/* Ring of models — the game screens. Same language as the VS screen: near-black, diagonal cuts, heavy italic
   lettering with a dark outline, molten gold for focus, each fighter in their own colours. */
:root {
  --bg: #06070b;
  --ink: #f4f5f8;
  --dim: #a3a8b8;
  --mute: #6d7284;
  --line: #262a36;
  --panel: rgba(10, 11, 17, 0.86);
  --gold: #ffc94a;
  --gold2: #ff8a1e;
  --hot: linear-gradient(180deg, #fffdf2 0%, #ffe27a 32%, #ffb02a 50%, #d2440f 53%, #ff8a1e 78%, #ffd46a 100%);
  --silver: linear-gradient(180deg, #ffffff 0%, #f1f2f6 55%, #c9ccd8 58%, #ffffff 100%);
  --cut: 14px;
  --pad: clamp(16px, 3.2vw, 56px);
  --font: Oswald, 'Arial Narrow', Impact, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* layers */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
#bg canvas { position: absolute; left: 50%; top: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; transform: translate(-50%, -50%); transition: filter .5s ease; }
body.menu #bg canvas { filter: blur(7px) brightness(.42) saturate(1.1); }
#bgShade { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(0,0,0,.7) 100%), linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 70%, rgba(0,0,0,.55)); }
#ui { position: fixed; inset: 0; z-index: 2; overflow: hidden; }
#frame { position: fixed; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
#frame canvas { display: block; position: relative; }
#frame canvas.frame-bg { position: absolute; inset: -6%; width: 112% !important; height: 112% !important; filter: blur(28px) brightness(.45) saturate(1.2); }
#overlay { position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#overlay > * { pointer-events: auto; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: var(--pad); padding-bottom: calc(var(--pad) + 30px); overflow-y: auto; overflow-x: hidden; animation: screenIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes screenIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.screen.back-in { animation-name: screenBack; }
@keyframes screenBack { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* lettering */
/* the text is painted by its background (background-clip: text) only inside the padding box: room around the
   glyphs for the italic slant on the right, Й and Ё above the caps and the tails below the line */
.slab { padding: .2em .16em .14em .06em; margin: -.2em -.16em -.14em -.06em; font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: .01em; line-height: .92; background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; filter: drop-shadow(0 0 0 #000) drop-shadow(3px 0 0 #0a0a10) drop-shadow(-3px 0 0 #0a0a10) drop-shadow(0 3px 0 #0a0a10) drop-shadow(0 -3px 0 #0a0a10) drop-shadow(4px 6px 6px rgba(0,0,0,.7)); }
.slab.hot { background: var(--hot); -webkit-background-clip: text; background-clip: text; }
.title { font-size: clamp(34px, 5.4vw, 92px); margin: 0; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: clamp(14px, 1.15vw, 20px); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.kicker::before { content: ''; width: 34px; height: 4px; background: var(--gold); transform: skewX(-30deg); }

/* head of a screen */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(16px, 2.4vw, 36px); flex-wrap: wrap; }
.head .left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* the key legend at the bottom */
.legend { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; gap: 22px; justify-content: flex-end; padding: 10px var(--pad); background: linear-gradient(0deg, rgba(0,0,0,.75), transparent); font-size: 15px; color: var(--dim); letter-spacing: .04em; pointer-events: none; }
.legend b { display: inline-block; min-width: 26px; padding: 1px 7px; margin-right: 7px; border: 1px solid #4a4f60; border-radius: 4px; color: var(--ink); font-weight: 500; text-align: center; background: rgba(20,22,30,.8); }

/* buttons: slanted plates */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 28px; min-height: 48px; border: 0; background: #151821; color: var(--ink); font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(15px, 1.2vw, 20px); clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); cursor: pointer; transition: transform .12s, background .12s, color .12s, filter .12s; outline: none; }
.btn::after { content: ''; position: absolute; inset: 0; border: 2px solid transparent; clip-path: inherit; pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, #ffe27a, #ffb02a 48%, #e2621a 52%, #ffb02a); color: #160a04; }
.btn:focus-visible, .btn.focus { transform: translateY(-2px) scale(1.03); filter: drop-shadow(0 0 14px rgba(255,170,60,.55)); background: linear-gradient(180deg, #ffe27a, #ffb02a 48%, #e2621a 52%, #ffb02a); color: #160a04; }
.btn:disabled { opacity: .35; cursor: default; filter: none; transform: none; }
.btn .ico { width: 18px; height: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* title screen: the opening's title layer (intro.js drives its transform, opacity and --heat) */
#title { justify-content: center; align-items: center; text-align: center; padding: 0; }
#title .intro-title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6vh; pointer-events: none; --heat: 0; }
#title .intro-logo { margin: 0; opacity: 0; display: flex; flex-direction: column; align-items: center; font-weight: 700; font-style: italic; text-transform: uppercase; line-height: 1; font-size: clamp(64px, 12.5vw, 260px); letter-spacing: .02em; will-change: transform, opacity; }
#title .intro-logo span { position: relative; display: block; padding: .18em .2em .12em .08em; margin: -.18em -.2em -.12em -.08em; background: linear-gradient(180deg, #fffaf0 0%, #ffe3a6 26%, #ffb04a 46%, #d4621c 58%, #7a2a0c 74%, #f5a44a 88%, #fff1c9 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* the outline, the heat and the shadow are a copy of the word behind it: a filter over clipped letters made Chrome
   shade the whole box of the word (a dark rectangle under the title) */
#title .intro-logo span::before { content: attr(data-t); position: absolute; inset: 0; padding: inherit; white-space: nowrap; z-index: -1; color: #120804; -webkit-text-stroke: .07em #120804; paint-order: stroke fill; text-shadow: 0 0 calc(var(--heat) * 40px) rgba(255, 128, 32, calc(var(--heat) * .9)), 0 0 calc(var(--heat) * 90px) rgba(255, 96, 20, calc(var(--heat) * .45)), 0 .05em 0 #120804, .04em .08em .1em rgba(0,0,0,.85); }
#title .intro-logo .w2 { font-size: .56em; letter-spacing: .1em; margin-top: -.02em; }
#title .intro-title::before { content: ''; position: absolute; left: 50%; top: 46%; width: 90vw; height: 70vh; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); opacity: calc(var(--heat) * 1.4); }
#title .press { position: absolute; bottom: 6vh; opacity: 0; font-size: clamp(16px, 1.6vw, 28px); letter-spacing: .34em; text-transform: uppercase; color: #f3ecdf; text-shadow: 0 2px 10px #000, 0 0 18px rgba(255,140,40,.35); }

/* main menu */
#main { justify-content: center; }
#main .wrap { display: grid; grid-template-columns: minmax(0, 640px) 1fr; gap: 4vw; align-items: center; height: 100%; }
#main .brand { font-size: clamp(28px, 3.2vw, 54px); margin-bottom: 4vh; }
.mm { display: flex; flex-direction: column; gap: 6px; }
.mm .item { position: relative; display: flex; align-items: baseline; gap: 18px; padding: 10px 26px 10px 22px; border: 0; background: transparent; text-align: left; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: clamp(30px, 3.4vw, 60px); line-height: 1; color: #c9ccd6; cursor: pointer; outline: none; white-space: nowrap; transition: color .12s, transform .15s; }
.mm .item .n { font-size: .34em; color: var(--mute); letter-spacing: .1em; width: 2.2em; }
.mm .item::before { content: ''; position: absolute; inset: 4px -20px 4px 0; background: linear-gradient(90deg, rgba(255,176,42,.95), rgba(226,98,26,.9) 60%, transparent); clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%); transform: scaleX(0); transform-origin: left; transition: transform .18s cubic-bezier(.2,.8,.2,1); z-index: -1; }
.mm .item.focus, .mm .item:focus-visible { color: #170a03; transform: translateX(10px); }
.mm .item.focus::before, .mm .item:focus-visible::before { transform: scaleX(1); }
.mm .item.focus .n { color: #170a03; }
#main .side { position: relative; height: min(78vh, 760px); }
#main .side .pair { position: absolute; inset: 0; }
#main .side .pair img { position: absolute; bottom: 0; height: 100%; max-width: 62%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 18px var(--glow, #ffb02a)); -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 98%); mask-image: linear-gradient(180deg, #000 70%, transparent 98%); }
#main .side .pair img:first-child { left: 0; }
#main .side .pair img:last-child { right: 0; transform: scaleX(-1); }
#main .side .caption { position: absolute; left: 0; right: 0; top: 46%; text-align: center; }
#main .side .caption .vs { font-size: clamp(60px, 8vw, 150px); }

/* tiles (roster, pickers) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 15vw, 250px), 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.tile { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; cursor: pointer; outline: none; background: linear-gradient(160deg, var(--p, #333) -10%, #0a0b10 75%); clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%); transition: transform .15s, filter .15s; overflow: hidden; }
.tile::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.04) 0 2px, transparent 2px 14px); }
.tile img { position: absolute; left: 50%; bottom: 0; height: 92%; transform: translateX(-50%); filter: drop-shadow(0 0 10px var(--a, #fff)); transition: transform .2s; }
.tile .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; text-align: left; background: linear-gradient(0deg, rgba(0,0,0,.92), transparent); }
.tile .name { font-size: clamp(20px, 1.8vw, 32px); }
.tile .model { display: inline-block; margin-bottom: 6px; padding: 2px 12px; background: var(--a, #fff); color: #0b0c12; font-weight: 700; font-size: clamp(11px, .85vw, 15px); letter-spacing: .08em; text-transform: uppercase; clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.tile .ver { position: absolute; top: 10px; right: 20px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink); background: rgba(0,0,0,.55); padding: 2px 8px; }
.tile.focus, .tile:focus-visible { transform: translateY(-6px); filter: drop-shadow(0 0 16px var(--a, #ffb02a)); }
.tile.focus img, .tile:focus-visible img { transform: translateX(-50%) scale(1.05); }
.tile.sel { outline: 3px solid var(--gold); outline-offset: -3px; }
.section { margin: 26px 0 12px; }
.empty { color: var(--dim); font-size: 22px; font-style: italic; padding: 30px 0; }

/* fighter card */
#card .layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(16px, 3vw, 50px); flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
#card .stage { position: relative; min-height: 360px; background: linear-gradient(160deg, var(--p) -20%, #07080c 70%); clip-path: polygon(30px 0, 100% 0, calc(100% - 30px) 100%, 0 100%); overflow: hidden; }
#card .stage::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(100deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px); }
#card .stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
#card .stage .anim { position: absolute; left: 30px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 2; }
#card .stage .anim .btn { padding: 6px 16px; min-height: 36px; font-size: 14px; }
#card .info { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; }
.plate { white-space: nowrap; align-self: flex-start; padding: 4px 18px; background: var(--a); color: #0b0c12; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: clamp(14px, 1.1vw, 20px); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
#card .name { font-size: clamp(40px, 5vw, 92px); white-space: nowrap; }
/* names that do not fit get a smaller size from fitText() in game.js; past its floor they wrap with room for Й and Ё */
[data-fit] { display: block; white-space: nowrap; }
.slab.fit-wrap { white-space: normal; line-height: 1.08; text-wrap: balance; }
#card .motto { font-style: italic; font-size: clamp(17px, 1.4vw, 24px); color: #e7e9f0; }
.versions { display: flex; gap: 8px; flex-wrap: wrap; }
.vchip { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 18px 6px 16px; min-width: 104px; border: 0; background: #141720; color: var(--ink); cursor: pointer; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); outline: none; text-align: left; }
.vchip .v { font-weight: 700; font-style: italic; font-size: 22px; line-height: 1.1; }
.vchip .when { font-size: 12px; color: var(--dim); letter-spacing: .03em; }
.vchip.on { background: var(--a); color: #0b0c12; }
.vchip.on .when { color: #1d1f28; }
.vchip.focus, .vchip:focus-visible { filter: drop-shadow(0 0 10px var(--gold)); transform: translateY(-2px); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.tab { padding: 8px 18px; border: 0; background: transparent; color: var(--dim); font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(14px, 1.05vw, 18px); cursor: pointer; outline: none; position: relative; }
.tab.on { color: var(--ink); }
.tab.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 3px; background: var(--a); }
.tab.focus, .tab:focus-visible { color: var(--gold); }
.tab .dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; background: var(--gold); border-radius: 50%; vertical-align: middle; }
.pane { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; }
.story { font-size: clamp(16px, 1.15vw, 20px); line-height: 1.5; color: #d9dce5; font-weight: 400; max-width: 62ch; }
.stats { display: grid; grid-template-columns: auto auto auto; justify-content: start; gap: 10px 16px; align-items: center; max-width: 520px; margin-top: 18px; }
.stats .l { font-size: 17px; letter-spacing: .1em; color: #dfe2ea; text-transform: uppercase; }
.stats .seg { display: flex; gap: 6px; }
.stats .seg i { width: 38px; height: 16px; background: #1a1c24; transform: skewX(-20deg); }
.stats .seg i.on { background: var(--a); box-shadow: inset 0 4px 0 rgba(255,255,255,.35); }
.stats .num { font-weight: 700; font-size: 24px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 10px 16px; background: rgba(20,22,30,.78); border-left: 4px solid var(--a); align-items: center; }
.li.btnlike { cursor: pointer; outline: none; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; color: inherit; width: 100%; }
.li.btnlike.focus, .li.btnlike:focus-visible { background: rgba(40,36,24,.95); box-shadow: inset 0 0 0 1px var(--gold); }
.li .t { font-weight: 700; font-style: italic; font-size: clamp(17px, 1.3vw, 22px); text-transform: uppercase; }
.li .s { grid-column: 1 / -1; color: var(--dim); font-size: 15px; font-weight: 400; line-height: 1.4; }
.li .k { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 13px; font-weight: 500; padding: 2px 8px; background: #232633; color: #dfe2ea; letter-spacing: .03em; white-space: nowrap; }
.tag.super { background: var(--gold); color: #160a04; }
.tag.special { background: #3a2a14; color: #ffd28a; }
.quote { position: relative; margin: 14px 0 0; padding: 14px 18px 14px 22px; background: rgba(255,201,74,.08); border-left: 4px solid var(--gold); font-size: clamp(15px, 1.1vw, 19px); line-height: 1.5; color: #efe7d2; font-weight: 400; white-space: pre-wrap; }
.quote .who { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.chg { display: flex; flex-direction: column; gap: 6px; }
.chg .c { padding: 6px 12px; background: rgba(20,22,30,.78); font-size: 16px; font-weight: 400; }
.chg .c.plus { border-left: 4px solid #5fd47a; }
.chg .c.minus { border-left: 4px solid #ff6a5a; }
.chg .c.tilde { border-left: 4px solid var(--gold); }
.chg h4 { margin: 10px 0 2px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.play { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--a); color: #0b0c12; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); cursor: pointer; outline: none; }
.play.focus, .play:focus-visible { filter: drop-shadow(0 0 8px var(--gold)); background: var(--gold); }

/* matches */
.mlist { display: flex; flex-direction: column; gap: 12px; }
.mcard { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 20px; padding: 16px 30px; border: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--pa) 45%, #0a0b10), #0b0c12 40%, #0b0c12 60%, color-mix(in srgb, var(--pb) 45%, #0a0b10)); clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%); cursor: pointer; outline: none; color: inherit; text-align: left; transition: transform .12s, filter .12s; }
.mcard.focus, .mcard:focus-visible { transform: translateX(8px); filter: drop-shadow(0 0 14px rgba(255,170,60,.5)); }
.mcard .side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mcard .side.r { align-items: flex-end; text-align: right; }
.mcard .side.r .plate, .mhead .s.r .plate { align-self: flex-end; }
.mcard .nm { font-size: clamp(22px, 2vw, 36px); }
.mcard .score { font-size: clamp(36px, 3.6vw, 64px); }
.mcard .when { color: var(--dim); font-size: 15px; text-align: right; line-height: 1.4; font-weight: 400; }
.mcard .plate { font-size: 13px; }
.won { color: var(--gold); }

/* match page */
.mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 20px; margin-bottom: 24px; }
.mhead .s { display: flex; flex-direction: column; gap: 8px; }
.mhead .s.r { align-items: flex-end; text-align: right; }
.mhead .nm { font-size: clamp(30px, 3.6vw, 64px); }
.mhead .score { font-size: clamp(54px, 6vw, 110px); text-align: center; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.round { display: grid; grid-template-columns: 180px 1fr auto; gap: 20px; align-items: center; padding: 0 22px 0 0; background: rgba(14,15,22,.88); clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); min-height: 96px; }
.round .thumb { height: 100%; min-height: 96px; background-size: cover; background-position: center; position: relative; }
.round .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, rgba(14,15,22,.95)); }
.round .what { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.round .rn { font-size: clamp(20px, 1.7vw, 30px); }
.round .res { color: #dfe2ea; font-size: clamp(15px, 1.1vw, 19px); font-weight: 400; }
.round .res b { font-weight: 700; }
.locker { margin: 0 0 0 60px; padding: 12px 18px; border-left: 2px dashed #3a3e4c; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.locker .lk { display: flex; flex-direction: column; gap: 6px; }
.locker .lk .who { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--a); font-weight: 700; }
.locker .lk .none { color: var(--mute); font-style: italic; font-size: 15px; font-weight: 400; }
.locker .lk .bul { font-size: 15px; font-weight: 400; color: #dfe2ea; }
.locker .lk .say { font-size: 15px; font-weight: 400; color: #efe7d2; font-style: italic; line-height: 1.45; }
.ltitle { margin: 6px 0 0 60px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

/* pickers: two corners + stage */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(12px, 2vw, 32px); align-items: stretch; }
.slot { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 48px 18px 40px; min-height: 300px; border: 0; color: inherit; background: linear-gradient(160deg, var(--p, #2a2d38) -20%, #08090d 72%); clip-path: polygon(22px 0, 100% 0, calc(100% - 22px) 100%, 0 100%); cursor: pointer; outline: none; text-align: left; overflow: hidden; }
.slot.r { text-align: right; align-items: flex-end; padding: 18px 40px 18px 48px; }
.slot img { position: absolute; bottom: 0; height: 88%; left: 50%; transform: translateX(-50%); filter: drop-shadow(0 0 14px var(--a, #fff)); opacity: .95; }
.slot .corner { position: relative; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.slot .nm { position: relative; font-size: clamp(26px, 2.6vw, 46px); margin-top: auto; }
.slot .plate { position: relative; }
.slot.r .plate { align-self: flex-end; }
.slot.focus, .slot:focus-visible { filter: drop-shadow(0 0 16px var(--gold)); }
.slot .change { position: relative; font-size: 13px; color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.vsmark { align-self: center; font-size: clamp(48px, 5vw, 96px); }
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stg { position: relative; aspect-ratio: 16 / 9; border: 0; padding: 0; background-size: cover; background-position: center; cursor: pointer; outline: none; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); color: #fff; }
.stg span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 6px; text-align: left; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 16px; background: linear-gradient(0deg, rgba(0,0,0,.85), transparent); }
.stg.on { box-shadow: inset 0 0 0 3px var(--gold); }
.stg.focus, .stg:focus-visible { filter: drop-shadow(0 0 10px var(--gold)) brightness(1.15); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.label { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); font-weight: 700; margin: 18px 0 10px; }

/* modal picker */
.modal { position: fixed; inset: 0; z-index: 9; background: rgba(3,4,8,.86); backdrop-filter: blur(6px); display: flex; flex-direction: column; padding: var(--pad); overflow-y: auto; animation: screenIn .25s; }

/* settings */
.set { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.opt { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 14px 24px; border: 0; background: rgba(14,15,22,.9); color: inherit; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); cursor: pointer; outline: none; text-align: left; font-size: clamp(18px, 1.5vw, 26px); font-weight: 700; font-style: italic; text-transform: uppercase; }
.opt .val { display: flex; gap: 6px; align-items: center; font-style: normal; font-size: 18px; }
.opt .val .o { padding: 3px 12px; background: #1b1e28; color: var(--dim); font-weight: 500; }
.opt .val .o.on { background: var(--gold); color: #160a04; font-weight: 700; }
.opt.focus, .opt:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); background: rgba(30,28,22,.95); }
.vol { display: flex; gap: 4px; }
.vol i { width: 14px; height: 22px; background: #1b1e28; transform: skewX(-20deg); }
.vol i.on { background: var(--gold); }

/* fight overlays */
.ov { min-width: min(560px, calc(100vw - 32px)); max-width: calc(100vw - 32px); padding: 28px 34px; background: rgba(6,7,11,.92); border-top: 4px solid var(--gold); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.ov .big { font-size: clamp(34px, 4vw, 64px); }
.ov .sub { color: var(--dim); font-size: 18px; font-weight: 400; }
.ov .col { display: flex; flex-direction: column; gap: 8px; }
.ov .col .btn { justify-content: flex-start; }
.busy { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.busy .bar2 { width: min(420px, 70vw); height: 6px; background: #1b1e28; overflow: hidden; }
.busy .bar2 i { display: block; height: 100%; width: 30%; background: var(--gold); animation: slide 1s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.busy .txt { font-size: 20px; letter-spacing: .12em; text-transform: uppercase; }
#controls { position: fixed; left: 50%; bottom: calc(var(--frame-b, 0px) + var(--frame-h, 100vh) * .035); transform: translateX(-50%); z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(calc(var(--frame-w, 100vw) * .5), 100vw); padding: 0; box-sizing: border-box; font-size: clamp(15px, calc(var(--frame-h, 100vh) * .019), 26px); color: #eef0f5; pointer-events: none; transition: opacity .5s, transform .5s; text-shadow: 0 1px 3px #000; }
#controls .row { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; }
#controls .kc { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(4,5,9,.68); border-radius: 6px; white-space: nowrap; backdrop-filter: blur(4px); }
#controls .kc b { display: inline-block; min-width: 1.4em; padding: 1px 7px; border: 1px solid #6a7086; border-radius: 4px; text-align: center; color: #fff; font-weight: 500; background: rgba(30,32,42,.9); }
#controls .kc.mv { color: var(--gold); }
#controls .mn { margin-left: 2px; }
#controls.off { opacity: 0; transform: translate(-50%, 12px); }
.cmd { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.cmd i { font-style: normal; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.cmd .ca { width: 1.45em; height: 1.45em; border-radius: 50%; background: #23262f; color: #fff; font-size: .95em; font-weight: 700; border: 1px solid #4a4f62; }
.cmd .ca.hold, .ml-note .ca.hold { box-shadow: 0 0 0 2px var(--gold) inset; }
.cmd .cb, .ml-keys .cb { min-width: 1.9em; height: 1.45em; padding: 0 .35em; border-radius: .7em; font-size: .78em; font-weight: 700; letter-spacing: .02em; color: #111; gap: .3em; }
.cb.p { background: #ffc94a; }
.cb.k { background: #6fd3ff; }
.cmd .cb small { font-size: .85em; font-weight: 500; opacity: .75; }
.cmd .cj { font-size: .72em; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-right: 4px; }
.movelist { display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
.movelist .ml-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; color: var(--dim); font-size: 14px; }
.movelist .ml-keys .kc { display: inline-flex; align-items: center; gap: 6px; }
.movelist .ml-keys b { padding: 0 6px; border: 1px solid #555b6e; border-radius: 4px; color: #fff; font-weight: 500; }
.movelist .ml-h { margin-top: 10px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.movelist .ml-r { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px 10px; background: rgba(20,22,30,.7); }
.movelist .ml-n { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.movelist .ml-note { margin-top: 8px; font-size: 13px; color: var(--dim); }
.ov.wide { min-width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.ov .ov-body { display: flex; gap: 28px; align-items: flex-start; }
.ov .ov-body .col { min-width: 240px; }
.ov .ov-list { flex: 1; min-width: 0; }
.fs-btn { position: fixed; right: 14px; top: 14px; z-index: 9; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(6,7,11,.55); color: #e8eaf0; cursor: pointer; opacity: .55; transition: opacity .2s; }
.fs-btn:hover { opacity: 1; }
body.intro-on .fs-btn { opacity: 0; pointer-events: none; }
.fs-btn .off { display: none; }
body.fs .fs-btn .on { display: none; }
body.fs .fs-btn .off { display: inline; }
@media (max-width: 760px) { .ov .ov-body { flex-direction: column; } }
.lockcard { width: min(1100px, calc(100vw - 32px)); padding: 30px 36px; background: rgba(6,7,11,.94); border-top: 4px solid var(--gold); display: flex; flex-direction: column; gap: 16px; }
.lockcard .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

/* phone */
@media (max-width: 820px) {
  #main .wrap { grid-template-columns: 1fr; }
  #main .side { display: none; }
  .mm .item { font-size: clamp(30px, 9vw, 46px); padding: 10px 18px; }
  #card .layout { grid-template-columns: 1fr; grid-template-rows: auto; }
  #card .stage { min-height: 42vh; }
  #card .stage .anim { left: 12px; right: 12px; bottom: 10px; gap: 6px; flex-wrap: nowrap; }
  #card .stage .anim .btn { padding: 4px 10px; min-height: 30px; font-size: 12px; white-space: nowrap; }
  .mcard { grid-template-columns: 1fr auto 1fr; padding: 14px 20px; gap: 10px; }
  .mcard .when { grid-column: 1 / -1; text-align: left; }
  .mhead { grid-template-columns: 1fr; text-align: left; }
  .mhead .s.r { align-items: flex-start; text-align: left; }
  .mhead .score { text-align: left; }
  .round { grid-template-columns: 90px 1fr; padding-right: 14px; }
  .round .go { grid-column: 1 / -1; padding: 0 0 12px 14px; }
  .locker, .ltitle { margin-left: 16px; }
  .locker { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .vsmark { justify-self: center; }
  .slot { min-height: 220px; }
  .legend { display: none; }
  .lockcard .cols { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  #controls { display: none !important; }
  .mcard .nm { font-size: 22px; }
  .mcard .plate { font-size: 11px; padding: 3px 12px; }
  .mcard .score { font-size: 34px; }
  .head .btn.primary { order: 3; }
}

.keys { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.keys .kk { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(20,22,30,.85); font-size: 15px; color: #dfe2ea; }
.keys .kk b { min-width: 26px; padding: 1px 7px; border: 1px solid #555b6e; border-radius: 4px; text-align: center; color: #fff; font-weight: 500; background: rgba(36,38,50,.95); }
.keys .kk.mv { color: var(--gold); }
.keys + .label { margin-top: 14px; }

/* match numbers (viewer/game/stats.js): health graph, counters, juiciest hit, locker rooms, protocol */
.mtabs { margin: 0 0 18px; }
.mstats { display: flex; flex-direction: column; gap: 22px; padding-bottom: 60px; }
.rblock .ltitle { margin: 0 0 10px; }
.rstats { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px 24px; align-items: start; }
.rstats .juicy { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: rgba(20,22,30,.8); flex-wrap: wrap; }
.rstats .juicy .jt { font-size: 18px; }
.rs-chart { background: rgba(10,11,16,.75); padding: 12px 14px 8px; }
.hpchart { width: 100%; height: auto; aspect-ratio: 640 / 180; display: block; }
.hpchart .g { stroke: #2c2f3a; stroke-width: 1; }
.hpchart .l { fill: #8b90a0; font: 12px Oswald, sans-serif; }
.legend2 { display: flex; gap: 18px; font-size: 14px; color: var(--dim); }
.legend2 span::before { content: ''; display: inline-block; width: 14px; height: 4px; margin-right: 6px; vertical-align: middle; background: var(--c); }
.cnt { background: rgba(10,11,16,.75); padding: 10px 14px; font-size: 16px; }
.cnt-h, .cnt-r { display: grid; grid-template-columns: 1fr 1.6fr 1fr; align-items: center; gap: 8px; padding: 5px 0; }
.cnt-h { font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .08em; border-bottom: 1px solid #2c2f3a; }
.cnt-h span:last-child, .cnt-r b:last-child { text-align: right; }
.cnt-r span { text-align: center; color: var(--dim); font-size: 14px; }
.cnt-r b { font-size: 20px; color: #d9dce6; }
.cnt-r b.win { color: var(--gold); }
.lkeff { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.leff { background: rgba(10,11,16,.75); border-left: 4px solid var(--a); padding: 12px 16px; font-size: 15px; }
.le-h { margin-bottom: 8px; }
.le-h .verdict { color: var(--gold); }
.le-r { display: grid; grid-template-columns: 1fr 50px 20px 50px 60px; align-items: center; gap: 6px; padding: 3px 0; color: var(--dim); }
.le-r b { color: #e8eaf0; text-align: right; }
.le-r i { font-style: normal; text-align: center; }
.le-r em { font-style: normal; text-align: right; }
.le-r em.up { color: #7dff9a; }
.le-r em.down { color: #ff7a6a; }
.proto { display: flex; flex-direction: column; gap: 18px; font-size: 15px; padding-bottom: 60px; }
.proto .pr-v { color: var(--gold); font-weight: 700; letter-spacing: .04em; }
.proto .pr-p { background: rgba(10,11,16,.75); padding: 12px 16px; overflow-x: auto; }
.proto .pr-h span { color: var(--dim); margin-left: 8px; }
.proto table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.proto th, .proto td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid #23262f; white-space: nowrap; }
.proto th { color: var(--dim); font-weight: 500; font-size: 13px; }
.proto .pr-r { display: flex; flex-direction: column; gap: 6px; color: var(--dim); }
.proto b.ok { color: #7dff9a; }
.proto b.bad { color: #ff7a6a; }
.juicyv { width: min(1280px, 86vw); aspect-ratio: 16 / 9; background: #000; }
.btn.small { padding: 6px 14px; font-size: 14px; }
@media (max-width: 760px) { .rstats { grid-template-columns: 1fr; } }

/* a stats frame for the reel (viewer/card.html): 1920×1080 or 1080×1920 */
body.cardpage { background: radial-gradient(120% 90% at 50% 30%, #1d1410, #07080c 70%); }
.scard { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 34px; padding: 80px 120px; box-sizing: border-box; font-size: 22px; }
.scard.v { padding: 120px 60px; gap: 40px; }
.scard .sc-top h1 { font-size: 96px; margin: 8px 0 0; }
.scard.v .sc-top h1 { font-size: 84px; }
.scard .kicker { font-size: 28px; }
.scard .rstats { gap: 28px 40px; }
.scard.v .rstats { grid-template-columns: 1fr; }
.scard .cnt { font-size: 22px; padding: 16px 22px; }
.scard .cnt-r b { font-size: 30px; }
.scard .cnt-r span { font-size: 20px; }
.scard .cnt-h { font-size: 18px; }
.scard .hpchart .l { font-size: 14px; }
.scard .legend2 { font-size: 20px; }
.scard .juicy .jt { font-size: 28px; }
.scard .sc-foot { color: var(--dim); font-size: 22px; }
.scard .lk-ch { display: flex; flex-wrap: wrap; gap: 12px; }
.scard .lk-ch span { padding: 10px 18px; background: rgba(20,22,30,.85); font-size: 24px; }
.scard .lk-say { font-size: 30px; font-style: italic; color: #f0e6d6; max-width: 1500px; line-height: 1.3; }
.scard .leff { font-size: 26px; padding: 18px 28px; max-width: 1100px; }
.scard .rs-chart .hpchart { aspect-ratio: 640 / 240; }
.scard .le-r { grid-template-columns: 1fr 100px 40px 100px 100px; }

/* captions over the reel (viewer/card.html?kind=caption): transparent page, a plate in the lower third */
html.cappage, body.cappage { background: transparent !important; }
.cap { position: fixed; left: 6%; bottom: 15%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 72%; }
.cap.v { left: 6%; right: 6%; bottom: 24%; max-width: none; align-items: center; }
.cap .kicker { font-size: 26px; text-shadow: 0 2px 6px rgba(0,0,0,.9); }
.cap.v .kicker { font-size: 34px; }
.cap-plate { position: relative; padding: 18px 46px 20px 40px; background: linear-gradient(100deg, rgba(8,9,14,.94), rgba(14,15,22,.9)); clip-path: polygon(22px 0, 100% 0, calc(100% - 22px) 100%, 0 100%); box-shadow: inset 6px 0 0 var(--side); }
.cap-plate::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--side), transparent 80%); }
.cap .slab { display: block; font-size: 60px; line-height: 1.04; white-space: nowrap; }
.cap.v .slab { font-size: 66px; white-space: normal; text-align: center; text-wrap: balance; }

/* ---------- tournament console ---------- */
.t-steps { display: flex; gap: 6px; margin: 0 0 clamp(16px, 2vw, 28px); padding: 0; list-style: none; flex-wrap: wrap; }
.t-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 22px 8px 16px; background: #12141b; color: #7d8292; font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(13px, 1vw, 17px); clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.t-steps li b { display: inline-grid; place-items: center; width: 26px; height: 26px; background: #1e212c; color: #9aa0b0; font-style: normal; }
.t-steps li.done { color: #c9ceda; }
.t-steps li.done b { background: #2a6b46; color: #fff; }
.t-steps li.on { background: linear-gradient(180deg, #ffe27a, #ffb02a 48%, #e2621a 52%, #ffb02a); color: #160a04; }
.t-steps li.on b { background: #160a04; color: #ffcf4a; }
.t-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 26px); }
.t-corner { position: relative; display: flex; flex-direction: column; gap: 12px; padding: clamp(14px, 1.4vw, 24px); background: linear-gradient(160deg, color-mix(in srgb, var(--a) 22%, #0c0d12) -20%, #0c0d12 70%); border-left: 4px solid var(--a); }
.t-ch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.t-ch .plate { background: var(--a); color: #0b0c12; }
.t-ch b { font-size: clamp(20px, 1.8vw, 32px); }
.t-corner label, .t-match label { display: flex; flex-direction: column; gap: 4px; font-size: clamp(12px, .9vw, 15px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9aa0b0; }
.t-corner select, .t-corner input, .t-match select, .t-match input { font: inherit; font-size: clamp(15px, 1.1vw, 19px); text-transform: none; letter-spacing: 0; color: var(--ink); background: #151821; border: 1px solid #2c2f3a; padding: 8px 10px; min-height: 42px; }
.t-corner input[type=color] { padding: 2px; width: 90px; }
.t-match { display: flex; gap: clamp(12px, 1.6vw, 26px); align-items: flex-end; flex-wrap: wrap; margin-top: clamp(12px, 1.6vw, 22px); }
.t-stages { display: flex; gap: 8px; flex-wrap: wrap; }
.t-stages .chip { flex-direction: row; align-items: center; gap: 8px; padding: 8px 14px; background: #151821; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: clamp(14px, 1vw, 17px); cursor: pointer; }
.t-actions, .t-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: clamp(14px, 1.6vw, 24px); }
.t-row { margin-top: 0; }
.t-sts { display: flex; gap: 8px; flex-wrap: wrap; }
.t-st { padding: 4px 12px; background: #1b1e28; color: #9aa0b0; font-weight: 700; font-size: clamp(13px, .95vw, 16px); }
.t-st.ok { background: #183b28; color: #7dffb0; }
.t-st.hot { background: var(--gold); color: #160a04; }
.t-nums { display: flex; gap: clamp(14px, 2vw, 34px); }
.t-nums div { display: flex; flex-direction: column; }
.t-nums b { font-size: clamp(26px, 2.4vw, 44px); }
.t-nums em { font-style: normal; color: #9aa0b0; font-size: clamp(12px, .9vw, 15px); text-transform: uppercase; letter-spacing: .08em; }
.t-score { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 40px); font-weight: 700; font-size: clamp(18px, 1.6vw, 28px); }
.t-score b { font-size: clamp(56px, 6vw, 110px); }
.t-big { text-align: center; font-size: clamp(22px, 2.2vw, 40px); font-weight: 700; font-style: italic; text-transform: uppercase; margin: 6px 0 10px; }
.t-clock { text-align: center; font-size: clamp(80px, 10vw, 180px); line-height: 1; margin-bottom: clamp(12px, 1.6vw, 24px); }
.t-job { text-align: center; color: #c9ceda; font-size: clamp(14px, 1.05vw, 18px); margin: 4px 0; }
.t-job.error { color: #ff8a7a; }
.t-job a { color: var(--gold); }
#tournament .t-actions { justify-content: center; }
#toast { position: fixed; left: 50%; bottom: 60px; transform: translate(-50%, 20px); opacity: 0; padding: 12px 26px; background: #151821; color: var(--ink); font-weight: 700; border-left: 4px solid var(--gold); transition: opacity .2s, transform .2s; z-index: 50; pointer-events: none; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 820px) {
  .t-pair { grid-template-columns: 1fr; }
  .t-steps { flex-wrap: nowrap; }
  .t-steps li { padding: 6px 12px 6px 10px; }
  .t-steps li:not(.on) { font-size: 0; gap: 0; }
  .t-steps li:not(.on) b { font-size: 14px; }
}
/* the reveal of a fighter on its card: titles and changed stats flash */
.rv-flash { animation: rvFlash 1.1s ease-out; }
@keyframes rvFlash { 0% { filter: brightness(3) drop-shadow(0 0 18px #fff); transform: scale(1.06); } 40% { filter: brightness(1.6) drop-shadow(0 0 10px var(--a, #ffb02a)); } 100% { filter: none; transform: none; } }
