/* ============================================================================
   THE FACILITY WIKI — STYLES
   Fandom-style community wiki layout: black page, banner community header
   with dropdown tabs, rounded dark-green content panel, right rail,
   mint accents and Rubik typography.
   ========================================================================== */

@font-face {
  font-family: 'AG Buch Condensed';
  src: url('../fonts/ag-buch-condensed.otf') format('opentype');
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* Palette (9 colours):
     #1d1928 night violet · #431f2b maroon · #463c47 plum · #3b4c5c slate blue · #625f58 warm grey
     #697c4e olive · #6896a6 dusty cyan · #ad9589 dusty rose · #d1c297 sand */
  --p-night:      #1d1928;
  --p-maroon:     #431f2b;
  --p-plum:       #463c47;
  --p-slate:      #3b4c5c;
  --p-grey:       #625f58;
  --p-olive:      #697c4e;
  --p-cyan:       #6896a6;
  --p-rose:       #ad9589;
  --p-sand:       #d1c297;

  /* Capsule art colours: #040e0c green-black ground · #7d220d rust frame ·
     #e8a41f title gold · #a41b16 title shadow red · #f49018 fire orange */
  --c-ground:     #040e0c;
  --c-rust:       #7d220d;
  --c-gold:       #e8a41f;
  --c-blood:      #a41b16;
  --c-fire:       #f49018;

  --body:         #070b0a;   /* capsule art ground */
  --page:         #15120f;   /* main content panel: warm charcoal */
  --page-2:       #3a2c24;   /* secondary surfaces: table headers, chips */
  --page-3:       #1d1915;   /* inset boxes inside the panel */
  --panel-deep:   #100e0c;   /* main page boxes */
  --tile:         #1c1814;
  --tile-border:  #3a2c22;
  --text:         #efe3c8;   /* warm cream */
  --text-2:       #cbb99b;
  --text-mix:     #8c7c68;
  --border:       #4a362a;
  --border-soft:  #2c221c;
  --link:         #f0a65a;   /* fire orange, softened for reading */
  --link-hover:   #ffd27a;
  --link-new:     #e07a6a;
  --accent:       #e8a41f;   /* title gold */
  --accent-ink:   #140d05;
  --accent-soft:  rgba(232,164,31,.42);
  --header-name:  #e8a41f;
  --sticky:       #0b0c0a;
  --alert:        #b52418;   /* title shadow red */
  --alert-soft:   #3a100b;
  --ok:           #8ea667;   /* olive from the palette */
  --menu-bg:      #1f1a15;
  --menu-hover:   #2e241c;

  --font:         'Rubik', helvetica, arial, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --font-display: 'AG Buch Condensed', 'Arial Narrow', sans-serif;

  --topbar-h:     48px;
  --container:    1260px;
  --rail-w:       300px;
  --radius:       12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 14px); }
body {
  margin: 0; background: var(--body); color: var(--text);
  font: 400 15px/1.6 var(--font); min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a.new { color: var(--link-new); }
a.external::after { content: '↗'; font-size: .75em; margin-left: .15em; opacity: .7; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font: .88em var(--font-mono); background: var(--page-3); padding: .1em .35em; border-radius: 3px; }
mark { background: rgba(232,164,31,.3); color: var(--text); padding: 0 .1em; border-radius: 2px; }
.muted { color: var(--text-mix); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--sticky); color: var(--text); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------------ Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--sticky); border-bottom: 1px solid var(--border-soft); }
.topbar-inner { height: var(--topbar-h); max-width: var(--container); margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; }
.topbar-brand { color: var(--text); font: 700 17px var(--font); white-space: nowrap; }
.topbar-brand span { color: var(--header-name); font-weight: 500; }
.topbar-brand:hover { color: var(--text); text-decoration: none; }
.searchbox { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.searchbox input {
  width: 100%; height: 34px; padding: 0 12px 0 36px; background: var(--page-3); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px; font: 400 15px var(--font);
}
.searchbox input::placeholder { color: var(--text-mix); }
.searchbox input:focus { outline: none; border-color: var(--link); background: #251e18; }
.search-icon { position: absolute; left: 11px; top: 8px; width: 18px; height: 18px; color: var(--text-2); pointer-events: none; }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; list-style: none; margin: 0; padding: 6px 0;
  background: var(--menu-bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6); max-height: 70vh; overflow-y: auto;
}
.suggest li a { display: flex; gap: 10px; align-items: center; padding: 7px 12px; color: var(--text); }
.suggest li a:hover, .suggest li.sel a { background: var(--menu-hover); text-decoration: none; }
.sugg-thumb { flex: 0 0 34px; height: 34px; background: var(--page-3); overflow: hidden; border-radius: 4px; }
.sugg-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sugg-noimg { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.05) 4px 5px); }
.sugg-text { display: flex; flex-direction: column; min-width: 0; }
.sugg-title { font-weight: 500; }
.sugg-meta { font-size: 12.5px; color: var(--text-mix); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg-all { border-top: 1px solid var(--border-soft); margin-top: 4px; }
.sugg-all a { font-size: 14px; color: var(--text-2) !important; }
.toplinks { display: flex; gap: 10px; align-items: center; }
.toplinks a { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .04em; padding: 7px 12px; border-radius: 4px; white-space: nowrap; }
.toplinks a:hover { text-decoration: none; }
.btn-outline { color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: rgba(232,164,31,.12); color: var(--accent); }
.btn-solid { color: var(--accent-ink); background: var(--accent); border: 1px solid var(--accent); }
.btn-solid:hover { background: #ffc24d; color: var(--p-night); }
.nav-toggle { display: none; width: 36px; height: 34px; background: none; border: 1px solid var(--border); border-radius: 4px; padding: 9px 8px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: var(--text); }

/* ------------------------------------------------------- Community header */
.main-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px 40px; flex: 1; }
.community-header {
  position: relative; margin: 0 -16px; padding: 30px 32px 0;
  background-color: #070b0a;
  background-image: linear-gradient(to bottom, rgba(0,0,0,0) 55%, var(--body)), url('../img/header-bg.jpg');
  background-size: cover; background-position: right center;
}
.ch-logo-img { display: block; height: 96px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.ch-top { display: flex; align-items: flex-end; gap: 20px; min-height: 86px; }
.ch-wordmark { color: var(--text); flex: 0 0 auto; }
.ch-wordmark:hover { text-decoration: none; color: var(--text); }
.ch-logo {
  display: block; font: 400 44px/.86 var(--font-display); text-transform: uppercase; letter-spacing: .04em;
  color: var(--text); text-shadow: 0 2px 10px rgba(0,0,0,.7), 0 0 18px rgba(232,164,31,.22);
}
.ch-name { color: var(--header-name); font: 500 20px var(--font); padding-bottom: 4px; }
.ch-name:hover { color: var(--header-name); }
.ch-count { margin-left: auto; text-align: right; line-height: 1; padding-bottom: 6px; }
.ch-count strong { display: block; font: 500 26px var(--font); color: var(--text); }
.ch-count span { font: 700 12px var(--font); text-transform: uppercase; color: var(--text); letter-spacing: .04em; }
.ch-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 14px 0 12px; }
.tn-tab { position: relative; }
.tn-label {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 6px 0; cursor: pointer;
  color: var(--text); font: 500 12.5px var(--font); text-transform: uppercase; letter-spacing: .02em;
}
.tn-label svg { width: 11px; height: 11px; transition: transform .15s; }
.tn-tab.open .tn-label svg, .tn-tab:hover .tn-label svg { transform: rotate(180deg); }
.tn-label:hover { color: var(--accent); }
.tn-menu {
  display: none; position: absolute; top: 100%; left: -12px; z-index: 60; min-width: 220px;
  background: var(--menu-bg); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 12px 28px rgba(0,0,0,.6); padding: 6px 0;
}
.tn-menu::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.tn-tab:hover .tn-menu, .tn-tab.open .tn-menu, .tn-tab:focus-within .tn-menu { display: block; }
.tn-menu ul { list-style: none; margin: 0; padding: 0; }
.tn-menu a { display: block; padding: 7px 16px; color: var(--text); font-size: 14px; }
.tn-menu a:hover { background: var(--menu-hover); color: var(--accent); text-decoration: none; }
.tn-menu a.active { color: var(--accent); }

/* ------------------------------------------------------------------ Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 18px; align-items: start; margin-top: 2px; }
body.is-mainpage .layout { grid-template-columns: minmax(0, 1fr); }
body.is-mainpage .rail { display: none; }
.page-main { min-width: 0; background: var(--page); border-radius: var(--radius); padding: 24px 36px 32px; outline: none; }
.sidebar { display: none; }

/* ------------------------------------------------------------------ Right rail */
.rail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rail-module { background: var(--page); border-radius: var(--radius); padding: 18px 18px 16px; }
.rail-h { margin: 0 0 12px; font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.rail-about p { margin: 0 0 12px; font-size: 14px; color: var(--text-2); }
.rail-stats { display: flex; gap: 10px; margin-bottom: 12px; }
.rail-stats div { flex: 1; background: var(--page-3); border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 10px; text-align: center; }
.rail-stats strong { display: block; font: 500 22px/1.1 var(--font); color: var(--accent); }
.rail-stats span { font-size: 12px; color: var(--text-mix); text-transform: uppercase; letter-spacing: .04em; }
.rail-btn { display: block; text-align: center; background: var(--accent); color: var(--accent-ink); font: 700 12.5px var(--font); text-transform: uppercase; padding: 9px; border-radius: 4px; }
.rail-btn:hover { background: #ffc24d; color: var(--p-night); text-decoration: none; }
.rail-chars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rail-chars a { display: block; color: var(--text); font-size: 12px; text-align: center; }
.rail-chars a:hover { text-decoration: none; color: var(--accent); }
.rc-img { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 6px; background: var(--page-3); border: 1px solid var(--border-soft); margin-bottom: 4px; }
.rc-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.rc-img .img-placeholder { height: 100%; aspect-ratio: auto; border: 0; }
.rc-img .img-placeholder span { display: none; }
.rc-name { display: block; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.rail-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.rail-list li:last-child { border-bottom: 0; }
.rail-list span { color: var(--text-mix); font-size: 12px; white-space: nowrap; }

/* ------------------------------------------------------------------ Content */
.loading { padding: 60px 0; text-align: center; color: var(--text-mix); }
.loading-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 8px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.breadcrumb { font-size: 13px; color: var(--text-mix); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 2px 0; align-items: center; }
.breadcrumb a { color: var(--link); }
.breadcrumb .sep { margin: 0 7px; color: var(--text-mix); }
.breadcrumb [aria-current] { color: var(--text-2); }

.article { position: relative; }
.article-head { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.page-cats { font-size: 13.5px; color: var(--text); margin-bottom: 2px; }
.page-cats > span { font-weight: 700; }
.file-strip { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-mix); margin-bottom: 4px; }
.page-title { font: 300 36px/1.2 var(--font); margin: 0; color: var(--text); }
.title-ns { color: var(--text-mix); }
.page-subtitle { margin-top: 4px; color: var(--text-mix); font-style: italic; }

/* Notices (spoiler / stub) */
.notice {
  display: flex; gap: 14px; align-items: center; border: 2px solid var(--border); border-radius: 8px;
  background: var(--page-3); padding: 12px 16px; margin: 0 0 20px; font-size: 14.5px; line-height: 1.5;
}
.notice-stamp {
  flex: 0 0 auto; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 9px; border-radius: 4px; color: var(--text); background: var(--border);
}
.notice-spoiler { border-color: var(--alert); background: var(--alert-soft); }
.notice-spoiler .notice-stamp { background: var(--alert); }
.notice-spoiler .notice-stamp::before { content: '⚠ '; }
.notice-stub .notice-stamp { background: var(--p-grey); }

/* Body + infobox (portable infobox look) */
.article-body::after { content: ''; display: block; clear: both; }
.infobox {
  float: right; width: 280px; margin: 0 0 18px 24px; background: var(--page);
  border: 1px solid var(--accent-soft); border-radius: 3px; font-size: 13px; line-height: 1.45; overflow: hidden;
}
.infobox-title { background: var(--accent); color: var(--accent-ink); text-align: center; font: 700 18px/1.3 var(--font); padding: 12px 9px; }
.infobox-image { margin: 0; padding: 10px 10px 8px; text-align: center; background: var(--page); }
.infobox-image img { margin: 0 auto; max-height: 400px; width: auto; object-fit: contain; border-radius: 2px; }
.infobox-image a { display: block; }
.infobox-image figcaption { font-size: 12px; color: var(--text-mix); text-align: center; margin-top: 6px; }
.infobox-section { background: var(--accent); color: var(--accent-ink); text-align: center; font: 700 14px var(--font); padding: 8px 9px; }
.infobox dl { margin: 0; }
.infobox-row { display: grid; grid-template-columns: 38% 62%; padding: 8px 9px; border-bottom: 1px solid var(--accent-soft); }
.infobox-row:last-child { border-bottom: 0; }
.infobox dt { font: 700 12.5px var(--font); color: var(--text); padding-right: 8px; }
.infobox dd { margin: 0; font-size: 13px; }

.img-placeholder {
  aspect-ratio: 3 / 4; width: 100%; display: flex; align-items: center; justify-content: center;
  background-color: var(--page-3); border-radius: 4px;
  background-image: repeating-linear-gradient(45deg, transparent 0 9px, rgba(255,255,255,.03) 9px 10px);
}
.img-placeholder span { font: 500 11px/1.5 var(--font); letter-spacing: .14em; text-align: center; color: var(--text-mix); border: 1px dashed var(--border); padding: 6px 10px; border-radius: 4px; }
.infobox .img-placeholder { aspect-ratio: auto; height: 180px; }

/* Prose */
.prose { font-size: 15px; color: var(--text); }
.prose > p:first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose h2 {
  font: 500 24px/1.3 var(--font); margin: 1.4em 0 .5em; padding-bottom: 4px; color: var(--text);
  border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 10px; overflow: hidden;
}
.prose h3 { font: 700 18px/1.35 var(--font); margin: 1.3em 0 .4em; color: var(--text); }
.prose h4 { font: 700 14px var(--font); margin: 1.1em 0 .35em; color: var(--text-2); }
.h-anchor { font-size: 15px; color: var(--text-mix); opacity: 0; transition: opacity .15s; }
h2:hover .h-anchor { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1em; }
.prose li { margin: .2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--border); color: var(--text-2); }
.wiki-quote { margin: 1.2em auto; max-width: 560px; padding: 12px 18px; text-align: center; border: 0; font: italic 400 17px/1.5 var(--font); color: var(--text); }
.wiki-quote::before { content: '“'; display: block; font: 700 40px/0.6 Georgia, serif; color: var(--accent); margin-bottom: 4px; }
.wiki-quote p { margin: 0; }
.wiki-quote cite { display: block; font: 400 13px var(--font); color: var(--text-mix); margin-top: 6px; font-style: normal; }

/* TOC */
.toc { display: inline-block; min-width: 220px; max-width: 100%; border: 1px solid var(--border); border-radius: 3px; margin: 6px 0 16px; font-size: 14px; }
.toc-head { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 500; }
.toc-toggle { background: none; border: 0; padding: 0; font: 400 12px var(--font); color: var(--link); cursor: pointer; }
.toc-toggle::before { content: '['; color: var(--text-mix); } .toc-toggle::after { content: ']'; color: var(--text-mix); }
.toc ol { list-style: none; margin: 0; padding: 10px 16px 12px 14px; }
.toc li { margin: 3px 0; }
.toc .toc-l3 { padding-left: 18px; }
.toc a { color: var(--link); }
.toc-num { color: var(--text-mix); margin-right: 4px; }
.toc.collapsed ol { display: none; }
.toc.collapsed .toc-head { border-bottom: 0; }

/* Callouts */
.callout { display: flex; gap: 12px; margin: 1em 0 1.2em; padding: 12px 16px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 6px; background: var(--page-3); font-size: 14.5px; line-height: 1.55; }
.callout-icon { flex: 0 0 24px; height: 24px; display: flex; align-items: center; justify-content: center; font: 700 13px var(--font); border-radius: 50%; color: var(--p-night); background: var(--text-mix); margin-top: 1px; }
.callout-body { min-width: 0; }
.callout-body p:last-child, .callout-body ul:last-child { margin-bottom: 0; }
.callout-title { font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.callout-unknown { border-left-color: #8f887c; }
.callout-unknown .callout-title { color: #b8b1a4; }
.callout-unknown .callout-icon { background: #8f887c; }
.callout-confirmed { border-left-color: var(--ok); }
.callout-confirmed .callout-title { color: var(--ok); }
.callout-confirmed .callout-icon { background: var(--ok); }
.callout-spoiler, .callout-warning { border-color: var(--alert); background: var(--alert-soft); }
.callout-spoiler .callout-title, .callout-warning .callout-title { color: #ff7a5c; }
.callout-spoiler .callout-icon, .callout-warning .callout-icon { background: var(--alert); color: var(--text); }
.callout-note { border-left-color: var(--link); }
.callout-note .callout-title { color: var(--link); }
.callout-note .callout-icon { background: var(--link); }
.callout-source { border-left-color: var(--p-sand); }
.callout-source .callout-title { color: var(--p-sand); }
.callout-source .callout-icon { background: var(--p-sand); }
.callout-dev { border-left-color: var(--link); }
.callout-dev .callout-title { color: var(--link); }
.callout-dev .callout-icon { background: var(--link); }

.missing { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin: .4em 0 1.2em; font-size: 14px; color: var(--text-mix); border: 1px dashed var(--border); border-radius: 6px; }
.missing-stamp { font: 700 11px var(--font); letter-spacing: .08em; color: var(--text-2); background: var(--page-2); padding: 2px 8px; border-radius: 3px; }

/* Tags */
.tag { display: inline-block; font: 700 11px/1.7 var(--font); text-transform: uppercase; letter-spacing: .04em; padding: 0 7px; border-radius: 3px; vertical-align: 1px; white-space: nowrap; }
.tag-unknown { color: var(--text); background: var(--p-plum); }
.tag-confirmed { color: var(--p-night); background: var(--ok); }
.tag-tba { color: var(--text-2); border: 1px dashed var(--border); }
.tag-new { color: var(--p-night); background: var(--accent); }

.redacted { background: #050605; color: transparent; padding: 0 .35em; user-select: none; border-radius: 2px; }
.spoiler-inline { background: #050605; box-shadow: 0 0 0 1px var(--border); color: transparent; cursor: pointer; border-radius: 3px; padding: 0 .2em; transition: background .2s, color .2s; }
.spoiler-inline a { color: transparent; }
.spoiler-inline.revealed { background: rgba(232,164,31,.14); box-shadow: none; color: inherit; cursor: auto; }
.spoiler-inline.revealed a { color: var(--link); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.wikitable { border-collapse: collapse; width: 100%; font-size: 14px; }
.wikitable th, .wikitable td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.wikitable th { background: var(--page-2); font-weight: 700; }
.wikitable tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* Galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: .6em 0 1.4em; }
.gallery-item { margin: 0; text-align: center; }
.gallery-item a { display: block; overflow: hidden; border-radius: 6px; background: #000; border: 1px solid var(--border-soft); }
.gallery-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .25s; }
.gallery-item.portrait a { background: var(--page); }
.gallery-item.portrait img { aspect-ratio: 3 / 4; object-fit: contain; }
.gallery-item a:hover img { transform: scale(1.04); }
.gallery-item .img-placeholder { aspect-ratio: 16 / 10; }
.gallery-item figcaption { font-size: 13px; line-height: 1.4; color: var(--text-2); padding: 6px 2px 2px; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.card { display: block; color: var(--text); border-radius: 8px; overflow: hidden; background: var(--tile); border: 1px solid var(--tile-border); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--link); text-decoration: none; transform: translateY(-2px); color: var(--text); }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--page-3); }
.card-img.portrait { aspect-ratio: 3 / 4; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img.portrait img { object-position: top; }
.card-img .img-placeholder { aspect-ratio: auto; height: 100%; border-radius: 0; }
.card-img .img-placeholder span { font-size: 9.5px; padding: 4px 6px; }
.card-title { font: 500 14px/1.3 var(--font); padding: 8px 10px 2px; }
.card-sub { font-size: 11.5px; color: var(--text-mix); padding: 0 10px 9px; }
.card-title:last-child { padding-bottom: 9px; }

/* Category page */
.alpha-list { columns: 3 200px; column-gap: 28px; }
.alpha-group { break-inside: avoid; margin-bottom: 10px; }
.alpha-group h3 { margin: 0 0 4px !important; font-size: 16px !important; color: var(--text-mix) !important; }
.alpha-group ul { margin: 0; }
.subcats { padding-left: 1.4em; }
.columns { columns: 3 220px; column-gap: 28px; }
.columns li { break-inside: avoid; }
.article-foot { clear: both; margin-top: 28px; }
.catlinks { border-top: 1px solid var(--border); padding: 12px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.catlinks-label { font-weight: 700; margin-right: 4px; }
.catlinks .sep { color: var(--text-mix); }
.lastmod { font-size: 12.5px; color: var(--text-mix); margin-top: 10px; }

/* Search page */
.search-page-form { display: flex; gap: 8px; margin: 0 0 16px; max-width: 560px; }
.search-page-form input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--page-3); color: var(--text); font: 15px var(--font); }
.search-page-form button { height: 38px; padding: 0 16px; background: var(--accent); color: var(--p-night); border: 0; border-radius: 4px; cursor: pointer; font: 700 12.5px var(--font); text-transform: uppercase; }
.search-page-form button:hover { background: #ffc24d; }
.search-results { padding-left: 1.3em; }
.search-results li { margin-bottom: 16px; }
.sr-title { font-size: 17px; font-weight: 500; }
.sr-type { font-size: 12px; color: var(--text-mix); margin-left: 6px; }
.sr-snippet { font-size: 14px; color: var(--text-2); }
.sr-cats { font-size: 12.5px; }
.exact { background: var(--page-3); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; }

/* 404 */
.notfound { text-align: center; padding: 18px 0 8px; }
.notfound ul { list-style: none; padding: 0; }
.stamp-big { display: inline-block; font: 700 26px var(--font); letter-spacing: .12em; color: #ff7a5c; border: 3px solid var(--alert); border-radius: 8px; padding: 8px 18px; margin: 10px 0 22px; }

/* ------------------------------------------------------------------ Main page */
.mainpage { display: flex; flex-direction: column; gap: 20px; }
.mp-welcome { text-align: center; padding: 4px 6% 0; }
.mp-hero { margin: 0 0 18px; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.mp-hero img { width: 100%; height: auto; }
.mp-welcome h1 { font: 400 30px/1.35 var(--font); margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.mp-welcome h1 em { font-weight: 700; }
.mp-welcome p { margin: 0 0 .8em; }
.mp-stats { color: var(--text-2); }
.mp-stats strong { color: var(--accent); }
.mp-spoiler { margin: 0; }
.mp-content { background: var(--panel-deep); border: 1px solid var(--tile-border); border-radius: 10px; padding: 18px 20px 20px; }
.mp-content-title { font: 400 30px/1.2 var(--font); text-align: center; margin: 0 0 16px; color: var(--text); }
.mp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.mp-tile {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 10px 12px;
  background: var(--tile); border: 1px solid var(--tile-border); border-radius: 8px; color: var(--text-2); font-size: 14px;
  transition: border-color .15s, color .15s, background .15s;
}
.mp-tile:hover { border-color: var(--link); color: var(--accent); background: #2a2018; text-decoration: none; }
.mp-columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.mp-main, .mp-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mp-box { background: var(--panel-deep); border: 1px solid var(--tile-border); border-radius: 10px; padding: 0 18px 16px; overflow: hidden; }
.mp-h { margin: 0 -18px 14px; padding: 10px 18px; background: var(--accent); color: var(--accent-ink); font: 700 15px var(--font); text-align: center; }
.featured { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.featured-img { display: block; border-radius: 8px; overflow: hidden; background: #000; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 11; }
.featured-text h3 { margin: 0 0 6px; font: 500 22px var(--font); }
.featured-text p { margin: 0 0 .7em; }
.more { margin: 6px 0 0; font-size: 14px; font-weight: 500; }
.lore-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.lore-list li { background: var(--tile); border: 1px solid var(--tile-border); border-radius: 8px; padding: 10px 12px; }
.lore-title { display: block; font: 500 16px var(--font); }
.lore-sum { display: block; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.recent { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.recent li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--tile-border); }
.recent li:last-child { border-bottom: 0; }
.recent .muted { font-size: 12px; white-space: nowrap; }
.plain { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.plain li { padding: 4px 0; }
.legend li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.mp-legend p { font-size: 14px; margin: 0 0 8px; }

/* ------------------------------------------------------------------ Vertical timeline */
.vtl-wrap {
  --k-olay: #8f887c; --k-donem: var(--c-gold); --k-arthur: #8fb6c4; --k-mary: var(--p-rose);
  --k-yangin: var(--c-fire); --k-tesis: var(--ok);
  margin: .8em 0 1.6em; clear: both;
}
.vtl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 500 12px var(--font); text-transform: uppercase; color: var(--text-2); margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; }
.vtl-key { display: inline-flex; align-items: center; gap: 6px; }
.vtl-key i { width: 10px; height: 10px; border-radius: 50%; background: var(--k, var(--k-olay)); display: inline-block; }
.vtl-key-thread i { width: 18px; height: 3px; border-radius: 0; background: var(--tc); }
.vtl { list-style: none; margin: 0; padding: 0; }
.vtl-item, .vtl-gap { display: grid; grid-template-columns: 112px 64px minmax(0, 1fr); margin: 0; }
.k-olay { --k: var(--k-olay); } .k-donem { --k: var(--k-donem); } .k-arthur { --k: var(--k-arthur); }
.k-mary { --k: var(--k-mary); } .k-yangin { --k: var(--k-yangin); } .k-tesis { --k: var(--k-tesis); }
.th-arthur { --tc: var(--k-arthur); } .th-mary { --tc: var(--k-mary); }
.vtl-year { font: 500 21px/1 var(--font); text-align: right; padding: 20px 0 0; color: var(--text-2); }
.vtl-key-event .vtl-year { color: var(--k); }
.k-donem .vtl-year { font-size: 17px; }
.vtl-rail { position: relative; min-height: 100%; }
.vtl-rail::before { content: ''; position: absolute; left: 31px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.vtl > li:first-child .vtl-rail::before { top: 26px; }
.vtl > li:last-child .vtl-rail::before { bottom: calc(100% - 26px); }
.k-donem .vtl-rail::before { width: 8px; left: 28px; background: repeating-linear-gradient(45deg, var(--k-donem) 0 3px, transparent 3px 6px); opacity: .8; }
.vtl-dot { position: absolute; left: 23px; top: 18px; width: 18px; height: 18px; border-radius: 50%; background: var(--page); border: 3px solid var(--k); z-index: 2; }
.vtl-key-event .vtl-dot { background: var(--k); box-shadow: 0 0 0 3px var(--page), 0 0 0 4px var(--k); }
.k-yangin .vtl-dot { border-radius: 2px; transform: rotate(45deg); }
.vtl-lane { position: absolute; width: 3px; background: var(--tc); z-index: 1; }
.vtl-lane.lane-0 { left: 8px; } .vtl-lane.lane-1 { left: 53px; }
.vtl-lane.seg-full { top: 0; bottom: 0; }
.vtl-lane.seg-top { top: 0; height: 27px; }
.vtl-lane.seg-bot { top: 27px; bottom: 0; }
.vtl-node { position: absolute; top: 21px; width: 11px; height: 11px; background: var(--tc); border: 2px solid var(--page); z-index: 2; }
.vtl-node.lane-0 { left: 4px; } .vtl-node.lane-1 { left: 49px; }
.vtl-card { margin: 8px 0; padding: 10px 14px 11px; background: var(--page-3); border: 1px solid var(--border-soft); border-left: 4px solid var(--k); border-radius: 6px; min-width: 0; }
.vtl-key-event .vtl-card { background: color-mix(in srgb, var(--k) 8%, var(--page-3)); }
.k-donem .vtl-card { background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(232,164,31,.07) 10px 11px); padding-top: 14px; padding-bottom: 15px; }
.vtl-kind { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--k); }
.vtl-title { font: 500 17px/1.3 var(--font); margin: 2px 0 4px; color: var(--text); }
.vtl-text { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.vtl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vtl-chip { font: 500 12px var(--font); padding: 1px 8px; background: var(--page-2); color: var(--text); border-radius: 10px; }
.vtl-chip-mary { background: color-mix(in srgb, var(--k-mary) 25%, var(--page-2)); }
.vtl-link { font-size: 12.5px; color: var(--tc); margin-top: 7px; padding-top: 6px; border-top: 1px dashed var(--border-soft); }
.vtl-link span { color: var(--text-mix); }
.vtl-gap { min-height: 22px; }
.vtl-gap .vtl-year { padding: 0; }
.vtl-gap-label { font-size: 12px; color: var(--text-mix); align-self: center; }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: #050605; color: var(--text-mix); border-top: 1px solid var(--border-soft); font-size: 13.5px; margin-top: 10px; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 22px 16px; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.site-footer a { color: var(--link); }
.site-footer strong { color: var(--text); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 500; }

/* ------------------------------------------------------------------ Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 50px 64px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; }
.lb-caption { color: #ddd; font-size: 14px; margin-top: 12px; text-align: center; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--text); font-size: 44px; line-height: 1; cursor: pointer; padding: 8px 14px; opacity: .8; }
.lightbox button:hover { opacity: 1; color: var(--accent); }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
body.lb-open { overflow: hidden; }

/* ------------------------------------------------------------------ Mobile drawer */
.nav-group { border-bottom: 1px solid var(--border-soft); }
.nav-group summary { list-style: none; cursor: pointer; padding: 12px 16px 6px; font: 700 12.5px var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--text); display: flex; justify-content: space-between; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: '−'; color: var(--text-mix); }
.nav-group:not([open]) summary { padding-bottom: 12px; }
.nav-group:not([open]) summary::after { content: '+'; }
.nav-group ul { list-style: none; margin: 0; padding: 0 0 8px; }
.nav-group a { display: block; padding: 6px 16px 6px 20px; color: var(--text); border-left: 3px solid transparent; }
.nav-group a:hover { background: var(--menu-bg); text-decoration: none; }
.nav-group a.active { border-left-color: var(--accent); color: var(--accent); }
.sidebar-head { padding: 14px 16px; border-bottom: 1px solid var(--border); font: 700 13px var(--font); text-transform: uppercase; color: var(--header-name); }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1100px) {
  .mp-columns { grid-template-columns: minmax(0, 1fr); }
  .mp-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .ch-nav { display: none; }
  .community-header { padding: 22px 16px 16px; }
  .sidebar {
    display: block; position: fixed; top: var(--topbar-h); left: 0; bottom: 0; z-index: 55; width: 280px; overflow-y: auto;
    background: var(--page); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 4px 0 24px rgba(0,0,0,.6);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(0,0,0,.55); z-index: 54; }
  .toplinks .btn-outline { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar-inner { gap: 10px; padding: 0 10px; }
  .topbar-brand { display: none; }
  .toplinks { display: none; }
  .searchbox { max-width: none; }
  .searchbox input { font-size: 16px; }
  .main-container { padding: 0 8px 28px; }
  .community-header { margin: 0 -8px; }
  .ch-top { min-height: 0; flex-wrap: wrap; gap: 6px 14px; }
  .ch-logo { font-size: 34px; }
  .ch-logo-img { height: 70px; }
  .community-header { background-position: 72% center; }
  .ch-name { font-size: 17px; }
  .page-main { padding: 16px 14px 22px; border-radius: 10px; }
  .page-title { font-size: 28px; }
  .infobox { float: none; width: 100%; margin: 0 0 18px; }
  .prose h2 { font-size: 21px; }
  .toc { display: block; }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .mp-welcome { padding: 0; }
  .mp-welcome h1, .mp-content-title { font-size: 23px; }
  .mp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 8px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .notice { flex-direction: column; align-items: flex-start; gap: 8px; }
  .lightbox { padding: 40px 8px; }
  .vtl-item, .vtl-gap { grid-template-columns: 50px minmax(0, 1fr); grid-template-areas: "rail year" "rail card"; }
  .vtl-gap { grid-template-areas: "rail label"; }
  .vtl-rail { grid-area: rail; }
  .vtl-item .vtl-year { grid-area: year; text-align: left; padding: 14px 0 0; font-size: 18px; }
  .vtl-gap .vtl-year { display: none; }
  .vtl-card { grid-area: card; margin-top: 4px; }
  .vtl-gap-label { grid-area: label; }
  .vtl-rail::before { left: 22px; }
  .k-donem .vtl-rail::before { left: 19px; }
  .vtl-dot { left: 14px; top: 13px; }
  .vtl > li:first-child .vtl-rail::before { top: 21px; }
  .vtl-lane.lane-0 { left: 3px; } .vtl-lane.lane-1 { left: 41px; }
  .vtl-node.lane-0 { left: -1px; } .vtl-node.lane-1 { left: 37px; }
  .vtl-lane.seg-top { height: 22px; } .vtl-lane.seg-bot { top: 22px; }
  .vtl-node { top: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .topbar, .community-header, .rail, .sidebar, .site-footer, .toc-toggle { display: none !important; }
  .layout { display: block; }
  .page-main { background: none; padding: 0; }
}

/* ------------------------------------------------------------------ Capsule-art frame accents */
.topbar { border-bottom: 2px solid var(--c-rust); }
.page-main, .rail-module { border: 1px solid var(--border-soft); border-top: 3px solid var(--c-rust); }
.mp-content, .mp-box { border-color: var(--border-soft); }
.infobox { border-color: var(--c-rust); }
.ch-name { text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.prose h2 { border-bottom-color: var(--c-rust); }

/* ==========================================================================
   CRT / ANALOG LAYER
   Screen effects stay on decoration (overlay, headings, labels, images);
   body text stays plain, high-contrast and easy to read.
   ========================================================================== */
:root {
  --font-term:   'VT323', 'IBM Plex Mono', ui-monospace, monospace;
  --glow-gold:   0 0 6px rgba(232,164,31,.45), 0 0 18px rgba(232,164,31,.15);
  --glow-soft:   0 0 4px rgba(239,227,200,.18);
}

/* Full-screen CRT glass: scanlines + vignette + faint phosphor tint */
.crt {
  pointer-events: none; position: fixed; inset: 0; z-index: 80;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 58%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 1px, rgba(0,0,0,0) 1px 3px),
    linear-gradient(rgba(232,164,31,.025), rgba(232,164,31,.025));
}
.crt::after { /* slow rolling refresh band */
  content: ''; position: absolute; left: 0; right: 0; height: 22vh; top: -22vh;
  background: linear-gradient(to bottom, rgba(255,240,210,0), rgba(255,240,210,.035), rgba(255,240,210,0));
  animation: crt-roll 9s linear infinite;
}
@keyframes crt-roll { to { transform: translateY(130vh); } }

/* Readability: calm body text */
body { font-size: 16px; line-height: 1.7; }
.prose { font-size: 16px; color: var(--text); }
.prose p, .prose li { max-width: 78ch; }
.prose strong { color: #fff3d6; }
.wikitable, .rail-list, .recent, .plain { font-size: 15px; }

/* Terminal-style labels */
.tn-label, .rail-h, .mp-h, .infobox-section, .toc-head, .callout-title, .notice-stamp,
.vtl-kind, .ch-count span, .page-cats > span, .catlinks-label, .missing-stamp, .tag, .sidebar-head, .nav-group summary {
  font-family: var(--font-term); letter-spacing: .06em; font-weight: 400;
}
.tn-label { font-size: 19px; }
.rail-h, .mp-h { font-size: 21px; }
.infobox-section { font-size: 19px; padding: 6px 9px; }
.toc-head { font-size: 20px; }
.callout-title { font-size: 18px; letter-spacing: .08em; }
.notice-stamp { font-size: 17px; }
.vtl-kind { font-size: 16px; }
.tag { font-size: 15px; line-height: 1.35; padding: 0 7px; }
.missing-stamp { font-size: 15px; }
.ch-count span, .catlinks-label, .page-cats > span { font-size: 17px; }
.nav-group summary { font-size: 18px; }
.sidebar-head { font-size: 19px; }

/* Phosphor glow on headings (not on body text) */
.page-title {
  font: 400 44px/1.1 var(--font-term); letter-spacing: .03em; color: #fff0cc;
  text-shadow: var(--glow-gold), 1px 0 rgba(255,70,40,.35), -1px 0 rgba(80,200,255,.25);
}
.prose h2 { font: 400 32px/1.15 var(--font-term); letter-spacing: .04em; color: var(--accent); text-shadow: var(--glow-gold); }
.prose h3 { color: #fff0cc; text-shadow: var(--glow-soft); }
.mp-welcome h1, .mp-content-title { text-shadow: var(--glow-soft); }
.infobox-title { font: 400 26px/1.15 var(--font-term); letter-spacing: .04em; }
.ch-name, .topbar-brand span, .rail-stats strong, .ch-count strong, .mp-stats strong { text-shadow: var(--glow-gold); }
.ch-logo-img { filter: drop-shadow(0 0 10px rgba(232,164,31,.35)) drop-shadow(0 2px 8px rgba(0,0,0,.6)); }

/* REC indicator (camcorder / surveillance feel) */
.rec {
  display: inline-flex !important; align-items: center; gap: 6px; margin-bottom: 6px;
  font: 400 18px var(--font-term) !important; color: #ff5a4a !important; letter-spacing: .12em;
}
.rec::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #ff3b2f; box-shadow: 0 0 8px #ff3b2f; animation: rec-blink 1.2s steps(2) infinite; }
@keyframes rec-blink { 50% { opacity: .15; } }

/* Monitor bezel feel on panels */
.page-main, .rail-module { box-shadow: inset 0 0 60px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4); }

/* Analog image treatment: scanlines + slight grade on artwork and screenshots */
.infobox-image a, .gallery-item a, .featured-img, .mp-hero, .rc-img, .card-img { position: relative; }
.infobox-image a::after, .gallery-item a::after, .featured-img::after, .mp-hero::after, .rc-img::after, .card-img::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.14) 0 1px, rgba(0,0,0,0) 1px 3px);
  box-shadow: inset 0 0 30px rgba(0,0,0,.45);
}
.gallery-item img, .featured-img img, .card-img img { filter: contrast(1.05) saturate(.92); }

/* Selection + focus in phosphor colours */
::selection { background: rgba(232,164,31,.35); color: #fff; }

@media (max-width: 760px) {
  .page-title { font-size: 36px; }
  .prose h2 { font-size: 27px; }
  .crt { background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 62%, rgba(0,0,0,.45) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.12) 0 1px, rgba(0,0,0,0) 1px 3px); }
}
@media (prefers-reduced-motion: reduce) { .crt::after, .rec::before { animation: none !important; } }
@media print { .crt { display: none !important; } }

/* Video items in galleries */
.gallery-item.video .video-wrap { position: relative; border-radius: 6px; overflow: hidden; background: #000; border: 1px solid var(--border-soft); }
.gallery-item.video video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #000; }
.video-badge { display: inline-block; font: 400 14px/1.4 var(--font-term); letter-spacing: .1em; color: var(--accent-ink); background: var(--accent); padding: 0 5px; border-radius: 2px; vertical-align: 1px; }

/* ==========================================================================
   INFORMATION STATUS SYSTEM
   ========================================================================== */
.status {
  display: inline-block; font: 400 14px/1.35 var(--font-term); letter-spacing: .08em; text-transform: uppercase;
  padding: 0 7px; border-radius: 3px; vertical-align: 2px; white-space: nowrap; border: 1px solid transparent;
}
.st-kesin    { color: #dfeccb; background: #34452a; border-color: #5d7a49; }
.st-gelisme  { color: #1a1206; background: #e8b93a; border-color: #f3cf6a; }
.st-kararyok { color: #d9d2c5; background: #3b3632; border-color: #625a52; }
.st-gizli    { color: #ffd9d2; background: repeating-linear-gradient(-45deg, #6d1810 0 6px, #4a0f0a 6px 12px); border-color: #b52418; }
h2 .status, h3 .status, h4 .status { margin-left: 10px; font-size: 13px; text-shadow: none; letter-spacing: .08em; }
.prose h2 { flex-wrap: wrap; }
.legend .status { min-width: 0; }

/* Status callouts */
.callout-kesin    { border-left-color: #6f8f55; }
.callout-kesin .callout-icon { background: #6f8f55; }
.callout-gelistiriliyor { border-left-color: #e8b93a; background: color-mix(in srgb, #e8b93a 6%, var(--page-3)); }
.callout-gelistiriliyor .callout-icon { background: #e8b93a; }
.callout-kararyok { border-left-color: #6d655c; border-left-style: dashed; }
.callout-kararyok .callout-icon { background: #6d655c; color: var(--text); }
.callout-gizli { border-color: #7d220d; background: repeating-linear-gradient(-45deg, rgba(125,34,13,.14) 0 10px, rgba(0,0,0,0) 10px 20px), var(--alert-soft); }
.callout-gizli .callout-icon { background: #b52418; color: #fff; border-radius: 3px; }
.callout-title .status { vertical-align: 1px; }
.callout-sub { color: var(--text); text-transform: none; letter-spacing: 0; font: 600 14px var(--font); }
.missing { border-style: dashed; }
.missing .status { flex: 0 0 auto; }

/* Temel bilgiler (bilgi kutusundan, durum etiketli) */
.basic-info { border: 1px solid var(--border-soft); border-radius: 6px; overflow: hidden; margin: 4px 0 12px; max-width: 78ch; }
.basic-info dl { margin: 0; }
.bi-section { background: var(--page-2); color: var(--text); font: 400 17px var(--font-term); letter-spacing: .06em; padding: 3px 12px; }
.bi-row { display: grid; grid-template-columns: 34% 66%; padding: 6px 12px; border-top: 1px solid var(--border-soft); font-size: 14.5px; }
.bi-row dt { font-weight: 600; color: var(--text-2); padding-right: 8px; }
.bi-row dd { margin: 0; }
.bi-row .status { font-size: 12px; margin-left: 4px; }
@media (max-width: 760px) { .bi-row { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   LIGHT VHS / ANALOG ARCHIVE LAYER
   Screen effects are deliberately faint so text stays sharp.
   ========================================================================== */
:root { --glow-gold: 0 0 6px rgba(232,164,31,.18); --glow-soft: none; }
/* Effects: faint VHS / archive feel only */
.crt {
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 65%, rgba(0,0,0,.28) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.035) 0 1px, rgba(0,0,0,0) 1px 4px);
}
.crt::after { display: none; animation: none; }               /* no rolling band */
.rec::before { animation: rec-pulse 2.4s ease-in-out infinite; box-shadow: 0 0 4px #ff3b2f; }
@keyframes rec-pulse { 50% { opacity: .55; } }                /* gentle pulse, no hard blink */
.ch-name, .topbar-brand span, .rail-stats strong, .ch-count strong, .mp-stats strong { text-shadow: none; }
.ch-logo { text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.ch-logo-img { filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.page-main, .rail-module { box-shadow: inset 0 0 30px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.4); }
.infobox-image a::after, .gallery-item a::after, .featured-img::after, .mp-hero::after, .rc-img::after, .card-img::after {
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.05) 0 1px, rgba(0,0,0,0) 1px 4px);
  box-shadow: inset 0 0 22px rgba(0,0,0,.28);
}
.gallery-item img, .featured-img img, .card-img img { filter: none; }

@media (max-width: 760px) {
  .crt { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 68%, rgba(0,0,0,.22) 100%); }
}

/* ==========================================================================
   TYPOGRAPHY — matched to the Fandom reference wiki
   Reference uses Rubik only (300 / 400 / 500 / 700, italic 400 / 700):
   body 14/24.5 400 · page title 36/45 300 · h2 24/30 500 · h3 18/22.5 500 · h4 16/20 500
   community name 18 500 · nav tabs 12/21 500 uppercase · dropdown 14 400
   infobox title 18 700 · section 14 700 · label 12 700 · value 12 400
   rail header 16 700 · buttons 12 600 uppercase · TOC title 14 500
   ========================================================================== */
:root {
  --font:      'Rubik', helvetica, arial, sans-serif;
  --font-term: 'Rubik', helvetica, arial, sans-serif;
}
body, .prose { font: 400 14px/1.75 var(--font); letter-spacing: normal; }
.prose p, .prose li { max-width: none; }
.prose strong, .prose b { font-weight: 700; }
.wikitable, .wikitable td, .rail-list, .recent, .plain { font-size: 14px; }
.wikitable th { font-weight: 700; }

/* Titles and headings */
.page-title { font: 300 36px/1.25 var(--font); letter-spacing: .25px; color: #fff0cc; text-shadow: var(--glow-gold); }
.prose h2   { font: 500 24px/1.25 var(--font); letter-spacing: normal; text-shadow: none; }
.prose h3   { font: 500 18px/1.25 var(--font); letter-spacing: normal; text-shadow: none; }
.prose h4   { font: 500 16px/1.25 var(--font); }
.mp-welcome h1, .mp-content-title { font: 300 30px/1.3 var(--font); text-shadow: none; }
.featured-text h3 { font: 500 22px/1.3 var(--font); }
.ch-name { font: 500 18px/1.25 var(--font); }
.topbar-brand { font: 700 17px var(--font); letter-spacing: normal; }
.topbar-brand span { font-weight: 500; }

/* Navigation */
.tn-label, #topnav > * > a, #topnav > a { font: 500 12px/21px var(--font); text-transform: uppercase; letter-spacing: normal; }
#topnav .tn-menu a, .tn-menu a { font: 400 14px/1.5 var(--font); text-transform: none; }
.nav-group summary, .sidebar-head { font: 500 12px var(--font); text-transform: uppercase; letter-spacing: normal; }
.nav-group a { font: 400 14px/1.5 var(--font); }
.toplinks a, .rail-btn, .search-page-form button { font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .15px; }
.searchbox input, .search-page-form input { font: 400 14px var(--font); }

/* Infobox */
.infobox-title   { font: 700 18px/1.25 var(--font); letter-spacing: normal; }
.infobox-section { font: 700 14px/1.25 var(--font); letter-spacing: normal; padding: 8px 9px; }
.infobox dt      { font: 700 12px/1.5 var(--font); letter-spacing: normal; }
.infobox dd      { font: 400 12px/1.5 var(--font); }
.bi-section      { font: 700 14px var(--font); letter-spacing: normal; }
.bi-row          { font-size: 14px; }

/* Rail, TOC, page chrome */
.rail-h, .mp-h { font: 700 16px/1.25 var(--font); letter-spacing: normal; text-transform: none; }
.toc-head { font: 500 14px var(--font); letter-spacing: normal; text-transform: none; }
.toc a { font: 400 14px/1.75 var(--font); }
.page-cats > span, .catlinks-label { font: 500 14px var(--font); letter-spacing: normal; text-transform: none; }
.ch-count strong, .rail-stats strong { font: 500 22px/1.1 var(--font); }
.ch-count span { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: normal; }
.card-title, .lore-title { font: 500 14px/1.3 var(--font); }

/* Small labels: tags, statuses, callout titles */
.tag, .status, .missing-stamp, .notice-stamp, .vtl-kind, .callout-title, .video-badge, .vtl-legend {
  font-family: var(--font); font-weight: 700; letter-spacing: .02em;
}
.callout-title { font-size: 12px; text-transform: uppercase; }
.callout-sub { font: 500 14px var(--font); text-transform: none; letter-spacing: normal; }
.tag, .missing-stamp, .notice-stamp, .vtl-kind, .video-badge { font-size: 11px; }
.status { font-size: 11px; line-height: 1.6; }
h2 .status, h3 .status, h4 .status { font-size: 10.5px; }
.callout, .notice, .basic-info, .vtl-text, .missing { font-size: 14px; }
.vtl-year { font: 500 20px/1 var(--font); }
.vtl-title { font: 500 16px/1.3 var(--font); }
.rec { font: 700 12px var(--font) !important; letter-spacing: .08em; }

@media (max-width: 760px) {
  .page-title { font-size: 28px; }
  .prose h2 { font-size: 21px; }
}


/* Turuncu not kâğıdı (karakter notları ve önemli alıntılar) */
.sticky-note {
  position: relative; max-width: 460px; margin: 14px 0 18px; padding: 16px 20px 22px;
  background: #f4931f; color: #23160a; border-radius: 2px;
  box-shadow: 0 6px 14px rgba(0,0,0,.45), inset 0 -24px 30px -24px rgba(0,0,0,.18);
  transform: rotate(-.6deg); font: 600 14px/1.6 var(--font);
}
.sticky-note:nth-of-type(even) { transform: rotate(.5deg); }
.sticky-note::after { /* kıvrık köşe */
  content: ''; position: absolute; right: 0; bottom: 0; width: 34px; height: 34px;
  background: linear-gradient(135deg, #c4730f 0 50%, #eadfce 50% 100%); box-shadow: -2px -2px 4px rgba(0,0,0,.18);
}
.sticky-note p { margin: 0 0 .6em; max-width: none; }
.sticky-note p:last-child { margin-bottom: 0; }
.sticky-note strong { color: #160d04; }
.sticky-note a { color: #3b1d05; text-decoration: underline; }
.sticky-title { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .06em; color: #5a2f06; margin-bottom: 6px; }
