/* ════════════════════════════════════════════════════════════
   AL MILLENNIUM — components.css
   Shared component styles reused across multiple public pages
   (home, stories, characters). Extracted from the original inline
   styles so each component is authored ONCE. Loaded globally after
   style.css + app.css. Page-only styles stay in the page's @push.
   ════════════════════════════════════════════════════════════ */

/* ── Nav vault button ─────────────────────────────────────── */
.nav-vault-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 9px;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(196,185,152,0.28);
  padding: 6px 14px; text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-vault-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold-light);
  background: rgba(196,185,152,0.07);
}
.nav-vault-btn svg { flex-shrink: 0; }
.nav-vault-btn.active { color: var(--gold-bright); border-color: var(--gold-light); }

/* ── Nav shop button (storefront + live cart count, every page) ── */
.nav-shop-btn { position: relative; }
.nav-shop-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--gold-light); color: var(--bg);
  font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0;
}
@media (max-width: 600px) { .nav-shop-btn span:not(.nav-shop-count) { display: none; } }

/* ── Nav member menu (signed-in Vault member) ─────────────── */
.nav-member { position: relative; display: inline-flex; }
.nav-member-btn {
  position: relative; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(196,185,152,0.07);
  border: 1px solid rgba(196,185,152,0.3);
  color: var(--gold-light);
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.04em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-member-btn:hover,
.nav-member.open .nav-member-btn { color: var(--gold-bright); border-color: var(--gold-light); background: rgba(196,185,152,0.12); }
.nav-member-dot {
  position: absolute; top: -1px; right: -1px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold-bright); border: 2px solid var(--bg);
}
.nav-member-menu {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 214px;
  background: linear-gradient(to bottom, rgba(10,10,14,0.99), rgba(8,8,11,0.99));
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  box-shadow: 0 28px 56px -26px rgba(0,0,0,0.9);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0.22s;
  z-index: 60;
}
.nav-member.open .nav-member-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-member-head { padding: 8px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.nav-member-name { display: block; font-family: 'Cinzel', serif; font-size: 13px; color: var(--gold-bright); letter-spacing: 0.03em; }
.nav-member-role { display: block; font-family: var(--font-display); font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.nav-member-menu a,
.nav-member-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  font-family: 'Inter', sans-serif; font-size: 12.5px; text-align: left;
  color: var(--text-sub); text-decoration: none;
  background: none; border: none; cursor: pointer;
  padding: 9px 12px; border-radius: 2px;
  transition: color 0.18s, background 0.18s;
}
.nav-member-menu a:hover,
.nav-member-menu button:hover { color: var(--gold-bright); background: rgba(196,185,152,0.06); }
.nav-member-badge {
  font-family: var(--font-display); font-size: 9px; letter-spacing: 0.05em;
  background: var(--gold-light); color: var(--bg);
  border-radius: 9px; padding: 1px 7px;
}
.nav-member-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ── Save / favourite control (members collect across the universe) ── */
.save-form { margin: 0; display: inline-flex; }
.save-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-light); text-decoration: none;
  background: rgba(196,185,152,0.05); border: 1px solid rgba(196,185,152,0.3);
  padding: 10px 18px; cursor: pointer; white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.12s;
}
.save-btn:hover { color: var(--gold-bright); border-color: var(--gold-light); background: rgba(196,185,152,0.1); }
.save-btn:active { transform: translateY(1px); }
.save-btn .bm { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.save-btn.is-saved { color: var(--gold-bright); border-color: rgba(196,185,152,0.5); background: rgba(196,185,152,0.1); }
.save-btn.is-saved .bm { fill: currentColor; stroke: currentColor; }
.save-btn.is-guest { opacity: 0.92; }
/* Compact round icon variant for card overlays. */
.save-btn.save-icon {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; gap: 0;
  background: rgba(8,8,11,0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-color: rgba(196,185,152,0.34);
}
.save-btn.save-icon:hover { background: rgba(8,8,11,0.82); }
@keyframes save-pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.save-btn.save-pulse .bm { animation: save-pop 0.34s var(--ease-out); }

/* ── Exclusive / locked signalling (tease-and-lock) ───────── */
.excl-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-bright); background: rgba(196,185,152,0.12);
  border: 1px solid rgba(196,185,152,0.4); padding: 4px 10px; border-radius: 2px;
}
.excl-chip svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.7; }
/* Lock overlay shown to non-members on a teased card. */
.lock-veil {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 20px;
  background: linear-gradient(to bottom, rgba(6,6,9,0.42), rgba(6,6,9,0.74));
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.3s var(--ease-out);
}
.story-tile:hover .lock-veil, .char-tile:hover .lock-veil, [data-locked]:hover .lock-veil { opacity: 1; }
.lock-veil .lock-ring {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(196,185,152,0.5); display: flex; align-items: center; justify-content: center;
  color: var(--gold-bright);
}
.lock-veil .lock-ring svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lock-veil .lock-text { font-family: var(--font-display); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-light); }

/* ── Member welcome ribbon (belonging cue on the home page) ── */
.member-ribbon {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 11px 24px; text-align: center;
  background: linear-gradient(90deg, transparent, rgba(196,185,152,0.07), transparent);
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif; font-size: 12.5px; color: var(--text-sub);
}
.member-ribbon strong { color: var(--gold-bright); font-weight: 500; }
.member-ribbon a {
  font-family: var(--font-display); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-light); text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
  transition: gap 0.2s, color 0.2s;
}
.member-ribbon a:hover { color: var(--gold-bright); gap: 11px; }

/* ── Primary + ghost CTAs (DESIGN_SYSTEM §6.6 / §6.7) ─────── */
.btn-prime {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'Cinzel', serif; font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold-bright);
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid var(--gold-light);
  background: transparent;
  transition: all 0.3s;
  position: relative; overflow: hidden;
  cursor: pointer;
}
.btn-prime::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold-light);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.7,0,0.3,1);
  z-index: -1;
}
.btn-prime:hover { color: var(--bg); }
.btn-prime:hover::before { transform: translateX(0); }
.btn-prime .arrow { transition: transform 0.3s; }
.btn-prime:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Cinzel', serif; font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-sub);
  text-decoration: none;
  padding: 14px 24px;
  transition: color 0.25s;
  background: none; border: none; cursor: pointer;
}
.btn-ghost:hover { color: var(--gold-light); }

/* ── Section shell + dossier head ─────────────────────────── */
.section { padding: 0 56px 100px; max-width: 1440px; margin: 0 auto; }
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(147,115,65,0.18);
  margin-bottom: 56px;
  gap: 32px;
}
.sec-head-left { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.sec-head-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.sec-head-title em { font-style: italic; font-weight: 400; color: var(--gold); }
.sec-head-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--text-muted); text-transform: uppercase;
}
.sec-head-meta a {
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  transition: all 0.25s;
}
.sec-head-meta a:hover { color: var(--gold-bright); border-color: var(--gold-light); }
@media (max-width: 900px) {
  .section { padding: 0 28px 80px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Pulsing status pill (DESIGN_SYSTEM §6.5) ─────────────── */
.story-tile-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(10,10,12,0.65);
  padding: 6px 12px;
  border: 1px solid rgba(196,185,152,0.4);
  display: inline-flex; align-items: center; gap: 8px;
}
.story-tile-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 8px var(--gold-light);
  animation: pulse 2s ease-in-out infinite;
}
.story-tile-status.dev .dot { background: var(--status-dev); box-shadow: 0 0 6px var(--status-dev); }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ── Story card (.story-tile) — 4:3 poster (DESIGN_SYSTEM §6.8) ── */
.stories-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .stories-row { grid-template-columns: 1fr; } }

/* Generic story tile grid used on nation/lore detail pages — prevents
   min-height + aspect-ratio from forcing tiles wider than the viewport.
   min-height:0 lets the column width govern tile size at all breakpoints;
   the aspect-ratio still gives a 4:3 proportion from the column width. */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.story-grid .story-tile { min-height: 0; }

.story-tile {
  position: relative; display: block; text-decoration: none;
  overflow: hidden; background: var(--bg2);
  aspect-ratio: 4/3; min-height: 420px;
}
@media (max-width: 900px) { .story-tile { min-height: 360px; } }
.story-tile .img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 25%;
  filter: brightness(0.6) contrast(1.1) saturate(0.85);
  transition: transform 1s cubic-bezier(0.2,0,0.2,1), filter 0.7s;
}
.story-tile:hover .img { transform: scale(1.05); filter: brightness(0.75) contrast(1.15) saturate(1); }
.story-tile::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(4,4,6,0.95) 0%, rgba(4,4,6,0.3) 50%, transparent 70%),
    linear-gradient(to bottom, rgba(4,4,6,0.35), transparent 30%);
}
.story-tile-corners > span {
  position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--gold-light); opacity: 0.6; z-index: 3;
}
.story-tile-corners > span:nth-child(1) { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.story-tile-corners > span:nth-child(2) { top: 16px; right: 16px; border-left: none; border-bottom: none; }
.story-tile-corners > span:nth-child(3) { bottom: 16px; left: 16px; border-right: none; border-top: none; }
.story-tile-corners > span:nth-child(4) { bottom: 16px; right: 16px; border-left: none; border-top: none; }
.story-tile .story-tile-status { position: absolute; top: 28px; left: 28px; z-index: 4; }
.story-tile-body { position: absolute; left: 28px; right: 28px; bottom: 28px; z-index: 4; }
.story-tile-format {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; color: var(--gold);
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px;
}
.story-tile-format::before { content: ''; display: inline-block; width: 24px; height: 1px; background: var(--gold); }
.story-tile-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold-bright); line-height: 0.95;
  text-shadow: 0 4px 28px rgba(0,0,0,0.7);
}
.story-tile-title em { font-style: italic; font-weight: 400; color: var(--gold-light); }
.story-tile-logline {
  margin-top: 14px; font-family: 'Inter', sans-serif;
  font-style: italic; font-size: 13px;
  color: var(--gold-light); opacity: 0.85; line-height: 1.5; max-width: 86%;
}
.story-tile-cta {
  margin-top: 18px; font-family: 'Cinzel', serif; font-size: 9px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-bright);
  display: inline-flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
}
.story-tile:hover .story-tile-cta { opacity: 1; transform: translateY(0); }
.story-tile-cta::after { content: '→'; transition: transform 0.3s; }
.story-tile:hover .story-tile-cta::after { transform: translateX(4px); }

/* ── Graceful art fallback (.mono-fb) ─────────────────────────────────
   Shown when a portrait/poster is missing or fails to load, so a card never
   renders the browser's broken-image icon or an empty black box. The span is
   the bottom layer of any image wrap; the photo paints over it when present,
   and enhancements.js (initArtFallbacks) hides a broken <img> / failed
   background so this on-brand monogram shows through instead. */
.mono-fb {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  margin: 0; pointer-events: none; user-select: none;
  font-family: 'Cinzel', serif; font-weight: 700; line-height: 1;
  font-size: clamp(40px, 8vw, 92px); letter-spacing: 0.04em;
  color: color-mix(in oklab, var(--na, var(--gold-light)) 62%, var(--gold-bright));
  background:
    radial-gradient(ellipse 78% 64% at 50% 40%, color-mix(in oklab, var(--na, var(--gold-light)) 16%, transparent), transparent 72%),
    linear-gradient(165deg, var(--bg2) 0%, #050507 100%);
  text-shadow: 0 0 38px color-mix(in oklab, var(--na, var(--gold-light)) 28%, transparent);
}
/* Small contexts get a proportionate initial. */
.lr-thumb .mono-fb, .av .mono-fb, .related-avatar .mono-fb { font-size: 22px; }

/* ── Nation emblem (.nsigil) ──────────────────────────────────────────
   The ONE nation emblem, shown everywhere the nation appears (big on the map
   on hover, on the hub hero, on its characters' pages). Rendered by
   <x-nation-sigil> from the nation's single uploaded emblem. The art is shown
   WHOLE and CLEAN — object-fit: contain + overflow visible, no frame/halo — so
   an element breaking the circle (e.g. Arcadia's sword) is never cropped. No
   emblem → a cinematic accent-tinted first-letter disc. */
.nsigil {
  --ns-size: 96px;
  --ns-accent: var(--gold-light);
  position: relative; flex-shrink: 0;
  display: inline-grid; place-items: center;
  width: var(--ns-size); height: var(--ns-size);
  vertical-align: middle; overflow: visible;
}
/* Art — just the emblem itself, clean and whole; a soft shadow grounds it. */
.nsigil-art {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
  transition: transform 0.5s var(--ease-out, cubic-bezier(0.2,0.7,0.2,1));
}
.nsigil:hover .nsigil-art, a:hover .nsigil-art, [data-tilt]:hover .nsigil-art { transform: scale(1.05); }
/* Letter fallback — an accent-tinted disc with the nation's initial. */
.nsigil-disc {
  position: absolute; inset: 0; border-radius: 50%; z-index: 0;
  background:
    radial-gradient(circle at 50% 36%, color-mix(in oklab, var(--ns-accent) 24%, transparent), transparent 70%),
    linear-gradient(165deg, var(--bg2) 0%, #050507 100%);
  border: 1px solid color-mix(in oklab, var(--ns-accent) 46%, transparent);
  box-shadow: 0 0 calc(var(--ns-size) * 0.26) color-mix(in oklab, var(--ns-accent) 20%, transparent);
}
.nsigil-mono {
  position: relative; z-index: 1; font-family: 'Cinzel', serif; font-weight: 700;
  font-size: calc(var(--ns-size) * 0.42); line-height: 1; letter-spacing: 0.02em;
  color: color-mix(in oklab, var(--ns-accent) 72%, var(--gold-bright));
  text-shadow: 0 0 calc(var(--ns-size) * 0.22) color-mix(in oklab, var(--ns-accent) 40%, transparent);
}
@media (prefers-reduced-motion: reduce) { .nsigil-art { transition: none; } }

/* ── Crowning crest (.crest) ──────────────────────────────────────────
   The signature Al Millennium move: an icon / emblem / glyph that breaks
   OUT of the TOP border of a panel or card — "sticking out" the top, the
   same crown the world-map nation panel gives its emblem. Put .crest-host
   on the bordered panel (it lets the crest overflow; pair it with extra top
   padding so the content clears the crown), then drop a .crest inside holding
   the mark. Add .crest--seal to set the mark in a gilded wax-seal medallion
   (use for a single glyph or a framed logo); WITHOUT it the emblem floats
   clean (use for transparent nation emblems whose art may break the circle —
   so a sword/protrusion is never cropped). Size with --crest-size, tint with
   --crest-accent. The crest is pointer-inert so it never eats the panel's
   own clicks. */
.crest-host { position: relative; overflow: visible; }
.crest {
  --crest-size: 64px;
  --crest-accent: var(--gold-light);
  position: absolute; top: 0; left: 50%;
  /* sit mostly ABOVE the panel's top edge — flush on the line, no gap, only the
     lower ~38% overlaps onto the panel (it sits ON TOP of it, not inside it) */
  transform: translate(-50%, -62%);
  z-index: 4; margin: 0; pointer-events: none;
  display: inline-grid; place-items: center;
  width: var(--crest-size); height: var(--crest-size);
}
.crest > * { position: relative; z-index: 1; }
.crest img { width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5)); }
/* A single letter / symbol mark, drawn in Cinzel and lit by the accent. */
.crest-glyph { font-family: 'Cinzel', serif; font-weight: 700; line-height: 1;
  font-size: calc(var(--crest-size) * 0.4);
  color: color-mix(in oklab, var(--crest-accent) 78%, var(--gold-bright));
  text-shadow: 0 0 calc(var(--crest-size) * 0.24) color-mix(in oklab, var(--crest-accent) 42%, transparent); }
/* Wax-seal medallion backing — pins the mark cleanly over the border line. */
.crest--seal::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: 0;
  background:
    radial-gradient(circle at 50% 32%, color-mix(in oklab, var(--crest-accent) 30%, transparent), transparent 72%),
    linear-gradient(165deg, var(--bg2) 0%, var(--bg) 100%);
  border: 1px solid color-mix(in oklab, var(--crest-accent) 52%, transparent);
  box-shadow:
    0 0 calc(var(--crest-size) * 0.34) color-mix(in oklab, var(--crest-accent) 24%, transparent),
    0 8px 22px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.crest--seal img { width: 72%; height: 72%; }
@media (prefers-reduced-motion: reduce) { .crest img { transition: none; } }

/* ── Character card (.char-tile) — 3:4 portrait (DESIGN_SYSTEM §6.8) ── */
.char-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .char-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .char-strip { grid-template-columns: 1fr; } }

.char-tile {
  position: relative; display: block; text-decoration: none;
  overflow: hidden; background: var(--bg2);
}
.char-tile .img-wrap { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #050507; isolation: isolate; }
.char-tile .img-wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  filter: brightness(0.78) contrast(1.05) saturate(0.85) grayscale(0.15);
  transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.2,0,0.2,1);
}
.char-tile:hover .img-wrap img { transform: scale(1.06); filter: brightness(1) contrast(1.1) saturate(1) grayscale(0); }
.char-tile .img-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(4,4,6,0.92) 0%, rgba(4,4,6,0.35) 35%, transparent 60%);
  pointer-events: none; z-index: 2;
}
.ct-nation {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--gold-light); padding: 8px 0;
}
.ct-nation::before {
  content: ''; position: absolute; top: 0; left: 50%;
  width: 1px; height: 14px; background: var(--gold-light); transform: translateX(-50%);
}
.ct-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px 22px; z-index: 4; }
.ct-overlay::before {
  content: ''; position: absolute; left: 22px; top: 0;
  width: 24px; height: 1px; background: var(--gold-light);
  transition: width 0.45s cubic-bezier(0.2,0,0.2,1);
}
.char-tile:hover .ct-overlay::before { width: calc(100% - 44px); }
.ct-title {
  font-family: 'Cinzel', serif; font-size: 8.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-top: 14px; opacity: 0.8;
}
.ct-name {
  font-family: 'Cinzel', serif; font-size: 16px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-bright);
  line-height: 1.1; margin-top: 8px;
}
.ct-name .surname { display: block; font-weight: 400; color: var(--gold-light); font-size: 0.85em; opacity: 0.85; }

.strip-footer {
  margin-top: 36px; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.strip-footer .note {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.12em;
  color: var(--text-muted); text-transform: uppercase;
}
.strip-footer .note b { color: var(--gold-bright); font-weight: 400; }

/* ── Inline codex links + hover preview (codex.js) ───────────── */
.codex-link {
  color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  transition: color 0.2s, border-color 0.2s;
}
.codex-link:hover { color: var(--gold-bright); border-bottom-color: var(--gold); }

.codex-pop {
  position: absolute; z-index: 9500; left: 0; top: 0;
  width: 300px; max-width: calc(100vw - 24px);
  display: none; overflow: hidden;
  background: #0d0d10;
  border: 1px solid rgba(196,185,152,0.32);
  box-shadow: 0 18px 48px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.codex-pop.open { display: block; opacity: 1; transform: none; }
.codex-pop-img { height: 116px; background-size: cover; background-position: top center; filter: brightness(0.85) saturate(0.9) grayscale(0.1); }
.codex-pop-body { padding: 14px 16px; }
.codex-pop-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.codex-pop-name { font-family: 'Cinzel', serif; font-size: 16px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-bright); margin-top: 5px; line-height: 1.1; }
.codex-pop-blurb { font-family: 'Inter', sans-serif; font-size: 12px; line-height: 1.6; color: var(--text-sub); margin-top: 9px; }
.codex-pop-go { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-light); margin-top: 12px; }
