/* ═══════════════════════════════════════════════════════════════════════════
   Anvilborn layout layer — loaded last.
   Gives the landing page, lobby and shared controls their own structure, so
   Anvilborn has its own visual identity:
     · notched iron buttons (not slanted parallelograms)
     · square riveted panels (not rounded glass cards)
     · split hero with a fanned hand of legendaries and a stat plaque
     · numbered "chronicle" features, mirrored market, full-bleed battlefield
     · 3×3 faction muster roll
     · lobby as a three-column war council
   All element ids are unchanged; JS is untouched.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --ab-notch: 10px;
  --ab-rivet: radial-gradient(circle at center, #8f8a80 0 1.6px, #3c3b39 2.2px, transparent 3px);
  --ab-frame-line: rgba(176, 141, 74, 0.45);
  --ab-panel-bg: linear-gradient(180deg, rgba(27, 23, 20, 0.94), rgba(16, 13, 11, 0.96));
}

/* ── 1. Shared controls ──────────────────────────────────────────────────── */

/* Notched plate: corners cut at 45°, brass edge drawn by an inner outline */
.btn-primary, .btn-secondary, .nav-cta, .lobby-inventory-btn, .economy-view-btn {
  clip-path: polygon(var(--ab-notch) 0, calc(100% - var(--ab-notch)) 0, 100% var(--ab-notch),
                     100% calc(100% - var(--ab-notch)), calc(100% - var(--ab-notch)) 100%,
                     var(--ab-notch) 100%, 0 calc(100% - var(--ab-notch)), 0 var(--ab-notch)) !important;
  border-radius: 0 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  position: relative;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}
.btn-primary, .nav-cta {
  background: linear-gradient(180deg, #9a2a20, #6a1512) !important;
  color: #f1e6c9 !important;
  box-shadow: inset 0 0 0 1px rgba(233, 217, 166, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.35) !important;
}
.btn-secondary, .lobby-inventory-btn, .economy-view-btn {
  background: linear-gradient(180deg, #34312d, #1d1b19) !important;
  color: var(--brass-hi) !important;
  box-shadow: inset 0 0 0 1px var(--ab-frame-line), inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
}
.btn-primary:hover, .btn-secondary:hover, .nav-cta:hover,
.lobby-inventory-btn:hover, .economy-view-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}
.btn-primary:active, .btn-secondary:active, .nav-cta:active { transform: translateY(1px); }

/* Riveted iron panel: square corners, double brass rule, a rivet in each corner */
.feature-card, .stat-box, .economy-ticker, .class-card, .tvn-parchment, .tvn-quest-board,
.ab-hero-plaque, .gh-container {
  border-radius: 0 !important;
  background:
    var(--ab-rivet) top 7px left 7px / 8px 8px no-repeat,
    var(--ab-rivet) top 7px right 7px / 8px 8px no-repeat,
    var(--ab-rivet) bottom 7px left 7px / 8px 8px no-repeat,
    var(--ab-rivet) bottom 7px right 7px / 8px 8px no-repeat,
    var(--ab-panel-bg) !important;
  border: 1px solid #0a0908 !important;
  box-shadow: inset 0 0 0 3px #26221e, inset 0 0 0 4px var(--ab-frame-line),
              0 10px 30px rgba(0, 0, 0, 0.55) !important;
}

/* ── 2. Navigation: brass rule, diamond separators, hanging logo tab ───────── */
nav { border-bottom: 1px solid rgba(176, 141, 74, 0.35) !important; }
nav::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(139, 26, 26, 0.7) 20%, rgba(139, 26, 26, 0.7) 80%, transparent);
  pointer-events: none;
}
.nav-logo {
  align-self: flex-start;
  margin-top: 6px;
  padding: 4px 16px 10px;
  background: linear-gradient(180deg, #141110, #0b0908);
  border: 1px solid rgba(176, 141, 74, 0.35);
  border-top: none;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  position: relative; z-index: 2;
}
.nav-links a { position: relative; }
.nav-links a:hover, .nav-links a.active, .nav-link.active {
  color: var(--brass-hi) !important;
  text-shadow: 0 0 10px rgba(179, 38, 30, 0.5);
}

/* ── 3. Landing ───────────────────────────────────────────────────────────── */

/* Split hero: copy on the left, fanned legendaries on the right, stat plaque below */
.hero.ab-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "copy fan" "plaque plaque";
  align-items: center;
  gap: 2rem 3rem;
  text-align: left !important;
  padding: 8rem clamp(1.5rem, 6vw, 6rem) 3rem !important;
  min-height: 100vh;
}
.ab-hero-copy { grid-area: copy; max-width: 620px; }
.ab-hero .hero-title { text-align: left; }
.ab-hero .hero-sub { text-align: left; letter-spacing: 0.35em; }
.ab-hero .hero-divider {
  margin: 1.6rem 0 !important;
  width: 180px !important;
  background: linear-gradient(90deg, var(--blood-hi), rgba(176, 141, 74, 0.6), transparent) !important;
}
.ab-hero .hero-desc { text-align: left; margin-left: 0 !important; max-width: 560px; }
.ab-hero .hero-btns { justify-content: flex-start !important; }

.ab-hero-fan {
  grid-area: fan;
  position: relative;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ab-hero-fan .card {
  position: absolute !important;
  width: 190px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-width: 1px !important;
  transform-origin: 50% 120%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7), inset 0 0 0 3px #1b1714 !important;
  background: #110e0c !important;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), z-index 0s !important;
  cursor: pointer;
}
.ab-hero-fan .card .card-art { height: 230px !important; border-radius: 0 !important; }
.ab-hero-fan .card:nth-child(1) { transform: translateX(-190px) rotate(-16deg); z-index: 1; }
.ab-hero-fan .card:nth-child(2) { transform: translateX(-95px) translateY(-14px) rotate(-8deg); z-index: 2; }
.ab-hero-fan .card:nth-child(3) { transform: translateY(-22px); z-index: 3; }
.ab-hero-fan .card:nth-child(4) { transform: translateX(95px) translateY(-14px) rotate(8deg); z-index: 2; }
.ab-hero-fan .card:nth-child(5) { transform: translateX(190px) rotate(16deg); z-index: 1; }
.ab-hero-fan .card:hover { z-index: 10 !important; filter: brightness(1.12); }
.ab-hero-fan .card:nth-child(1):hover { transform: translateX(-190px) translateY(-40px) rotate(-12deg) scale(1.06); }
.ab-hero-fan .card:nth-child(2):hover { transform: translateX(-95px) translateY(-52px) rotate(-5deg) scale(1.06); }
.ab-hero-fan .card:nth-child(3):hover { transform: translateY(-60px) scale(1.06); }
.ab-hero-fan .card:nth-child(4):hover { transform: translateX(95px) translateY(-52px) rotate(5deg) scale(1.06); }
.ab-hero-fan .card:nth-child(5):hover { transform: translateX(190px) translateY(-40px) rotate(12deg) scale(1.06); }

.ab-hero-plaque {
  grid-area: plaque;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.1rem 1.5rem;
  margin-top: 1rem;
}
.ab-hero-plaque .stat-box {
  background: none !important; border: none !important; box-shadow: none !important;
  padding: 0.4rem 1rem !important;
  display: flex; align-items: baseline; justify-content: center; gap: 0.7rem;
}
.ab-hero-plaque .stat-box + .stat-box { border-left: 1px solid rgba(176, 141, 74, 0.25) !important; }
.ab-hero-plaque .stat-number { font-size: 2rem !important; margin: 0 !important; }
.ab-hero-plaque .stat-label { margin: 0 !important; }

/* Market: ledger on the left, copy on the right */
.economy-layout { flex-direction: row-reverse !important; }
.economy-left { padding-left: 1rem; border-left: 3px solid rgba(139, 26, 26, 0.7); }
.economy-ticker { padding: 1.4rem !important; }

/* Features: numbered chronicle entries in two columns */
.features-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1.2rem 2.4rem !important;
  counter-reset: ab-chron;
  max-width: 1080px !important;
}
.feature-card {
  counter-increment: ab-chron;
  display: grid !important;
  grid-template-columns: 64px 84px 1fr;
  grid-template-rows: auto 1fr;
  align-items: center;
  column-gap: 1rem;
  text-align: left !important;
  padding: 1.3rem 1.6rem !important;
}
.feature-card::before {
  content: counter(ab-chron, upper-roman) !important;
  position: static !important;
  height: auto !important;
  background: none !important;
  opacity: 1 !important;
  grid-column: 1; grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: rgba(179, 38, 30, 0.85);
  text-align: center;
  border-right: 1px solid rgba(176, 141, 74, 0.25);
  line-height: 1;
  padding: 0.6rem 0.4rem 0.6rem 0;
}
.feature-card .feature-icon { grid-column: 2; grid-row: 1 / span 2; margin: 0 !important; }
.feature-card .feature-icon-img { width: 72px !important; height: 72px !important; }
.feature-card .feature-title { grid-column: 3; grid-row: 1; margin: 0 0 0.3rem !important; align-self: end; }
.feature-card .feature-text { grid-column: 3; grid-row: 2; margin: 0 !important; align-self: start; }
.feature-card:hover { transform: none; filter: brightness(1.08); }
.features-grid .feature-card:nth-child(even):hover { transform: translateY(2.2rem); }
.features-grid .feature-card:nth-child(even) { transform: translateY(2.2rem); }
.features { padding-bottom: 5rem !important; }

/* Battlefield: full-bleed band with the caption laid over it */
.board-section {
  position: relative;
  max-width: none !important;
  padding: 0 !important;
  margin: 4rem 0 0 !important;
}
.board-section > .reveal:first-child {
  position: absolute; z-index: 5;
  left: clamp(1.5rem, 6vw, 6rem); bottom: 2.4rem;
  text-align: left;
  max-width: 460px;
  padding: 1.2rem 1.6rem;
  background: linear-gradient(90deg, rgba(13, 11, 10, 0.92), rgba(13, 11, 10, 0.55));
  border-left: 3px solid var(--blood-hi);
}
.board-section > .reveal:first-child .section-title,
.board-section > .reveal:first-child .section-subtitle { text-align: left !important; margin-left: 0 !important; }
.board-section .board-preview {
  width: 100% !important;
  max-width: none !important;
  height: min(62vh, 620px) !important;
  border-radius: 0 !important;
  border: none !important;
  border-top: 1px solid rgba(176, 141, 74, 0.3) !important;
  border-bottom: 1px solid rgba(176, 141, 74, 0.3) !important;
  margin: 0 !important;
}
.ornament { display: none !important; }

/* Factions: 3×3 muster roll, portrait beside the text */
.classes-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  max-width: 1180px !important;
}
.class-card {
  display: grid !important;
  grid-template-columns: 112px 1fr;
  grid-auto-rows: min-content;
  column-gap: 1rem;
  align-items: start;
  text-align: left !important;
  padding: 1rem 1.1rem !important;
  min-height: 0 !important;
}
.class-card > .class-portrait {
  grid-row: 1 / span 8;
  width: 112px !important; height: 140px !important;
  object-fit: cover;
  border-radius: 0 !important;
  margin: 0 !important;
  border: 1px solid rgba(176, 141, 74, 0.35) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}
.class-card > *:not(.class-portrait) { text-align: left !important; margin-left: 0 !important; margin-right: 0 !important; }
.class-card .class-name { font-size: 1rem !important; margin-top: 0.2rem !important; }

/* ── 4. Lobby: the war council ───────────────────────────────────────────── */
@media (min-width: 1101px) {
  #screen-lobby .tvn-center.ab-council {
    display: grid !important;
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(280px, 340px);
    gap: 1.6rem;
    padding: 88px 1.6rem 1.2rem !important;
    height: 100vh;
    overflow: hidden !important;
    align-items: stretch;
    flex-wrap: nowrap !important;
  }
  #screen-lobby .ab-col {
    height: calc(100vh - 88px - 1.2rem) !important;
    max-height: none !important;
    overflow-y: auto;
    scrollbar-width: thin;
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
  }

  /* left: commander dossier */
  #lobby-commander .tvn-parchment { max-width: none !important; width: 100% !important; filter: none !important; }
  #lobby-commander .parch-body { padding: 1.6rem 1.3rem 1.4rem !important; }
  #lobby-commander .parch-stats-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem !important;
  }
  #lobby-commander .parch-stat-sep { display: none !important; }
  #lobby-commander .parch-stat {
    padding: 0.6rem 0.4rem;
    border: 1px solid rgba(176, 141, 74, 0.2);
    background: rgba(0, 0, 0, 0.25);
  }
  #lobby-commander .parch-stat:first-child { grid-column: 1 / -1; }
  #lobby-commander .lobby-inventory-btn { width: 100%; margin-top: 1rem; }

  /* centre: take the field */
  #lobby-main.ab-col-mid {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 1.2rem !important;
    padding: 0 0.4rem 2rem !important;
  }
  .ab-field-head { text-align: center; padding-top: 0.6rem; }
  .ab-field-kicker {
    font-family: var(--font-heading); font-size: 0.75rem; letter-spacing: 0.4em;
    color: rgba(217, 184, 114, 0.7); text-transform: uppercase;
  }
  .ab-field-title {
    font-family: var(--font-display); font-weight: 400;
    font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1;
    color: #ecdcae; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
    margin: 0.3rem 0 0.2rem;
  }
  .ab-field-sub { font-family: var(--font-body); font-style: italic; color: var(--text-dim); }

  /* modes: three tall war banners, two plaques beneath */
  #screen-lobby .tvn-signs-rail {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem !important;
    max-width: 760px !important;
    width: 100% !important;
    margin: 0 auto;
  }
  #screen-lobby .tvn-sign {
    animation: none !important;
    transform: none !important;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.65)) !important;
    width: auto !important;
  }
  #screen-lobby .tvn-sign .sign-chains { display: none !important; }
  #screen-lobby .sign-casual, #screen-lobby .sign-ranked, #screen-lobby .sign-ai { grid-column: span 2; }
  #screen-lobby .sign-tutorial, #screen-lobby .sign-tournament { grid-column: span 3; }
  #screen-lobby .sign-ranked { order: -1; }

  #screen-lobby .sign-casual .sign-board,
  #screen-lobby .sign-ranked .sign-board,
  #screen-lobby .sign-ai .sign-board {
    width: 100% !important;
    min-height: 250px;
    padding: 2rem 1rem 3.2rem !important;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
    border-radius: 0 !important;
    border: none !important;
    /* swallowtail banner */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
    background:
      linear-gradient(90deg, transparent 0 8px, rgba(176, 141, 74, 0.55) 8px 9px, transparent 9px calc(100% - 9px),
                      rgba(176, 141, 74, 0.55) calc(100% - 9px) calc(100% - 8px), transparent calc(100% - 8px)),
      linear-gradient(180deg, #5e1713 0%, #3d0f0c 55%, #230807 100%) !important;
    box-shadow: inset 0 14px 0 -8px rgba(0, 0, 0, 0.45) !important;
    transition: transform 0.2s ease, filter 0.2s ease;
  }
  #screen-lobby .sign-casual .sign-board { background:
      linear-gradient(90deg, transparent 0 8px, rgba(176, 141, 74, 0.55) 8px 9px, transparent 9px calc(100% - 9px),
                      rgba(176, 141, 74, 0.55) calc(100% - 9px) calc(100% - 8px), transparent calc(100% - 8px)),
      linear-gradient(180deg, #2f3a33 0%, #1c2420 55%, #111613 100%) !important; }
  #screen-lobby .sign-ai .sign-board { background:
      linear-gradient(90deg, transparent 0 8px, rgba(176, 141, 74, 0.55) 8px 9px, transparent 9px calc(100% - 9px),
                      rgba(176, 141, 74, 0.55) calc(100% - 9px) calc(100% - 8px), transparent calc(100% - 8px)),
      linear-gradient(180deg, #2c2f3a 0%, #1a1c24 55%, #0f1015 100%) !important; }
  #screen-lobby .sign-casual .sign-board::before,
  #screen-lobby .sign-ranked .sign-board::before,
  #screen-lobby .sign-ai .sign-board::before {
    content: ''; position: absolute; left: -4%; right: -4%; top: 0; height: 12px; inset: 0 -4% auto -4%;
    background: linear-gradient(180deg, #6d6a64, #2e2c29); border: none !important; border-radius: 0 !important;
  }
  #screen-lobby .tvn-sign:hover .sign-board { transform: translateY(-4px); filter: brightness(1.2); }
  #screen-lobby .sign-casual .sign-icon-img,
  #screen-lobby .sign-ranked .sign-icon-img,
  #screen-lobby .sign-ai .sign-icon-img { width: 84px !important; height: 84px !important; }
  #screen-lobby .sign-casual .sign-name,
  #screen-lobby .sign-ranked .sign-name,
  #screen-lobby .sign-ai .sign-name { font-size: 1.35rem !important; letter-spacing: 0.08em; color: #f0e3c2 !important; }
  #screen-lobby .sign-sub { font-size: 0.8rem !important; color: rgba(233, 217, 166, 0.7) !important; }

  #screen-lobby .sign-tutorial .sign-board,
  #screen-lobby .sign-tournament .sign-board {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.9rem;
    text-align: left !important;
    padding: 0.8rem 1.2rem !important;
    border-radius: 0 !important;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px),
                       calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    background: linear-gradient(180deg, #2a2724, #171513) !important;
    box-shadow: inset 0 0 0 1px rgba(176, 141, 74, 0.4) !important;
    border: none !important;
  }
  #screen-lobby .sign-tutorial .sign-icon, #screen-lobby .sign-tournament .sign-icon { grid-row: 1 / span 2; margin: 0 !important; }
  #screen-lobby .sign-tutorial .sign-icon-img, #screen-lobby .sign-tournament .sign-icon-img { width: 48px !important; height: 48px !important; }
  #screen-lobby .sign-tutorial .sign-name, #screen-lobby .sign-tournament .sign-name { text-align: left !important; }
  #screen-lobby .sign-tutorial .sign-sub, #screen-lobby .sign-tournament .sign-sub { text-align: left !important; }

  #lobby-game-history { width: 100%; max-width: 760px !important; margin: 0.4rem auto 0 !important; }

  /* right: the Quartermaster above the contracts board */
  #lobby-sidebar.ab-col-right { display: flex !important; flex-direction: column; gap: 1rem; }
  #lobby-sidebar .keeper-overlay {
    position: relative !important; inset: auto !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 0.6rem;
    pointer-events: auto;
  }
  #lobby-sidebar .tvn-keeper { flex: 0 0 120px; width: 120px !important; height: auto !important; }
  #lobby-sidebar .keeper-portrait-img {
    width: 120px !important; height: 150px !important; object-fit: cover;
    border-radius: 0 !important;
    border: 1px solid rgba(176, 141, 74, 0.45) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6) !important;
  }
  #lobby-sidebar .keeper-bubble {
    position: relative !important; inset: auto !important;
    flex: 1; max-width: none !important;
    border-radius: 0 !important;
    background: #d8c9a3 !important;
    color: #241c14 !important;
    border: none !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5) !important;
    padding: 0.8rem 0.9rem !important;
  }
  #lobby-sidebar .keeper-bubble p { color: #241c14 !important; font-style: italic; }
  #lobby-sidebar .keeper-bubble::after {
    content: ''; position: absolute; right: -8px; bottom: 18px;
    border: 8px solid transparent; border-left-color: #d8c9a3; border-right: 0;
  }
  #lobby-sidebar .tvn-quest-board { flex: 1 1 auto; max-width: none !important; padding: 1.2rem 1rem !important; }
}

/* ── 5. Narrow screens: stack everything ─────────────────────────────────── */
@media (max-width: 1100px) {
  .hero.ab-hero { grid-template-columns: 1fr; grid-template-areas: "copy" "fan" "plaque"; text-align: center !important; }
  .ab-hero-copy { margin: 0 auto; }
  .ab-hero .hero-title, .ab-hero .hero-sub, .ab-hero .hero-desc { text-align: center; margin-left: auto !important; margin-right: auto !important; }
  .ab-hero .hero-divider { margin: 1.6rem auto !important; }
  .ab-hero .hero-btns { justify-content: center !important; }
  .ab-hero-fan { height: 380px; --fan-base: 0.8; }
  .classes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #screen-lobby .tvn-center.ab-council { display: flex !important; flex-direction: column !important; }
  #lobby-commander, #lobby-sidebar.ab-col-right, #lobby-main.ab-col-mid {
    width: 100% !important; max-width: 640px !important; margin: 0 auto !important;
    align-self: center !important; height: auto !important; overflow: visible !important;
  }
  #lobby-commander .tvn-parchment { max-width: none !important; width: 100% !important; }
  #lobby-sidebar .keeper-overlay {
    position: static !important; flex-direction: column !important; align-items: center !important;
    gap: 0.6rem; margin: 0.8rem auto !important;
  }
  #lobby-sidebar .keeper-bubble { position: static !important; transform: none !important; max-width: 92% !important; }
  .ab-field-head { text-align: center; margin: 1rem 0 0.4rem; }
  .ab-field-title { font-family: var(--font-display) !important; font-size: 2.6rem !important; font-weight: 400; color: #ecdcae; line-height: 1.05; margin: 0.2rem 0; }
  .ab-field-kicker { font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 0.35em; text-transform: uppercase; color: rgba(217, 184, 114, 0.7); }
  .ab-field-sub { font-family: var(--font-body); font-style: italic; color: var(--text-dim); }
  #screen-lobby .tvn-sign { animation: none !important; transform: none !important; }
  #screen-lobby .tvn-sign .sign-chains { display: none !important; }
  #screen-lobby .tvn-sign .sign-board {
    border-radius: 0 !important; border: none !important;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px),
                       calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    background: linear-gradient(180deg, #2a2724, #171513) !important;
    box-shadow: inset 0 0 0 1px rgba(176, 141, 74, 0.4) !important;
  }
  #screen-lobby .sign-ranked .sign-board { background: linear-gradient(180deg, #5e1713, #2a0a08) !important; }
  #screen-lobby .sign-ranked { order: -1; }
  #lobby-main.ab-col-mid { align-items: stretch !important; }
  #lobby-game-history, #lobby-game-history > * { width: 100% !important; max-width: none !important; }
  #lobby-sidebar .keeper-bubble { width: auto !important; min-width: 240px; }
}
@media (max-width: 720px) {
  .ab-hero-fan { display: none; }
  .ab-hero-plaque { grid-template-columns: repeat(2, 1fr); }
  .ab-hero-plaque .stat-box + .stat-box { border-left: none !important; }
  .features-grid { grid-template-columns: 1fr !important; }
  .features-grid .feature-card:nth-child(even) { transform: none; }
  .feature-card { grid-template-columns: 44px 64px 1fr; }
  .classes-grid { grid-template-columns: 1fr !important; }
  .board-section > .reveal:first-child { position: static; max-width: none; }
}

/* ── 6. Inner screens ────────────────────────────────────────────────────── */

/* Header band: title and subtitle on one line over a blood-red rule */
.screen-body > .screen-title,
#crafting-top-bar .screen-title {
  display: inline-block;
  margin: 0 1rem 0 0 !important;
  vertical-align: baseline;
}
.screen-body > .screen-subtitle {
  display: inline-block;
  vertical-align: baseline;
  margin: 0 !important;
  opacity: 0.85;
}
.screen-body > .screen-subtitle,
.screen-body > .screen-title:not(:has(+ .screen-subtitle)) {
  padding-bottom: 0.9rem;
}
.screen-body > .screen-subtitle + *,
.screen-body > .screen-title + :not(.screen-subtitle) {
  margin-top: 0.4rem;
  border-top: 1px solid rgba(139, 26, 26, 0.65);
  box-shadow: 0 -1px 0 rgba(176, 141, 74, 0.2);
  padding-top: 1.2rem;
}

/* Bookmark tabs: plain small-caps text on a brass rule, red marker when active */
.mp-tab, .shop-tab, .lb-tab, .crafting-tab {
  background: none !important;
  background-image: none !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  color: rgba(217, 184, 114, 0.6) !important;
  font-family: var(--font-heading) !important;
  letter-spacing: 0.12em !important;
  padding: 0.55rem 1rem !important;
  min-width: 0 !important;
  height: auto !important;
  transition: color 0.15s ease, border-color 0.15s ease !important;
}
.mp-tab:hover, .shop-tab:hover, .lb-tab:hover, .crafting-tab:hover { color: var(--brass-hi) !important; }
.mp-tab.active, .shop-tab.active, .lb-tab.active, .crafting-tab.active {
  color: #f1e6c9 !important;
  border-bottom-color: var(--blood-hi) !important;
}
.mp-tab.active::before, .shop-tab.active::before, .lb-tab.active::before, .crafting-tab.active::before {
  content: '◆ '; color: var(--blood-hi); font-size: 0.7em; vertical-align: 0.15em;
}
.mp-tabs, #shop-tabs, .lb-tabs, .crafting-tabs {
  display: flex !important;
  gap: 0.2rem !important;
  border-bottom: 1px solid rgba(176, 141, 74, 0.3) !important;
  background: none !important;
  padding: 0 !important;
}

@media (min-width: 1101px) {
  /* Armoury (collection): filter column on the left, grid on the right */
  #screen-collection .screen-body {
    display: grid !important;
    grid-template-columns: 230px minmax(0, 1fr);
    grid-template-areas: "title title" "filters grid" "filters pages";
    column-gap: 1.6rem;
    align-items: start;
  }
  #screen-collection .screen-title { grid-area: title; }
  #screen-collection .screen-subtitle { display: none; }
  #screen-collection .coll-filters {
    grid-area: filters;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.8rem !important;
    padding: 1.2rem 1rem !important;
    position: sticky; top: 90px;
    background: var(--ab-rivet) top 7px left 7px / 8px 8px no-repeat,
                var(--ab-rivet) top 7px right 7px / 8px 8px no-repeat,
                var(--ab-panel-bg) !important;
    box-shadow: inset 0 0 0 3px #26221e, inset 0 0 0 4px var(--ab-frame-line) !important;
    border: none !important;
  }
  #screen-collection .coll-filters::before {
    content: 'Sort the Armoury';
    font-family: var(--font-heading); letter-spacing: 0.2em; font-size: 0.72rem;
    color: rgba(217, 184, 114, 0.7); text-transform: uppercase;
    border-bottom: 1px solid rgba(176, 141, 74, 0.25); padding-bottom: 0.5rem;
  }
  #screen-collection .coll-filters > * { width: 100% !important; max-width: none !important; margin: 0 !important; }
  #screen-collection #collection-grid { grid-area: grid; margin-top: 0 !important; }
  #screen-collection #collection-pagination { grid-area: pages; }

  /* Warbands: roster on the left, muster form as a side panel */
  #screen-decks .screen-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "title title" "list form" "list slots";
    column-gap: 1.6rem;
    align-items: start;
  }
  #screen-decks .screen-title { grid-area: title; }
  #screen-decks .screen-subtitle { display: none; }
  #screen-decks .new-deck-form {
    grid-area: form;
    display: flex !important; flex-direction: column !important; gap: 0.8rem !important;
    padding: 1.3rem 1.2rem !important; margin: 0 !important;
  }
  #screen-decks .new-deck-form::before {
    content: 'Muster a new warband';
    font-family: var(--font-display); font-size: 1.5rem; color: #ecdcae;
  }
  #screen-decks .new-deck-form > * { width: 100% !important; margin: 0 !important; }
  #screen-decks .deck-list { grid-area: list; margin-top: 0 !important; }
  #screen-decks .screen-body > :not(.screen-title):not(.screen-subtitle):not(.new-deck-form):not(.deck-list) { grid-area: slots; }

  /* Warband builder: warband list on the left, card library on the right */
  .builder-layout { grid-template-columns: 300px minmax(0, 1fr) !important; }
  .builder-right {
    order: -1;
    border-left: none !important;
    border-right: 2px solid rgba(139, 26, 26, 0.55) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.8) !important;
  }

  /* Black Market: ledger index down the left */
  #screen-marketplace .screen-body {
    display: grid !important;
    grid-template-columns: 210px minmax(0, 1fr);
    column-gap: 1.6rem;
    align-items: start;
  }
  #screen-marketplace .screen-title,
  #screen-marketplace .screen-subtitle { grid-column: 1 / -1; }
  #screen-marketplace .mp-tabs {
    grid-column: 1; grid-row: 3 / span 8;
    flex-direction: column !important;
    border-bottom: none !important;
    border-right: 1px solid rgba(176, 141, 74, 0.3) !important;
    position: sticky; top: 90px;
    margin: 0 !important;
  }
  #screen-marketplace .mp-tab {
    text-align: left !important;
    border-bottom: none !important;
    border-left: 3px solid transparent !important;
    padding: 0.8rem 1rem !important;
    width: 100%;
  }
  #screen-marketplace .mp-tab.active { border-left-color: var(--blood-hi) !important; background: rgba(139, 26, 26, 0.12) !important; }
  #screen-marketplace .screen-body > :not(.screen-title):not(.screen-subtitle):not(.mp-tabs) { grid-column: 2; }

  /* Leaderboard: see §10 (Roll of Honour) */

  /* Settings: sections as tabs across the top */
  #settings-layout { grid-template-columns: 1fr !important; gap: 1.2rem !important; }
  #settings-sidebar {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap;
    gap: 0.2rem !important;
    width: auto !important; position: static !important;
    background: none !important; border: none !important; box-shadow: none !important;
    border-bottom: 1px solid rgba(176, 141, 74, 0.3) !important;
    padding: 0 !important;
  }
  .settings-nav-btn {
    width: auto !important;
    background: none !important; border: none !important; border-radius: 0 !important;
    border-bottom: 2px solid transparent !important;
    padding: 0.6rem 1rem !important;
    color: rgba(217, 184, 114, 0.6) !important;
    font-family: var(--font-heading) !important; letter-spacing: 0.1em;
    box-shadow: none !important;
  }
  .settings-nav-btn.active { color: #f1e6c9 !important; border-bottom-color: var(--blood-hi) !important; }
  #settings-content {
    background: var(--ab-rivet) top 7px left 7px / 8px 8px no-repeat,
                var(--ab-rivet) top 7px right 7px / 8px 8px no-repeat,
                var(--ab-rivet) bottom 7px left 7px / 8px 8px no-repeat,
                var(--ab-rivet) bottom 7px right 7px / 8px 8px no-repeat,
                var(--ab-panel-bg) !important;
    box-shadow: inset 0 0 0 3px #26221e, inset 0 0 0 4px var(--ab-frame-line) !important;
    padding: 1.6rem 1.8rem !important;
  }

  /* Crafting: the anvil on the left, the card grid on the right */
  #crafting-layout { direction: rtl; }
  #crafting-layout > * { direction: ltr; }
}

/* ── 7. The Merchant's Wagon (shop) ──────────────────────────────────────── */
#screen-shop .screen-body { max-width: 1240px !important; }

/* Tabs become merchant stalls: painted icon over the label */
#screen-shop #shop-tabs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem !important;
  border-bottom: none !important;
  margin-bottom: 1.6rem !important;
}
#screen-shop .shop-tab {
  display: flex !important; flex-direction: column; align-items: center; gap: 0.45rem;
  padding: 0.9rem 0.4rem 0.7rem !important;
  border-bottom: 3px solid transparent !important;
  background: linear-gradient(180deg, rgba(27, 23, 20, 0.9), rgba(13, 11, 10, 0.95)) !important;
  box-shadow: inset 0 0 0 1px rgba(176, 141, 74, 0.25) !important;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px) !important;
}
#screen-shop .shop-tab::before, #screen-shop .shop-tab.active::before {
  content: '' !important;
  width: 54px; height: 54px;
  background: center / contain no-repeat;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7)) grayscale(0.45) brightness(0.8);
  transition: filter 0.15s ease, transform 0.15s ease;
}
#screen-shop .shop-tab[data-tab="gold"]::before      { background-image: url('../assets/Gold_pile.webp'); }
#screen-shop .shop-tab[data-tab="packs"]::before     { background-image: url('../assets/Card_Pack.webp'); }
#screen-shop .shop-tab[data-tab="cosmetics"]::before { background-image: url('../assets/cosmetics.webp'); }
#screen-shop .shop-tab[data-tab="tokens"]::before    { background-image: url('../assets/token_shop.webp'); }
#screen-shop .shop-tab[data-tab="ranked"]::before    { background-image: url('../assets/ranked.webp'); }
#screen-shop .shop-tab[data-tab="prestige"]::before  { background-image: url('../assets/prestige-card-back.webp'); }
#screen-shop .shop-tab:hover::before { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7)); transform: translateY(-2px); }
#screen-shop .shop-tab.active {
  border-bottom-color: var(--blood-hi) !important;
  background: linear-gradient(180deg, rgba(94, 23, 19, 0.55), rgba(20, 10, 9, 0.95)) !important;
  box-shadow: inset 0 0 0 1px rgba(217, 184, 114, 0.5) !important;
}
#screen-shop .shop-tab.active::before { filter: drop-shadow(0 3px 8px rgba(179, 38, 30, 0.6)); }

/* Shared item look: iron plates, square art */
#screen-shop .shop-item, #screen-shop .gold-tier-card, #screen-shop .token-bundle-card,
#screen-shop .cosmetic-card, #screen-shop .class-unlock-card, #screen-shop .gold-custom-panel,
#screen-shop #shop-withdraw-section, #screen-shop .ranked-card, #screen-shop .token-shop-status {
  border-radius: 0 !important;
  border: 1px solid #0a0908 !important;
  background: var(--ab-panel-bg) !important;
  box-shadow: inset 0 0 0 2px #26221e, inset 0 0 0 3px rgba(176, 141, 74, 0.3), 0 8px 22px rgba(0, 0, 0, 0.5) !important;
}
#screen-shop .shop-cat-title, #screen-shop #shop-tab-cosmetics > h3, #screen-shop .sp-section-title {
  font-family: var(--font-display) !important; font-size: 1.5rem !important; font-weight: 400 !important;
  text-transform: none !important; letter-spacing: 0.02em !important; color: #ecdcae !important;
  border-bottom: 1px solid rgba(139, 26, 26, 0.6); padding-bottom: 0.4rem; margin: 0.4rem 0 1rem !important;
}

@media (min-width: 1101px) {
  /* Crowns: price ledger on the left, custom amount + withdrawal in a sticky side column */
  #shop-tab-gold:not([style*="none"]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: "title title" "tiers custom" "tiers withdraw";
    gap: 0 1.6rem;
    align-items: start;
  }
  #shop-tab-gold .shop-category { display: contents !important; }
  #shop-tab-gold .shop-cat-title { grid-area: title; }
  #shop-tab-gold .gold-tier-grid {
    grid-area: tiers;
    display: flex !important; flex-direction: column !important; gap: 0.5rem !important;
  }
  #shop-tab-gold .gold-tier-card {
    display: grid !important;
    grid-template-columns: 64px 1fr 1fr 120px;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.2rem !important;
    text-align: left !important;
    min-height: 0 !important;
  }
  #shop-tab-gold .gold-tier-img-wrap { margin: 0 !important; width: 56px !important; height: 56px !important; }
  #shop-tab-gold .gold-tier-img-wrap img { width: 56px !important; height: 56px !important; }
  #shop-tab-gold .tier-euros { font-size: 1.5rem !important; margin: 0 !important; text-align: left !important; }
  #shop-tab-gold .tier-total-gold { font-size: 1.3rem !important; margin: 0 !important; text-align: right !important; }
  #shop-tab-gold .btn-bundle-buy { margin: 0 !important; width: 100% !important; }
  #shop-tab-gold .gold-tier-card.best-value { position: relative; box-shadow: inset 0 0 0 2px #26221e, inset 0 0 0 3px var(--blood-hi), 0 8px 22px rgba(0, 0, 0, 0.5) !important; }
  #shop-tab-gold .gold-tier-card.best-value::after {
    content: 'Best value'; position: absolute; left: -6px; top: -8px;
    padding: 2px 10px; background: var(--blood-hi); color: #f1e6c9;
    font-family: var(--font-heading); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  }
  #shop-tab-gold .gold-custom-panel { grid-area: custom; margin: 0 0 1rem !important; position: sticky; top: 90px; }
  #shop-tab-gold #shop-withdraw-section { grid-area: withdraw; margin: 0 !important; }

  /* War chests: three featured chests, boosts as compact rows, slot as a strip */
  #shop-tab-packs .shop-items-grid:has([id^="shop-item-pack_"]) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }
  #shop-tab-packs [id^="shop-item-pack_"] { padding: 1.4rem 1.2rem !important; min-height: 360px; }
  #shop-tab-packs [id^="shop-item-pack_"] .shop-item-icon {
    width: 170px !important; height: 170px !important; margin: 0 auto 0.8rem !important;
  }
  #shop-tab-packs [id^="shop-item-pack_"] .shop-item-img { width: 100% !important; height: 100% !important; }
  #shop-tab-packs [id^="shop-item-boost"] .shop-item-icon, #shop-tab-packs #shop-item-deck_slot .shop-item-icon { width: 56px !important; height: 56px !important; }
  #shop-tab-packs [id^="shop-item-pack_"] .shop-item-name { font-size: 1.2rem !important; }
  #shop-tab-packs [id^="shop-item-boost"], #shop-tab-packs #shop-item-deck_slot {
    display: grid !important;
    grid-template-columns: 64px 1fr auto;
    grid-template-areas: "icon name footer" "icon desc footer";
    align-items: center; column-gap: 1rem;
    text-align: left !important;
    padding: 0.8rem 1.1rem !important;
    min-height: 0 !important;
  }
  #shop-tab-packs [id^="shop-item-boost"] .shop-item-icon, #shop-tab-packs #shop-item-deck_slot .shop-item-icon { grid-area: icon; margin: 0 !important; }
  #shop-tab-packs [id^="shop-item-boost"] .shop-item-name, #shop-tab-packs #shop-item-deck_slot .shop-item-name { grid-area: name; margin: 0 !important; text-align: left !important; }
  #shop-tab-packs [id^="shop-item-boost"] .shop-item-desc, #shop-tab-packs #shop-item-deck_slot .shop-item-desc { grid-area: desc; margin: 0 !important; text-align: left !important; }
  #shop-tab-packs [id^="shop-item-boost"] .shop-item-footer, #shop-tab-packs #shop-item-deck_slot .shop-item-footer { grid-area: footer; margin: 0 !important; gap: 0.8rem; }
  #shop-tab-packs .shop-items-grid:not(:has([id^="shop-item-pack_"])) {
    display: flex !important; flex-direction: column !important; gap: 0.5rem !important;
  }

  /* Season pass: summary and purchase left, challenges and milestones right */
  #shop-tab-ranked .ranked-grid { display: block !important; }
  #shop-tab-ranked .ranked-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    max-width: none !important;
    text-align: left !important;
    padding: 2rem 2.2rem !important;
  }
  #shop-tab-ranked .sp-col-main { border-right: 1px solid rgba(176, 141, 74, 0.2); padding-right: 2rem; }
  #shop-tab-ranked .ranked-icon { justify-content: flex-start !important; text-align: left !important; }
  #shop-tab-ranked .ranked-card h3, #shop-tab-ranked .ranked-card p { text-align: left !important; }
  #shop-tab-ranked .ranked-price { text-align: left !important; font-size: 2rem !important; margin-top: 1rem !important; }
  #shop-tab-ranked .ranked-buy-btn { width: 100%; }

  /* Prestige: faction unlocks in a 4×2 grid */
  #shop-prestige-content .cosmetics-grid:has(.class-unlock-card) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

  /* Tokens: status on the left, bundles in a row */
  #shop-token-bundles { display: grid !important; grid-template-columns: 280px minmax(0, 1fr); gap: 0 1.4rem; align-items: stretch; }
  #shop-token-bundles > .shop-cat-title { grid-column: 1 / -1; }
  #shop-token-bundles .token-shop-grid { grid-column: 2; display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0.8rem !important; }
  #shop-token-bundles .token-shop-status { grid-column: 1; grid-row: 2; }
  #shop-token-bundles .token-shop-status { flex-direction: column !important; justify-content: center; text-align: center; padding: 1.4rem !important; margin: 0 !important; }
  #shop-token-bundles .token-shop-grid { margin: 0 !important; }
}

/* ── 8. Landing journey: a fly-through scrubbed by scroll ─────────────────── */
/* js/landing-journey.js drives it: --ab-dim (per-section darkening), --mx/--my
   (cursor), --hero-out (0 → 1 as the hero scrolls away), --sx/--sy (card spotlight) */

#screen-landing {
  position: relative;
  background: transparent !important;
  /* translucent iron so the journey shows through every panel */
  --ab-panel-bg: linear-gradient(180deg, rgba(27, 23, 20, 0.7), rgba(14, 11, 9, 0.82));
}
#screen-landing > section, #screen-landing > footer { position: relative; z-index: 1; }

.ab-stage {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  background: var(--soot);
  --ab-dim: 0.15; --mx: 50%; --my: 50%;
}
.ab-stage-media { position: absolute; inset: -2%; transform: scale(1.06); will-change: transform; }
.ab-stage-video, .ab-stage-still {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ab-stage-still { transition: opacity 0.3s linear; }
.ab-stage-embers { position: absolute; inset: 0; width: 100%; height: 100%; }
.ab-stage-glow {
  position: absolute; inset: 0;
  background: radial-gradient(560px circle at var(--mx) var(--my), rgba(222, 116, 55, 0.16), transparent 65%);
  mix-blend-mode: screen;
}
.ab-stage-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 11, 10, 0.78) 0%, rgba(13, 11, 10, 0.3) 42%, transparent 68%),
    linear-gradient(to bottom, rgba(13, 11, 10, 0.6) 0%, transparent 16%, transparent 72%, rgba(13, 11, 10, 0.85) 100%);
}
.ab-stage-shade::after {
  content: ''; position: absolute; inset: 0;
  background: var(--soot);
  opacity: var(--ab-dim);
  transition: opacity 0.9s ease;
}
.ab-still-only .ab-stage-media { transform: none; }

/* Headings float over moving footage: give them a soot halo */
/* (gradient-clipped titles: text-shadow would bleed through the glyphs, so use drop-shadow) */
#screen-landing .section-title, #screen-landing .economy-heading, #screen-landing .hero-title {
  text-shadow: none !important;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.9));
}
#screen-landing .section-subtitle, #screen-landing .hero-desc, #screen-landing .economy-subtitle { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95); }

/* Glass iron: blur what passes behind the panels */
#screen-landing .feature-card, #screen-landing .class-card, #screen-landing .economy-ticker,
#screen-landing .ab-hero-plaque {
  -webkit-backdrop-filter: blur(7px) saturate(1.15);
  backdrop-filter: blur(7px) saturate(1.15);
}

/* Cursor spotlight on panels */
#screen-landing .feature-card, #screen-landing .class-card, #screen-landing .economy-ticker { position: relative; }
#screen-landing .feature-card::after, #screen-landing .class-card::after, #screen-landing .economy-ticker::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(260px circle at var(--sx, -300px) var(--sy, -300px), rgba(217, 184, 114, 0.13), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease;
}
#screen-landing .feature-card:hover::after, #screen-landing .class-card:hover::after,
#screen-landing .economy-ticker:hover::after { opacity: 1; }
#screen-landing .class-card { transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease !important; }
#screen-landing .class-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 3px #26221e, inset 0 0 0 4px var(--brass-hi), 0 16px 40px rgba(0, 0, 0, 0.7),
              0 0 28px rgba(179, 38, 30, 0.25) !important;
}

/* Hero: no own backdrop; copy lifts away as you march through the gate */
.hero.ab-hero { background: none !important; overflow: visible !important; }
.ab-hero-copy {
  opacity: calc(1 - var(--hero-out, 0) * 1.15);
  transform: translateY(calc(var(--hero-out, 0) * -70px));
}
.ab-hero-fan {
  opacity: calc(1 - var(--hero-out, 0) * 0.9);
  transform: translateY(calc(var(--hero-out, 0) * -30px)) scale(calc(var(--fan-base, 1) * (1 - var(--hero-out, 0) * 0.08)));
}
/* js/landing-journey.js animates the fan per frame; CSS transitions would fight it */
.ab-hero-fan.ab-fan-live .card { transition: filter 0.3s ease, box-shadow 0.3s ease !important; will-change: transform; }
.ab-hero-fan.ab-fan-live .card:hover { filter: none; }
.ab-hero-fan.ab-fan-live .card.is-lifted { filter: brightness(1.12); }
.ab-scroll-cue {
  position: absolute; left: 50%; bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(217, 184, 114, 0.75);
  opacity: calc(1 - var(--hero-out, 0) * 4);
  pointer-events: none;
}
.ab-scroll-cue::after {
  content: ''; width: 10px; height: 10px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: ab-cue 1.8s ease-in-out infinite;
}
@keyframes ab-cue { 0%, 100% { transform: translateY(0) rotate(45deg); opacity: 0.4; } 50% { transform: translateY(6px) rotate(45deg); opacity: 1; } }

/* Staggered reveals inside grids */
.reveal.ab-stagger { opacity: 1 !important; transform: none !important; }
.reveal.ab-stagger > * {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), translate 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.reveal.ab-stagger.visible > * { opacity: 1; translate: 0 0; }

/* War-table band melts into the footage instead of hard edges */
#screen-landing .board-section .board-preview {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  border-top: none !important; border-bottom: none !important;
}

/* Finale: the camera arrives at the Great Anvil */
.ab-finale {
  min-height: 110vh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 18vh 1.5rem 6rem;
  text-align: center;
}
.ab-finale-inner { max-width: 720px; }
.ab-kicker {
  font-family: var(--font-heading);
  font-size: 0.8rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--brass-hi);
  margin-bottom: 1rem;
}
.ab-finale-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 1;
  margin: 0 0 1.4rem;
  color: #f1e6c9;
  animation: ab-forge-glow 3.2s ease-in-out infinite;
}
@keyframes ab-forge-glow {
  0%, 100% { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9), 0 0 24px rgba(222, 116, 55, 0.25); }
  50%      { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9), 0 0 46px rgba(222, 116, 55, 0.55); }
}
.ab-finale-desc {
  font-family: var(--font-body);
  font-size: 1.1rem; line-height: 1.7;
  color: var(--text, #d8c9a3);
  max-width: 560px; margin: 0 auto 2.2rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 1);
}
.ab-finale-btns { justify-content: center !important; }

/* Section rail: Roman-numbered diamonds, the label slides out on hover */
.ab-rail {
  position: fixed; right: 1.3rem; top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 1.05rem;
  padding: 0.4rem 0;
}
.ab-rail-line { position: absolute; right: 0.74rem; top: 0; bottom: 0; width: 1px; background: rgba(176, 141, 74, 0.22); }
.ab-rail-fill {
  position: absolute; inset: 0;
  background: linear-gradient(var(--blood-hi), var(--brass-hi));
  transform-origin: top; transform: scaleY(0);
}
.ab-rail-mark {
  position: relative;
  display: flex; align-items: center; gap: 0.7rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: rgba(216, 201, 163, 0.55);
}
.ab-rail-num {
  order: 2; position: relative; z-index: 0;
  width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center;
  font-family: var(--font-heading); font-size: 0.56rem;
}
.ab-rail-num::before {
  content: ''; position: absolute; inset: 3px; z-index: -1;
  transform: rotate(45deg);
  background: var(--soot);
  border: 1px solid rgba(176, 141, 74, 0.45);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.ab-rail-label {
  order: 1;
  font-family: var(--font-heading); font-size: 0.78rem; letter-spacing: 0.14em;
  white-space: nowrap;
  text-shadow: 0 1px 8px #000;
  opacity: 0; transform: translateX(8px);
  transition: opacity 0.25s, transform 0.25s;
}
.ab-rail:hover .ab-rail-label, .ab-rail-mark:focus-visible .ab-rail-label { opacity: 0.85; transform: none; }
.ab-rail-mark.is-past .ab-rail-num::before { border-color: var(--brass-hi); }
.ab-rail-mark.is-active { color: #f1e6c9; }
.ab-rail-mark.is-active .ab-rail-num::before {
  background: linear-gradient(180deg, #9a2a20, #6a1512);
  border-color: var(--brass-hi);
  box-shadow: 0 0 14px rgba(179, 38, 30, 0.7);
}
.ab-rail-mark.is-active .ab-rail-label { color: var(--brass-hi); }
.ab-rail-mark:hover { color: #f1e6c9; }

@media (max-width: 900px) {
  .ab-rail { display: none; }
  .ab-finale { min-height: 90vh; padding-top: 14vh; }
  .ab-scroll-cue { display: none; }
  #screen-landing .ab-finale-title { font-size: clamp(2.6rem, 13vw, 3.6rem) !important; }
  .ab-finale-desc { font-size: 1rem; }
  .ab-stage-shade { background: linear-gradient(to bottom, rgba(13, 11, 10, 0.55), rgba(13, 11, 10, 0.25) 30%, rgba(13, 11, 10, 0.85)); }
}
@media (prefers-reduced-motion: reduce) {
  .ab-finale-title, .ab-scroll-cue::after { animation: none; }
  .reveal.ab-stagger > * { transition: none; opacity: 1; translate: none; }
}

/* ── 9. Battle: the war-table ─────────────────────────────────────────────── */
/* Layout (desktop): each Warlord sits at the centre of their own edge, the two
   lines face each other across a torn-banner front line, End Turn is a brass
   bell. Units are heater shields everywhere. Effects driven by js/game.js:
   .ab-charging, .ab-board-jolt, .ab-dust/.ab-spark, .ab-dust-ring,
   .ab-turn-banner, .ab-crack (death ghosts). */

#screen-game { --ab-shield: polygon(0 5%, 5% 0, 95% 0, 100% 5%, 100% 56%, 97% 67%, 91% 77%, 81% 87%, 66% 95%, 50% 100%, 34% 95%, 19% 87%, 9% 77%, 3% 67%, 0 56%); }

/* War-table frame: brass rule with rivets around both battle lines */
#screen-game .game-board::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  left: 10px; right: 10px; top: 6px; bottom: 196px;
  border: 1px solid rgba(176, 141, 74, 0.38);
  box-shadow: inset 0 0 0 4px rgba(13, 11, 10, 0.55), inset 0 0 0 5px rgba(176, 141, 74, 0.2),
              inset 0 0 90px rgba(0, 0, 0, 0.55);
  background:
    var(--ab-rivet) top 9px left 9px / 8px 8px no-repeat,
    var(--ab-rivet) top 9px right 9px / 8px 8px no-repeat,
    var(--ab-rivet) bottom 9px left 9px / 8px 8px no-repeat,
    var(--ab-rivet) bottom 9px right 9px / 8px 8px no-repeat;
}

/* Battle lines: leather inlays on the table instead of full-width strips */
#screen-game .board-zone {
  width: min(1180px, 76%);
  margin: 0.25rem auto !important;
  border-radius: 2px !important;
  border: 1px solid rgba(176, 141, 74, 0.22) !important;
  background:
    radial-gradient(ellipse 70% 90% at 50% 50%, rgba(44, 30, 20, 0.35), rgba(10, 7, 5, 0.6)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 7px) !important;
  box-shadow: inset 0 0 0 3px rgba(13, 11, 10, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.5) !important;
  gap: 0.9rem !important;
}
#screen-game .board-zone.board-drop-zone {
  border-color: rgba(217, 184, 114, 0.6) !important;
  box-shadow: inset 0 0 0 3px rgba(13, 11, 10, 0.5), inset 0 0 40px rgba(217, 184, 114, 0.12), 0 0 22px rgba(217, 184, 114, 0.18) !important;
}

/* Front line: a torn red banner with a crossed-swords boss in the middle */
#screen-game .board-divider { height: 26px; padding: 0 !important; justify-content: center; }
#screen-game .bd-line {
  flex: 0 1 min(1240px, 80%);
  height: 9px;
  border-radius: 0;
  animation: none;
  background:
    linear-gradient(180deg, rgba(217, 184, 114, 0.55) 0 1px, transparent 1px calc(100% - 1px), rgba(217, 184, 114, 0.55) calc(100% - 1px)),
    linear-gradient(180deg, #8a1c15, #4d0d0a);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
    repeating-linear-gradient(90deg, #000 0 11px, rgba(0, 0, 0, 0.55) 11px 13px);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
    repeating-linear-gradient(90deg, #000 0 11px, rgba(0, 0, 0, 0.55) 11px 13px);
  mask-composite: intersect;
  box-shadow: none;
  opacity: 0.9;
}
#screen-game .bd-emblem {
  position: absolute; left: 50%; top: 50%;
  width: 46px; height: 46px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: radial-gradient(circle, #2b2622, #110e0c 70%);
  border: 1px solid rgba(217, 184, 114, 0.7);
  box-shadow: 0 0 0 3px #0d0b0a, 0 0 0 4px rgba(176, 141, 74, 0.45), 0 6px 16px rgba(0, 0, 0, 0.8);
}
#screen-game .bd-emblem::after {
  content: ''; position: absolute; inset: 6px;
  transform: rotate(-45deg);
  background: url('../assets/duels.webp') center/contain no-repeat;
  filter: brightness(1.9) contrast(1.15) drop-shadow(0 0 3px rgba(222, 116, 55, 0.6));
}

/* End Turn: a brass bell, cold iron while the enemy acts */
#screen-game .end-turn-panel { gap: 0.55rem; }
#screen-game .end-turn-btn {
  width: 96px; height: 96px; min-width: 0; min-height: 0;
  padding: 0 !important;
  border-radius: 50% !important;
  clip-path: none !important;
  background-image: none !important;
  background: radial-gradient(circle at 38% 30%, #f4dc9a, #c49a48 38%, #7a5722 72%, #3c2a10) !important;
  border: 1px solid #2a1d0b !important;
  box-shadow: inset 0 0 0 5px rgba(60, 42, 16, 0.55), inset 0 0 0 6px rgba(255, 235, 180, 0.35),
              inset 0 -8px 14px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.7) !important;
  color: #2a1c0a !important;
  font-family: var(--font-heading) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.08em !important;
  line-height: 1.05;
  white-space: normal !important;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.45) !important;
}
#screen-game .end-turn-btn.my-turn { animation: abBellGlow 2.2s ease-in-out infinite !important; }
#screen-game .end-turn-btn:hover:not(:disabled) { transform: translateY(-2px) rotate(-4deg); filter: brightness(1.1); }
#screen-game .end-turn-btn:active:not(:disabled) { transform: translateY(1px) rotate(3deg); }
#screen-game .end-turn-btn:disabled {
  opacity: 1 !important; filter: none !important;
  background: radial-gradient(circle at 38% 30%, #6a655d, #3b3834 45%, #1d1b19 80%) !important;
  color: rgba(216, 201, 163, 0.55) !important;
  text-shadow: 0 1px 2px #000 !important;
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.35), inset 0 0 0 6px rgba(176, 141, 74, 0.2), 0 8px 20px rgba(0, 0, 0, 0.7) !important;
}
@keyframes abBellGlow {
  0%, 100% { box-shadow: inset 0 0 0 5px rgba(60, 42, 16, 0.55), inset 0 0 0 6px rgba(255, 235, 180, 0.35), 0 8px 20px rgba(0, 0, 0, 0.7), 0 0 14px rgba(222, 116, 55, 0.35); }
  50%      { box-shadow: inset 0 0 0 5px rgba(60, 42, 16, 0.55), inset 0 0 0 6px rgba(255, 235, 180, 0.35), 0 8px 20px rgba(0, 0, 0, 0.7), 0 0 30px rgba(222, 116, 55, 0.75); }
}

/* Card backs: the painted Anvilborn back (tinted per cosmetic in js/game.js) */
.hand-card-back { background: url('../assets/card-back.webp') center/cover !important; }
#screen-game .opp-hand-card {
  width: 44px; height: 64px;
  margin: 0 -9px;
  border-radius: 3px;
  border: 1px solid rgba(176, 141, 74, 0.45);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}
#screen-game .opp-hand-card:nth-child(odd) { transform: rotate(-3deg); }
#screen-game .opp-hand-card:nth-child(even) { transform: rotate(3deg) translateY(2px); }
#screen-game .deck-pile-card { border-radius: 3px; border-width: 1px; }
.cb-dragon, .cb-arcane, .cb-fel, .cb-frost, .cb-holy, .cb-shadow {
  background-image: linear-gradient(var(--cb-tint), var(--cb-tint)), url('../assets/card-back.webp') !important;
  background-size: cover !important; background-position: center !important;
  background-blend-mode: color, normal !important;
}
.cb-dragon { --cb-tint: #933110; } .cb-arcane { --cb-tint: #5a2490; } .cb-fel { --cb-tint: #296c37; }
.cb-frost  { --cb-tint: #386694; } .cb-holy   { --cb-tint: #cbab27; } .cb-shadow { --cb-tint: #6a1a6a; }

/* ── Units: heater shields ── */
#screen-game .game-minion {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  justify-content: flex-start;
  isolation: isolate;
  filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.75)) brightness(0.88);
}
/* rim (replaces the legendary shimmer pseudo) */
#screen-game .game-minion::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  clip-path: var(--ab-shield);
  border-radius: 0;
  animation: none;
  background: linear-gradient(160deg, #b9a27a, #6e5a3c 45%, #2c2219);
}
#screen-game .game-minion.rarity-rare::before { background: linear-gradient(160deg, #a9bfd8, #4d6788 45%, #1d2735); }
#screen-game .game-minion.rarity-epic::before { background: linear-gradient(160deg, #c39be0, #6b3d8e 45%, #26152f); }
#screen-game .game-minion.rarity-legendary::before { background: linear-gradient(160deg, #fff0bf, #d9a83e 40%, #6b4a12); }
#screen-game .game-minion .minion-emoji {
  position: absolute; inset: 4px; z-index: 1;
  clip-path: var(--ab-shield);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #15110d;
  filter: none;
}
#screen-game .game-minion .minion-emoji::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 22%, transparent 55%, rgba(0, 0, 0, 0.65));
}
#screen-game .game-minion .minion-art { border-radius: 0 !important; width: 100%; height: 100%; object-fit: cover; }
#screen-game .game-minion .minion-name {
  position: absolute; z-index: 3; top: 5px; left: 7px; right: 7px;
  max-width: none;
  font-family: var(--font-heading);
  font-size: 0.52rem !important;
  color: #ead7a4 !important;
  text-shadow: 0 1px 2px #000, 0 0 4px #000;
  text-overflow: ellipsis;
}
#screen-game .game-minion .minion-stats {
  position: absolute; z-index: 4;
  left: -9px; right: -9px; bottom: 18%;
  justify-content: space-between;
}
#screen-game .game-minion .m-atk, #screen-game .game-minion .m-hp {
  width: 32px; height: 32px; font-size: 0.85rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.9));
}
#screen-game .game-minion .m-hp.damaged { color: #ff6b5a; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.9)); }
#screen-game .game-minion .attacked-veil { clip-path: var(--ab-shield); border-radius: 0; z-index: 2; }
#screen-game .game-minion .impact-flash-overlay { clip-path: var(--ab-shield); border-radius: 0; z-index: 5; }
#screen-game .game-minion .status-icon { z-index: 5; bottom: 34%; }
#screen-game .game-minion .minion-tooltip { z-index: 60; }
/* Divine shield: a pale-gold halo following the shield */
#screen-game .game-minion .divine-ring {
  inset: -6px; z-index: -1;
  border: none; border-radius: 0; box-shadow: none;
  clip-path: var(--ab-shield);
  background: linear-gradient(160deg, #fff6d0, #ebd27a 50%, #b8913a);
}
/* Taunt: a riveted iron wall-shield behind the unit */
#screen-game .game-minion.has-taunt::after {
  content: ''; position: absolute; inset: -9px -8px -10px; z-index: -2;
  clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%);
  background:
    var(--ab-rivet) top 6px left 6px / 8px 8px no-repeat,
    var(--ab-rivet) top 6px right 6px / 8px 8px no-repeat,
    linear-gradient(180deg, #77726a, #3a3733 55%, #1e1c1a);
}
/* State glows follow the shield outline (drop-shadow, not box-shadow) */
#screen-game .game-minion.can-attack {
  filter: drop-shadow(0 0 2px #f6dc8c) drop-shadow(0 0 9px rgba(217, 184, 114, 0.85)) drop-shadow(0 7px 6px rgba(0, 0, 0, 0.6));
}
#screen-game .game-minion.targetable { animation: abTargetPulse 1s ease-in-out infinite; }
#screen-game .game-minion.selected-attacker { animation: abSelectedPulse 1s ease-in-out infinite; }
#screen-game .game-minion.is-frozen {
  filter: drop-shadow(0 0 3px #cfe6ff) drop-shadow(0 0 10px rgba(163, 192, 220, 0.8)) brightness(1.1) hue-rotate(110deg);
}
#screen-game .game-minion.ab-charging {
  filter: drop-shadow(0 0 4px #ffd27a) drop-shadow(0 0 14px rgba(255, 140, 50, 0.85)) drop-shadow(0 14px 10px rgba(0, 0, 0, 0.6)) !important;
}
@keyframes abTargetPulse {
  0%, 100% { filter: drop-shadow(0 0 2px #ff5a3a) drop-shadow(0 0 8px rgba(207, 49, 23, 0.7)); }
  50%      { filter: drop-shadow(0 0 3px #ff7a52) drop-shadow(0 0 16px rgba(207, 49, 23, 1)); }
}
@keyframes abSelectedPulse {
  0%, 100% { filter: drop-shadow(0 0 3px #fff0bf) drop-shadow(0 0 12px rgba(217, 184, 114, 0.8)); }
  50%      { filter: drop-shadow(0 0 4px #fff0bf) drop-shadow(0 0 22px rgba(217, 184, 114, 1)); }
}

/* ── Motion ── */
#screen-game .game-minion.ab-awaiting-land { visibility: hidden; }
/* Units slam down onto the table */
@keyframes minionLandBounce {
  0%   { transform: translateY(-30px) scale(1.22); }
  55%  { transform: translateY(3px) scale(1.05, 0.93); }
  75%  { transform: translateY(-2px) scale(0.98, 1.03); }
  100% { transform: none; }
}
/* Dying units crack, grey out, sink and crumble */
@keyframes cardDeath {
  0%   { transform: none; opacity: 1; filter: grayscale(0) brightness(1); }
  25%  { transform: translateX(-2px) rotate(-1.5deg); opacity: 1; filter: grayscale(0.7) brightness(0.9); }
  45%  { transform: translateX(2px) rotate(1deg); opacity: 1; filter: grayscale(1) brightness(0.7); }
  100% { transform: translateY(28px) rotate(5deg) scale(0.84); opacity: 0; filter: grayscale(1) brightness(0.35) blur(2px); }
}
.ab-crack {
  position: absolute; inset: 4px; z-index: 6; pointer-events: none;
  clip-path: var(--ab-shield, none);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 125' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23ffb35c' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M52 0 L47 22 L58 38 L44 58 L55 76 L48 125'/%3E%3Cpath d='M58 38 L80 46 L96 40'/%3E%3Cpath d='M44 58 L22 64 L6 58'/%3E%3Cpath d='M55 76 L72 92'/%3E%3C/g%3E%3C/svg%3E") center/100% 100% no-repeat;
  filter: drop-shadow(0 0 3px rgba(255, 140, 50, 0.9));
  opacity: 0;
  animation: abCrack 0.35s ease-out 0.05s forwards;
}
@keyframes abCrack { to { opacity: 1; } }
.ab-board-jolt { animation: abJolt 0.26s ease-out; }
@keyframes abJolt { 0% { transform: translateY(0); } 30% { transform: translateY(3px); } 60% { transform: translateY(-1px); } 100% { transform: none; } }
.ab-dust-ring {
  position: fixed; z-index: 9998; pointer-events: none;
  width: 24px; height: 9px; margin: -4px 0 0 -12px;
  border-radius: 50%;
  border: 2px solid rgba(170, 150, 118, 0.55);
  background: radial-gradient(rgba(120, 100, 80, 0.35), transparent 70%);
  animation: abDustRing 0.55s ease-out forwards;
}
@keyframes abDustRing { from { transform: scale(1); opacity: 0.9; } to { transform: scale(7, 4.5); opacity: 0; } }
.ab-dust, .ab-spark {
  position: fixed; z-index: 9999; pointer-events: none;
  border-radius: 50%;
  margin: -3px 0 0 -3px;
  animation-name: abParticle; animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); animation-fill-mode: forwards;
}
.ab-dust { filter: blur(1.5px); opacity: 0.75; }
.ab-spark { box-shadow: 0 0 6px currentColor, 0 0 3px #fff3cf; }
@keyframes abParticle {
  from { transform: translate(0, 0) scale(1); opacity: 0.9; }
  to   { transform: translate(var(--dx), var(--dy)) scale(1.8); opacity: 0; }
}
/* "Your Turn" banner sweeps across the table */
.ab-turn-banner {
  position: absolute; left: 0; right: 0; top: 41%; z-index: 500;
  height: 92px; margin-top: -46px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(106, 18, 14, 0.9) 18%, rgba(140, 26, 18, 0.95) 50%, rgba(106, 18, 14, 0.9) 82%, transparent);
  border-top: 1px solid rgba(217, 184, 114, 0.6);
  border-bottom: 1px solid rgba(217, 184, 114, 0.6);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: abBanner 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.ab-turn-banner-text {
  font-family: var(--font-display);
  font-size: 3.4rem; line-height: 1;
  color: #f1e6c9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 24px rgba(222, 116, 55, 0.6);
  animation: abBannerText 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes abBanner {
  0%   { transform: scaleY(0); opacity: 0; }
  14%  { transform: scaleY(1); opacity: 1; }
  78%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.2); opacity: 0; }
}
@keyframes abBannerText {
  0%   { transform: translateX(-60px); opacity: 0; letter-spacing: 0.3em; }
  22%  { transform: translateX(0); opacity: 1; letter-spacing: 0.06em; }
  78%  { transform: translateX(10px); opacity: 1; }
  100% { transform: translateX(50px); opacity: 0; }
}

/* ── Desktop + tablet layout: Warlords at the centre of their edges ── */
@media (min-width: 1101px) and (min-height: 760px) {
  #screen-game .game-minion { width: 96px !important; height: 120px !important; }
}
@media (min-width: 769px) and (max-height: 759px), (min-width: 769px) and (max-width: 1100px) {
  #screen-game .game-minion { width: 80px !important; height: 100px !important; }
  #screen-game .game-minion .m-atk, #screen-game .game-minion .m-hp { width: 27px; height: 27px; font-size: 0.75rem; }
  #screen-game .board-zone { min-height: 104px !important; padding-top: 0.2rem !important; padding-bottom: 0.2rem !important; }
}
/* Short screens (e.g. 1366×700 laptops): compact Warlords, lines and shields */
@media (min-width: 769px) and (max-height: 759px) {
  #screen-game .game-minion { width: 70px !important; height: 88px !important; }
  #screen-game .game-minion .minion-name { font-size: 0.44rem !important; top: 4px; }
  #screen-game .game-minion .m-atk, #screen-game .game-minion .m-hp { width: 23px; height: 23px; font-size: 0.66rem; }
  #screen-game .board-zone { min-height: 94px !important; }
  #screen-game .game-hero-portrait { width: 62px !important; height: 62px !important; }
  #screen-game .hero-power-circle { width: 44px !important; height: 44px !important; }
  #screen-game .opp-zone .hero-row { min-height: 74px !important; padding-top: 2px !important; }
  #screen-game #opp-hand { top: 10px !important; }
  #screen-game #opp-hand .opp-hand-card { width: 34px; height: 50px; }
  #screen-game #opponent-name { top: 18px !important; }
  #screen-game .board-divider { height: 18px; }
  #screen-game .bd-emblem { width: 34px; height: 34px; }
  #screen-game .end-turn-btn { width: 80px !important; height: 80px !important; font-size: 0.68rem !important; }
  #screen-game .game-board::before { bottom: 192px; }
}
@media (min-width: 769px) {
  /* opponent edge: hand on the left of the Warlord, name on the right, warband pile far right */
  #screen-game .opp-zone .hero-row { position: relative; justify-content: center; padding: 6px 0 0; min-height: 108px; }
  #screen-game .opp-zone .hero-info-right { position: absolute; right: 22px; top: 10px; }
  #screen-game #opponent-name { left: calc(50% + 70px) !important; top: 30px !important; font-size: 1rem !important; }
  #screen-game #opp-hand { position: absolute; top: 26px; right: calc(50% + 78px); padding: 0; min-height: 0; }
  #screen-game .opp-zone .hero-unit, #screen-game .my-zone .hero-unit {
    background: radial-gradient(ellipse at 50% 60%, rgba(13, 11, 10, 0.75), rgba(13, 11, 10, 0) 70%);
    border: none; border-radius: 0;
  }
  /* my edge: Warlord centred above the hand, ability beside it, Resolve on the right */
  #screen-game .my-zone .hero-row { position: relative; justify-content: center; padding: 2px 0 0; }
  #screen-game .my-zone .hero-row .mana-info { position: absolute; right: 150px; bottom: 0; margin: 0 !important; }
  #screen-game .concede-btn { position: absolute; left: -96px; top: 50%; transform: translateY(-50%); }
  #screen-game .end-turn-panel { right: 24px !important; }
}

/* ── 10. Roll of Honour (leaderboard) ─────────────────────────────────────── */
/* Rendered by js/leaderboard.js: banners for the top three, a ledger for the
   rest, and side cards for the season, your standing and the rank ladder.
   --tc is the row's rank-tier colour. */
#screen-leaderboard .screen-body { max-width: 1240px; }
.ab-lb { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.6rem; align-items: start; margin-top: 1.2rem; }
.ab-lb.is-wins .ab-lb-side { align-self: start; }
.ab-lb-empty { color: var(--text-dim); text-align: center; padding: 3rem 1rem; font-style: italic; }

/* Hanging war banners: pole, cloth in the tier colour, swallowtail hem */
.ab-lb-banners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: start; padding: 0 1rem; }
.ab-banner-1 { --pc: #9e1f17; } .ab-banner-2 { --pc: #5f6b78; } .ab-banner-3 { --pc: #8a5a2b; }
.ab-banner { position: relative; transform-origin: 50% 0; animation: abSway 6s ease-in-out infinite; cursor: default; }
.ab-banner-2 { animation-delay: -2s; margin-top: 2.2rem; }
.ab-banner-3 { animation-delay: -4s; margin-top: 3.2rem; }
@keyframes abSway { 0%, 100% { transform: rotate(-0.7deg); } 50% { transform: rotate(0.7deg); } }
.ab-banner-pole {
  height: 12px; margin: 0 -10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f1d99a, #9a7430 55%, #4d3712);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  position: relative; z-index: 2;
}
.ab-banner-pole::before, .ab-banner-pole::after {
  content: ''; position: absolute; top: -3px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff0bf, #b08d4a 55%, #4d3712);
}
.ab-banner-pole::before { left: -6px; } .ab-banner-pole::after { right: -6px; }
.ab-banner-cloth {
  position: relative;
  margin: -4px 8px 0;
  padding: 1.4rem 1rem 3.4rem;
  text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 34px), 0 100%);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.35)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, color-mix(in srgb, var(--pc) 78%, #000), color-mix(in srgb, var(--pc) 34%, #000));
  box-shadow: inset 0 0 0 2px rgba(217, 184, 114, 0.35), inset 0 0 0 6px rgba(0, 0, 0, 0.25);
  transition: filter 0.25s ease;
}
.ab-banner:hover .ab-banner-cloth { filter: brightness(1.15); }
.ab-banner-1 .ab-banner-cloth { padding-top: 1.8rem; padding-bottom: 4rem; }
.ab-banner-num {
  font-family: var(--font-display); font-size: 2.4rem; line-height: 1;
  color: #f1e6c9; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.ab-banner-1 .ab-banner-num { font-size: 3.2rem; color: #ffe7a8; }
.ab-banner-seal {
  width: 56px; height: 56px; margin: 0.6rem auto 0.7rem;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-display); font-size: 1.7rem; color: #f6e2b0;
  background: radial-gradient(circle at 38% 32%, #c4382c, #7a1410 60%, #3d0907);
  box-shadow: 0 0 0 3px rgba(122, 20, 16, 0.6), 0 4px 10px rgba(0, 0, 0, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.ab-banner-1 .ab-banner-seal { width: 66px; height: 66px; font-size: 2rem; }
.ab-banner-name { font-family: var(--font-heading); font-size: 1.05rem; color: #f1e6c9; text-shadow: 0 1px 4px #000; word-break: break-word; }
.ab-banner-tier { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: color-mix(in srgb, var(--tc) 55%, #fff); margin-top: 0.2rem; text-shadow: 0 1px 3px #000; }
.ab-banner-score { font-family: var(--font-heading); font-size: 1.35rem; color: #ffe7a8; margin-top: 0.6rem; text-shadow: 0 1px 6px #000; }
.ab-banner-score small { font-size: 0.7rem; letter-spacing: 0.12em; color: rgba(255, 231, 168, 0.7); }
.ab-banner-record { font-size: 0.78rem; color: rgba(241, 230, 201, 0.7); margin-top: 0.15rem; }
.ab-banner.is-me .ab-banner-cloth { box-shadow: inset 0 0 0 2px #ffe7a8, inset 0 0 0 6px rgba(0, 0, 0, 0.25), 0 0 30px rgba(255, 231, 168, 0.4); }

/* Toolbar */
.ab-lb-tools { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin: 1.6rem 0 0.7rem; }
.ab-lb-search {
  flex: 0 0 220px;
  background: rgba(13, 11, 10, 0.75); color: var(--text, #d8c9a3);
  border: 1px solid rgba(176, 141, 74, 0.35); border-radius: 0;
  padding: 0.5rem 0.75rem; font-family: var(--font-body); font-size: 0.9rem;
}
.ab-lb-search:focus { outline: none; border-color: var(--brass-hi); box-shadow: 0 0 0 2px rgba(217, 184, 114, 0.18); }
.ab-lb-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ab-chip {
  --tc: var(--brass-hi);
  background: rgba(13, 11, 10, 0.6); color: rgba(216, 201, 163, 0.75);
  border: 1px solid rgba(176, 141, 74, 0.25); border-left: 3px solid var(--tc);
  padding: 0.3rem 0.6rem; font-family: var(--font-heading); font-size: 0.74rem; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ab-chip span { opacity: 0.6; margin-left: 0.2rem; }
.ab-chip:hover { color: #f1e6c9; }
.ab-chip.is-on { background: color-mix(in srgb, var(--tc) 30%, #0d0b0a); color: #f1e6c9; border-color: var(--tc); }

/* The ledger */
.ab-roll {
  background: linear-gradient(180deg, rgba(27, 23, 20, 0.86), rgba(14, 11, 9, 0.9));
  border: 1px solid #0a0908;
  box-shadow: inset 0 0 0 3px #26221e, inset 0 0 0 4px var(--ab-frame-line), 0 10px 30px rgba(0, 0, 0, 0.55);
  padding: 0.6rem 0.9rem 0.9rem;
}
.ab-roll-head, .ab-roll-row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) minmax(130px, 0.9fr) 150px;
  gap: 0.9rem; align-items: center;
}
.ab-roll-head {
  padding: 0.5rem 0.6rem;
  font-family: var(--font-heading); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(176, 141, 74, 0.8);
  border-bottom: 1px solid rgba(176, 141, 74, 0.3);
}
.ab-roll-head span:first-child, .ab-roll-rank { text-align: right; }
#ab-roll-body { max-height: 62vh; overflow-y: auto; }
.ab-roll-row {
  position: relative;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px dashed rgba(176, 141, 74, 0.13);
  animation: abRowIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 18ms);
  transition: background 0.15s ease;
}
@keyframes abRowIn { from { opacity: 0; transform: translateX(-10px); } }
.ab-roll-row::before {
  content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px;
  background: var(--tc); opacity: 0; transition: opacity 0.15s;
}
.ab-roll-row:hover { background: rgba(217, 184, 114, 0.05); }
.ab-roll-row:hover::before { opacity: 1; }
.ab-roll-row.is-me { background: rgba(179, 38, 30, 0.14); }
.ab-roll-row.is-me::before { opacity: 1; background: var(--blood-hi); }
.ab-roll-rank { font-family: var(--font-heading); font-size: 1.05rem; color: rgba(216, 201, 163, 0.65); }
.ab-roll-who { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.ab-roll-who > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.ab-roll-who b { color: #ead7a4; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-roll-who small { font-size: 0.72rem; color: var(--tc); letter-spacing: 0.06em; }
.ab-roll-shield {
  flex: 0 0 auto; width: 18px; height: 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 100%, #fff 20%), color-mix(in srgb, var(--tc) 55%, #000));
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.ab-you { font-style: normal; font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase; color: #fff; background: var(--blood-hi); padding: 0 0.35rem; margin-left: 0.3rem; vertical-align: 1px; }
.ab-roll-score { display: flex; flex-direction: column; gap: 0.25rem; }
.ab-roll-score b { font-family: var(--font-heading); color: var(--brass-hi); font-size: 0.95rem; }
.ab-bar, .ab-wl { display: block; height: 4px; background: rgba(255, 255, 255, 0.06); position: relative; overflow: hidden; }
.ab-bar > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 60%, #000), var(--tc)); }
.ab-roll-rec { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.5rem; align-items: center; }
.ab-roll-rec b { font-size: 0.86rem; color: #d8c9a3; font-weight: 600; }
.ab-roll-rec small { grid-column: 2; font-size: 0.68rem; color: var(--text-dim); text-align: right; }
.ab-wl { grid-column: 1 / -1; background: rgba(179, 38, 30, 0.55); }
.ab-wl > i { position: absolute; inset: 0 auto 0 0; background: #8fa86a; }
.ab-roll-empty { padding: 2rem; text-align: center; color: var(--text-dim); font-style: italic; }

/* Side cards */
.ab-lb-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 90px; }
.ab-lb-card {
  padding: 1.1rem 1.2rem;
  border-radius: 0;
  background:
    var(--ab-rivet) top 7px left 7px / 8px 8px no-repeat,
    var(--ab-rivet) top 7px right 7px / 8px 8px no-repeat,
    var(--ab-rivet) bottom 7px left 7px / 8px 8px no-repeat,
    var(--ab-rivet) bottom 7px right 7px / 8px 8px no-repeat,
    var(--ab-panel-bg);
  border: 1px solid #0a0908;
  box-shadow: inset 0 0 0 3px #26221e, inset 0 0 0 4px var(--ab-frame-line), 0 10px 30px rgba(0, 0, 0, 0.55);
}
.ab-lb-kicker { font-family: var(--font-heading); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(176, 141, 74, 0.85); margin-bottom: 0.5rem; }
.ab-lb-note { font-size: 0.82rem; color: var(--text-dim); line-height: 1.45; margin-top: 0.5rem; }
.ab-lb-season-name { font-family: var(--font-display); font-size: 1.7rem; color: #f1e6c9; line-height: 1.05; }
.ab-lb-count { display: flex; align-items: baseline; gap: 0.1rem; margin-top: 0.7rem; font-family: var(--font-heading); }
.ab-lb-count span { font-size: 1.7rem; color: var(--brass-hi); min-width: 2ch; text-align: right; }
.ab-lb-count i { font-style: normal; font-size: 0.75rem; color: var(--text-dim); margin: 0 0.45rem 0 0.1rem; }
.ab-lb-count.is-ended span { color: var(--text-dim); }
.ab-lb-elapsed { height: 5px; margin-top: 0.6rem; background: rgba(255, 255, 255, 0.06); }
.ab-lb-elapsed > div { height: 100%; width: 0; background: linear-gradient(90deg, #6a1512, var(--blood-hi), #de7437); }
.ab-me-pos { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: #f1e6c9; }
.ab-me-line { color: #d8c9a3; margin-top: 0.3rem; }
.ab-me-tier { --tc: var(--brass-hi); display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.ab-me-tier b { color: var(--tc); font-family: var(--font-heading); font-size: 1.1rem; }
.ab-me-tier span:last-child { margin-left: auto; color: #d8c9a3; font-size: 0.9rem; }
.ab-me-prog { height: 6px; margin-top: 0.6rem; background: rgba(255, 255, 255, 0.06); }
.ab-me-prog > i { display: block; height: 100%; }
.ab-me-cta { color: #d8c9a3; }
.ab-me-spoils { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid rgba(176, 141, 74, 0.22); }
.ab-spoil { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.82rem; padding: 0.2rem 0; color: var(--text-dim); }
.ab-spoil b { color: #ead7a4; font-weight: 600; text-align: right; }
.ab-spoil-total { border-top: 1px dashed rgba(176, 141, 74, 0.25); margin-top: 0.3rem; padding-top: 0.45rem; }
.ab-spoil-total b { color: var(--brass-hi); }
.ab-rung {
  display: grid; grid-template-columns: 14px 1fr auto 28px; gap: 0.55rem; align-items: center;
  padding: 0.35rem 0.4rem; font-size: 0.84rem; color: #d8c9a3;
  border-left: 2px solid transparent;
}
.ab-rung + .ab-rung { border-top: 1px dashed rgba(176, 141, 74, 0.12); }
.ab-rung-pip { width: 10px; height: 10px; transform: rotate(45deg); background: var(--tc); box-shadow: 0 0 6px color-mix(in srgb, var(--tc) 60%, transparent); }
.ab-rung-min { font-size: 0.72rem; color: var(--text-dim); }
.ab-rung-count { text-align: right; font-size: 0.75rem; color: rgba(216, 201, 163, 0.55); }
.ab-rung.is-mine { border-left-color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); }
.ab-rung.is-mine .ab-rung-name::after { content: ' · you'; color: var(--blood-hi); font-size: 0.72rem; }
.ab-lb-rewards-btn { width: 100%; margin-top: 0.9rem; }

@media (max-width: 1100px) {
  .ab-lb { grid-template-columns: 1fr; }
  .ab-lb-side { position: static; order: -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  .ab-lb-side { order: 0; }
  .ab-lb-banners { gap: 0.5rem; padding: 0; }
  .ab-banner-cloth { padding: 1rem 0.4rem 2.6rem; margin: -4px 2px 0; }
  .ab-banner-num { font-size: 1.7rem; }
  .ab-banner-1 .ab-banner-num { font-size: 2.2rem; }
  .ab-banner-seal, .ab-banner-1 .ab-banner-seal { width: 40px; height: 40px; font-size: 1.2rem; }
  .ab-banner-name { font-size: 0.82rem; }
  .ab-banner-score { font-size: 1rem; }
  .ab-banner-record { display: none; }
  .ab-lb-search { flex: 1 1 100%; }
  .ab-roll-head, .ab-roll-row { grid-template-columns: 34px minmax(0, 1fr) 92px; gap: 0.5rem; }
  .ab-roll-head span:last-child, .ab-roll-rec { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-banner, .ab-roll-row { animation: none; }
}

/* ── 11. Header while logged in ───────────────────────────────────────────── */
/* Links in the heading face (mixed case, no tracking), a red diamond marks the
   current screen; currencies sit on one iron purse plate; Depart is notched. */
@media (min-width: 1101px) {
  #nav-game-links { gap: 1.55rem !important; }
  #nav-game-links .nav-link {
    font-family: var(--font-heading) !important;
    font-size: 1.02rem !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
    color: rgba(216, 201, 163, 0.82) !important;
    padding: 0.35rem 0 !important;
  }
  #nav-game-links .nav-link::after {
    content: ''; position: absolute; left: 50% !important; bottom: -7px !important;
    width: 7px !important; height: 7px !important; margin-left: -3.5px;
    border-radius: 0 !important;
    transform: rotate(45deg) scale(0);
    background: var(--blood-hi) !important;
    box-shadow: 0 0 8px rgba(179, 38, 30, 0.8) !important;
    transition: transform 0.18s ease !important;
  }
  #nav-game-links .nav-link:hover::after { transform: rotate(45deg) scale(0.7); }
  #nav-game-links .nav-link.active::after { transform: rotate(45deg) scale(1); }
  #nav-game-links .nav-link.active { color: #f1e6c9 !important; text-shadow: 0 0 12px rgba(217, 184, 114, 0.35) !important; }
  #nav-game-links .nav-link:hover { text-decoration: none !important; }
}

#nav-logged-in .nav-user-info {
  display: flex; align-items: center; gap: 0;
  padding: 0.25rem 0.35rem 0.25rem 0.5rem;
  background: linear-gradient(180deg, rgba(27, 23, 20, 0.92), rgba(14, 11, 9, 0.95));
  border: 1px solid #0a0908;
  box-shadow: inset 0 0 0 2px #26221e, inset 0 0 0 3px rgba(176, 141, 74, 0.35);
}
#nav-logged-in .nav-currency, #nav-logged-in #nav-level {
  font-family: var(--font-heading) !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em !important;
  padding: 0.15rem 0.7rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
  cursor: pointer;
}
#nav-logged-in .nav-currency + .nav-currency, #nav-logged-in #nav-level { border-left: 1px solid rgba(176, 141, 74, 0.22); }
#nav-logged-in .nav-currency:hover { color: #f1e6c9 !important; }
#nav-logged-in #nav-level { cursor: default; color: #9fc0a8 !important; }
#nav-logged-in #nav-username {
  font-family: var(--font-heading) !important;
  font-size: 1rem !important;
  color: var(--brass-hi) !important;
  letter-spacing: 0.01em !important;
  text-decoration: none !important;
  padding: 0.15rem 0.6rem 0.15rem 0.7rem;
  border-left: 1px solid rgba(176, 141, 74, 0.22);
}
#nav-logged-in #nav-username:hover { color: #f1e6c9 !important; }
#nav-logged-in .nav-logout-btn {
  font-family: var(--font-heading) !important;
  font-size: 0.9rem !important;
  text-transform: none !important;
  letter-spacing: 0.03em !important;
  color: rgba(216, 201, 163, 0.85) !important;
  background: linear-gradient(180deg, #34312d, #1d1b19) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.4rem 0.95rem !important;
  clip-path: polygon(var(--ab-notch) 0, calc(100% - var(--ab-notch)) 0, 100% var(--ab-notch), 100% calc(100% - var(--ab-notch)), calc(100% - var(--ab-notch)) 100%, var(--ab-notch) 100%, 0 calc(100% - var(--ab-notch)), 0 var(--ab-notch));
  box-shadow: inset 0 0 0 1px var(--ab-frame-line) !important;
}
#nav-logged-in .nav-logout-btn:hover { color: #f1e6c9 !important; filter: brightness(1.15); }
#nav-game-links .nav-link, #nav-logged-in .nav-currency, #nav-logged-in #nav-level, #nav-logged-in #nav-username { white-space: nowrap; }
#nav-logged-in .nav-logout-btn { white-space: nowrap; }
@media (min-width: 1101px) and (max-width: 1440px) {
  #nav-game-links { gap: 0.95rem !important; }
  #nav-game-links .nav-link { font-size: 0.9rem !important; }
  #nav-logged-in .nav-currency, #nav-logged-in #nav-level { padding: 0.15rem 0.45rem; font-size: 0.86rem !important; }
  #nav-logged-in #nav-username { font-size: 0.9rem !important; max-width: 130px; overflow: hidden; text-overflow: ellipsis; padding-right: 0.4rem; }
  #nav-logged-in .nav-logout-btn { padding: 0.35rem 0.7rem !important; font-size: 0.84rem !important; }
  .nav-logo { flex-shrink: 0; }
}
@media (min-width: 1101px) and (max-width: 1240px) {
  #nav-logged-in #nav-level { display: none !important; }
  #nav-logged-in #nav-username { max-width: 96px; }
  #nav-game-links { gap: 0.8rem !important; }
}

/* ── Mobile: portrait orientation hint for game screen ─────────────────────── */
@media (orientation: portrait) and (max-width: 768px) {
  #screen-game::before {
    content: 'Rotate your device for the best experience';
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.85); color: #c9a84c;
    text-align: center; padding: 8px; font-size: 0.85rem;
    z-index: 9999;
  }
}
