/* Страница ведущего: телефон в руке, крупные кнопки, тёмная тема с цветом игры */
.station-body { background: radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--bg); background-attachment: fixed; }
.st-app { max-width: 720px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.st-head { position: sticky; top: 0; z-index: 20; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: rgba(6, 8, 14, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.st-title-row { display: flex; align-items: center; gap: 12px; }
.st-station-ico { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 25%, transparent); }
.st-station { display: block; font: 700 18px/1.2 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-game { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 10px; }
.st-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.st-sync::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-sync.ok { color: var(--ok); }
.st-sync.off { color: var(--danger); }
.st-sync.warn { color: var(--warn); }
.st-archived { margin-top: 10px; }
.stopwatch { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.stopwatch .ico { color: var(--accent); }
.sw-time { flex: 1; font: 700 26px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sw-time.run { color: var(--accent); text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 50%, transparent); }
.st-tools { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 8px; }
.st-tools .seg { align-self: flex-start; }
.st-list { display: flex; flex-direction: column; gap: 8px; padding: 6px 12px calc(100px + env(safe-area-inset-bottom)); }
.st-team { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 10px 14px 10px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-align: left; cursor: pointer; overflow: hidden; transition: transform .1s, border-color .2s; }
.st-team::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--team); }
.st-team:active { transform: scale(.985); }
.st-team b { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.2; }
.st-team small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.st-team.done { border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.st-team.pending { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.st-val { font: 700 19px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-val.out { font: 700 14px/1 var(--font); color: #FF93A6; text-transform: uppercase; letter-spacing: .06em; }
.st-place { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; font: 800 15px/1 var(--font-display); background: var(--panel-3); }
.st-place.p1 { background: linear-gradient(145deg, #FFF3C4, var(--gold)); color: #3A2500; }
.st-place.p2 { background: linear-gradient(145deg, #fff, var(--silver)); color: #1B2230; }
.st-place.p3 { background: linear-gradient(145deg, #FFD7B0, var(--bronze)); color: #2A1203; }
.st-add { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.st-empty { text-align: center; color: var(--muted); padding: 30px 0; }
.st-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(6, 8, 14, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.st-tabbar button { flex: 1; max-width: 340px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 700; font-size: 15px; cursor: pointer; }
.st-tabbar button.on { color: var(--on-accent); border-color: transparent; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2))); }
.st-rank { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px calc(100px + env(safe-area-inset-bottom)); }
.st-rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.st-rank-row .st-place { min-width: 40px; height: 40px; }
.st-rank-note { color: var(--muted); font-size: 13.5px; text-align: center; padding: 8px 0; }

/* нижняя шторка ввода */
.sheet-back { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px); animation: fade .2s; }
.sheet { width: 100%; max-width: 720px; max-height: 96dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--panel); border: 1px solid var(--line-2); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); animation: sheet-up .32s var(--ease); }
.sheet-grip { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-head small { color: var(--muted); font-size: 13px; }
.sheet-head h2 { font: 800 24px/1.15 var(--font); margin-top: 2px; }
.sheet-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.display { position: relative; padding: 18px 16px; border-radius: 18px; text-align: center; background: var(--bg-2); border: 1px solid var(--line-2); font: 700 clamp(40px, 13vw, 60px)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.display.empty { color: var(--faint); }
.display.bad { color: #FF93A6; border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.display small { font: 600 16px/1 var(--font); color: var(--muted); margin-left: 8px; }
.display-hint { text-align: center; font-size: 12.5px; color: var(--faint); margin-top: -6px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { height: 62px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel-2); font: 700 26px/1 var(--font-display); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.keypad button:active { background: var(--panel-3); transform: scale(.97); }
.keypad button.fn { font-size: 20px; color: var(--muted); }
.keypad button:disabled { visibility: hidden; }
.sw-insert { display: flex; align-items: center; justify-content: center; gap: 8px; }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.place-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 62px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.place-grid button b { font: 800 22px/1 var(--font-display); }
.place-grid button small { max-width: 56px; font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-grid button.taken { opacity: .55; }
.place-grid button.on { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2))); color: var(--on-accent); border-color: transparent; opacity: 1; }
.place-grid button.on small { color: inherit; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-actions .btn { height: 50px; }
.sheet-actions .btn-primary { grid-column: 1 / -1; height: 60px; font-size: 18px; border-radius: 16px; }
.sheet-actions .btn-ghost { grid-column: 1 / -1; }

/* вход */
.st-login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.st-login-card { width: min(100%, 420px); display: flex; flex-direction: column; gap: 14px; padding: 28px 22px; border-radius: 24px; background: rgba(16, 21, 31, .82); border: 1px solid var(--line-2); backdrop-filter: blur(16px); box-shadow: var(--shadow); text-align: center; }
.st-login-ico { align-self: center; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 22px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 30%, transparent); }
.st-login-card h1 { font: 700 24px/1.2 var(--font-display); }
.code-input { height: 72px; text-align: center; font: 800 34px/1 var(--mono); letter-spacing: .32em; text-transform: uppercase; padding-left: .32em; }
.st-login-alt { color: var(--muted); font-size: 14px; }
.st-offline { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; }

@keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } }
