/* =========================================================================
   BlockCraft front end — title · main menu · skirmish lobby · options · versus
   Built from the same nested kit as the HUD (panel → well → button → keycap).
   #menu[data-screen] drives every transition; one logo travels between screens.
   ========================================================================= */
#menu { display: block; overflow: hidden; background: none; }
#menu.instant, #menu.instant * { transition: none !important; }
#embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.menu-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(4, 10, 12, 0) 30%, rgba(4, 10, 12, 0.72) 100%); }
.menu-shade::before, .menu-shade::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s; }
/* main: a dark side so the command column reads */
.menu-shade::before { background: linear-gradient(90deg, rgba(4, 8, 10, 0.9) 0%, rgba(4, 8, 10, 0.55) 32%, rgba(4, 8, 10, 0) 58%); }
/* lobby: the battlefield steps back */
.menu-shade::after { background: rgba(5, 9, 10, 0.5); }
#menu[data-screen="title"] .menu-shade { background: radial-gradient(ellipse 52% 24% at 50% 29%, rgba(4, 8, 10, 0.78) 0%, rgba(4, 8, 10, 0.45) 55%, rgba(4, 8, 10, 0) 100%), radial-gradient(ellipse at 50% 42%, rgba(28, 15, 8, 0.12) 20%, rgba(4, 10, 12, 0.88) 100%); }
#menu[data-screen="main"] .menu-shade::before { opacity: 1; }
#menu[data-screen="skirmish"] .menu-shade::after { opacity: 1; }
/* the backdrop swaps battlefields behind a quick dip to black */
#menu::after { content: ''; position: absolute; inset: 0; background: #050809; opacity: 0; pointer-events: none; transition: opacity 0.16s; z-index: 1; }
#menu.blink::after { opacity: 1; }

/* cinematic bars on the title (and the versus card) */
.letterbox i { position: absolute; left: 0; right: 0; height: 64px; background: #000; z-index: 6; transition: transform 0.25s cubic-bezier(.6, 0, .2, 1); pointer-events: none; }
.letterbox i:first-child { top: 0; } .letterbox i:last-child { bottom: 0; }
#menu:not([data-screen="title"]) .letterbox i:first-child { transform: translateY(-100%); }
#menu:not([data-screen="title"]) .letterbox i:last-child { transform: translateY(100%); }

/* ---------- screens ---------- */
.scr { position: absolute; inset: 0; z-index: 3; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 0.1s, visibility 0s 0.1s; }
#menu[data-screen="title"] .scr-title, #menu[data-screen="main"] .scr-main, #menu[data-screen="skirmish"] .scr-skirmish {
  visibility: visible; opacity: 1; transition: opacity 0.12s, visibility 0s; }
.scr > * { pointer-events: auto; }

/* ---------- the logo ---------- */
#logo { position: absolute; left: 0; top: 0; z-index: 4; margin: 0; text-align: center; width: max-content; transform-origin: 0 0;
  transition: transform 0.32s cubic-bezier(.2, .9, .2, 1), opacity 0.15s; will-change: transform; }
#menu[data-screen="title"] #logo { transform: translate(calc(50vw - 50%), calc(33vh - 100%)) scale(1); }
#menu[data-screen="main"] #logo { transform: translate(64px, 40px) scale(0.56); }
#menu[data-screen="skirmish"] #logo { transform: translate(calc(50vw - 50% * 0.3), -60px) scale(0.3); opacity: 0; pointer-events: none; }
#logo .title { white-space: nowrap; }
#logo .word span { display: inline-block; }
#logo .splash { transition: opacity 0.3s; }
#menu[data-screen="skirmish"] #logo .splash { opacity: 0; }
/* first load: letters drop in like placed blocks, then the II stamps down */
body.intro #logo .word span { animation: blockDrop 0.55s cubic-bezier(.35, 1.45, .5, 1) both; animation-delay: calc(var(--i) * 65ms + 250ms); }
body.intro #logo .two { display: inline-block; animation: stamp 0.42s cubic-bezier(.3, 1.6, .5, 1) 1.05s both; }
body.intro #logo .subtitle { animation: fadeUp 0.5s ease-out 1.35s both; }
body.intro #logo .splash { animation: splashIn 0.4s cubic-bezier(.3, 1.8, .5, 1) 1.6s both, splash 0.6s ease-in-out 2s infinite alternate; }
body.intro .press-any { animation: fadeUp 0.5s ease-out 1.8s both; }
body.intro .tagline { animation: fadeUp 0.5s ease-out 2s both; }
@keyframes blockDrop { 0% { transform: translateY(-46vh); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes stamp { 0% { transform: scale(2.6); opacity: 0; filter: brightness(2.4); } 60% { opacity: 1; } 100% { transform: none; opacity: 1; filter: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splashIn { from { transform: rotate(-16deg) scale(0); } to { transform: rotate(-16deg) scale(1); } }

/* ---------- 1 · title ---------- */
.scr-title { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: calc(33vh + 180px); gap: 18px; }
.press-any { position: relative; display: inline-flex; align-items: center; gap: 14px; padding: 12px 30px; cursor: pointer; font-size: 36px; color: var(--text);
  background: rgba(6, 10, 12, 0.6); border: 0; text-shadow: 0 2px 0 #000; }
.press-any > span:first-child { animation: breatheText 2.2s ease-in-out infinite; }
.press-any kbd { font-size: 19px; line-height: 19px; padding: 2px 7px 1px; }
.press-any .brackets { inset: -6px; }
@keyframes breatheText { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.tagline { margin: 0; padding: 3px 14px 2px; font-size: 23px; color: #c9cec6; text-shadow: 0 2px 0 #000; background: rgba(6, 10, 12, 0.6); }

/* ---------- 2 · main menu ---------- */
.cmd-list { position: absolute; left: 64px; top: 196px; width: 430px; display: flex; flex-direction: column; gap: 14px; }
.cmd-list .mc-btn { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; justify-items: start; column-gap: 12px; row-gap: 3px;
  width: 100%; padding: 11px 16px 10px 20px; text-align: left; }
.cmd-list .mc-btn b { font-weight: normal; font-size: 30px; line-height: 26px; }
.cmd-list .mc-btn small { grid-row: 2; font-size: 18px; line-height: 16px; color: var(--mute); text-shadow: none; }
.cmd-list .mc-btn kbd { grid-row: 1 / 3; grid-column: 2; }
.cmd-list .mc-btn.big { padding: 15px 16px 13px 20px; }
.cmd-list .mc-btn.big b { font-size: 38px; line-height: 32px; }
.cmd-list .mc-btn.big small { color: #5a4810; }
.cmd-list .mc-btn.slim { padding: 8px 16px 7px 20px; }
.cmd-list .mc-btn.slim b { font-size: 23px; line-height: 20px; color: #c9cec6; }
.cmd-list .mc-btn:focus-visible { outline: none; }
/* entering the menu: the column deals itself in from the left */
.cmd-list > .mc-btn { transition: opacity 0.12s, translate 0.18s cubic-bezier(.2, .9, .2, 1); }
#menu:not([data-screen="main"]) .cmd-list > .mc-btn { opacity: 0; translate: -24px 0; }
/* one set of brackets glides to the hovered or focused command */
.nav-brackets { position: absolute; left: 0; top: 0; inset: auto; width: 0; height: 0; opacity: 0; pointer-events: none; animation: none;
  transition: none; }
.nav-brackets i:nth-child(1) { left: -7px; top: -7px; animation: brA 1.4s ease-in-out infinite; }
.nav-brackets i:nth-child(2) { right: -7px; top: -7px; animation: brB 1.4s ease-in-out infinite; }
.nav-brackets i:nth-child(3) { left: -7px; bottom: -7px; animation: brC 1.4s ease-in-out infinite; }
.nav-brackets i:nth-child(4) { right: -7px; bottom: -7px; animation: brD 1.4s ease-in-out infinite; }
@keyframes brA { 50% { transform: translate(-3px, -3px); } } @keyframes brB { 50% { transform: translate(3px, -3px); } }
@keyframes brC { 50% { transform: translate(-3px, 3px); } } @keyframes brD { 50% { transform: translate(3px, 3px); } }
#menu:not([data-screen="main"]) .nav-brackets { opacity: 0 !important; }

/* the war table: your last battle, or a primer for the first one */
.war-table { position: absolute; right: 64px; top: 196px; width: 480px; padding: 14px 16px 16px; transition: opacity 0.12s, translate 0.18s cubic-bezier(.2, .9, .2, 1); }
#menu:not([data-screen="main"]) .war-table { opacity: 0; translate: 24px 0; }
.wt-label { font-family: var(--title); font-size: 10px; letter-spacing: 1px; color: var(--mute); margin: 2px 0 10px; text-shadow: 0 2px 0 var(--ink); }
.war-table { display: flex; flex-direction: column; }
.wt-stage { position: relative; flex: 1; min-height: 212px; display: flex; align-items: center; justify-content: center; gap: 0; overflow: hidden;
  background: radial-gradient(ellipse at 50% 90%, #22343a 0%, var(--well) 70%); }
.wt-stage img { width: 200px; height: auto; filter: drop-shadow(2px 5px 0 rgba(0, 0, 0, 0.45)); }
.wt-stage img.flip, #faceoff img.flip, #versus img.flip { transform: scaleX(-1); }
.wt-stage.trio img { width: 140px; margin: 0 -4px; }
.wt-vs { font-family: var(--title); font-size: 26px; color: var(--yellow); text-shadow: 0 3px 0 var(--ink), 0 0 12px rgba(0, 0, 0, 0.8); margin: 0 -18px; z-index: 1; }
.wt-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.wt-foot > div { flex: 1; min-width: 0; }
.wt-res { font-size: 23px; line-height: 1.05; color: var(--text); }
.wt-res b { font-weight: normal; } .wt-res b.win { color: var(--green); } .wt-res b.loss { color: var(--rhi); } .wt-res b.draw { color: var(--yellow); }
.wt-meta { font-size: 19px; color: var(--mute); margin-top: 3px; }
.wt-foot .mc-btn { flex: none; font-size: 21px; }

/* ---------- now playing ---------- */
.np-chip { position: absolute; left: 64px; bottom: 26px; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 7px 16px 7px 8px; cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: none !important;
  background: var(--face); border: 2px solid var(--ink); border-radius: 4px; box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo), 0 4px 0 rgba(0, 0, 0, 0.42);
  transition: transform 0.08s, background 0.12s, left 0.5s cubic-bezier(.2, .9, .2, 1), bottom 0.5s cubic-bezier(.2, .9, .2, 1); }
.np-chip:hover { background: var(--btn-hov); transform: translateY(-2px); }
.np-chip .eq { display: flex; align-items: flex-end; gap: 2px; width: 40px; height: 38px; padding: 4px; background: var(--well); border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 var(--well-lo); }
.np-chip .eq i { flex: 1; height: 100%; background: var(--yellow); transform-origin: 50% 100%; transform: scaleY(0.12); transition: transform 0.08s linear; }
.np-chip .eq i:nth-child(even) { background: var(--em); }
.np-chip .np-txt { display: flex; flex-direction: column; }
.np-chip .np-txt b { font-weight: normal; font-size: 22px; line-height: 20px; }
.np-chip .np-txt small { font-size: 17px; line-height: 16px; color: var(--mute); }
.np-chip .np-note { font-size: 24px; color: var(--yellow); margin-left: 8px; }
.np-chip.off .eq i { background: var(--dim); }
.np-chip.off .np-note { color: var(--dim); text-decoration: line-through; }
.np-chip.locked .np-note { animation: blink 1s steps(2) infinite; }
#menu[data-screen="title"] .np-chip { bottom: 76px; }
.lobby-bar .np-chip { position: static; box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); background: var(--btn-lo); margin-right: 8px; }
.lobby-bar .np-chip:hover { background: var(--btn); }
.menu-foot { position: absolute; right: 64px; bottom: 34px; z-index: 5; font-size: 20px; color: var(--dim); text-shadow: 0 2px 0 #000; display: flex; gap: 8px; align-items: center; }
#menu[data-screen="title"] .menu-foot { bottom: 84px; }
#menu[data-screen="skirmish"] .menu-foot { display: none; }

/* ---------- 3 · skirmish lobby ---------- */
.scr-skirmish { display: flex; flex-direction: column; gap: 14px; padding: 22px 40px 22px; overflow-y: auto; }
.scr-skirmish > * { width: 100%; max-width: 1400px; margin: 0 auto; flex: none; }
.lobby-head { display: flex; align-items: center; gap: 18px; height: 50px; }
.lobby-head h2 { font-family: var(--title); font-size: 20px; margin: 0; color: var(--text); text-shadow: 0 3px 0 var(--ink); font-weight: normal; }
.lobby-sub { font-size: 23px; color: var(--mute); text-shadow: 0 2px 0 #000; }
.lobby-head .mc-btn kbd { margin-left: 4px; }
/* entering the lobby: panels drop in one after another */
.scr-skirmish > .mc-panel { transition: translate 0.18s cubic-bezier(.2, .9, .2, 1), opacity 0.12s; }
#menu:not([data-screen="skirmish"]) .scr-skirmish > .mc-panel { translate: 0 -10px; opacity: 0; }
.scr-skirmish .setup { animation: none; padding: 14px 18px 18px; }

/* the face-off banner */
.faceoff { position: relative; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; height: 168px; padding: 0 22px; overflow: visible;
  background: linear-gradient(90deg, color-mix(in srgb, var(--you, #c58b4a) 46%, var(--face)) 0%, var(--face) 46%, var(--face) 54%, color-mix(in srgb, var(--them, #e25b4a) 42%, var(--face)) 100%); }
.faceoff .side { display: flex; align-items: center; gap: 18px; min-width: 0; height: 100%; }
.faceoff .side.them { justify-content: flex-end; text-align: right; }
.faceoff .side img { width: 210px; height: auto; margin: -34px 0 -10px; filter: drop-shadow(3px 6px 0 rgba(0, 0, 0, 0.45)); flex: none; }
.faceoff .side small { display: block; font-family: var(--title); font-size: 11px; color: var(--mute); letter-spacing: 1px; text-shadow: 0 2px 0 var(--ink); }
.faceoff .side b { display: block; font-family: var(--title); font-weight: normal; font-size: 21px; margin: 12px 0 10px; color: var(--text); text-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
.faceoff .side span { display: block; font-size: 22px; color: #9fe3b8; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); }
.faceoff .side.them span { color: var(--rhi); }
.faceoff .mystery { width: 132px; height: 132px; flex: none; display: flex; align-items: center; justify-content: center; }
.faceoff .side .mystery span { font-family: var(--title); font-size: 64px; color: var(--yellow); text-shadow: 0 5px 0 var(--ylo), 0 8px 0 var(--ink); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.faceoff .vs, .vs-medal { position: relative; display: flex; align-items: center; justify-content: center; }
.faceoff .vs { width: 120px; height: 120px; }
.faceoff .vs i, .vs-medal i { position: absolute; width: 76px; height: 76px; transform: rotate(45deg); background: #8e2a22; border: 3px solid var(--ink);
  box-shadow: inset 3px 3px 0 #c2463a, inset -3px -3px 0 #5a1712, 0 5px 0 rgba(0, 0, 0, 0.45); }
.faceoff .vs span, .vs-medal span { position: relative; font-family: var(--title); font-size: 26px; color: var(--yellow); text-shadow: 0 3px 0 var(--ink); }
.faceoff .side.slam img, .faceoff .side.slam .mystery { animation: slamIn 0.34s cubic-bezier(.3, 1.6, .5, 1); }
.faceoff .side.slam b { animation: fadeUp 0.3s ease-out; }
@keyframes slamIn { from { transform: translateY(-18px) scale(1.12); opacity: 0; } to { opacity: 1; } }
.faceoff .side.them.slam img { animation-name: slamInFlip; }
@keyframes slamInFlip { from { transform: scaleX(-1) translateY(-18px) scale(1.12); opacity: 0; } to { transform: scaleX(-1); opacity: 1; } }

/* faction cards: a colour stripe names each side */
.fcard::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 4px; background: var(--dim); }
.fcard[data-faction="village"]::after { background: #c58b4a; } .fcard[data-faction="horde"]::after { background: #3fbf6a; } .fcard[data-faction="end"]::after { background: #a35bd6; }
.diff-note { margin: 12px 0 0; font-size: 19px; line-height: 1.05; color: var(--mute); min-height: 40px; }

.lobby-bar { display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 22px; }
.matchup { flex: 1; display: flex; align-items: baseline; gap: 14px; font-size: 26px; color: var(--text); min-width: 0; white-space: nowrap; overflow: hidden; }
.matchup b { font-weight: normal; color: var(--yellow); }
.matchup span { color: #d9dcd2; }
.matchup span::before { content: '·'; color: var(--dim); margin-right: 14px; }
.lobby-bar #startBtn { font-size: 30px; padding: 11px 26px 10px 32px; min-width: 280px; gap: 14px; }

/* ---------- options ---------- */
#options { z-index: 55; }
.opt-panel { width: min(860px, 94vw); max-height: 92vh; display: flex; flex-direction: column; padding: 18px 22px 20px; animation: popIn 0.1s ease-out both; }
.opt-panel h2 { font-family: var(--title); font-weight: normal; font-size: 18px; margin: 4px 0 14px; text-align: center; color: var(--text); text-shadow: 0 3px 0 var(--ink); }
.opt-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.opt-tab { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; cursor: pointer; font-size: 24px; color: var(--text);
  background: var(--btn); border: 2px solid var(--ink); border-bottom: 0; border-radius: 4px 4px 0 0; box-shadow: inset 2px 2px 0 var(--btn-hi); text-shadow: 0 2px 0 #000; }
.opt-tab:hover { background: var(--btn-hov); }
.opt-tab.on { background: #2f4246; color: var(--yellow); height: 48px; margin-top: -4px; }
.opt-tab kbd { font-size: 13px; line-height: 12px; min-width: 14px; padding: 1px 3px 0; }
.opt-body { padding: 10px 26px 18px; min-height: 380px; overflow-y: auto; }
.opt-sec { font-family: var(--title); font-size: 10px; letter-spacing: 1px; color: var(--yellow); margin: 18px 0 8px; text-shadow: 0 2px 0 var(--ink); }
.opt-row { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 16px; padding: 7px 0; border-bottom: 2px solid #182224; }
.opt-row.tall { grid-template-columns: 1fr auto; }
.opt-row label { font-size: 24px; color: var(--text); }
.opt-txt p { margin: 2px 0 0; font-size: 18px; line-height: 1.05; color: var(--mute); }
.opt-row output { font-size: 23px; color: var(--yellow); text-align: right; }
.slider { display: flex; gap: 2px; height: 30px; padding: 5px 6px; cursor: pointer; background: #070b0c; border: 2px solid var(--ink); border-radius: 3px; box-shadow: inset 2px 2px 0 var(--well-lo), inset -2px -2px 0 var(--well-hi); touch-action: none; }
.slider:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.slider i { flex: 1; background: #1d2a2c; transition: background 0.06s; }
.slider i.on { background: var(--em); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22); }
.slider i.tip { background: #b6ffd2; }
.toggle { position: relative; width: 96px; height: 34px; padding: 0; cursor: pointer; font: inherit; background: #070b0c; border: 2px solid var(--ink); border-radius: 3px; box-shadow: inset 2px 2px 0 var(--well-lo), inset -2px -2px 0 var(--well-hi); }
.toggle i { position: absolute; top: 3px; left: 3px; width: 42px; height: 24px; background: var(--btn); border: 2px solid var(--ink); border-radius: 2px; box-shadow: inset 2px 2px 0 var(--btn-hi), inset -2px -2px 0 var(--btn-lo); transition: left 0.14s cubic-bezier(.3, 1.4, .5, 1), background 0.14s; }
.toggle span { position: absolute; top: 5px; right: 12px; font-size: 20px; color: var(--dim); }
.toggle.on i { left: 47px; background: var(--yellow); box-shadow: inset 2px 2px 0 var(--yhi), inset -2px -2px 0 var(--ylo); }
.toggle.on span { right: auto; left: 13px; color: var(--em); }
.toggle:focus-visible, .opt-tab:focus-visible, .seg button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.opt-row .seg { flex-wrap: nowrap; }
.opt-row .seg button { flex: none; min-width: 92px; font-size: 21px; padding: 5px 14px; white-space: nowrap; }
.opt-keys { font-size: 20px; color: #d9dcd2; }
.opt-keys .krow { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 2px solid #182224; }
.opt-keys .krow span { margin-left: auto; text-align: right; }
.opt-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.opt-saved { flex: 1; text-align: center; font-size: 20px; color: var(--mute); }
.opt-saved.flash { animation: savedFlash 0.6s ease-out; }
@keyframes savedFlash { from { color: var(--em); } to { color: var(--mute); } }
.opt-foot .mc-btn { height: 46px; font-size: 22px; padding: 0 20px; gap: 12px; }
.opt-test { display: flex; align-items: center; gap: 14px; padding: 10px 0 2px; font-size: 18px; color: var(--mute); }
.opt-test .mc-btn { font-size: 20px; gap: 10px; }
.settings .opt-link { grid-column: 1 / -1; color: var(--yellow); }

/* ---------- versus / loading ---------- */
#versus { position: fixed; inset: 0; z-index: 70; overflow: hidden; background: #050809; }
#versus.out { opacity: 0; transition: opacity 0.25s; }
.vs-half { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.vs-half.left { clip-path: polygon(0 0, 59% 0, 41% 100%, 0 100%); align-items: flex-start; padding-left: 7vw;
  background: radial-gradient(ellipse at 22% 55%, color-mix(in srgb, var(--acc) 42%, #0b1012) 0%, #0a0e10 70%); }
.vs-half.right { clip-path: polygon(59% 0, 100% 0, 100% 100%, 41% 100%); align-items: flex-end; padding-right: 7vw;
  background: radial-gradient(ellipse at 78% 55%, color-mix(in srgb, var(--acc) 38%, #0b1012) 0%, #07090a 70%); }
.vs-half img { width: min(36vw, 560px); height: auto; filter: drop-shadow(4px 10px 0 rgba(0, 0, 0, 0.5)); margin-top: 4vh; }
.vs-name b { display: block; font-family: var(--title); font-weight: normal; font-size: clamp(20px, 2.2vw, 32px); color: var(--text); text-shadow: 0 4px 0 var(--ink); }
.vs-name span { display: block; margin-top: 10px; font-size: 26px; color: var(--acc); text-shadow: 0 2px 0 #000; filter: brightness(1.3); }
.vs-half.right .vs-name { text-align: right; }
.vs-seam { z-index: 0; position: absolute; left: 50%; top: -5%; width: 4px; height: 110%; background: var(--yellow); transform: translateX(-50%) rotate(11.3deg); box-shadow: 0 0 18px rgba(255, 210, 63, 0.55); }
.vs-medal { position: absolute; left: 50%; top: 46%; width: 0; height: 0; z-index: 3; }
.vs-medal i { width: 128px; height: 128px; border-width: 4px; box-shadow: inset 5px 5px 0 #c2463a, inset -5px -5px 0 #5a1712, 0 8px 0 rgba(0, 0, 0, 0.5); }
.vs-medal span { font-size: 50px; }
.vs-map { position: absolute; top: 96px; left: 0; right: 0; text-align: center; z-index: 2; }
.vs-map b { display: block; font-family: var(--title); font-weight: normal; font-size: 22px; color: var(--text); text-shadow: 0 3px 0 var(--ink); }
/* versus text sits on small recessed wells, 1px edges, like the rest of the kit */
.vs-plate, .vs-load p { background: #0b1113; border: 1px solid var(--ink); box-shadow: inset 1px 1px 0 var(--well-lo), inset -1px -1px 0 var(--well-hi), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.vs-plate { display: inline-block; padding: 10px 22px 9px; }
.vs-map span { display: block; margin-top: 6px; font-size: 24px; color: var(--mute); text-shadow: 0 2px 0 #000; }
.vs-load { position: absolute; left: 0; right: 0; bottom: 96px; width: min(760px, 86vw); margin: 0 auto; text-align: center; z-index: 2; }
.vs-bar { display: flex; gap: 3px; height: 32px; padding: 5px 6px; }
.vs-bar i { flex: 1; background: #1d2a2c; }
.vs-bar i.on { background: var(--em); box-shadow: inset 0 3px 0 #b6ffd2; }
.vs-load p { display: inline-block; margin: 14px 0 0; padding: 3px 12px 2px; font-size: 23px; color: var(--text); text-shadow: 0 2px 0 #000; text-wrap: balance; }
.vs-bar { width: min(620px, 80vw); margin: 0 auto; }
#versus .letterbox i { height: 64px; }
/* choreography: halves slide in, the medal slams, everything shakes once */
#versus.in .vs-half.left { animation: vsFromLeft 0.26s cubic-bezier(.2, .9, .2, 1) both; }
#versus.in .vs-half.right { animation: vsFromRight 0.26s cubic-bezier(.2, .9, .2, 1) both; }
#versus.in .vs-seam { animation: seamIn 0.22s ease-out 0.1s both; }
#versus .vs-medal { opacity: 0; }
#versus.slam .vs-medal { animation: medalSlam 0.36s cubic-bezier(.3, 1.6, .5, 1) both; }
#versus.slam .vs-half img { animation: jolt 0.3s ease-out; }
#versus.in .vs-map, #versus.in .vs-load { animation: fadeUp 0.2s ease-out 0.2s both; }
@keyframes vsFromLeft { from { transform: translateX(-60%); } to { transform: none; } }
@keyframes vsFromRight { from { transform: translateX(60%); } to { transform: none; } }
@keyframes seamIn { from { opacity: 0; height: 0; } to { opacity: 1; height: 110%; } }
@keyframes medalSlam { from { opacity: 0; transform: scale(3); } to { opacity: 1; transform: none; } }
@keyframes jolt { 30% { translate: 0 6px; } 60% { translate: 0 -3px; } }
#versus .vs-half.right img { transform: scaleX(-1); }

/* ---------- quieter motion ---------- */
body.calm #logo .word span, body.calm #logo .two, body.calm #logo .subtitle, body.calm .press-any, body.calm .tagline { animation: none !important; }
body.calm #logo .splash { animation: none; }
body.calm .press-any > span:first-child { animation: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) { .war-table { display: none; } }
@media (max-height: 820px) {
  .faceoff { height: 136px; } .faceoff .side img { width: 168px; margin: -24px 0 -8px; } .faceoff .mystery { width: 108px; height: 108px; }
  .scr-skirmish { gap: 10px; padding-top: 14px; }
  .cmd-list, .war-table { top: 170px; } .cmd-list { gap: 10px; }
}

/* the lobby's opponent/difficulty column needs room for four labels a row */
.scr-skirmish .row2 { grid-template-columns: 1fr 330px; }

/* focus: thin, never the browser's thick ring; the main column shows it with the gliding brackets */
#menu .mc-btn:focus, #options .mc-btn:focus, #menu .fcard:focus, #menu .bcard:focus, #menu .seg button:focus { outline: none; }
#menu .mc-btn:focus-visible, #options .mc-btn:focus-visible, #menu .fcard:focus-visible, #menu .bcard:focus-visible, #menu .seg button:focus-visible { outline: 1px solid var(--yellow); outline-offset: 3px; }
#menu .cmd-list .mc-btn:focus-visible { outline: none; }
/* main: the splash is the title's joke; the docked logo stays clean */
#menu[data-screen="main"] #logo .splash { opacity: 0; }
/* lobby: the stack sits in the middle of the screen with even breathing room */
.scr-skirmish > :first-child { margin-top: auto; }
.scr-skirmish > :last-child { margin-bottom: auto; }
.scr-skirmish .row2 { margin-top: 18px; }
.scr-skirmish .step-label { margin-bottom: 12px; }

/* war table dioramas carry their names in faction colour */
.wt-stage figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.wt-stage figcaption { margin-top: 6px; font-size: 21px; color: var(--acc); text-shadow: 0 2px 0 #000; filter: brightness(1.25); white-space: nowrap; }
.wt-stage figure small { font-size: 17px; color: var(--mute); }

/* snappy: menus answer on the frame you act. Hover and press states are instant, no easing
   (the press still sinks; it just doesn't glide). Overlays pop in over 100 ms with no bounce. */
#menu .mc-btn, #menu .px-btn, #options .mc-btn, #help .mc-btn, #pause .px-btn, #menu .fcard, #menu .bcard, #menu .seg button,
#menu .fcard .portraits img.render, .toggle i, .slider i { transition: none !important; }
#menu .cmd-list > .mc-btn { transition: opacity 0.12s, translate 0.18s cubic-bezier(.2, .9, .2, 1) !important; }
#help .help-panel, #pause .panel-pop, #endscreen .end-panel { animation: popIn 0.1s ease-out both; }
@keyframes popIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
#help .mc-btn:focus { outline: none; }
#help .mc-btn:focus-visible { outline: 1px solid var(--yellow); outline-offset: 3px; }

/* ---------- narrow windows: the lobby reflows instead of spilling sideways ---------- */
@media (max-width: 1100px) {
  .scr-skirmish { padding-left: 16px; padding-right: 16px; }
  .scr-skirmish .row2 { grid-template-columns: 1fr; }
  .biomes { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .faceoff { grid-template-columns: 1fr 96px 1fr; padding: 0 14px; }
  .faceoff .vs { width: 96px; } .faceoff .vs i { width: 60px; height: 60px; } .faceoff .vs span { font-size: 20px; }
  .faceoff .side img { width: 150px; margin: -18px 0 -6px; }
  .faceoff .side b { font-size: 16px; white-space: normal; }
  .faceoff .side span { font-size: 19px; }
}
@media (max-width: 900px) {
  .factions { grid-template-columns: 1fr; }
  .fcard .portraits { min-width: 104px; } .fcard .portraits img.render { width: 104px; }
  .faceoff { height: auto; min-height: 110px; padding: 10px 14px; }
  .faceoff .side img, .faceoff .side .mystery { display: none; }
  .faceoff .side small { font-size: 9px; }
  .lobby-sub { display: none; }
  .lobby-bar { flex-wrap: wrap; }
  .lobby-bar .np-chip { display: none; }
  .matchup { font-size: 22px; flex-basis: 100%; }
  .lobby-bar #startBtn { flex: 1; min-width: 0; }
}
