/* Full screens: title, the room's countdown and item planner, match intro, results. Tokens only. */
#ui { position: absolute; inset: 0; pointer-events: none; z-index: var(--z-hud); }
.screen { position: absolute; inset: 0; pointer-events: auto; overflow: hidden; background: var(--bg-0); }
.backdrop {
  position: absolute;
  inset: -20px;
  /* The arena painting at 960 px (art/moonforge/world/backdrop.py): blurred this much it looks the same as the 4 MB original. */
  background: url('/c/b0f7d3748b5d7f069441f97c952a6b3aa6de8b8c8ca432bd8814c42089fee3aa.webp') center / cover;
  filter: blur(5px) brightness(0.38) saturate(0.85);
}
.backdrop.dark { filter: blur(8px) brightness(0.2); }
.spr { display: block; flex: none; }

/* Front screens (title, champion select, lobby) share one scene and one visual language:
 * full-strength art, a shade only where text sits, words instead of boxes, one gold plate per screen. */
.front { background: var(--bg-0); }
/* Title scene: Pixel Studio layers at 480x270 scaled to cover (--u = screen px per scene px), cropped at the edges. */
.tscene { position: absolute; width: calc(480 * var(--u)); height: calc(270 * var(--u)); --px: 0; --py: 0; }
.tworld { position: absolute; inset: 0; }
.tworld > * { position: absolute; translate: calc(var(--px) * var(--d) * -16 * var(--u)) calc(var(--py) * var(--d) * -10 * var(--u)); transition: translate 700ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.tl {
  left: calc(-16 * var(--u));
  top: calc(-16 * var(--u));
  width: calc(512 * var(--u));
  height: calc(302 * var(--u));
  background: center / 100% 100% no-repeat;
  image-rendering: pixelated;
}
.tl-sky { background-image: url('/c/3ffb590cab2431803387e2afc352165117abb95c59c535305b9e0dbc373e6e1a.png'); }
.tl-far { background-image: url('/c/149d898c3b3fbf6f2b783d171205e3f30f2c5da2a66f99b87c7eb87e4f7044b4.png'); }
.tl-gate { background-image: url('/c/996d5dfa158ec72975af70f62988f04549629aeb57c595ece00c67cef8521ce0.png'); }
.tl-firelight { background-image: url('/c/38afe169d35e532fabcef860935f6758a7516a654942cdb3d6dcfe83af5f6dbb.png'); animation: flicker 1.9s steps(1) infinite; }
.tl-fog { background-image: url('/c/920f0f3bf98c0677b36b5a1a91c52f4a2de9bf5cad0a59799aa5712b401a7609.png'); animation: fog-drift 16s ease-in-out infinite alternate; }
.tl-front { background-image: url('/c/675175c218321e9d7e3127015c1daef6591ac30fa781c836842343e4358f1113.png'); }
/* Six-frame fire strips stepped at 100 ms. */
.tl-gatefire, .tl-brazier { background-size: 600% 100%; background-position: 0 0; animation: fire 600ms steps(6) infinite; }
.tl-gatefire { background-image: url('/c/0fae5ef323817a90d19f580428f6d4d0854f6d087187520afcccef9b71377d26.png'); }
.tl-brazier { background-image: url('/c/6c90e2084a37ee51c7dcb6c29fe3d78944d206525bb85e959e5a252cdce45a16.png'); animation-duration: 660ms; }
@keyframes fire { to { background-position: 120% 0; } }
/* The fires flare on the logo's strike: in the opening at 2.3 s, and when a skip lands the strike (.struck, set on the
 * fire layers themselves for 700 ms). */
@keyframes flare { 0%, 100% { filter: brightness(1); } 16% { filter: brightness(2.1) saturate(1.25); } }
.tl-gatefire.struck { animation: fire 600ms steps(6) infinite, flare 600ms ease-out; }
.tl-brazier.struck { animation: fire 660ms steps(6) infinite, flare 600ms ease-out; }
.tl-firelight.struck { animation: flicker 1.9s steps(1) infinite, flare 600ms ease-out; }
@keyframes flicker {
  0%, 100% { filter: brightness(1); }
  18% { filter: brightness(0.82); }
  31% { filter: brightness(1.08); }
  52% { filter: brightness(0.9); }
  71% { filter: brightness(1.04); }
  86% { filter: brightness(0.86); }
}
@keyframes fog-drift { from { transform: translateX(calc(-8 * var(--u))); } to { transform: translateX(calc(8 * var(--u))); } }
/* Warm bloom from the arch, breathing with the fire. */
.tglow {
  left: calc(210 * var(--u));
  top: calc(110 * var(--u));
  width: calc(240 * var(--u));
  height: calc(170 * var(--u));
  background: radial-gradient(ellipse 50% 50% at 50% 62%, color-mix(in srgb, var(--physical) 34%, transparent), transparent 70%);
  mix-blend-mode: screen;
  animation: breathe 2.6s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: 0.55; } to { opacity: 0.8; } }
.twinkles { inset: 0; }
.twinkles i { position: absolute; width: var(--u); height: var(--u); background: var(--text); animation: twinkle 4.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; box-shadow: 0 0 calc(var(--u) * 1.5) var(--text-dim); } }
/* The real champions, backlit by the gate fire: dark bodies with a hot rim. */
.champs { inset: 0; }
.champ { position: absolute; }
.tscene.loading > * { visibility: hidden; }
.tscene.loading > .tstart { visibility: visible; }
.tstart {
  width: 100%;
  padding: 24px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin: 0;
  text-align: center;
  font-family: var(--font-head);
  font-size: var(--t-l);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: beckon 1.6s ease-in-out infinite alternate;
}
@keyframes beckon { from { opacity: 0.35; } to { opacity: 1; } }
.champ .spr {
  filter: brightness(0.58) saturate(0.75) drop-shadow(0 calc(var(--u) * -0.5) 0 var(--you)) drop-shadow(calc(var(--u) * 0.5) 0 0 var(--physical))
    drop-shadow(calc(var(--u) * -0.5) 0 0 var(--physical));
}
.tembers { inset: 0; pointer-events: none; }
.tembers i {
  position: absolute;
  top: calc(218 * var(--u));
  width: calc(var(--s) * var(--u));
  height: calc(var(--s) * var(--u));
  background: var(--you-light);
  animation: lift linear infinite;
  opacity: 0;
}
@keyframes lift {
  0% { transform: translate(0, 0); opacity: 0; background: var(--you-light); }
  12% { opacity: 1; }
  60% { background: var(--physical); }
  100% { transform: translate(calc(-14 * var(--u)), calc(-120 * var(--u))); opacity: 0; background: var(--enemy); }
}
.tflash { position: absolute; inset: 0; background: var(--text); opacity: 0; pointer-events: none; }
.tlogo { position: absolute; left: calc(6 * var(--u)); top: calc(6 * var(--u)); margin: 0; line-height: 0; }
.tlogo img { width: calc(162 * var(--u)); image-rendering: pixelated; display: block; filter: drop-shadow(0 calc(var(--u) * 1.5) 0 var(--shadow)); }
/* A metal glint crossing the logo every few seconds, clipped to the logo's own pixels. */
.tlogo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 40%, color-mix(in srgb, var(--you-light) 85%, transparent) 50%, transparent 60%) 160% 0 / 250% 100% no-repeat;
  -webkit-mask: url('/c/8bdc18872f9fa1dc4122b126469aa892ffc855bbf30540783a2141db0f048e4c.png') 0 0 / 100% 100%;
  mask: url('/c/8bdc18872f9fa1dc4122b126469aa892ffc855bbf30540783a2141db0f048e4c.png') 0 0 / 100% 100%;
  mix-blend-mode: screen;
  animation: glint 8s ease-in-out 2s infinite;
}
@keyframes glint {
  0%, 84% { background-position: 160% 0; }
  100% { background-position: -60% 0; }
}
.tmenu { position: absolute; left: calc(10 * var(--u)); top: calc(92 * var(--u)); }
.tscene.night .tworld { filter: brightness(0.6) saturate(0.85); }
.tscene.night .tl-fog { opacity: 0.6; }

/* The opening, first visit only (any key or click skips): the camera pulls back from the moon, the braziers
 * light, the gate erupts, the champions step out of the fire, a white hit, the logo strikes, the menu follows. */
.tscene.opening { animation: shake 320ms ease-out 1.05s both; }
.tscene.opening .tworld { animation: pull-back 1.5s cubic-bezier(0.25, 0, 0.2, 1) both; transform-origin: 86% 18%; }
.tscene.opening :is(.tl-brazier, .tl-firelight) { opacity: 0; animation: ignite 250ms ease-out 0.6s forwards, fire 660ms steps(6) infinite, flare 600ms ease-out 2.3s; }
.tscene.opening .tl-firelight { animation: ignite 250ms ease-out 0.6s forwards, flicker 1.9s steps(1) infinite, flare 600ms ease-out 2.3s; }
.tscene.opening .tl-gatefire { animation: erupt 450ms cubic-bezier(0.2, 0.9, 0.3, 1) 1.05s both, fire 600ms steps(6) infinite, flare 600ms ease-out 2.3s; }
.tscene.opening .tglow { animation: bloom 1s ease-out 1.05s both, breathe 2.6s ease-in-out 2.1s infinite alternate; }
.tscene.opening .tembers { animation: ignite 400ms ease-out 1.2s both; }
.tscene.opening .champ { animation: emerge 450ms cubic-bezier(0.2, 0.8, 0.3, 1) both; animation-delay: calc(1.35s + var(--i) * 70ms); }
.tscene.opening .tflash { animation: hit 500ms ease-out 2.1s both; }
.tscene.opening .tlogo { animation: strike 450ms cubic-bezier(0.2, 1.4, 0.4, 1) 2.15s both; }
.tscene.opening .tmenu { animation: rise 350ms cubic-bezier(0.2, 0.8, 0.3, 1) 2.5s both; }
@keyframes pull-back {
  from { transform: scale(1.6); filter: brightness(0); }
  25% { filter: brightness(0.7); }
  to { transform: none; filter: none; }
}
@keyframes ignite { from { opacity: 0; } to { opacity: 1; } }
@keyframes erupt { from { opacity: 0; clip-path: inset(85% 0 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes bloom { from { opacity: 0; } 18% { opacity: 1; } to { opacity: 0.55; } }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(calc(var(--u) * 1), calc(var(--u) * -1)); }
  45% { transform: translate(calc(var(--u) * -1), calc(var(--u) * 1)); }
  70% { transform: translate(calc(var(--u) * 0.5), 0); }
}
@keyframes emerge { from { opacity: 0; transform: translateY(calc(6 * var(--u))); } to { opacity: 1; transform: none; } }
@keyframes hit { 0% { opacity: 0; } 12% { opacity: 0.9; } 100% { opacity: 0; } }
@keyframes strike { from { opacity: 0; transform: scale(1.5); } 60% { opacity: 1; transform: scale(0.97); } to { opacity: 1; transform: none; } }

.friends {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: 0 0 var(--s3) var(--s6);
  padding: var(--s3) 0 var(--s3) var(--s4);
  border-left: 2px solid var(--you-deep);
  animation: open 220ms cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }
/* Wide enough for a three-word code in capitals (client UI council round 0: the example was cut off). */
.input.code { width: 340px; letter-spacing: 0.04em; text-transform: uppercase; }
.input.name { width: 270px; }
.corner-tr { position: absolute; right: var(--s6); top: var(--s5); zoom: var(--ui-scale); display: flex; align-items: center; gap: var(--s4); }
.iconbtn { background: none; border: none; padding: var(--s2); color: var(--text-dim); display: inline-flex; }
.iconbtn .ico { width: 24px; height: 24px; }
.iconbtn:is(:hover, .virtual-hover) { color: var(--you-light); }
.fineprint { position: absolute; left: var(--s6); bottom: var(--s4); zoom: var(--ui-scale); font-size: var(--t-xs); color: var(--text-faint); }
/* Opening, first visit only: fade from black, the wordmark strikes in, the menu follows word by word. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Every ability stays in the room's page for screen readers, even while another is shown (play.css lays out the room). */
.kit-all { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; padding: 0; }
.seg { display: flex; border: 2px solid var(--line-strong); background: color-mix(in srgb, var(--bg-0) 80%, transparent); }
.seg button {
  background: none;
  border: none;
  padding: var(--s2) var(--s4);
  font-weight: 700;
  font-size: var(--t-s);
  color: var(--text-dim);
}
.seg button + button { border-left: 2px solid var(--line); }
.seg button:is(:hover, .virtual-hover):not(:disabled) { color: var(--text); background: var(--bg-2); }
.seg button.on { color: var(--ink); background: var(--you); }
.seg button:disabled { color: var(--text-faint); text-decoration: line-through; cursor: not-allowed; }
/* The one primary action: an angled gold plate, like a struck ingot. */
.plate {
  position: relative;
  min-width: 380px;
  padding: var(--s4) var(--s7);
  border: none;
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  background:
    linear-gradient(100deg, transparent 40%, color-mix(in srgb, var(--you-light) 70%, transparent) 50%, transparent 60%) 200% 0 / 250% 100% no-repeat,
    linear-gradient(180deg, var(--you-light) 0%, var(--you) 48%, var(--you-deep) 100%);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--t-xl);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: filter 120ms, transform 120ms;
}
.plate.small { min-width: 200px; padding: var(--s3) var(--s6); font-size: var(--t-l); }
.plate:is(:hover, .virtual-hover):not(:disabled) { filter: brightness(1.1); animation: shine 700ms ease-out; }
.plate:active:not(:disabled) { transform: translateY(2px); }
.plate:disabled { background: var(--bg-3); color: var(--text-faint); cursor: not-allowed; }
@keyframes shine { from { background-position: 200% 0, 0 0; } to { background-position: -60% 0, 0 0; } }
/* The start countdown covers the lobby: nothing else takes a click until it ends or someone cancels (Tyler, 2026-10-27). */
.start-countdown { margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; border: 0; padding: 0; position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: #061014c8; pointer-events: auto; }
.start-count-card { min-width: 380px; display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s6) var(--s7); background: var(--bg-1); border: 2px solid var(--steel-line); box-shadow: 0 8px 40px var(--shadow); }
.start-count-number { min-height: 1em; font-family: var(--font-head); font-weight: 700; font-size: 128px; line-height: 1; color: var(--you); }
.start-count-pop { display: inline-block; animation: count-pop 420ms ease-out; }
@keyframes count-pop { from { transform: scale(1.35); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
.btn.start-cancel { min-width: 300px; justify-content: center; padding: var(--s4) var(--s6); font-size: var(--t-l); text-transform: uppercase; border-color: var(--enemy); }
.btn.start-cancel:is(:hover, .virtual-hover) { background: color-mix(in srgb, var(--enemy) 30%, var(--steel-flat)); }
@media (prefers-reduced-motion: reduce) { .start-count-pop { animation: none; } }

/* Item planner: the shop's parts at a dialog's size, the same size whatever the search shows (Tyler, 2026-10-27). */
.planner-backdrop { margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; border: 0; position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #061014dc; padding: var(--s4); }
.planner { width: min(1120px, 94vw); height: min(700px, 88vh); display: flex; flex-direction: column; overflow: hidden; }
.planner .panel-head { flex: none; gap: var(--s2); padding-right: var(--s3); }
.planner-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.planner-build { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); border-right: 2px solid var(--line); overflow-y: auto; }
.planner-build :is(h4, p) { margin: 0; }
.planner-slots { list-style: none; margin: var(--s1) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.planner-slots li { display: flex; align-items: center; gap: var(--s2); }
.planner-n { width: 16px; flex: none; font-weight: 700; font-size: var(--t-s); color: var(--text-dim); text-align: right; }
.planner-slot { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s3); padding: var(--s1); background: var(--bg-1); border: 2px solid var(--steel-line); color: var(--text); text-align: left; }
button.planner-slot:is(:hover, .virtual-hover) { border-color: var(--trim); }
.planner-slot .col { flex: 1; min-width: 0; }
.planner-slot b { font-size: var(--t-s); line-height: 1.2; } /* long names take two lines, not an ellipsis */
.planner-x { padding: 0 var(--s2); font-size: var(--t-l); line-height: 1; color: var(--text-dim); }
button.planner-slot:is(:hover, .virtual-hover) .planner-x { color: var(--enemy); }
.planner-slot.empty { border-style: dashed; background: transparent; }
.planner-browse { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 0; }
.planner-split { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.planner-split .filters { overflow-y: auto; scrollbar-width: thin; }
.planner-grid { min-height: 0; overflow-y: auto; scrollbar-width: thin; display: grid; grid-template-columns: repeat(auto-fill, 100px); gap: var(--s3) var(--s2); align-content: start; padding-bottom: var(--s4); }
.planner-grid .tile { width: 100px; }
.planner-grid .tile .nm { font-size: var(--t-s); line-height: 1.2; height: 2.4em; }
.planner-grid .tile:disabled { cursor: default; }
.planner-grid .tile:disabled:not(.owned) { opacity: 0.55; }
.planner-note { margin: calc(-1 * var(--s1)) 0 0; }
@media (max-width: 700px) {
  .planner-backdrop { padding: 8px; }
  .planner { width: 100%; height: min(700px, 94vh); }
  .planner .panel-head { flex-wrap: wrap; }
  .planner-body { display: flex; flex-direction: column; overflow-y: auto; }
  .planner-build { flex: none; overflow: visible; border-right: 0; border-bottom: 2px solid var(--line); }
  .planner-browse { flex: none; min-width: 0; }
  .planner .searchbox { min-width: 0; flex-direction: row; }
  .planner .searchbox input { min-width: 0; width: 100%; }
  .planner-split { display: flex; flex-direction: column; }
  .planner-split .filters { flex-direction: row; flex-wrap: wrap; overflow: visible; }
  .planner-grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
.bot-chip { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-family: var(--font-body); font-weight: 700; font-size: var(--t-l); color: var(--text-dim); background: var(--bg-0); border: 2px solid var(--line); cursor: pointer; }
.bot-chip img { width: 100%; height: 100%; image-rendering: pixelated; display: block; filter: brightness(0.75); }
.bot-chip.on { border-color: var(--you); color: var(--you); }
.bot-chip.on img, .bot-chip:is(:hover, .virtual-hover):not(:disabled) img { filter: none; }
.bot-chip:is(:hover, .virtual-hover):not(:disabled) { border-color: var(--text-dim); }
.bot-chip:disabled { opacity: 0.25; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .front, .front *, .front *::before, .front *::after { animation: none !important; transition: none !important; }
  .embers { display: none; }
}

/* Results — one full-height column: banner, scrollable content, buttons always visible */
.results-screen { z-index: var(--z-modal); }
.resview, .res {
  position: absolute;
  inset: 0;
  zoom: var(--ui-scale);
  width: calc(100vw / var(--ui-scale));
  height: calc(100vh / var(--ui-scale));
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s5) var(--s7);
}
.result-banner { text-align: center; flex: none; }
.result-banner h1 { font-size: var(--t-hero); }
h1.victory, h2.victory { color: var(--you); text-shadow: 0 6px 0 var(--you-edge), 0 0 60px var(--you-glow); }
h1.defeat, h2.defeat { color: #b3c3d8; }
h1.draw, h2.draw { color: var(--text-dim); }
.resfoot { flex: none; gap: var(--s4); padding-top: var(--s3); border-top: 2px solid var(--line); }
.res-head { gap: var(--s5); }
.res-head .tabs { border: none; }
.mine { display: flex; gap: var(--s6); align-items: center; padding: var(--s4) var(--s5); }
.mine .k { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.table-wrap { overflow: auto; min-height: 0; flex: 1; }
.rtable { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
.rtable th { text-align: left; font-size: var(--t-xs); color: var(--text-dim); padding: var(--s2) var(--s3); border-bottom: 2px solid var(--line); font-weight: 700; position: sticky; top: 0; background: var(--bg-0); }
.rtable td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.rtable tr.you td { background: var(--you-soft); }
.rtable tr.you td:first-child { box-shadow: inset 4px 0 0 var(--you); }
.rtable .sep td { padding: var(--s1) var(--s3); font-weight: 700; font-size: var(--t-xs); letter-spacing: 0.12em; border-bottom: 2px solid var(--line); }
.dbar { display: flex; align-items: center; gap: var(--s2); }
.dbar i { display: block; height: 10px; background: var(--physical); }
.graph { padding: var(--s4); flex: 1; min-height: 0; overflow: auto; }
.graph-host { margin-top: var(--s3); }
.graph-host .u-legend { color: var(--text-dim); font-size: var(--t-xs); }

.tstart:focus-visible { outline: 2px solid var(--you); outline-offset: -8px; }

/* The match is the spotlight. Keep names and controls off the centre of the fight. */
.potg { position:fixed; inset:0; display:flex; flex-direction:column; justify-content:space-between; pointer-events:none; color:#f4ead5; z-index:35; }
.potg header { padding:clamp(18px,3vw,40px); background:linear-gradient(#080d18e8,transparent); }
.potg-eyebrow { font-family:Silkscreen,monospace; font-size:clamp(17px,2.4vw,30px); color:#efd18c; text-shadow:0 2px 0 #080d18; }
.potg-credit { display:flex; align-items:center; gap:16px; margin-top:14px; }
.potg-name { font-size:clamp(22px,3vw,36px); font-weight:700; }
.potg-detail { color:#d3ccbb; font-size:14px; }
.potg-credit p { margin:5px 0 0; color:#efd18c; }
.potg footer { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; padding:20px; background:linear-gradient(transparent,#080d18eb); pointer-events:auto; }
.potg-hint { margin-right:auto; color:#d3ccbb; font-size:14px; }
@media(max-width:600px) { .potg footer {padding:12px;gap:8px} .potg-hint {display:none} .potg-credit {gap:10px} }
.potg-outcome { font-size:13px; text-transform:uppercase; letter-spacing:.14em; color:#d3ccbb; margin-bottom:8px; }

/* Let the result land, hold it, then reveal the first play. Controls always stay usable. */
.potg-result { --result:#efcf81; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; background:radial-gradient(ellipse at center,#233957dd,#080d18ed 75%);  }
.potg-result span { font-family:Silkscreen,monospace; font-size:clamp(42px,8vw,108px); color:var(--result); text-transform:uppercase; text-shadow:0 4px #080d18,0 0 40px #dfb95c55; animation:potg-result-arrive 500ms cubic-bezier(.16,1,.3,1) both; }
.potg-result i { display:block; width:min(60vw,540px); height:3px; margin-top:20px; background:linear-gradient(90deg,transparent,var(--result),transparent); transform-origin:center; animation:potg-rule 650ms 120ms both; }
.potg-result.defeat { --result:#aebed1; background:radial-gradient(ellipse at center,#32252fdd,#080d18ed 75%); }
.potg-result.defeat span { text-shadow:0 4px #080d18; animation:potg-defeat-arrive 650ms ease-out both; }
.potg-result.draw { --result:#d5dedc; background:radial-gradient(ellipse at center,#30403fdd,#080d18ed 75%); }
.potg-result.draw span { text-shadow:0 4px #080d18; }
.potg-intro header { visibility:hidden; }
.potg-count { margin-left:16px; color:#d3ccbb; font-size:14px; }
@keyframes potg-result-arrive { from {opacity:0;transform:scale(.88) translateY(12px)} to {opacity:1;transform:none} }
@keyframes potg-defeat-arrive { from {opacity:0;transform:translateY(-8px)} to {opacity:1;transform:none} }
@keyframes potg-rule { from {opacity:0;transform:scaleX(.15)} to {opacity:1;transform:scaleX(1)} }
.potg-result.revealing { animation:potg-result-away 400ms ease-out both; }
.potg-result small {margin-top:24px;color:#d3ccbb;font-size:14px}
.potg footer {position:relative;z-index:2}
@keyframes potg-result-away { from {opacity:1} to {opacity:0} }
@media(prefers-reduced-motion:reduce) { .potg-result,.potg-result.revealing,.potg-result span,.potg-result i {animation:none} }

/* The title scene under the signed-in shell (client.css holds the shell itself). The sign-in panel shows from the first
   load, before the click that allows sound; so do Settings and the version line beside it (Ibara walk, 28 October 2026:
   they showed only after signing out). */
.tscene.loading > * { visibility: visible; }
.tscene.opening .tmenu { animation: none; }

/* Room and match handoff: labels supplement colour and focus stays inside clipped panels. */
.front :is(button, input, select):focus-visible, .results-screen button:focus-visible, .potg button:focus-visible { outline: 3px solid var(--you-light); outline-offset: -3px; }
.start-countdown::backdrop { background: #061014c8; }
.start-count-card { min-width: 0; width: min(380px, 90vw); }
.btn.start-cancel { min-width: 0; width: 100%; }
.loading-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: clamp(16px,4vw,64px); overflow: auto; }
.loading-teams { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.loading-team { background: var(--bg-1); padding: 16px; }
.loading-team h2 { border-bottom: 3px solid var(--ally); }
.loading-team.red h2 { border-color: var(--enemy); }
.loading-seats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.loading-seat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; overflow-wrap: anywhere; }
.loading-bottom { align-self: center; text-align: center; background: var(--bg-1); padding: 12px 24px; }
@media(max-width: 700px) { .loading-teams { grid-template-columns: 1fr; } }
@media(prefers-reduced-motion:reduce) { .results-screen *, .potg * { animation: none !important; transition: none !important; } }

.planner-backdrop::backdrop { background: #061014dc; }

.freeze-menu .tscene, .freeze-menu .tscene *, .freeze-menu .tscene *::before, .freeze-menu .tscene *::after { animation-play-state: paused !important; transition: none !important; }
