/* OpenClub PVP.GAMES Tekken page. The site's theme (apps/pvpgames/app/pvp-theme/tokens.css): ink, bone, ash; Rubik and
   UnifrakturCook from the same origin. Minimal chrome, the game as a clean screen, and a quiet outline controller.
   Controller behaviour is the canonical controls.mjs: these rules only style its elements and states
   (.is-pressed, .controls-ready, data-size, data-phase, data-link, data-sync, html.in-match). */
@font-face { font-family: "UnifrakturCook"; src: url("/fonts/UnifrakturCook-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Titles use the site's calmer title blackletter (app/openclub-type.css): UnifrakturCook's k reads as an f ("Teffen"). */
@font-face { font-family: "Grenze Gotisch"; src: url("/fonts/grenze-gotisch-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("/fonts/Rubik-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("/fonts/rubik-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #141413; --raised: #1D1D1B; --overlay: #262623; --charcoal: #34332F; --stone: #7A766F; --ash: #A6A29B; --bone: #EEE7D7;
  --green: #7FBF8E; --red: #E58A7F; --amber: #D9B26B;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Grenze Gotisch", "UnifrakturCook", Georgia, serif;
  --r-md: 8px; --r-lg: 12px; --r-full: 999px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --pad-scale: 1;
  background: var(--ink); color: var(--bone); font: 400 15px/1.5 var(--font-body);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--ink); -webkit-tap-highlight-color: transparent; }
.hidden, .tk-legacy { display: none !important; }
.tk-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, input { font: inherit; color: inherit; }
code, kbd, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

/* ---- Top bar ---- */
.tk-bar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr) auto max-content; align-items: center; gap: 12px;
  height: 56px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--charcoal); }
.tk-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--ash); text-decoration: none; font-size: 14px; }
.tk-back:hover { color: var(--bone); }
.tk-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tk-brand { display: grid; place-items: center; }
.tk-avail { justify-self: end; display: inline-flex; align-items: center; margin: 0; min-width: 0; }
.tk-avail, .tk-avail span, .tk-p2p { white-space: nowrap; overflow: visible; text-overflow: unset; }

.tk-main { width: min(100%, 960px); margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 16px; }

/* ---- Intro ---- */
.tk-intro { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--charcoal); min-height: 180px; display: flex; align-items: flex-end; isolation: isolate; }
.tk-intro__art { position: absolute; inset: 0; z-index: -1; }
.tk-intro__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.tk-intro__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--ink) 90%, transparent) 0%, transparent 70%); }
.tk-intro__copy { padding: 20px; }
.tk-title { margin: 0; font: 700 clamp(2.25rem, 8vw, 3.25rem)/1 var(--font-display); }
.tk-lede { margin: 6px 0 0; color: var(--ash); }
.tk-tag { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); }

/* ---- Setup ---- */
.tk-setup { display: grid; gap: 12px; }
.tk-seg { display: inline-grid; grid-auto-flow: column; justify-self: start; padding: 3px; gap: 3px; border: 1px solid var(--charcoal); border-radius: var(--r-full); background: var(--raised); }
.tk-seg button { min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-full); background: transparent; color: var(--ash); cursor: pointer; font-weight: 500; }
.tk-seg button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.tk-setup[data-setup-mode="play"] .tk-join, .tk-setup[data-setup-mode="join"] .tk-play { display: none; }

.tk-card { background: var(--raised); border: 1px solid var(--charcoal); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; }
.tk-h2 { margin: 0; font-size: 16px; font-weight: 500; }
.tk-h2 code { padding: 2px 8px; border-radius: var(--r-md); background: var(--overlay); letter-spacing: .1em; }
.tk-help { margin: 0; font-size: 13px; color: var(--ash); }
.tk-label { font-size: 13px; color: var(--ash); }
.tk-field { display: grid; gap: 6px; }
.tk-field label { font-size: 13px; color: var(--ash); }
.tk-field input, .tk-invite input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--stone); background: var(--ink); }
.tk-field input:focus, .tk-invite input:focus { border-color: var(--bone); outline: none; }
.tk-file { display: grid; gap: 2px; padding: 14px; border: 1px dashed var(--stone); border-radius: var(--r-md); cursor: pointer; }
.tk-file strong { font-weight: 500; }
.tk-file span, .tk-file small { font-size: 13px; color: var(--ash); }
.tk-file input { margin-top: 6px; font-size: 12px; color: var(--ash); }
.tk-more summary { cursor: pointer; font-size: 13px; color: var(--ash); }
.tk-more[open] summary { margin-bottom: 8px; }

.tk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid var(--stone); background: transparent; color: var(--bone); font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease); }
.tk-btn:hover:not(:disabled) { border-color: var(--bone); }
.tk-btn:active:not(:disabled) { transform: scale(.98); }
.tk-btn:disabled { opacity: .45; cursor: not-allowed; }
.tk-btn--primary { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.tk-btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--bone) 86%, var(--ash)); }
.tk-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.tk-link { border: 0; padding: 0; min-height: 36px; color: var(--ash); justify-content: flex-start; }
.tk-wide { width: 100%; margin-top: 10px; }
.tk-actions > .tk-btn { flex: 1 1 140px; }
.tk-status { margin: 0; font-size: 13px; color: var(--ash); text-align: center; }

/* ---- Loading, lobby, result ---- */
.tk-progress { justify-items: center; text-align: center; padding: 28px 16px; }
.tk-spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--charcoal); border-top-color: var(--bone); animation: tk-spin .9s linear infinite; }
@keyframes tk-spin { to { transform: rotate(1turn); } }
#load-label { font-weight: 500; }
progress { width: min(100%, 360px); height: 6px; appearance: none; border: 0; border-radius: var(--r-full); background: var(--charcoal); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--charcoal); }
progress::-webkit-progress-value { background: var(--bone); border-radius: var(--r-full); }
progress::-moz-progress-bar { background: var(--bone); }
.tk-progress .tk-actions { justify-content: center; width: min(100%, 360px); }
.tk-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-players li { padding: 10px 12px; border-radius: var(--r-md); background: var(--overlay); font-size: 14px; }
.tk-invite { display: flex; gap: 8px; }
.tk-invite .tk-btn { flex: none; }
.tk-qr { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--charcoal); background: var(--ink); }
.tk-qr__code { flex: none; width: 152px; height: 152px; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / .35); }
.tk-qr__code svg { display: block; width: 100%; height: 100%; }
.tk-qr__copy { display: grid; gap: 4px; min-width: 0; }
.tk-qr__copy strong { font-size: 14px; font-weight: 500; color: var(--bone); }
.tk-qr__copy code { padding: 1px 6px; border-radius: 4px; background: var(--overlay); letter-spacing: .08em; }
@media (max-width: 480px) { .tk-qr { flex-direction: column; text-align: center; } .tk-qr__code { width: 180px; height: 180px; } }

/* ---- Game ---- */
.tk-game { display: grid; gap: 8px; }
.tk-game__top { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.tk-game__title { margin: 0; font-size: 15px; font-weight: 500; white-space: nowrap; }
.tk-session { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--ash); overflow: hidden; }
.tk-session strong { color: var(--bone); font-weight: 500; white-space: nowrap; }
.tk-session span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-voice { display: flex; align-items: center; gap: 6px; }
.tk-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); border: 1px solid var(--charcoal); background: transparent; color: var(--ash); cursor: pointer; flex: none; }
.tk-icon:hover { color: var(--bone); border-color: var(--stone); }
.tk-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tk-stage { --btn: calc(54px * var(--pad-scale)); --dpad: calc(132px * var(--pad-scale));
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "screen screen screen" "move system attack"; align-items: center; gap: 12px 8px; }
.arena-stage[data-size="s"] { --pad-scale: .86; }
.arena-stage[data-size="l"] { --pad-scale: 1.16; }
.tk-screen { grid-area: screen; min-width: 0; min-height: 0; width: 100%; display: grid; place-items: center; }
#game-wrap { position: relative; width: min(100%, calc(78dvh * 4 / 3)); aspect-ratio: 4 / 3; max-width: 100%; max-height: 78dvh; margin: 0 auto; background: #000; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--charcoal); }
#game { width: 100%; height: 100%; }
#game canvas { width: 100% !important; height: 100% !important; object-fit: contain; }
/* The emulator's own touch pad and menus stay off: only our controller (controls.mjs) drives input. */
#game .ejs_virtualGamepad_parent{display:none!important;pointer-events:none!important}
#game .ejs_menu_bar, #game .ejs_context_menu { display: none !important; }
#guest-view, #guest-video { width: 100%; height: 100%; }
#guest-video { object-fit: contain; background: #000; }
.tk-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.tk-pill { padding: 6px 12px; border-radius: var(--r-full); background: color-mix(in srgb, var(--ink) 85%, transparent); border: 1px solid var(--charcoal); font-size: 12px; }
.tk-sync { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); margin: 0; color: var(--amber); }
/* Connection state as a thin line on the screen's top edge: live, waiting or lost. */
.tk-screen #game-wrap::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; z-index: 2; background: transparent; transition: background .3s; }
.arena-stage:is([data-phase="live"], [data-phase="countdown"])[data-link="ok"] #game-wrap::before { background: var(--green); }
.arena-stage[data-sync="waiting"] #game-wrap::before { background: var(--amber); }
.arena-stage[data-link="lost"] #game-wrap::before { background: var(--red); animation: tk-blink 1s steps(2) infinite; }
@keyframes tk-blink { 50% { opacity: .3; } }

/* Controller: outline shapes on ink; a press fills bone. Disabled until the game accepts input. */
.tk-pad { display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.tk-pad--move { grid-area: move; justify-self: start; }
.tk-pad--attack { grid-area: attack; justify-self: end; }
.arena-stage:not(.controls-ready) :is(.tk-pad, .tk-system) { opacity: .4; transition: opacity .25s; }
.tk-dpad { position: relative; width: var(--dpad); height: var(--dpad); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  border-radius: 50%; border: 1px solid var(--charcoal); background: radial-gradient(circle, var(--raised) 0 62%, var(--ink) 63%); touch-action: none; }
.tk-dpad button { appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer; touch-action: none; display: grid; place-items: center; }
.tk-dpad .arm i { display: block; width: 0; height: 0; border: 7px solid transparent; transition: border-color .08s; }
.tk-dpad .up i { border-bottom: 9px solid var(--stone); margin-bottom: 6px; }
.tk-dpad .down i { border-top: 9px solid var(--stone); margin-top: 6px; }
.tk-dpad .left i { border-right: 9px solid var(--stone); margin-right: 6px; }
.tk-dpad .right i { border-left: 9px solid var(--stone); margin-left: 6px; }
.tk-dpad .up.is-pressed i { border-bottom-color: var(--bone); }
.tk-dpad .down.is-pressed i { border-top-color: var(--bone); }
.tk-dpad .left.is-pressed i { border-right-color: var(--bone); }
.tk-dpad .right.is-pressed i { border-left-color: var(--bone); }
.tk-dpad .pad-center { width: 34%; height: 34%; place-self: center; border-radius: 50%; border: 1px solid var(--charcoal); transition: transform .08s, background .08s; }
.tk-dpad:has(.is-pressed) .pad-center { background: var(--overlay); }
.tk-dpad:has(.up.is-pressed) .pad-center { transform: translateY(-6px); }
.tk-dpad:has(.down.is-pressed) .pad-center { transform: translateY(6px); }
.tk-dpad:has(.left.is-pressed) .pad-center { transform: translateX(-6px); }
.tk-dpad:has(.right.is-pressed) .pad-center { transform: translateX(6px); }

.tk-face { position: relative; width: calc(var(--btn) * 2.75); height: calc(var(--btn) * 2.75); touch-action: none; }
.tk-face .face { position: absolute; width: var(--btn); height: var(--btn); margin: calc(var(--btn) / -2) 0 0 calc(var(--btn) / -2); border-radius: 50%;
  border: 1.5px solid var(--stone); background: var(--raised); color: var(--bone); display: grid; place-items: center; padding: 0; cursor: pointer; touch-action: none;
  transition: background .06s, border-color .06s, transform .06s, color .06s; }
.tk-face .face b { font-weight: 500; font-size: calc(13px * var(--pad-scale)); letter-spacing: .02em; }
.tk-face .face kbd { display: none; }
.tk-face .triangle { left: 50%; top: 19%; } .tk-face .square { left: 19%; top: 50%; } .tk-face .circle { left: 81%; top: 50%; } .tk-face .cross { left: 50%; top: 81%; }
.tk-face .kick { border-color: var(--ash); }
.tk-face .face.is-pressed { background: var(--bone); border-color: var(--bone); color: var(--ink); transform: scale(.93); }

.tk-system { grid-area: system; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tk-system button { min-width: 64px; min-height: 30px; padding: 0 10px; border-radius: var(--r-full); border: 1px solid var(--charcoal); background: transparent; color: var(--ash);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; touch-action: none; transition: background .06s, color .06s; }
.tk-system button.is-pressed { background: var(--bone); color: var(--ink); border-color: var(--bone); }

.tk-game__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.tk-opts { display: flex; align-items: center; gap: 8px; }
.tk-chip, .tk-sizes button { min-height: 32px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--charcoal); background: transparent; color: var(--ash); font-size: 12px; cursor: pointer; }
.tk-chip[aria-pressed="true"] { color: var(--bone); border-color: var(--stone); }
.tk-sizes { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--charcoal); border-radius: var(--r-full); }
.tk-sizes button { border: 0; min-width: 32px; padding: 0; }
.tk-sizes button[aria-checked="true"] { background: var(--bone); color: var(--ink); }
.tk-rotate { display: none; margin: 0; font-size: 12px; color: var(--stone); text-align: center; }
.tk-claims { font-size: 14px; }

/* ---- Controls reference, footer, diagnostics ---- */
.tk-keys summary, .tk-diag summary { cursor: pointer; font-size: 13px; color: var(--ash); }
.tk-keys dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
.tk-keys dl div { display: flex; gap: 8px; align-items: baseline; }
.tk-keys dt { padding: 2px 6px; border: 1px solid var(--charcoal); border-radius: 4px; font: 12px ui-monospace, monospace; color: var(--bone); }
.tk-keys dd { margin: 0; font-size: 13px; color: var(--ash); }
.tk-recover { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tk-diag { font-size: 12px; color: var(--stone); }
.tk-diag pre { white-space: pre-wrap; max-height: 200px; overflow: auto; padding: 8px; border-radius: var(--r-md); background: var(--raised); }
.tk-foot { text-align: center; font-size: 12px; color: var(--stone); }

/* ---- In a match: only the game, maximized for every screen ---- */
html.in-match, html.in-match body { overscroll-behavior: none; }
html.in-match :is(.tk-bar, .tk-intro, .tk-setup, .tk-status, .tk-keys, .tk-foot, .tk-diag) { display: none; }
html.in-match .tk-main { width: 100%; max-width: 1480px; padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); gap: 6px; }

/* Desktop & wide screens: big 4:3 arcade screen flanked by controls (~86% of viewport height). */
@media (min-width: 900px) and (min-height: 580.01px) and (pointer: fine) {
  html.in-match .tk-main { min-height: 100dvh; align-content: center; }
  html.in-match .tk-game { height: calc(100dvh - 16px); grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; }
  html.in-match .tk-stage {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "move screen attack" "system screen .";
    align-items: center;
    gap: 6px 18px;
    min-height: 0;
    height: 100%;
  }
  html.in-match .tk-screen { height: 100%; overflow: hidden; }
  html.in-match #game-wrap {
    width: min(100%, calc((100dvh - 104px) * 4 / 3));
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 4 / 3;
  }
  html.in-match .tk-system { flex-direction: row; justify-self: center; gap: 6px; }
}

/* Upright phone in a match: full-width edge-to-edge screen on top, thumb pads below. */
@media (orientation:portrait) {
  html.in-match .tk-main { padding: max(6px, env(safe-area-inset-top)) 4px max(10px, env(safe-area-inset-bottom)); }
  html.in-match .tk-game { min-height: calc(100dvh - max(6px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom))); grid-template-rows: auto 1fr auto auto; }
  html.in-match .tk-stage { grid-template-rows: auto 1fr; align-items: end; }
  html.in-match #game-wrap { width: 100%; max-height: 68dvh; border-radius: 6px; }
  html.in-match .tk-stage > :is(.tk-pad, .tk-system) { align-self: end; padding-bottom: 6px; }
}

@media (max-width: 639.98px) {
  .tk-main { padding: 12px 12px 32px; min-width: 0; }
  .tk-game { min-width: 0; }
  .tk-game__top { gap: 6px; min-width: 0; }
  .tk-game__title { display: none; }
  .tk-game__top .tk-btn--sm { padding: 0 8px; font-size: 12px; white-space: nowrap; }
  .tk-stage { --btn: calc(52px * var(--pad-scale)); --dpad: calc(128px * var(--pad-scale)); gap: 12px 4px; }
  #game-wrap { border-radius: var(--r-md); }
  .tk-session span { display: none; }
}
@media (orientation:portrait) and (max-width: 639.98px) { .tk-rotate { display: block; } }

/* Sideways phone / handheld landscape: pad | FULL-HEIGHT 4:3 screen | buttons, filling the entire display.
   Top controls sit cleanly in the upper corners above the pads so the screen spans virtually 100% of display height.
   Matches both CSS landscape queries AND JS html[data-side-mode="1"] so rotation switches reliably on every iOS/Android device. */
@media (orientation:landscape) and (max-height: 580px), (orientation:landscape) and (pointer: coarse) {
  .tk-bar { height: 42px; }
  html.in-match, html.in-match body { height: 100dvh; overflow: hidden; }
  html.in-match .tk-main {
    width: 100%; max-width: none; height: 100dvh; max-height: 100dvh;
    padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    gap: 0;
  }
  html.in-match .tk-game { position: relative; height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); gap: 0; }
  html.in-match .tk-game__top {
    position: fixed;
    top: max(4px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    z-index: 12;
    min-height: 30px;
    gap: 4px;
    pointer-events: none;
  }
  html.in-match .tk-game__top > * { pointer-events: auto; }
  html.in-match .tk-session { flex: 0 1 135px; pointer-events: none; }
  html.in-match .tk-voice { margin-left: auto; }
  html.in-match .tk-voice #voice-status { display: none; }
  html.in-match #toggle-controls { margin-left: auto; }
  html.in-match .tk-voice:not(.hidden) + #toggle-controls { margin-left: 0; }
  html.in-match .tk-game__title { display: none; }
  html.in-match .tk-session span { display: none; }
  html.in-match .tk-icon { width: 30px; height: 30px; background: color-mix(in srgb, var(--ink) 80%, transparent); }
  html.in-match .tk-btn--sm { min-height: 30px; padding: 0 7px; font-size: 11px; background: color-mix(in srgb, var(--ink) 80%, transparent); }
  .tk-stage {
    --btn: calc(46px * var(--pad-scale)); --dpad: calc(118px * var(--pad-scale));
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "move screen attack" "system screen .";
    align-items: center;
    gap: 2px 10px;
    min-height: 0;
    height: 100%;
  }
  .tk-screen { height: 100%; overflow: hidden; }
  #game-wrap {
    width: min(100%, calc((100dvh - 10px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 4 / 3));
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
  }
  .tk-pad--move { align-self: center; padding-top: 22px; }
  .tk-pad--attack { align-self: center; padding-top: 22px; }
  .tk-system { flex-direction: row; justify-self: center; gap: 6px; padding-bottom: 2px; }
  .tk-system button { min-width: 54px; min-height: 26px; padding: 0 8px; font-size: 10px; }
  html.in-match .tk-rotate { display: none; }
  html.in-match .tk-game__foot {
    position: fixed;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(4px, env(safe-area-inset-bottom));
    z-index: 12;
    gap: 6px;
  }
  html.in-match .tk-opts { display: none; }
  html.in-match :is(#claims, .tk-stake-end) {
    position: fixed;
    left: 16px; right: 16px;
    bottom: max(10px, env(safe-area-inset-bottom));
    max-width: 560px;
    margin: 0 auto;
    z-index: 30;
    max-height: 84dvh;
    overflow: auto;
    box-shadow: 0 12px 40px rgb(0 0 0 / .75);
  }
}

/* Explicit JS orientation fallback when mobile WebViews/Safari lag on media-query updates during rotation. */
html.in-match[data-side-mode="1"], html.in-match[data-side-mode="1"] body { height: 100dvh; overflow: hidden; }
html.in-match[data-side-mode="1"] .tk-main {
  width: 100%; max-width: none; height: 100dvh; max-height: 100dvh;
  padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  gap: 0;
}
html.in-match[data-side-mode="1"] .tk-game { position: relative; height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); gap: 0; }
html.in-match[data-side-mode="1"] .tk-game__top {
  position: fixed;
  top: max(4px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  z-index: 12;
  min-height: 30px;
  gap: 4px;
  pointer-events: none;
}
html.in-match[data-side-mode="1"] .tk-game__top > * { pointer-events: auto; }
html.in-match[data-side-mode="1"] .tk-session { flex: 0 1 135px; pointer-events: none; }
html.in-match[data-side-mode="1"] .tk-voice { margin-left: auto; }
html.in-match[data-side-mode="1"] .tk-voice #voice-status { display: none; }
html.in-match[data-side-mode="1"] #toggle-controls { margin-left: auto; }
html.in-match[data-side-mode="1"] .tk-voice:not(.hidden) + #toggle-controls { margin-left: 0; }
html.in-match[data-side-mode="1"] .tk-game__title,
html.in-match[data-side-mode="1"] .tk-session span,
html.in-match[data-side-mode="1"] .tk-rotate,
html.in-match[data-side-mode="1"] .tk-opts { display: none; }
html.in-match[data-side-mode="1"] .tk-icon { width: 30px; height: 30px; background: color-mix(in srgb, var(--ink) 80%, transparent); }
html.in-match[data-side-mode="1"] .tk-btn--sm { min-height: 30px; padding: 0 7px; font-size: 11px; background: color-mix(in srgb, var(--ink) 80%, transparent); }
html.in-match[data-side-mode="1"] .tk-stage {
  --btn: calc(46px * var(--pad-scale)); --dpad: calc(118px * var(--pad-scale));
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "move screen attack" "system screen .";
  align-items: center;
  gap: 2px 10px;
  min-height: 0;
  height: 100%;
}
html.in-match[data-side-mode="1"] .tk-screen { height: 100%; overflow: hidden; }
html.in-match[data-side-mode="1"] #game-wrap {
  width: min(100%, calc((100dvh - 10px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 4 / 3));
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
}
html.in-match[data-side-mode="1"] .tk-pad--move,
html.in-match[data-side-mode="1"] .tk-pad--attack { align-self: center; padding-top: 22px; }
html.in-match[data-side-mode="1"] .tk-system { flex-direction: row; justify-self: center; gap: 6px; padding-bottom: 2px; }
html.in-match[data-side-mode="1"] .tk-system button { min-width: 54px; min-height: 26px; padding: 0 8px; font-size: 10px; }
html.in-match[data-side-mode="1"] .tk-game__foot {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(4px, env(safe-area-inset-bottom));
  z-index: 12;
  gap: 6px;
}
html.in-match[data-side-mode="1"] :is(#claims, .tk-stake-end) {
  position: fixed;
  left: 16px; right: 16px;
  bottom: max(10px, env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  z-index: 30;
  max-height: 84dvh;
  overflow: auto;
  box-shadow: 0 12px 40px rgb(0 0 0 / .75);
}

/* Compact short phones (e.g. iPhone SE 667x375): tighten controls slightly so the 4:3 screen stays huge. */
@media (orientation:landscape) and (max-width: 720px) {
  html.in-match .tk-stage { --btn: calc(42px * var(--pad-scale)); --dpad: calc(108px * var(--pad-scale)); gap: 2px 6px; }
  html.in-match .tk-btn--sm { padding: 0 6px; font-size: 10px; }
}

/* Fullscreen: full-bleed side-by-side arcade stage filling the display. */
.tk-game:is(:fullscreen, :-webkit-full-screen) {
  width: 100vw; height: 100dvh; background: var(--ink);
  padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px; overflow: hidden;
}
.tk-game:is(:fullscreen, :-webkit-full-screen) .tk-stage {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "move screen attack" "system screen .";
  align-items: center; gap: 4px 14px; min-height: 0; height: 100%;
}
.tk-game:is(:fullscreen, :-webkit-full-screen) .tk-screen { height: 100%; overflow: hidden; }
.tk-game:is(:fullscreen, :-webkit-full-screen) #game-wrap {
  width: min(100%, calc((100dvh - 54px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 4 / 3));
  height: auto; max-width: 100%; max-height: 100%; aspect-ratio: 4 / 3;
}
.tk-game:is(:fullscreen, :-webkit-full-screen) .tk-system { flex-direction: row; justify-self: center; gap: 6px; }
.tk-game:is(:fullscreen, :-webkit-full-screen) .tk-game__foot {
  position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(6px, env(safe-area-inset-bottom)); z-index: 12;
}
.tk-game:is(:fullscreen, :-webkit-full-screen) .tk-opts { display: none; }
.tk-game:is(:fullscreen, :-webkit-full-screen) :is(#claims, .tk-stake-end) {
  position: fixed; left: 16px; right: 16px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; z-index: 30; max-height: 84dvh; overflow: auto;
}

/* Controller / No-Buttons Full-Screen Mode (automatic when GameSir or any physical gamepad connects,
   or manually toggled via "Hide pad"). Pure edge-to-edge 4:3 Tekken screen with zero on-screen buttons
   and quiet ghost corner controls in the black pillarbox margins. */
html.in-match[data-hide-controls="1"],
html.in-match[data-hide-controls="1"] body {
  height: 100dvh; overflow: hidden; background: #000;
}
html.in-match[data-hide-controls="1"] .tk-main {
  width: 100%; max-width: none; height: 100dvh; max-height: 100dvh;
  padding: 0; gap: 0; background: #000;
}
html.in-match[data-hide-controls="1"] .tk-game,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) {
  position: relative; width: 100%; height: 100%; min-height: 0;
  padding: 0; gap: 0; background: #000;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
html.in-match[data-hide-controls="1"] :is(.tk-pad, .tk-system, .tk-opts, .tk-rotate, .tk-game__title, .tk-session),
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) :is(.tk-pad, .tk-system, .tk-opts, .tk-rotate, .tk-game__title, .tk-session) {
  display: none !important;
}
html.in-match[data-hide-controls="1"] .tk-stage,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-stage {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "screen";
  place-items: center;
  gap: 0; width: 100%; height: 100%; min-height: 0;
}
html.in-match[data-hide-controls="1"] .tk-screen,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-screen {
  width: 100%; height: 100%; overflow: hidden;
}
html.in-match[data-hide-controls="1"] #game-wrap,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) #game-wrap {
  width: min(100vw, calc(100dvh * 4 / 3));
  height: auto;
  max-width: 100vw;
  max-height: 100dvh;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 0;
}
html.in-match[data-hide-controls="1"] .tk-game__top,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-game__top {
  position: fixed;
  top: max(6px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  left: auto;
  z-index: 15;
  flex-direction: column;
  align-items: flex-end;
  min-height: 30px;
  gap: 6px;
  opacity: .34;
  transition: opacity .18s var(--ease);
  pointer-events: auto;
}
html.in-match[data-hide-controls="1"] .tk-game__top:is(:hover, :focus-within, :active),
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-game__top:is(:hover, :focus-within, :active) {
  opacity: 1;
}
html.in-match[data-hide-controls="1"] .tk-game__top .tk-btn--sm,
html.in-match[data-hide-controls="1"] .tk-game__top .tk-icon,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-game__top :is(.tk-btn--sm, .tk-icon) {
  background: rgb(0 0 0 / .65);
  border-color: rgb(255 255 255 / .22);
}
html.in-match[data-hide-controls="1"] .tk-voice #voice-status { display: none; }
html.in-match[data-hide-controls="1"] .tk-game__foot,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-game__foot {
  position: fixed;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 15;
  opacity: .34;
  transition: opacity .18s var(--ease);
}
html.in-match[data-hide-controls="1"] .tk-game__foot:is(:hover, :focus-within, :active),
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-game__foot:is(:hover, :focus-within, :active) {
  opacity: 1;
}
html.in-match[data-hide-controls="1"] .tk-game__foot .tk-btn--sm,
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) .tk-game__foot .tk-btn--sm {
  background: rgb(0 0 0 / .65);
  border-color: rgb(255 255 255 / .22);
}
html.in-match[data-hide-controls="1"] :is(#claims, .tk-stake-end),
html[data-hide-controls="1"] .tk-game:is(:fullscreen, :-webkit-full-screen) :is(#claims, .tk-stake-end) {
  position: fixed;
  left: 16px; right: 16px;
  bottom: max(12px, env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  z-index: 30;
  max-height: 84dvh;
  overflow: auto;
  box-shadow: 0 12px 40px rgb(0 0 0 / .85);
}

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

.tk-watch { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--charcoal); }
.tk-watch:hover, .tk-watch:focus-visible { border-color: var(--bone); }

/* ---- Play for SOL (openclub-stake.mjs) ---- */
.tk-stake { gap: 12px; animation: tk-stake-in .28s var(--ease); }
@keyframes tk-stake-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tk-stake__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-stake__net { padding: 2px 8px; border-radius: var(--r-full); border: 1px solid var(--charcoal); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.tk-stake__chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tk-stake__chips .tk-chip { min-height: 44px; color: var(--bone); font-size: 15px; border-radius: var(--r-md); border: 1px solid var(--stone); background: transparent; cursor: pointer; font-weight: 500; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.tk-stake__chips .tk-chip:hover { border-color: var(--bone); }
.tk-stake__chips .tk-chip[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.tk-stake__eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.tk-stake__title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 500; }
.tk-stake__title.is-win { color: var(--green); }
.tk-stake__offer { margin: 0; font-weight: 500; }
.tk-stake__msg { color: var(--amber); }
.tk-stake__funds { display: grid; gap: 8px; }
.tk-stake__funds a { color: var(--bone); }
.tk-stake__busy { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; color: var(--bone); }
.tk-stake__busy .tk-spinner { width: 18px; height: 18px; flex: none; }
.tk-stake__wallet { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-stake a { color: var(--bone); }
.tk-stake code { padding: 1px 6px; border-radius: var(--r-md); background: var(--overlay); }
.tk-stake .tk-invite { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-stake .tk-invite input { flex: 1 1 200px; min-width: 0; }
.tk-linkbtn { padding: 0; border: 0; background: none; color: var(--ash); text-decoration: underline; cursor: pointer; font-size: 13px; }
.tk-linkbtn:hover { color: var(--bone); }
.tk-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.tk-steps li { display: grid; gap: 6px; font-size: 12px; color: var(--stone); }
.tk-steps i { height: 4px; border-radius: var(--r-full); background: var(--charcoal); overflow: hidden; position: relative; }
.tk-steps .is-done { color: var(--ash); }
.tk-steps .is-done i { background: var(--bone); }
.tk-steps .is-now { color: var(--bone); }
.tk-steps .is-now i::after { content: ""; position: absolute; inset: 0; width: 45%; border-radius: inherit; background: var(--bone); animation: tk-step 1.2s var(--ease) infinite alternate; }
@keyframes tk-step { from { transform: translateX(-20%); } to { transform: translateX(140%); } }
.tk-stake-pill { margin: 0; white-space: nowrap; }
html.in-match .tk-stake:not(.tk-stake-end) { display: none; }
/* A staked game: the release's own result panel steps aside for the card, which carries the payout, the rematch,
   the new game and the record download (its buttons are still pressed from the card). */
body.stake-on #panel-result { display: none !important; }
.tk-stake__links { display: flex; gap: 16px; flex-wrap: wrap; }
/* The waiting room of a staked game: the card carries the invite link, so the release's own copy and its solo switch go. */
body.stake-on :is(#invite-label, #invite-box, #practice) { display: none !important; }
body.stake-invited .tk-setup, body.stake-invited #live-status { display: none; }
@media (prefers-reduced-motion: reduce) { .tk-stake, .tk-steps .is-now i::after { animation: none; } }

/* Fast-stream loading stages & live P2P status pill */
.tk-stages { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.tk-stages span { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: rgba(244,242,237,.58); background: rgba(255,255,255,.03); }
.tk-stages span[data-state="active"] { color: #e8e6e0; border-color: rgba(232,230,224,.55); background: rgba(232,230,224,.10); }
.tk-stages span[data-state="done"] { color: #b7f28c; border-color: rgba(183,242,140,.45); background: rgba(183,242,140,.10); }
.tk-progress-meta { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
/* Header status pill: one colour-coded pill, no separate dot. Colour is never the only cue. */
.tk-p2p { flex: none; width: max-content; margin: 0; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  border: 1px solid var(--charcoal); background: transparent; color: var(--ash);
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.tk-p2p[data-state="ready"] { border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.tk-p2p[data-state="pending"] { border-color: color-mix(in srgb, var(--amber) 50%, transparent); background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.tk-p2p[data-state="local"] { border-color: var(--charcoal); background: transparent; color: var(--ash); }
.tk-p2p[data-state="down"] { border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
@media (max-width: 399.98px) {
  #availability[data-short] .tk-p2p__full { display: none; }
  #availability[data-short]::before { content: attr(data-short); }
}
@media (prefers-reduced-motion: reduce) {
  .tk-p2p { transition: none; }
}
.pnl-layer{--pnl-surface: var(--color-surface, #1D1D1B);--pnl-ink: var(--pvp-ink, #141413);--pnl-glass: #0B0B0A;--pnl-bone: var(--pvp-bone, #EEE7D7);--pnl-ash: var(--pvp-ash, #A6A29B);--pnl-stone: var(--pvp-stone, #7A766F);--pnl-rule: var(--pvp-charcoal, #34332F);--pnl-up: var(--color-success, #7FBF8E);position:fixed;inset:0;z-index:80;display:flex;justify-content:center;align-items:flex-start;pointer-events:none;padding:calc(var(--pvp-header-h, 64px) + clamp(18px,7vh,64px)) max(16px,env(safe-area-inset-left)) calc(var(--pvp-tabbar-h, 0px) + var(--space-4, 16px))}@media(min-width:640px){.pnl-layer{padding-top:calc(var(--pvp-header-h, 64px) + clamp(32px,11vh,108px));padding-bottom:24px}}.pnl-card{position:relative;width:min(100%,352px);overflow:hidden;pointer-events:auto;background:var(--pnl-surface);color:var(--pnl-bone);border:1px solid var(--pnl-rule);border-radius:var(--radius-lg, 12px);box-shadow:var(--shadow-lg, 0 18px 48px rgb(0 0 0 / .55));font-family:var(--font-body, "Rubik", system-ui, sans-serif);font-variant-numeric:tabular-nums;animation:pnl-in .24s var(--ease, cubic-bezier(.2, .75, .25, 1)) both}@keyframes pnl-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}.pnl-hero{position:relative;min-height:204px;padding:18px 18px 16px;border-bottom:1px solid var(--pnl-rule)}.pnl-hero:before{content:"";position:absolute;right:-26px;top:26px;width:190px;height:190px;border-radius:50%;border:1px solid var(--pnl-rule);background:radial-gradient(closest-side,rgb(238 231 215 / .035),transparent);pointer-events:none}.pnl-figure-wrap{position:absolute;right:-10px;bottom:-1px;width:188px;height:188px;color:var(--pnl-ash);pointer-events:none}.pnl-figure{display:block;width:100%;height:100%;overflow:visible}.pnl-figure path{vector-effect:non-scaling-stroke;stroke-width:1px}.pnl-figure #bust-outline path{stroke-dasharray:1;stroke-dashoffset:1;animation:pnl-draw 1.1s .12s var(--ease, cubic-bezier(.2, .75, .25, 1)) forwards}@keyframes pnl-draw{to{stroke-dashoffset:0}}.pnl-shades{color:var(--pnl-bone);opacity:0;transform:translateY(-14px);animation:pnl-shades .36s 1.05s cubic-bezier(.2,.9,.3,1) forwards}.pnl-shades__lens{stroke:var(--pnl-bone)}@keyframes pnl-shades{to{opacity:1;transform:none}}.pnl-copy{position:relative;z-index:1;max-width:66%}.pnl-game{margin:0;font:var(--weight-display, 700) var(--display-sm, 1.75rem)/1 var(--font-display-title, "Grenze Gotisch", "UnifrakturCook", Georgia, serif);color:var(--pnl-bone)}.pnl-detail{margin:6px 0 0;font-size:var(--text-xs, .75rem);line-height:1.35;color:var(--pnl-ash)}.pnl-label{margin:18px 0 2px;font-size:11px;font-weight:500;letter-spacing:var(--tracking-caps, .08em);text-transform:uppercase;color:var(--pnl-stone)}.pnl-value{margin:0;font-size:34px;font-weight:500;line-height:1.05;letter-spacing:-.02em;color:var(--pnl-up);white-space:nowrap}.pnl-unit{margin:6px 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;font-size:var(--text-xs, .75rem);color:var(--pnl-ash)}.pnl-pct{padding:2px 8px;border-radius:var(--radius-full, 999px);background:#7fbf8e1f;color:var(--pnl-up);font-weight:500}.pnl-sub{display:block;margin-top:2px;font-size:11px;color:var(--pnl-stone);font-weight:400}.pnl-close{position:absolute;z-index:2;top:4px;right:4px;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:var(--radius-full, 999px);background:#1414138c;color:var(--pnl-ash);cursor:pointer;transition:color var(--duration-fast, .12s),background var(--duration-fast, .12s)}.pnl-close:hover{color:var(--pnl-bone);background:var(--pnl-ink)}.pnl-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.pnl-rows{margin:0;display:grid;grid-template-columns:repeat(3,1fr)}.pnl-rows div{padding:12px 18px}.pnl-rows div+div{border-left:1px solid var(--pnl-rule);padding-left:14px}.pnl-rows dt{font-size:11px;font-weight:500;letter-spacing:var(--tracking-caps, .08em);text-transform:uppercase;color:var(--pnl-stone)}.pnl-rows dd{margin:4px 0 0;font-size:var(--text-sm, .875rem);color:var(--pnl-bone);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pnl-foot{margin:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px 12px;border-top:1px solid var(--pnl-rule);font-size:var(--text-xs, .75rem);color:var(--pnl-ash)}.pnl-foot__note{display:inline-flex;align-items:center;gap:8px;min-width:0}.pnl-foot i{width:6px;height:6px;border-radius:50%;background:var(--pnl-up);flex:none}.pnl-share{appearance:none;display:inline-flex;align-items:center;gap:6px;flex:none;padding:5px 11px;min-height:30px;border-radius:var(--radius-full, 999px);border:1px solid var(--pnl-rule);background:var(--pnl-ink);color:var(--pnl-bone);font:500 12px/1 var(--font-body, "Rubik", system-ui, sans-serif);cursor:pointer;transition:border-color var(--duration-fast, .12s),color var(--duration-fast, .12s),background var(--duration-fast, .12s)}.pnl-share:hover{border-color:var(--pnl-ash)}.pnl-share:disabled{opacity:.6;cursor:default}.pnl-share.is-done{border-color:var(--pnl-up);color:var(--pnl-up)}.pnl-share svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.pnl-timer{position:absolute;left:0;bottom:0;height:2px;width:100%;background:var(--pnl-rule);transform-origin:left;animation:pnl-timer linear both}@keyframes pnl-timer{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){.pnl-card{animation:pnl-fade .16s ease-out both}.pnl-figure #bust-outline path{animation:none;stroke-dashoffset:0}.pnl-shades{animation:none;opacity:1;transform:none}}[data-motion=reduce] .pnl-card{animation:pnl-fade .16s ease-out both}[data-motion=reduce] .pnl-figure #bust-outline path{animation:none;stroke-dashoffset:0}[data-motion=reduce] .pnl-shades{animation:none;opacity:1;transform:none}@keyframes pnl-fade{0%{opacity:0}to{opacity:1}}.pnl-trigger{justify-self:start;align-self:start;border:1px solid var(--color-border-control, #545149);border-radius:999px;padding:6px 12px;min-height:32px;background:transparent;color:var(--pvp-bone, #eee7d7);font:inherit;font-size:.8125rem;cursor:pointer}.pnl-card[data-direction=down]{--pnl-up: var(--color-danger, #db918a)}.pnl-card[data-direction=flat]{--pnl-up: var(--pnl-bone)}.pnl-pct{background:color-mix(in srgb,var(--pnl-up) 12%,transparent)}.pnl-value{font-size:clamp(1.1rem,3.8vw,1.5rem);overflow-wrap:anywhere;white-space:normal}.pnl-rows dd{font-size:var(--text-xs, .75rem);overflow-wrap:anywhere;white-space:normal}@media(max-width:639.98px){.pnl-hero{min-height:145px;padding:14px}.pnl-figure-wrap{width:140px;height:140px}.pnl-rows div{min-width:0;padding:8px 10px}.pnl-foot{padding:8px 12px}}.pnl-toast{--pnl-up: var(--color-success, #7FBF8E);position:fixed;z-index:80;top:calc(var(--header-height, 64px) + var(--space-2, 8px));left:var(--space-3, 12px);right:var(--space-3, 12px);display:flex;align-items:center;gap:var(--space-3, 12px);min-height:44px;padding:0 0 0 var(--space-4, 16px);background:var(--color-surface, #1D1D1B);color:var(--pvp-bone, #EEE7D7);border:1px solid var(--pvp-charcoal, #34332F);border-radius:var(--radius-md, 8px);box-shadow:var(--shadow-md, 0 8px 24px rgb(0 0 0 / .45));font-family:var(--font-body, "Rubik", system-ui, sans-serif);font-size:var(--text-sm, .875rem);font-variant-numeric:tabular-nums;animation:pnl-toast-in var(--duration-base, .18s) var(--ease-out, ease-out) both}.pnl-toast.is-leaving{animation:pnl-toast-out var(--duration-base, .18s) var(--ease-out, ease-out) both}.pnl-toast[data-direction=down]{--pnl-up: var(--color-danger, #db918a)}.pnl-toast[data-direction=flat]{--pnl-up: var(--pvp-bone, #EEE7D7)}.pnl-toast__game{flex:none;font-weight:500;white-space:nowrap}.pnl-toast__figs{flex:1 1 auto;min-width:0;display:flex;align-items:baseline;gap:var(--space-2, 8px);white-space:nowrap;overflow:hidden}.pnl-toast__label{font-size:var(--text-xs, .75rem);letter-spacing:var(--tracking-caps, .08em);color:var(--pvp-stone, #7A766F)}.pnl-toast__value{color:var(--pnl-up);font-weight:500}.pnl-toast__unit{font-size:var(--text-xs, .75rem);color:var(--pvp-ash, #A6A29B);overflow:hidden;text-overflow:ellipsis}.pnl-toast .pnl-toast__close{position:static;flex:none;background:transparent}@keyframes pnl-toast-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}@keyframes pnl-toast-out{0%{opacity:1;transform:none}to{opacity:0;transform:translateY(-6px)}}@media(min-width:1024px){.pnl-toast{left:auto;right:var(--space-6, 24px);width:min(360px,calc(100vw - 2 * var(--space-6, 24px)))}}@media(prefers-reduced-motion:reduce){.pnl-toast,.pnl-toast.is-leaving{animation:none}}[data-motion=reduce] .pnl-toast,[data-motion=reduce] .pnl-toast.is-leaving{animation:none}
