
:root {
  --tcrf-toolbar-height: 3.5rem;
  --tcrf-edge-space: 0.9rem;
  --tcrf-drawer-width: min(24rem, 92vw);
  --tcrf-sheet-width: min(22rem, 90vw);
  --tcrf-panel-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  --tcrf-toolbar-bg: rgba(255, 251, 241, 0.96);
  --tcrf-toolbar-border: #d9cfb0;
  --tcrf-accent: #7a1f16;
  --tcrf-safe-top: env(safe-area-inset-top);
  --tcrf-safe-right: env(safe-area-inset-right);
  --tcrf-safe-bottom: env(safe-area-inset-bottom);
  --tcrf-safe-left: env(safe-area-inset-left);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.tcrf-mobile-proxy #p-personal,
body.tcrf-mobile-proxy #ca-viewsource,
body.tcrf-mobile-proxy #ca-history,
body.tcrf-mobile-proxy .navbar a[href*="action=edit"] {
  display: none !important;
}

@media (min-width: 961px) {
  .tcrf-mobile-only {
    display: none !important;
  }
}

@media (max-width: 960px) {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--tcrf-toolbar-height) + var(--tcrf-safe-top) + 0.75rem);
  }

  body.tcrf-mobile-proxy {
    margin: 0;
    padding-bottom: var(--tcrf-safe-bottom);
    background:
      radial-gradient(circle at top, #fff7dd 0, #fff9ef 18rem, #f8f3e7 55rem);
  }

  body.tcrf-mobile-proxy.tcrf-modal-open {
    overflow: hidden;
  }

  #mw-page-base,
  #mw-head-base,
  .mw-jump-link,
  #jump-to-nav {
    display: none !important;
  }

  #tcrf-mobile-toolbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    min-height: var(--tcrf-toolbar-height);
    padding:
      calc(0.55rem + var(--tcrf-safe-top))
      max(var(--tcrf-edge-space), var(--tcrf-safe-right))
      0.55rem
      max(var(--tcrf-edge-space), var(--tcrf-safe-left));
    background: var(--tcrf-toolbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tcrf-toolbar-border);
  }

  .tcrf-mobile-actions {
    display: flex;
    min-width: 0;
    gap: 0.42rem;
    align-items: center;
  }

  .tcrf-mobile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    appearance: none;
    border: 1px solid #c8be9c;
    background: #fffef8;
    border-radius: 999px;
    min-height: 2.5rem;
    padding: 0.48rem 0.45rem;
    color: #2e2715;
    font: 700 0.82rem/1 system-ui, sans-serif;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    text-align: center;
    touch-action: manipulation;
  }

  .tcrf-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.15rem;
    min-width: 3.15rem;
    text-decoration: none;
    touch-action: manipulation;
  }

  .tcrf-mobile-brand-mark {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.14rem;
    width: 2.85rem;
    aspect-ratio: 1;
    padding: 0.34rem;
    border-radius: 1rem;
    border: 1px solid #bda977;
    background:
      linear-gradient(180deg, rgba(255, 251, 239, 0.98) 0%, rgba(245, 234, 198, 0.94) 100%);
    box-shadow:
      0 10px 20px rgba(81, 47, 18, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.78);
  }

  .tcrf-mobile-brand-mark::before {
    content: "";
    position: absolute;
    inset: 0.27rem;
    border-radius: 0.74rem;
    background:
      linear-gradient(155deg, #692018 0%, #3f0f10 100%);
  }

  .tcrf-mobile-brand-mark > span {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    border-radius: 0.35rem;
    background: rgba(255, 231, 176, 0.08);
    color: #ffe0a0;
    font: 800 0.67rem/1.05 system-ui, sans-serif;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.38);
  }

  .tcrf-mobile-brand:focus-visible .tcrf-mobile-brand-mark,
  .tcrf-mobile-brand:hover .tcrf-mobile-brand-mark {
    transform: translateY(-1px);
    box-shadow:
      0 12px 22px rgba(81, 47, 18, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.84);
  }

  #tcrf-mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 1000;
    border: 0;
    background: rgba(20, 18, 12, 0.42);
    padding: 0;
    margin: 0;
  }

  #tcrf-mobile-scrim[hidden] {
    display: none !important;
  }

  #content.mw-body,
  #footer {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    border: 0 !important;
  }

  #content.mw-body {
    background: transparent !important;
    padding:
      0
      max(var(--tcrf-edge-space), var(--tcrf-safe-right))
      calc(1rem + var(--tcrf-safe-bottom))
      max(var(--tcrf-edge-space), var(--tcrf-safe-left)) !important;
  }

  #bodyContent,
  .mw-body-content {
    font-size: 16px;
    line-height: 1.6;
  }

  #siteNotice,
  .mw-indicators,
  #bodyContent > #siteSub,
  #contentSub {
    margin-inline: 0 !important;
  }

  #firstHeading {
    margin: 0.55rem 0 0.8rem !important;
    padding: 0;
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    line-height: 1.08;
  }

  #mw-content-text [id] {
    scroll-margin-top: calc(var(--tcrf-toolbar-height) + var(--tcrf-safe-top) + 0.85rem);
  }

  #mw-content-text > .mw-parser-output > table,
  table.wikitable,
  table.navbox,
  table.breakout,
  table.msgbox,
  table[class*="wikitable"],
  table[class*="navbox"] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0 !important;
    box-sizing: border-box;
  }

  table.breakout {
    float: none !important;
    margin-left: 0 !important;
  }

  table.breakout > tbody,
  table.breakout > tbody > tr,
  table.breakout > tbody > tr > td,
  table.breakout > tbody > tr > th {
    display: block;
    width: auto !important;
    box-sizing: border-box;
  }

  table.breakout > tbody > tr > td,
  table.breakout > tbody > tr > th {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  table.breakout .breakouttitle th {
    text-align: center !important;
    padding-top: 0.5rem !important;
  }

  table.msgbox > tbody > tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
  }

  table.msgbox .msgboximg {
    width: 2.75rem !important;
    min-width: 2.75rem !important;
  }

  table.msgbox .msgboximg,
  table.msgbox .msgboximg .center,
  table.msgbox .msgboximg .floatnone {
    display: block !important;
    width: 2.75rem !important;
    min-width: 2.75rem !important;
    max-width: 2.75rem !important;
  }

  table.msgbox .msgboximg img {
    display: block;
    width: 2rem !important;
    max-width: 2rem !important;
    height: auto !important;
    margin: 0.1rem auto 0;
  }

  .thumb,
  .tright,
  .tleft,
  .floatright,
  .floatleft {
    float: none !important;
    margin: 1rem auto !important;
    max-width: 100% !important;
  }

  img,
  video,
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 15rem;
    margin: 1rem 0 !important;
  }

  iframe[src*="youtube.com"],
  iframe[src*="youtu.be"] {
    aspect-ratio: 16 / 9;
    min-height: auto;
    height: auto !important;
  }

  pre,
  code,
  .mw-code,
  .mw-highlight {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    box-sizing: border-box;
  }

  pre {
    padding: 0.9rem;
    border-radius: 0.8rem;
    background: #f5efe1;
  }

  table.wikitable > tbody,
  table[class*="wikitable"] > tbody {
    display: table;
    width: 100%;
    min-width: max-content;
  }

  table.wikitable th,
  table.wikitable td,
  table[class*="wikitable"] th,
  table[class*="wikitable"] td {
    min-width: 6.5rem;
    padding: 0.45rem 0.6rem;
    vertical-align: top;
  }

  table.wikitable tr > :first-child,
  table[class*="wikitable"] tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff9e8;
    box-shadow: 1px 0 0 rgba(179, 165, 122, 0.55);
  }

  table.wikitable tr:first-child > :first-child,
  table[class*="wikitable"] tr:first-child > :first-child {
    z-index: 2;
  }

  table.navbox {
    border-collapse: separate;
    border-spacing: 0;
    background: #fffdf7;
  }

  table.navbox > tbody {
    display: block;
    min-width: 100%;
  }

  table.navbox > tbody > tr {
    display: grid;
    grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr);
    gap: 0.6rem 0.85rem;
    align-items: start;
    padding: 0.75rem 0.8rem;
    border-top: 1px solid #e4ddc5;
  }

  table.navbox > tbody > tr:first-child {
    grid-template-columns: minmax(0, 1fr);
    border-top: 0;
  }

  table.navbox > tbody > tr > th,
  table.navbox > tbody > tr > td {
    display: block;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
  }

  table.navbox > tbody > tr > th[colspan],
  table.navbox > tbody > tr > td[colspan] {
    grid-column: 1 / -1;
  }

  table.navbox .navboxgroup,
  table.navbox .navboxhead,
  table.navbox .navboxtitle {
    font-weight: 700;
  }

  table.navbox a {
    overflow-wrap: anywhere;
  }

  .mw-category-generated .mw-category {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .mw-category-generated .mw-category-group {
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid #e2d9bb;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.82);
    break-inside: avoid;
  }

  .mw-category-generated .mw-category-group h3 {
    margin-top: 0;
    margin-bottom: 0.55rem;
  }

  .mw-category-generated .mw-category-group ul {
    margin: 0;
    padding-left: 1.15rem;
  }

  #catlinks {
    margin-top: 1.2rem;
    padding: 0.8rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.8);
  }

  #catlinks ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-left: 0;
    list-style: none;
  }

  #catlinks li {
    margin: 0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f3ecda;
  }

  #tcrf-mobile-nav-panel[hidden],
  #tcrf-mobile-search-panel[hidden],
  #tcrf-mobile-toc-panel[hidden] {
    display: none !important;
  }

  body.tcrf-mobile-mounted #mw-navigation,
  body.tcrf-mobile-mounted #toc {
    display: none !important;
  }

  .tcrf-mobile-panel-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    max-height: inherit;
    border: 1px solid #d7cfb1;
    border-radius: 1.1rem;
    background: #fffdf7;
    box-shadow: var(--tcrf-panel-shadow);
    overflow: hidden;
  }

  .tcrf-mobile-panel-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #fff9eb 0%, #f8f0d9 100%);
    border-bottom: 1px solid #e4d8b4;
  }

  .tcrf-mobile-panel-title {
    margin: 0;
    color: #463417;
    font: 700 1.02rem/1.2 Georgia, serif;
  }

  .tcrf-mobile-panel-body {
    min-height: 0;
    padding: 0.9rem 0.95rem 1rem;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .tcrf-mobile-panel-copy {
    margin: 0 0 0.8rem;
    color: #62502d;
    font-size: 0.93rem;
  }

  #tcrf-mobile-nav-panel,
  #tcrf-mobile-search-panel,
  #tcrf-mobile-toc-panel {
    position: fixed;
    display: flex;
    top: calc(var(--tcrf-toolbar-height) + var(--tcrf-safe-top) + 0.4rem);
    max-width: calc(100vw - max(var(--tcrf-edge-space), var(--tcrf-safe-left)) - max(var(--tcrf-edge-space), var(--tcrf-safe-right)));
    max-height: calc(100svh - var(--tcrf-toolbar-height) - var(--tcrf-safe-top) - 1rem);
    max-height: calc(100dvh - var(--tcrf-toolbar-height) - var(--tcrf-safe-top) - 1rem);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.18s ease-out,
      opacity 0.18s ease-out;
  }

  #tcrf-mobile-nav-panel {
    left: max(var(--tcrf-edge-space), var(--tcrf-safe-left));
    z-index: 1260;
    width: var(--tcrf-drawer-width);
    transform: translateX(calc(-100% - 1rem));
  }

  #tcrf-mobile-search-panel {
    left: max(var(--tcrf-edge-space), var(--tcrf-safe-left));
    right: max(var(--tcrf-edge-space), var(--tcrf-safe-right));
    z-index: 1270;
    transform: translateY(-1rem);
  }

  #tcrf-mobile-toc-panel {
    right: max(var(--tcrf-edge-space), var(--tcrf-safe-right));
    z-index: 1280;
    width: var(--tcrf-sheet-width);
    transform: translateX(calc(100% + 1rem));
  }

  body.tcrf-mobile-proxy.tcrf-nav-open #tcrf-mobile-nav-panel,
  body.tcrf-mobile-proxy.tcrf-search-open #tcrf-mobile-search-panel,
  body.tcrf-mobile-proxy.tcrf-toc-open #tcrf-mobile-toc-panel {
    opacity: 1;
    pointer-events: auto;
  }

  body.tcrf-mobile-proxy.tcrf-nav-open #tcrf-mobile-nav-panel {
    transform: translateX(0);
  }

  body.tcrf-mobile-proxy.tcrf-search-open #tcrf-mobile-search-panel {
    transform: translateY(0);
  }

  body.tcrf-mobile-proxy.tcrf-toc-open #tcrf-mobile-toc-panel {
    transform: translateX(0);
  }

  .tcrf-mobile-nav-logo {
    margin-bottom: 0.2rem;
  }

  .tcrf-mobile-nav-logo .mw-wiki-logo {
    display: block;
    width: min(12rem, 100%);
    height: 4.7rem;
    background-position: left center;
    background-repeat: no-repeat;
    background-size: contain;
  }

  .tcrf-mobile-nav-group {
    margin-top: 0.95rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid #e1d7b7;
    border-radius: 1rem;
    background: rgba(248, 241, 220, 0.58);
  }

  .tcrf-mobile-nav-group:first-child {
    margin-top: 0;
  }

  .tcrf-mobile-nav-title {
    margin: 0 0 0.7rem;
    color: #594321;
    font: 700 0.96rem/1.25 system-ui, sans-serif;
  }

  .tcrf-mobile-nav-section + .tcrf-mobile-nav-section {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e7dec4;
  }

  .tcrf-mobile-nav-subtitle {
    margin: 0 0 0.45rem;
    color: #7f6941;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .tcrf-mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }

  .tcrf-mobile-nav-group .portal,
  .tcrf-mobile-nav-group .vectorTabs,
  .tcrf-mobile-nav-group .vectorMenu {
    float: none !important;
    position: static !important;
    width: auto !important;
    margin: 0 !important;
    left: auto !important;
    right: auto !important;
  }

  .tcrf-mobile-nav-group .portal + .portal,
  .tcrf-mobile-nav-group .vectorTabs + .vectorTabs,
  .tcrf-mobile-nav-group .vectorTabs + .vectorMenu,
  .tcrf-mobile-nav-group .vectorMenu + .vectorTabs,
  .tcrf-mobile-nav-group .vectorMenu + .vectorMenu {
    margin-top: 0.8rem !important;
    padding-top: 0.8rem;
    border-top: 1px solid #e7dec4;
  }

  .tcrf-mobile-nav-group > .portal > h3 {
    display: none !important;
  }

  .tcrf-mobile-nav-group .vectorTabs > h3,
  .tcrf-mobile-nav-group .vectorMenu > h3 {
    margin: 0 0 0.45rem;
    color: #7f6941;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .tcrf-mobile-nav-group ul {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
    padding-left: 0;
    list-style: none;
  }

  .tcrf-mobile-nav-group li {
    margin: 0 !important;
  }

  .tcrf-mobile-nav-group .vectorTabs li,
  .tcrf-mobile-nav-group .vectorMenu li,
  .tcrf-mobile-nav-group .portal li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
  }

  .tcrf-mobile-nav-group .vectorTabs ul,
  .tcrf-mobile-nav-group .vectorMenu ul {
    display: block !important;
    width: 100% !important;
  }

  .tcrf-mobile-nav-group .vectorTabs li > span,
  .tcrf-mobile-nav-group .vectorMenu li > span {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .tcrf-mobile-nav-group .vectorTabs li > span > a,
  .tcrf-mobile-nav-group .vectorMenu li > span > a,
  .tcrf-mobile-nav-group .vectorTabs li > a,
  .tcrf-mobile-nav-group .vectorMenu li > a {
    display: block !important;
    float: none !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .tcrf-mobile-nav-group a {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 0.8rem;
    background: #f6f0de;
    color: #2f2717;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  #tcrf-mobile-search-form {
    margin: 0;
  }

  .tcrf-mobile-search-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: stretch;
  }

  .tcrf-mobile-search-fields input[type="search"] {
    grid-column: 1 / -1;
  }

  .tcrf-mobile-search-fields .tcrf-mobile-search-submit:only-of-type {
    grid-column: 1 / -1;
  }

  .tcrf-mobile-search-fields input[type="hidden"] {
    display: none !important;
  }

  #tcrf-mobile-search-input {
    width: 100% !important;
    min-height: 2.85rem;
    box-sizing: border-box;
    padding: 0.75rem 0.9rem;
    border: 1px solid #cfc7a8;
    border-radius: 0.85rem;
    background: #fffefb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  .tcrf-mobile-search-submit {
    display: block !important;
    width: 100% !important;
    min-height: 2.75rem;
    box-sizing: border-box;
    padding: 0.65rem 0.9rem;
    border: 1px solid #ccb98a;
    border-radius: 0.85rem;
    background: #f6e8be;
    color: #33270d;
    font: 600 0.92rem/1.2 system-ui, sans-serif;
    text-align: center;
    white-space: normal;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #tcrf-mobile-search-form input[type="submit"],
  #tcrf-mobile-search-form .mw-fallbackSearchButton {
    float: none !important;
    clear: none !important;
  }

  .tcrf-mobile-search-submit[name="go"] {
    background: #fff4c9;
  }

  #tcrf-mobile-toc {
    position: static;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #tcrf-mobile-toc .toctitle {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0 0 0.8rem;
  }

  #tcrf-mobile-toc ul {
    margin: 0;
    padding-left: 1.15rem;
  }

  #tcrf-mobile-toc li {
    margin: 0.18rem 0;
  }

  #tcrf-mobile-toc a {
    display: block;
    padding: 0.18rem 0;
    overflow-wrap: anywhere;
  }

  .navbox .navbar {
    float: none !important;
    width: auto !important;
    margin-bottom: 0.5rem;
  }

  .tcrf-toc-controls,
  .tcrf-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .tcrf-toc-controls {
    margin-top: 0.5rem;
  }

  .tcrf-inline-toggle {
    appearance: none;
    border: 1px solid #cdbf95;
    background: #fff9e7;
    color: #433519;
    border-radius: 999px;
    padding: 0.32rem 0.72rem;
    font: 600 0.8rem/1.2 system-ui, sans-serif;
    touch-action: manipulation;
  }

  .tcrf-enhanced-toc li.tcrf-toc-group > ul[hidden] {
    display: none !important;
  }

  .tcrf-enhanced-toc li.tcrf-toc-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.45rem;
  }

  .tcrf-enhanced-toc li.tcrf-toc-group > ul {
    grid-column: 1 / -1;
    margin-top: 0.15rem;
  }

  .tcrf-enhanced-toc li > a {
    min-width: 0;
  }

  .tcrf-collapsible-card {
    margin: 1rem 0;
    border: 1px solid #dfd5b4;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
  }

  .tcrf-collapsible-header {
    padding: 0.7rem 0.85rem;
    background: rgba(248, 240, 217, 0.9);
    border-bottom: 1px solid #e3d6ae;
  }

  .tcrf-collapsible-label {
    font-weight: 700;
    line-height: 1.3;
    color: #47361c;
  }

  .tcrf-collapsible-body {
    position: relative;
    max-height: 17rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tcrf-collapsible-body > table {
    margin: 0 !important;
    border-radius: 0 !important;
  }

  body.page-The_Cutting_Room_Floor #mw-content-text > .mw-parser-output > div[style*="float: left"],
  body.page-The_Cutting_Room_Floor #mw-content-text > .mw-parser-output > div[style*="float: right"],
  body.page-The_Cutting_Room_Floor #mw-content-text > .mw-parser-output > div[style*="width: 45%"],
  body.page-The_Cutting_Room_Floor #mw-content-text > .mw-parser-output > div[style*="width: 98.2%"] {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1rem 0 !important;
    padding: 0.85rem 0.95rem 1rem !important;
    box-sizing: border-box;
  }

  body.page-The_Cutting_Room_Floor #mw-content-text > .mw-parser-output > div#featured-area,
  body.page-The_Cutting_Room_Floor #mw-content-text > .mw-parser-output > div#dyk-area,
  body.page-The_Cutting_Room_Floor #mw-content-text > .mw-parser-output > div#contrib-area {
    border-radius: 1rem;
  }

  body.page-The_Cutting_Room_Floor #featured-area h3 .mw-headline > div,
  body.page-The_Cutting_Room_Floor #featured-area h3 > div {
    float: none !important;
    width: auto !important;
    text-align: left !important;
  }

  .tcrf-collapsible-card.is-expanded .tcrf-collapsible-body {
    max-height: none;
  }

  .tcrf-collapsible-card:not(.is-expanded) .tcrf-collapsible-body::after {
    content: "";
    position: sticky;
    left: 0;
    bottom: 0;
    display: block;
    width: 100%;
    height: 3.2rem;
    margin-top: -3.2rem;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 253, 247, 0), rgba(255, 253, 247, 0.96));
  }

  html.tcrf-dark-mode body.tcrf-mobile-proxy {
    background:
      radial-gradient(circle at top, #11151b 0, #06080b 18rem, #000000 58rem);
  }

  html.tcrf-dark-mode #tcrf-mobile-toolbar {
    background: rgba(7, 9, 12, 0.94);
    border-bottom-color: #2f3742;
  }

  html.tcrf-dark-mode .tcrf-mobile-button {
    border-color: #4b5666;
    background: #11151c;
    color: #f5f7fa;
  }

  html.tcrf-dark-mode .tcrf-mobile-brand-mark {
    border-color: #5e6a7c;
    background:
      linear-gradient(180deg, rgba(31, 38, 49, 0.96) 0%, rgba(13, 17, 23, 0.98) 100%);
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.36),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  html.tcrf-dark-mode .tcrf-mobile-brand-mark::before {
    background:
      linear-gradient(155deg, #a33525 0%, #5b1615 100%);
  }

  html.tcrf-dark-mode .tcrf-mobile-brand-mark > span {
    background: rgba(255, 227, 160, 0.07);
    color: #ffd27d;
  }

  html.tcrf-dark-mode .tcrf-mobile-brand:focus-visible .tcrf-mobile-brand-mark,
  html.tcrf-dark-mode .tcrf-mobile-brand:hover .tcrf-mobile-brand-mark {
    box-shadow:
      0 16px 30px rgba(0, 0, 0, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.11);
  }

  html.tcrf-dark-mode [data-tcrf-theme-toggle] {
    background: #1d2430;
    border-color: #5e6a7c;
    color: #ffe4a8;
  }

  html.tcrf-dark-mode #tcrf-mobile-scrim {
    background: rgba(6, 8, 12, 0.72);
  }

  html.tcrf-dark-mode #content.mw-body {
    background: #000000 !important;
    border: 1px solid #20242c !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45) !important;
    border-radius: 1rem;
    color: #f5f7fa !important;
  }

  html.tcrf-dark-mode #footer,
  html.tcrf-dark-mode #catlinks,
  html.tcrf-dark-mode .mw-category-generated .mw-category-group {
    background: #06080b !important;
    border: 1px solid #20242c !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38) !important;
    color: #f5f7fa !important;
  }

  html.tcrf-dark-mode #bodyContent,
  html.tcrf-dark-mode .mw-body-content,
  html.tcrf-dark-mode #mw-content-text,
  html.tcrf-dark-mode #mw-content-text p,
  html.tcrf-dark-mode #mw-content-text li,
  html.tcrf-dark-mode #mw-content-text dt,
  html.tcrf-dark-mode #mw-content-text dd,
  html.tcrf-dark-mode #mw-content-text th,
  html.tcrf-dark-mode #mw-content-text td,
  html.tcrf-dark-mode #mw-content-text caption,
  html.tcrf-dark-mode #firstHeading,
  html.tcrf-dark-mode #siteSub,
  html.tcrf-dark-mode #contentSub,
  html.tcrf-dark-mode #catlinks,
  html.tcrf-dark-mode #footer,
  html.tcrf-dark-mode #footer li {
    color: #f5f7fa !important;
  }

  html.tcrf-dark-mode #mw-content-text h1,
  html.tcrf-dark-mode #mw-content-text h2,
  html.tcrf-dark-mode #mw-content-text h3,
  html.tcrf-dark-mode #mw-content-text h4,
  html.tcrf-dark-mode #mw-content-text h5,
  html.tcrf-dark-mode #mw-content-text h6,
  html.tcrf-dark-mode #firstHeading {
    color: #ffffff !important;
    border-color: #2f3742 !important;
  }

  html.tcrf-dark-mode #mw-content-text a,
  html.tcrf-dark-mode #catlinks a,
  html.tcrf-dark-mode #footer a,
  html.tcrf-dark-mode .mw-category-generated a {
    color: #8ab4f8 !important;
  }

  html.tcrf-dark-mode #mw-content-text a:visited,
  html.tcrf-dark-mode #catlinks a:visited,
  html.tcrf-dark-mode #footer a:visited,
  html.tcrf-dark-mode .mw-category-generated a:visited {
    color: #c58af9 !important;
  }

  html.tcrf-dark-mode #mw-content-text a.new,
  html.tcrf-dark-mode #mw-content-text a.new:visited {
    color: #ff9b9b !important;
  }

  html.tcrf-dark-mode #mw-content-text table,
  html.tcrf-dark-mode #mw-content-text table.wikitable,
  html.tcrf-dark-mode #mw-content-text table.navbox,
  html.tcrf-dark-mode #mw-content-text table.breakout,
  html.tcrf-dark-mode #mw-content-text table.msgbox,
  html.tcrf-dark-mode #mw-content-text table[class*="wikitable"],
  html.tcrf-dark-mode #mw-content-text table[class*="navbox"],
  html.tcrf-dark-mode #mw-content-text .thumbinner,
  html.tcrf-dark-mode #mw-content-text pre,
  html.tcrf-dark-mode #mw-content-text .mw-highlight,
  html.tcrf-dark-mode #mw-content-text code,
  html.tcrf-dark-mode .tcrf-collapsible-card,
  html.tcrf-dark-mode .tcrf-collapsible-header {
    background: #11151c !important;
    border-color: #2f3742 !important;
    color: #f5f7fa !important;
  }

  html.tcrf-dark-mode table.wikitable tr > :first-child,
  html.tcrf-dark-mode table[class*="wikitable"] tr > :first-child {
    background: #11151c !important;
    box-shadow: 1px 0 0 #2f3742 !important;
  }

  html.tcrf-dark-mode table.navbox > tbody > tr {
    border-top-color: #2f3742;
  }

  html.tcrf-dark-mode table.breakout > tbody > tr {
    background: transparent !important;
  }

  html.tcrf-dark-mode table.breakout .breakouttitle {
    background: #182129 !important;
    border-top: 1px solid #2f3742 !important;
    border-bottom: 1px solid #2f3742 !important;
  }

  html.tcrf-dark-mode table.breakout .breakouttitle > th {
    color: #ffffff !important;
  }

  html.tcrf-dark-mode #catlinks li {
    background: #161b23;
  }

  html.tcrf-dark-mode .mw-pt-languages {
    background: #11151c !important;
    border-color: #2f3742 !important;
    color: #f5f7fa !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32) !important;
  }

  html.tcrf-dark-mode .mw-pt-languages-label {
    background: #1b212b !important;
    border-bottom: 1px solid #2f3742 !important;
    color: #ffffff !important;
  }

  html.tcrf-dark-mode .mw-pt-languages-list,
  html.tcrf-dark-mode .mw-pt-languages-list.autonym,
  html.tcrf-dark-mode .mw-pt-languages-ui,
  html.tcrf-dark-mode .mw-pt-languages-selected {
    color: #f5f7fa !important;
  }

  html.tcrf-dark-mode .mw-pt-languages a {
    color: #8ab4f8 !important;
  }

  html.tcrf-dark-mode .mw-pt-languages a:visited {
    color: #c58af9 !important;
  }

  html.tcrf-dark-mode .tcrf-collapsible-label {
    color: #f5f7fa;
  }

  html.tcrf-dark-mode .tcrf-collapsible-card:not(.is-expanded) .tcrf-collapsible-body::after {
    background: linear-gradient(to bottom, rgba(17, 21, 28, 0), rgba(17, 21, 28, 0.98));
  }

  html.tcrf-dark-mode img,
  html.tcrf-dark-mode video,
  html.tcrf-dark-mode canvas,
  html.tcrf-dark-mode svg {
    filter: none !important;
  }

  html.tcrf-dark-mode .tcrf-dark-inline-surface {
    background: #11151c !important;
    border-color: #2f3742 !important;
    box-shadow: none !important;
    color: #f5f7fa !important;
  }

  html.tcrf-dark-mode .tcrf-dark-inline-surface,
  html.tcrf-dark-mode .tcrf-dark-inline-surface p,
  html.tcrf-dark-mode .tcrf-dark-inline-surface li,
  html.tcrf-dark-mode .tcrf-dark-inline-surface dt,
  html.tcrf-dark-mode .tcrf-dark-inline-surface dd,
  html.tcrf-dark-mode .tcrf-dark-inline-surface th,
  html.tcrf-dark-mode .tcrf-dark-inline-surface td,
  html.tcrf-dark-mode .tcrf-dark-inline-surface span,
  html.tcrf-dark-mode .tcrf-dark-inline-surface div,
  html.tcrf-dark-mode .tcrf-dark-inline-surface b,
  html.tcrf-dark-mode .tcrf-dark-inline-surface strong,
  html.tcrf-dark-mode .tcrf-dark-inline-surface i,
  html.tcrf-dark-mode .tcrf-dark-inline-surface em {
    color: #f5f7fa !important;
  }

  html.tcrf-dark-mode .tcrf-dark-inline-surface h1,
  html.tcrf-dark-mode .tcrf-dark-inline-surface h2,
  html.tcrf-dark-mode .tcrf-dark-inline-surface h3,
  html.tcrf-dark-mode .tcrf-dark-inline-surface h4,
  html.tcrf-dark-mode .tcrf-dark-inline-surface h5,
  html.tcrf-dark-mode .tcrf-dark-inline-surface h6 {
    color: #ffffff !important;
    border-color: #2f3742 !important;
  }

  html.tcrf-dark-mode .tcrf-dark-inline-surface a:not(.image),
  html.tcrf-dark-mode .tcrf-dark-inline-surface a.extiw,
  html.tcrf-dark-mode .tcrf-dark-inline-surface a.external {
    color: #8ab4f8 !important;
  }

  html.tcrf-dark-mode .tcrf-dark-inline-surface a:not(.image):visited,
  html.tcrf-dark-mode .tcrf-dark-inline-surface a.extiw:visited,
  html.tcrf-dark-mode .tcrf-dark-inline-surface a.external:visited {
    color: #c58af9 !important;
  }

  html.tcrf-dark-mode .tcrf-dark-inline-surface a.new,
  html.tcrf-dark-mode .tcrf-dark-inline-surface a.new:visited {
    color: #ff9b9b !important;
  }

  html.tcrf-dark-mode .tcrf-mobile-panel-shell {
    background: #161b23;
    border-color: #434b58;
    color: #f5f7fa;
  }

  html.tcrf-dark-mode .tcrf-mobile-panel-header {
    background: linear-gradient(180deg, #232a36 0%, #1b212b 100%);
    border-bottom-color: #3c4450;
  }

  html.tcrf-dark-mode .tcrf-mobile-panel-title,
  html.tcrf-dark-mode .tcrf-mobile-panel-copy,
  html.tcrf-dark-mode .tcrf-mobile-nav-title,
  html.tcrf-dark-mode .tcrf-mobile-nav-subtitle {
    color: #f5f7fa;
  }

  html.tcrf-dark-mode .tcrf-mobile-nav-group {
    background: rgba(255, 255, 255, 0.04);
    border-color: #353d49;
  }

  html.tcrf-dark-mode .tcrf-mobile-nav-section + .tcrf-mobile-nav-section {
    border-top-color: #353d49;
  }

  html.tcrf-dark-mode .tcrf-mobile-nav-group a {
    background: #232b37;
    color: #f5f7fa;
  }

  html.tcrf-dark-mode #tcrf-mobile-search-input {
    background: #10151c;
    border-color: #5d6674;
    color: #f5f7fa;
  }

  html.tcrf-dark-mode #tcrf-mobile-search-input::placeholder {
    color: #98a2b0;
  }

  html.tcrf-dark-mode .tcrf-mobile-search-submit,
  html.tcrf-dark-mode .tcrf-inline-toggle {
    background: #293240;
    border-color: #677281;
    color: #f5f7fa;
  }

  html.tcrf-dark-mode #tcrf-mobile-toc,
  html.tcrf-dark-mode #tcrf-mobile-toc a {
    color: #d5e4ff;
  }

  #footer {
    padding:
      1rem
      max(var(--tcrf-edge-space), var(--tcrf-safe-right))
      calc(2rem + var(--tcrf-safe-bottom))
      max(var(--tcrf-edge-space), var(--tcrf-safe-left)) !important;
  }

  #footer-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-left: 0;
    list-style: none;
  }
}

@media (min-width: 640px) and (max-width: 960px) {
  .mw-category-generated .mw-category {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
