/* Showdown Duel — voting page. Tokens and resets come from shared/base.css.
   Everything that moves animates transform/opacity only (the loser's grayscale is the one
   filter); the per-vote animations run through the Web Animations API in app.js. */

:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --edge: 10px;
  --gap: clamp(36px, 7.5vw, 108px);
  /* Card width: 27vw, at most 294 px, and never taller than the viewport minus header, keycaps
     and the label line. */
  --card-w: min(27vw, 294px, calc((100vh - 316px) * 320 / 468));
}
@supports (height: 100dvh) {
  :root { --card-w: min(27vw, 294px, calc((100dvh - 316px) * 320 / 468)); }
}

/* ---- corners -------------------------------------------------------------- */

.controls {
  position: fixed; z-index: 10; display: flex; align-items: center; gap: 6px;
  top: calc(var(--safe-t) + var(--edge)); right: calc(var(--safe-r) + var(--edge));
}
.controls .icon-btn { width: var(--tap); height: var(--tap); }

/* "best code: FLASH" */
.code {
  /* One flex line, baseline-aligned as before, centred inside a full tap-height box. */
  margin: 0 8px 0 0; padding: 0 6px; min-height: var(--tap); display: flex; flex-wrap: wrap; align-content: center; align-items: baseline; gap: 7px;
  white-space: nowrap; user-select: none; border-radius: 10px; text-decoration: none; color: inherit; outline: none;
  transition: filter var(--t-fast), box-shadow var(--t-fast);
}
.code-value { transition: text-shadow var(--t-fast); }
.code:hover, .code:focus-visible { filter: brightness(1.15); }
.code:hover .code-value, .code:focus-visible .code-value { text-shadow: 0 0 12px rgba(55, 198, 255, .6), 0 0 2px rgba(255, 255, 255, .6); }
.code:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.code-label { font-size: 13px; color: var(--muted); text-transform: lowercase; }
.code-value { font-size: 21px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; }

.counter {
  position: fixed; z-index: 10; display: flex; align-items: baseline; gap: 5px;
  top: calc(var(--safe-t) + var(--edge)); left: calc(var(--safe-l) + var(--edge));
  height: var(--tap); padding: 0 10px; line-height: var(--tap); border-radius: 10px;
  border: 1px solid transparent; transform-origin: 20% 50%; outline: none; cursor: default; user-select: none;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.counter { cursor: pointer; }
@media (hover: hover) { .counter:hover { background: var(--panel); border-color: var(--line); } }
.counter:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.counter-word { font-size: 13px; color: var(--muted); }
.counter-num { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.counter-label { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---- layout --------------------------------------------------------------- */

.app {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 8px;
  padding: calc(var(--safe-t) + 18px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 28px) calc(var(--safe-l) + 16px);
}

/* Header and stage reveal once app.js has set the layout (no desktop-size flash on phones)
   and the first pair is decoded. */
.head, .stage { opacity: 0; transform: translateY(8px); transition: opacity 360ms ease-out, transform 360ms cubic-bezier(.2, .8, .2, 1); }
body[data-ready] .head { opacity: 1; transform: none; }
body[data-results] .head { display: none; }   /* the results need the room */
/* ... and start below the corner controls (counter, FLASH, buttons). */
body[data-results] .app { padding-top: calc(var(--safe-t) + 66px); }
body[data-ready] .stage:not([data-state="loading"]) { opacity: 1; transform: none; }

.head { text-align: center; user-select: none; }
.head-kicker {
  margin: 0 0 4px; font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
.head-title {
  display: inline-block; margin: 0; font-size: clamp(44px, 7.5vw, 104px); font-weight: 900; line-height: 1;
  letter-spacing: -0.02em; text-transform: uppercase; cursor: help; outline: none; border-radius: 8px;
  /* Symmetric side padding keeps it centred and gives the last glyph's ink room inside the
     box that background-clip: text paints into. */
  padding: 0 .08em;
  background: linear-gradient(180deg, #fff 0%, #fff 30%, #cfd6e6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* A text-shadow would paint over clipped text; the glow goes underneath via drop-shadow. */
  filter: drop-shadow(0 0 26px rgba(55, 198, 255, .22));
}
.head-title .q { letter-spacing: 0; }
.head-title:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

.play { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ---- label line under the cards: CLOSE DUEL / STREAK MODE ... ULTRA STREAK ---------
   Height always reserved; app.js pops labels in. Text is a clipped gradient that sweeps
   (shimmer), the glow is a drop-shadow underneath; each streak tier is bigger and hotter. */

.duel { height: var(--duel-h, 48px); display: flex; align-items: center; justify-content: center; }
.duel-text {
  --c1: var(--gold); --c2: #fff3c4; --glow: rgba(242, 182, 61, .45);
  display: inline-block; padding: 0 .2em; font-size: 24px; font-weight: 900; line-height: 1.1;
  letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; cursor: help; outline: none; border-radius: 6px;
  background: linear-gradient(100deg, var(--c1) 0%, var(--c1) 40%, var(--c2) 50%, var(--c1) 60%, var(--c1) 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px var(--glow));
}
.duel-text[data-tier] { animation: label-sweep 2.4s linear infinite; }
.duel-text:not([data-tier]) { visibility: hidden; }
/* base.css shortens animations to 1 ms for reduced motion; infinite sweeps must stop instead. */
@media (prefers-reduced-motion: reduce) { .duel-text, .res-row.top::after { animation: none !important; } }
.duel-text:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
@keyframes label-sweep { from { background-position: 130% 0; } to { background-position: -30% 0; } }
/* SUPER CLOSE DUEL!: hotter and bigger than CLOSE DUEL, orange-red into gold, quicker sweep. */
.duel-text[data-tier="super"] {
  --c1: #ff6a2b; --c2: #ffe9a6; --glow: rgba(255, 106, 43, .6); font-size: 29px;
  background-image: linear-gradient(100deg, #ff4d2e 0%, #ff8a2a 30%, #ffe9a6 50%, #f2b63d 70%, #ff4d2e 100%);
  animation-duration: 1.4s; filter: drop-shadow(0 0 14px var(--glow));
}
.duel-text[data-tier="0"] { --c1: var(--accent-2); --c2: #ead2ff; --glow: rgba(181, 108, 255, .5); }
.duel-text[data-tier="1"] { --c1: #f2b63d; --c2: #fff1c2; --glow: rgba(242, 182, 61, .55); font-size: 26px; }
.duel-text[data-tier="2"] { --c1: #ff8a2a; --c2: #ffd9a8; --glow: rgba(255, 138, 42, .6); font-size: 30px; animation-duration: 1.8s; }
.duel-text[data-tier="3"] { --c1: #ff4b3a; --c2: #ffc2a8; --glow: rgba(255, 75, 58, .7); font-size: 34px; animation-duration: 1.4s; }
.duel-text[data-tier="4"] {
  --c1: #ff3d6e; --c2: #ffd6f0; --glow: rgba(214, 80, 255, .85); font-size: 40px; letter-spacing: .12em;
  background-image: linear-gradient(100deg, #ff3d6e 0%, #c86bff 35%, #ffd6f0 50%, #c86bff 65%, #ff3d6e 100%);
  animation-duration: 1s; filter: drop-shadow(0 0 18px var(--glow)) drop-shadow(0 0 4px rgba(255, 255, 255, .5));
}

/* ---- verdict effects ------------------------------------------------------- */

.tick {
  position: fixed; z-index: 6; left: 0; top: 0; width: 160px; height: 160px; pointer-events: none; opacity: 0;
  color: var(--pos); filter: drop-shadow(0 0 16px rgba(34, 181, 95, .6)); will-change: transform, opacity;
}

/* Faint red flash after a wrong pick (app.js fades it). */
.tint { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(226, 59, 71, .11), rgba(226, 59, 71, .07) 75%); }

/* ---- "End session now?" ---------------------------------------------------- */

.confirm {
  position: fixed; z-index: 40; top: calc(var(--safe-t) + var(--edge) + var(--tap) + 6px); left: calc(var(--safe-l) + var(--edge));
  padding: 14px 16px; border-radius: 12px; background: #1c2338; border: 1px solid #334060;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55); transform-origin: 20px 0;
}
.confirm-text { margin: 0 0 12px; font-weight: 700; font-size: 15px; }
.confirm-actions { display: flex; gap: 8px; }
.btn {
  min-width: 72px; height: 38px; padding: 0 16px; border-radius: 10px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); outline: none;
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.btn:active { transform: scale(.96); }
.btn:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.btn-primary { border-color: transparent; background: linear-gradient(180deg, #4fd3ff, #1ea9e3); color: #06121c; }
@media (hover: hover) {
  .btn-ghost:hover { border-color: #3a4766; background: #222b44; }
  .btn-primary:hover { filter: brightness(1.08); }
}

/* ---- cards ---------------------------------------------------------------- */

.stage { display: flex; justify-content: center; align-items: flex-start; gap: var(--gap); }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.card {
  position: relative; display: block; padding: 0; border: 0; background: none; border-radius: 14px;
  width: var(--card-w); aspect-ratio: 320 / 468;
  transition: transform var(--t-fast) ease-out;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; outline: none;
}
.face {
  position: relative; display: block; width: 100%; height: 100%;
  border-radius: inherit; border: 1px solid var(--line); overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow);
  transition: border-color var(--t-fast);
  will-change: transform, opacity;
}
.face img {
  display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
/* Inner glow ring (hover/focus at half strength, full on a win) and the white win flash. */
.ring, .flash { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; }
.ring {
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 26px rgba(55, 198, 255, .35);
  transition: opacity var(--t-fast);
}
.flash { box-shadow: inset 0 0 0 3px #fff, inset 0 0 18px rgba(255, 255, 255, .55); }
/* Outer glow on the button (outside the clipped face); app.js pulses it on a win. */
.glow {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 1px rgba(55, 198, 255, .65), 0 0 36px 6px rgba(55, 198, 255, .4);
  transition: opacity var(--t-fast);
}

@media (hover: hover) {
  .card:hover { transform: translateY(-6px); }
  .card:hover .face { border-color: var(--accent); }
  .card:hover .ring { opacity: .5; }
  .card:hover .glow { opacity: .7; }
}
.card:focus-visible { transform: translateY(-6px); }
.card:focus-visible .face { border-color: var(--accent); }
.card:focus-visible .ring { opacity: .5; }
.card:focus-visible .glow { opacity: 1; }

/* Waiting for the next pair (queue ran dry): the voted pair stays, inert. */
.stage[data-state="waiting"] .card { pointer-events: none; }

/* Keycap hints. */
.keys { display: flex; gap: 6px; user-select: none; }
.keys kbd {
  min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center;
  font: 600 12px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: rgba(19, 24, 40, .6);
}

/* Confetti burst from the winner's centre (spawned by app.js, removed when done). */
.burst { position: absolute; left: 50%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.burst i {
  position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px rgba(242, 182, 61, .7);
}
.burst i:nth-child(3n + 2) { background: var(--accent); box-shadow: 0 0 10px rgba(55, 198, 255, .7); }
.burst i:nth-child(3n) { background: #fff; width: 6px; height: 6px; left: -3px; top: -3px; }

/* Goal confetti: full-screen layer of small paper bits (app.js). */
.confetti { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: 7px; height: 12px; border-radius: 2px; will-change: transform, opacity; }

/* ---- results panel -------------------------------------------------------- */

.results { width: min(720px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 2px; }
.results > .res-list { width: min(560px, 100%); }
/* Accuracy in the middle, Boosted most on its left, Devalued most on its right (phone: below). */
.res-top { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "boost head drop"; align-items: center; column-gap: 24px; }
.res-top .res-head { grid-area: head; }
.res-head { text-align: center; }
.res-head p { margin: 0; }
.res-pct {
  font-size: clamp(56px, 7vw, 92px); font-weight: 900; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap;
  text-shadow: 0 0 40px rgba(55, 198, 255, .35);
}
.res-sub { margin-top: 6px !important; font-size: 16px; color: var(--muted); }
.res-time { margin: 0; font-size: 16px; color: var(--muted); text-align: center; }
.res-time b { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.res-time-q { font-weight: 700; color: var(--accent); }

.res-movers { display: contents; }
.res-mover { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px; text-align: center; }
.res-mover[data-kind="boost"] { grid-area: boost; justify-self: end; }
.res-mover[data-kind="drop"] { grid-area: drop; justify-self: start; }
.res-mover img {
  display: block; width: 110px; height: auto; aspect-ratio: 320 / 468; border-radius: 9px; margin-bottom: 2px;
  border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
}
.res-mover-cap { font-size: 12px; color: var(--muted); }
.res-mover-name { font-size: 14px; font-weight: 700; line-height: 1.25; }
.res-mover-delta { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.res-mover-delta[data-tone="pos"] { color: var(--pos); }
.res-mover-delta[data-tone="neg"] { color: var(--neg); }
/* "ELO 1534" pill: the card's Elo right now. */
.res-mover-elo {
  display: inline-flex; align-items: baseline; gap: 6px; margin-top: 4px; padding: 3px 11px 3px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); line-height: 1.2;
}
.res-mover-elo[hidden] { display: none; }
.res-mover-elo small { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.res-mover-elo b { font-size: 14px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

.res-caption { margin: 2px 0 -4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: center; }
/* Top 5 / Bottom 5 cards right now. */
.res-cards { width: 100%; display: flex; justify-content: center; gap: 24px; }
.res-cardlist { width: min(270px, 100%); display: flex; flex-direction: column; gap: 8px; }
.res-cl { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.res-cl li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 3px 12px 3px 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); outline: none;
}
.res-cl img { display: block; width: 30px; height: 44px; border-radius: 4px; }
.res-cl-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-cl-elo { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Wide desktop: Top 5 left and Bottom 5 right of the accuracy block, the class table below. */
@media (min-width: 1200px) {
  body:not([data-layout="phone"]) .results {
    display: grid; width: min(1280px, 100%); column-gap: 28px; row-gap: 12px; align-items: center; justify-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr);
    grid-template-areas: "tc top bc" "tc time bc" "cap cap cap" "list list list" "btn btn btn";
  }
  body:not([data-layout="phone"]) .res-top { grid-area: top; }
  body:not([data-layout="phone"]) .res-cards { display: contents; }
  body:not([data-layout="phone"]) .res-cardlist[data-kind="top"] { grid-area: tc; justify-self: end; }
  body:not([data-layout="phone"]) .res-cardlist[data-kind="bottom"] { grid-area: bc; justify-self: start; }
  body:not([data-layout="phone"]) .res-caption-classes { grid-area: cap; }
  body:not([data-layout="phone"]) .res-time { grid-area: time; }
  body:not([data-layout="phone"]) .results > .res-list { grid-area: list; }
  body:not([data-layout="phone"]) .res-btn { grid-area: btn; }
}

.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res-row {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 26px 44px 1fr auto; align-items: center; gap: 14px;
  padding: 5px 18px 5px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
}
.res-rank { font-size: 18px; font-weight: 800; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.res-row img { width: 44px; height: 44px; display: block; }
.res-name { font-size: 18px; font-weight: 700; color: var(--cc, var(--text)); }
.res-score { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The leader: gold border, warm wash and a slow foil shimmer. */
.res-row.top {
  border-color: rgba(242, 182, 61, .65);
  background: linear-gradient(90deg, rgba(242, 182, 61, .16), var(--panel) 65%);
  box-shadow: 0 0 26px rgba(242, 182, 61, .16);
}
.res-row.top .res-rank { color: var(--gold); }
.res-row.top .res-score { color: #ffd982; }
.res-row.top::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 226, 150, .22) 50%, transparent 65%);
  transform: translateX(-100%); animation: shimmer 2.8s ease-in-out .7s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }

.res-btn {
  align-self: center; height: 46px; padding: 0 30px; border-radius: 999px; border: 0;
  background: linear-gradient(180deg, #4fd3ff, #1ea9e3); color: #06121c; font-weight: 800; font-size: 15px;
  box-shadow: 0 8px 24px rgba(55, 198, 255, .25); outline: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.res-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(55, 198, 255, .38); }
.res-btn:active { transform: scale(.97); }
.res-btn:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }

@media (max-height: 820px) {
  body:not([data-layout="phone"]) .res-row { padding-top: 4px; padding-bottom: 4px; grid-template-columns: 26px 40px 1fr auto; }
  body:not([data-layout="phone"]) .res-row img { width: 40px; height: 40px; }
  body:not([data-layout="phone"]) .res-list { gap: 6px; }
}

/* ---- empty state and status ----------------------------------------------- */

.done-line { margin: 4vh 0 0; font-size: 20px; font-weight: 700; text-align: center; }

/* Network status bar under the header (app.js): amber offline, green briefly once caught up. */
.netbar {
  width: min(100%, calc(var(--card-w) * 2 + var(--gap))); height: 40px; padding: 0 14px;
  display: flex; align-items: center; justify-content: center; border-radius: 10px;
  font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: netbar-in var(--t-med) ease-out;
}
.netbar[data-tone="warn"] { color: var(--warn); background: rgba(232, 189, 45, .15); border: 1px solid rgba(232, 189, 45, .7); }
.netbar[data-tone="ok"] { color: var(--pos); background: rgba(34, 181, 95, .15); border: 1px solid rgba(34, 181, 95, .7); }
@keyframes netbar-in { from { opacity: 0; transform: translateY(-4px); } }
/* Offline: cards dim and keycaps hide; with nothing left to show, no cards at all. */
.card { transition: transform var(--t-fast) ease-out, opacity var(--t-med); }
body[data-offline] .card { opacity: .6; }
body[data-offline] .keys { visibility: hidden; }
body[data-offline] .stage[data-state="waiting"] { visibility: hidden; }

/* ---- phone layout --------------------------------------------------------- */

body[data-layout="phone"] {
  --gap: 12px;
  --card-w: min(44vw, calc((100vh - 240px - var(--safe-t) - var(--safe-b)) * 320 / 468));
}
@supports (height: 100dvh) {
  body[data-layout="phone"] { --card-w: min(44vw, calc((100dvh - 240px - var(--safe-t) - var(--safe-b)) * 320 / 468)); }
}
body[data-layout="phone"] .app {
  padding: calc(var(--safe-t) + 64px) calc(var(--safe-r) + 8px) calc(var(--safe-b) + 20px) calc(var(--safe-l) + 8px);
}
body[data-layout="phone"] .head-kicker { font-size: 12px; margin-bottom: 2px; }
body[data-layout="phone"] .head-title { font-size: clamp(36px, 11vw, 56px); }
body[data-layout="phone"] .keys { display: none; }
body[data-layout="phone"] .netbar { font-size: 12px; padding: 0 10px; }
body[data-layout="phone"] .duel { --duel-h: 40px; }
body[data-layout="phone"] .duel-text { font-size: 19px; }
body[data-layout="phone"] .duel-text[data-tier="super"] { font-size: 23px; }
body[data-layout="phone"] .duel-text[data-tier="1"] { font-size: 20px; }
body[data-layout="phone"] .duel-text[data-tier="2"] { font-size: 23px; }
body[data-layout="phone"] .duel-text[data-tier="3"] { font-size: 26px; }
body[data-layout="phone"] .duel-text[data-tier="4"] { font-size: 29px; letter-spacing: .08em; }
body[data-layout="phone"] .card { border-radius: 10px; }
body[data-layout="phone"] .slot { gap: 0; }
body[data-layout="phone"] .code { flex-direction: column; flex-wrap: nowrap; justify-content: center; align-items: flex-end; gap: 1px; margin-right: 4px; line-height: 1.05; }
body[data-layout="phone"] .code-label { font-size: 10px; }
body[data-layout="phone"] .code-value { font-size: 15px; }
body[data-layout="phone"] .res-top { grid-template-columns: 1fr 1fr; grid-template-areas: "head head" "boost drop"; row-gap: 14px; column-gap: 12px; }
body[data-layout="phone"] .res-mover { width: auto; justify-self: center; }
body[data-layout="phone"] .res-mover img { width: 88px; }
body[data-layout="phone"] .res-mover-delta { font-size: 20px; }
body[data-layout="phone"] .counter { padding: 0 6px; gap: 4px; }
body[data-layout="phone"] .res-pct { font-size: clamp(56px, 18vw, 80px); }
body[data-layout="phone"] .res-caption { font-size: 11px; letter-spacing: .05em; white-space: nowrap; }
body[data-layout="phone"] .res-cards { flex-direction: column; align-items: center; gap: 14px; }
body[data-layout="phone"] .res-cardlist { width: 100%; }
body[data-layout="phone"] .res-row { grid-template-columns: 20px 40px 1fr auto; gap: 10px; padding: 7px 12px 7px 8px; }
body[data-layout="phone"] .res-row img { width: 40px; height: 40px; }
body[data-layout="phone"] .res-name { font-size: 16px; }
body[data-layout="phone"] .res-score { font-size: 17px; }
