/* 📏 Size Matters – baut auf arcade-ui.css auf (Neon/Glass, Gold als Markenfarbe) */

:root {
    --sm-ref: #94a3b8;
    --sm-target: #ffd23f;
    --sm-true: #3dffa2;
    --stage-h: min(52vh, 540px);
}

.brand-mark.sm { display: inline-block; transform: rotate(-12deg); }
.hero-logo h1 .sm-small { font-size: 0.55em; vertical-align: 0.35em; letter-spacing: 0; }
.hero-logo h1 .sm-big { display: inline-block; font-size: 1.15em; transform-origin: bottom center; animation: smGrow 3.2s ease-in-out infinite; }
@keyframes smGrow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.hero-sizes { display: flex; justify-content: center; align-items: flex-end; gap: 0.6rem; height: 70px; margin: 0.5rem 0 1rem; }
.hero-sizes span { display: block; width: 14px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--gold), var(--orange)); box-shadow: 0 0 12px rgba(255, 210, 63, 0.4); animation: barBounce 2.4s ease-in-out infinite; }
.hero-sizes span:nth-child(odd) { background: linear-gradient(180deg, var(--cyan), #6366f1); box-shadow: 0 0 12px rgba(61, 224, 255, 0.4); }
@keyframes barBounce { 50% { transform: scaleY(0.6); } }
.hero-sizes span { transform-origin: bottom; }

.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.75rem; }
.menu-grid .btn { flex-direction: column; gap: 0.15rem; padding: 0.85rem 0.6rem; }
.menu-grid .btn small { font-weight: 600; font-size: 0.72rem; opacity: 0.75; }
.btn-ranked { background: linear-gradient(135deg, #a78bfa, #6366f1); color: #fff; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-ranked:hover:not(:disabled) { transform: translateY(-2px); }
.btn-casual { background: linear-gradient(135deg, var(--cyan), #0ea5e9); color: #04121a; box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35), inset 0 1px 0 rgba(255,255,255,0.4); }
.btn-casual:hover:not(:disabled) { transform: translateY(-2px); }
.rating-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.7rem; border-radius: 999px; background: rgba(167, 139, 250, 0.15); border: 1px solid rgba(167, 139, 250, 0.4); color: #c4b5fd; font-weight: 800; font-size: 0.8rem; }

/* ---------- Queue ---------- */
.queue-card { text-align: center; }
.radar { position: relative; width: 180px; height: 180px; margin: 1rem auto 1.25rem; border-radius: 50%; border: 2px solid rgba(61, 224, 255, 0.35); background: radial-gradient(circle, rgba(61,224,255,0.12) 0%, transparent 70%); overflow: hidden; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 1px solid rgba(61, 224, 255, 0.25); }
.radar::after { inset: 42%; }
.radar .sweep { position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(61, 224, 255, 0.55), transparent 25%); animation: spin 2s linear infinite; }
.radar.ranked { border-color: rgba(167, 139, 250, 0.45); }
.radar.ranked .sweep { background: conic-gradient(from 0deg, rgba(167, 139, 250, 0.6), transparent 25%); }
.radar .radar-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.queue-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.queue-time { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- Lobby ---------- */
.lobby-layout { width: 100%; max-width: 1100px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.25rem; align-items: start; }
.lobby-layout .card { max-width: none; }
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lobby-head .room-code { font-size: 2.4rem; margin: 0; }
.lobby-badge { padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: var(--glass-strong); border: 1px solid var(--stroke); }
.lobby-badge.ranked { background: rgba(167, 139, 250, 0.18); border-color: rgba(167, 139, 250, 0.5); color: #c4b5fd; }
.lobby-badge.casual { background: rgba(61, 224, 255, 0.14); border-color: rgba(61, 224, 255, 0.45); color: var(--cyan); }

.mode-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1.25rem; }
.mode-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.8rem 0.4rem; border-radius: var(--radius-sm); background: rgba(0,0,0,0.25); border: 1.5px solid var(--stroke); cursor: pointer; text-align: center; transition: transform 0.15s, border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.mode-card:hover:not(.readonly) { transform: translateY(-2px); border-color: rgba(255,255,255,0.3); }
.mode-card .mode-icon { font-size: 1.6rem; }
.mode-card .mode-name { font-weight: 800; font-size: 0.85rem; }
.mode-card small { color: var(--muted); font-size: 0.68rem; line-height: 1.25; }
.mode-card.selected { border-color: var(--gold); background: rgba(255, 210, 63, 0.12); box-shadow: 0 0 22px rgba(255, 210, 63, 0.25); }
.mode-card.readonly { cursor: default; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin-bottom: 1.25rem; }
.mod-chip { display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.6rem 0.7rem; border-radius: var(--radius-sm); background: rgba(0,0,0,0.25); border: 1.5px solid var(--stroke); cursor: pointer; transition: border-color 0.2s, background 0.2s, opacity 0.2s; text-align: left; }
.mod-chip .mod-icon { font-size: 1.25rem; line-height: 1; }
.mod-chip b { display: block; font-size: 0.85rem; }
.mod-chip small { display: block; color: var(--muted); font-size: 0.68rem; line-height: 1.3; }
.mod-chip.on { border-color: var(--pink); background: rgba(255, 77, 141, 0.12); box-shadow: 0 0 18px rgba(255, 77, 141, 0.2); }
.mod-chip.disabled { opacity: 0.3; cursor: not-allowed; }
.mod-chip.readonly { cursor: default; }

.category-grid.sm { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.category-grid.sm .category-btn { padding: 0.6rem 0.3rem; }
.category-grid.sm .cat-icon { font-size: 1.4rem; }
.category-grid.readonly .category-btn { cursor: default; }
.category-grid.readonly .category-btn:hover { transform: none; }
.settings-grid.three { grid-template-columns: repeat(3, 1fr); }
.toggle-row { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; cursor: pointer; }
.toggle-row input { accent-color: var(--gold); width: 18px; height: 18px; }

.member-list { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.member-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--stroke); animation: popIn 0.3s cubic-bezier(.3,1.6,.5,1); }
.member-row.me { border-color: rgba(255, 210, 63, 0.5); }
.member-row.offline { opacity: 0.45; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; background: currentColor; }
.member-row .name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .tag { font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.mini-btn { border: 1px solid var(--stroke); background: var(--glass); border-radius: 8px; padding: 0.2rem 0.5rem; font-size: 0.75rem; font-weight: 700; cursor: pointer; color: var(--text); }
.mini-btn:hover { background: var(--glass-strong); }
.team-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.team-col { border-radius: var(--radius-sm); padding: 0.7rem; border: 1.5px solid color-mix(in srgb, var(--team) 55%, transparent); background: color-mix(in srgb, var(--team) 10%, transparent); min-height: 130px; }
.team-col h3 { font-size: 0.95rem; color: var(--team); margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.team-col .member-row { padding: 0.4rem 0.5rem; }
.leader-star { font-size: 0.75rem; }
.start-problem { text-align: center; color: #fda4af; font-size: 0.85rem; min-height: 1.2em; margin-top: 0.5rem; }

/* ---------- Game ---------- */
.game-layout.sm { grid-template-columns: 1fr 260px; }
.sm-hud { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-bottom: 0.6rem; }
.sm-hud .center-col { display: flex; flex-direction: column; align-items: center; }
.sm-hud .timer-ring { width: 78px; height: 78px; }
.sm-hud .timer { font-size: 1.6rem; }
.matchup { text-align: center; margin-bottom: 0.5rem; width: 100%; }
.matchup .vs-line { display: flex; align-items: baseline; justify-content: center; gap: 0.75rem; flex-wrap: wrap; font-size: clamp(1.1rem, 2.6vw, 1.6rem); font-weight: 900; }
.matchup .ref-name { color: #cbd5e1; }
.matchup .target-name { color: var(--gold); text-shadow: 0 0 16px rgba(255, 210, 63, 0.45); }
.matchup .ref-name, .matchup .target-name { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.matchup .obj-tag { font-size: 0.68rem; font-weight: 700; color: var(--muted); text-shadow: none; letter-spacing: 0.02em; margin-top: 0.15rem; }
.matchup .vs { font-size: 0.8rem; color: var(--muted); font-weight: 800; letter-spacing: 0.1em; }
.matchup .dim-note { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.matchup .dim-note b { color: var(--text); }
.chain { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.4rem; }
.chain span { padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); }
.chain span.cur { color: var(--gold); border-color: rgba(255, 210, 63, 0.5); }
.chain i { font-style: normal; opacity: 0.6; }
.flag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; background: rgba(255, 77, 141, 0.15); border: 1px solid rgba(255, 77, 141, 0.45); color: #ff9ec4; margin: 0 0.15rem; }

.stage-wrap { position: relative; width: 100%; }
.stage { position: relative; width: 100%; height: var(--stage-h); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--stroke);
    background: radial-gradient(ellipse at 50% 110%, rgba(255, 138, 61, 0.18), transparent 60%), linear-gradient(180deg, #0f0f26 0%, #16163a 100%);
    touch-action: none; user-select: none; cursor: ns-resize; box-shadow: var(--shadow), inset 0 0 60px rgba(0,0,0,0.5); }
.stage.locked { cursor: default; }
.stage.over-target:not(.locked) { cursor: grab; }
.stage.moving { cursor: grabbing !important; }
.stage .grid-lines { position: absolute; inset: 0; pointer-events: none; }
.stage .ground { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35) 12%, rgba(255,255,255,0.35) 88%, transparent); box-shadow: 0 0 12px rgba(255,255,255,0.2); }
.stage .ground-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent); }
.world { position: absolute; inset: 0; pointer-events: none; }
.obj { position: absolute; transform-origin: bottom left; }
.sil { position: absolute; inset: 0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-position: center; mask-position: center; }
.obj.ref .sil { background: linear-gradient(180deg, #cbd5e1, #64748b); }
.obj.ref { filter: drop-shadow(0 0 6px rgba(148, 163, 184, 0.35)); }
.obj.target { filter: drop-shadow(0 0 10px rgba(255, 210, 63, 0.55)); }
.obj.target .sil { background: linear-gradient(180deg, #ffe680, #ff8a3d); }
.obj.target.moved .sil { opacity: 0.68; }
.obj.target.active { animation: targetPulse 1.6s ease-in-out infinite; }
@keyframes targetPulse { 50% { filter: drop-shadow(0 0 18px rgba(255, 210, 63, 0.85)); } }
.obj.ghost { transition: opacity 0.3s; }
.obj.ghost .sil { background: var(--c); opacity: 0.28; }
.obj.ghost .ghost-top { position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); }
.obj.ghost.me .sil { opacity: 0.4; }
.obj.ghost.team-avg .sil { opacity: 0.18; }
.obj.ghost.team-avg { outline: 2px dashed var(--c); outline-offset: 0; }
.obj.truth { filter: drop-shadow(0 0 16px rgba(61, 255, 162, 0.8)); z-index: 5; }
.obj.truth .sil { background: linear-gradient(180deg, #9dffd0, #10b981); }
.obj.truth.grow { animation: truthGrow 0.9s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes truthGrow { from { transform: scale(0.001); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
.obj.truth.dim .sil { opacity: 0.85; }

.bracket { position: absolute; pointer-events: none; }
.bracket.v { border-left: 2px solid currentColor; }
.bracket.v::before, .bracket.v::after { content: ""; position: absolute; left: -6px; width: 10px; height: 2px; background: currentColor; }
.bracket.v::before { top: 0; }
.bracket.v::after { bottom: 0; }
.bracket.h { border-top: 2px solid currentColor; }
.bracket.h::before, .bracket.h::after { content: ""; position: absolute; top: -6px; width: 2px; height: 10px; background: currentColor; }
.bracket.h::before { left: 0; }
.bracket.h::after { right: 0; }
.bracket .blabel { position: absolute; white-space: nowrap; font-size: 0.75rem; font-weight: 800; padding: 0.15rem 0.45rem; border-radius: 6px; background: rgba(11, 11, 26, 0.85); border: 1px solid currentColor; }
.bracket.v .blabel { left: 8px; top: 50%; transform: translateY(-50%); }
.bracket.v.left .blabel { left: auto; right: 8px; }
.bracket.h .blabel { left: 50%; top: 6px; transform: translateX(-50%); }
.bracket.ref { color: #94a3b8; }
.bracket.target { color: var(--gold); }
.bracket.truth { color: var(--green); }
.bracket.truth .blabel { font-size: 0.95rem; box-shadow: 0 0 14px rgba(61, 255, 162, 0.5); }

.name-rail { position: absolute; inset: 0; pointer-events: none; }
.ghost-label { position: absolute; display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; font-size: 0.72rem; font-weight: 800; padding: 0.12rem 0.45rem; border-radius: 999px; background: rgba(11, 11, 26, 0.88); border: 1.5px solid var(--c); color: var(--text); transform: translateY(-50%); animation: popIn 0.3s cubic-bezier(.3,1.6,.5,1) both; }
.ghost-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.ghost-label .pts { color: var(--gold); margin-left: 0.2rem; }
.ghost-label .pts.neg { color: var(--red); }
.ghost-label.me { border-width: 2px; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.ghost-label.team { border-style: dashed; }
.leader-line { position: absolute; height: 1px; background: var(--c); opacity: 0.55; transform-origin: left center; }

.stage-hint { position: absolute; left: 12px; top: 12px; font-size: 0.75rem; color: var(--muted); background: rgba(11,11,26,0.7); padding: 0.25rem 0.7rem; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.stage-banner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 0.35rem 0.9rem; border-radius: 999px; font-weight: 800; font-size: 0.8rem; background: rgba(167, 139, 250, 0.2); border: 1px solid rgba(167, 139, 250, 0.5); color: #ddd6fe; pointer-events: none; z-index: 8; }
.stage-banner.warn { background: rgba(255, 77, 109, 0.2); border-color: rgba(255, 77, 109, 0.55); color: #fecdd3; }

.scale-readout { position: absolute; right: 14px; top: 12px; text-align: right; pointer-events: none; z-index: 6; }
.scale-readout .big { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--gold); text-shadow: 0 0 18px rgba(255, 210, 63, 0.5); line-height: 1; }
.scale-readout small { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 700; margin-top: 0.2rem; }

.controls { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 0.6rem; align-items: center; margin-top: 0.75rem; }
.controls .step-btn { width: 48px; height: 48px; border-radius: 14px; font-size: 1.4rem; font-weight: 900; background: var(--glass); border: 1px solid var(--stroke); cursor: pointer; }
.controls .step-btn:hover:not(:disabled) { background: var(--glass-strong); }
.slider-wrap { display: flex; align-items: center; gap: 0.6rem; }
.log-slider { flex: 1; appearance: none; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(61,224,255,0.4), rgba(255,210,63,0.6), rgba(255,77,141,0.5)); outline: none; }
.log-slider::-webkit-slider-thumb { appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); border: 3px solid #1a1000; box-shadow: 0 0 14px rgba(255, 210, 63, 0.8); cursor: grab; }
.log-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 3px solid #1a1000; box-shadow: 0 0 14px rgba(255, 210, 63, 0.8); cursor: grab; }
.log-slider:disabled { opacity: 0.4; }
.lock-btn { min-width: 170px; font-size: 1.1rem; letter-spacing: 0.06em; }
.lock-btn.locked { background: linear-gradient(135deg, var(--green), #10b981); color: #03140c; box-shadow: 0 0 24px rgba(61, 255, 162, 0.45); }
.conf-group { display: flex; gap: 0.3rem; }
.conf-btn { width: 46px; height: 48px; border-radius: 12px; font-weight: 900; background: var(--glass); border: 1.5px solid var(--stroke); cursor: pointer; transition: all 0.15s; }
.conf-btn.sel { border-color: var(--pink); background: rgba(255, 77, 141, 0.2); box-shadow: 0 0 14px rgba(255, 77, 141, 0.4); }
.conf-btn[data-c="3"].sel { animation: riskPulse 0.9s ease-in-out infinite; }
@keyframes riskPulse { 50% { box-shadow: 0 0 22px rgba(255, 77, 109, 0.8); } }
.conf-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.lock-status { width: 100%; text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; min-height: 1.2em; }

.sm-scoreboard .score-row .pts.neg { color: var(--red); }
.score-row.out { opacity: 0.4; text-decoration: line-through; }
.score-row .lk { width: 1.2rem; text-align: center; }
.score-row .streak-badge { font-size: 0.7rem; color: #fdba74; font-weight: 800; }
.team-score { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0.7rem; border-radius: 10px; margin-bottom: 0.4rem; border: 1.5px solid color-mix(in srgb, var(--team) 55%, transparent); background: color-mix(in srgb, var(--team) 12%, transparent); font-weight: 800; }
.team-score .pts { color: var(--team); font-variant-numeric: tabular-nums; }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(5, 5, 15, 0.55); backdrop-filter: blur(4px); animation: fadeIn 0.2s ease; }
.overlay.clear { background: transparent; backdrop-filter: none; pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; } }
.countdown-num { font-size: clamp(6rem, 22vw, 12rem); font-weight: 900; background: linear-gradient(135deg, var(--gold), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 40px rgba(255, 77, 141, 0.5)); animation: cdPop 0.9s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes cdPop { from { transform: scale(2.2); opacity: 0; } 40% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
.countdown-sub { text-align: center; color: var(--muted); font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; margin-top: -1rem; }

.reveal-panel { width: 100%; margin-top: 0.75rem; }
.results-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.35rem 0.6rem; padding: 0.7rem; border-radius: var(--radius-sm); background: rgba(11, 11, 26, 0.7); border: 1px solid var(--stroke); animation: rowIn 0.35s ease; }
.results-panel.teams { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.results-panel .res-row { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 0.5rem; padding: 0.3rem 0.35rem; border-radius: 8px; font-size: 0.82rem; opacity: 0; animation: rowIn 0.35s ease forwards; }
.results-panel .res-row.me { background: rgba(255, 210, 63, 0.1); }
.results-panel .res-row .who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results-panel .res-row .dev { color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.results-panel .res-row .pts { font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; min-width: 3.4rem; text-align: right; }
.results-panel .res-row .pts.neg { color: var(--red); }
.results-panel .res-row.out .who { text-decoration: line-through; color: #fda4af; }
.results-panel .team-block { margin-bottom: 0; border-radius: 10px; padding: 0.4rem; margin-bottom: 0.4rem; border: 1.5px solid color-mix(in srgb, var(--team) 55%, transparent); background: color-mix(in srgb, var(--team) 8%, transparent); }
.results-panel .team-head { display: flex; justify-content: space-between; font-weight: 900; color: var(--team); font-size: 0.85rem; padding: 0 0.3rem 0.2rem; }
.tag-x { font-size: 0.65rem; font-weight: 900; padding: 0.05rem 0.35rem; border-radius: 6px; background: rgba(255, 77, 141, 0.2); color: #ff9ec4; margin-left: 0.25rem; }
.tag-perfect { background: rgba(61, 255, 162, 0.2); color: var(--green); }
.tag-bust { background: rgba(255, 77, 109, 0.2); color: #fda4af; }

.truth-banner { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 9; text-align: center; padding: 0.5rem 1.1rem; border-radius: 14px; background: rgba(11, 11, 26, 0.88); border: 1.5px solid rgba(61, 255, 162, 0.6); box-shadow: 0 0 24px rgba(61, 255, 162, 0.35); animation: popIn 0.4s cubic-bezier(.3,1.6,.5,1) both; }
.truth-banner .tb-title { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.truth-banner .tb-val { font-size: 1.5rem; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.truth-banner .tb-ref { font-size: 0.75rem; color: #cbd5e1; }

.my-result { position: absolute; left: 16px; top: 14px; z-index: 9; text-align: left; animation: popIn 0.45s cubic-bezier(.3,1.6,.5,1) both; }
.my-result .mr-pts { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 900; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, var(--gold), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255, 138, 61, 0.5)); line-height: 1; }
.my-result .mr-pts.neg { background: linear-gradient(135deg, #ff4d6d, #b91c1c); -webkit-background-clip: text; background-clip: text; }
.my-result .mr-pts.perfect { background: linear-gradient(135deg, var(--green), var(--cyan)); -webkit-background-clip: text; background-clip: text; }
.my-result .mr-label { font-weight: 900; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }

.standings-panel { width: min(520px, 92vw); max-height: 80vh; overflow-y: auto; }
.standings-panel .elim-banner { text-align: center; font-weight: 900; font-size: 1.1rem; color: #fda4af; margin-bottom: 0.75rem; animation: shake 0.5s; }
.cat-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.6rem; margin: 1rem 0; }
.pick-timer { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.pick-timer > div { height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); animation: drain linear forwards; }

/* ---------- Ende ---------- */
.end-layout { width: 100%; max-width: 960px; display: grid; gap: 1.25rem; }
.end-layout .card { max-width: none; }
.winner-banner { text-align: center; }
.winner-banner .crown-big { font-size: 3.5rem; animation: bob 2.4s ease-in-out infinite; display: inline-block; }
.winner-banner h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0.2rem 0; }
.winner-banner h2 span { color: var(--gold); }
.winner-banner .sub { color: var(--muted); }
.rating-delta { display: inline-flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem; padding: 0.45rem 1rem; border-radius: 999px; background: rgba(167, 139, 250, 0.15); border: 1px solid rgba(167, 139, 250, 0.45); font-weight: 900; }
.rating-delta .up { color: var(--green); }
.rating-delta .down { color: var(--red); }
.awards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.award { position: relative; padding: 1rem; border-radius: var(--radius-sm); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, transparent), rgba(255,255,255,0.02)); border: 1.5px solid color-mix(in srgb, var(--c) 50%, transparent); text-align: center; opacity: 0; animation: awardIn 0.55s cubic-bezier(.3,1.5,.5,1) forwards; }
.award .aw-icon { font-size: 2.2rem; }
.award .aw-title { font-weight: 900; letter-spacing: 0.04em; margin: 0.2rem 0; }
.award .aw-name { color: var(--c); font-weight: 800; }
.award .aw-detail { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
@keyframes awardIn { from { opacity: 0; transform: translateY(20px) rotate(-3deg) scale(0.9); } to { opacity: 1; transform: none; } }
.final-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.final-table th { text-align: left; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.4rem 0.5rem; }
.final-table td { padding: 0.5rem; border-top: 1px solid var(--stroke); }
.final-table tr.me td { background: rgba(255, 210, 63, 0.06); }
.final-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.end-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.end-actions .btn { min-width: 180px; }

/* ---------- Leaderboard ---------- */
.lb-layout { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; align-items: start; }
.lb-layout .card { max-width: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.tab { padding: 0.45rem 0.8rem; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.tab.active { background: rgba(255, 210, 63, 0.15); border-color: rgba(255, 210, 63, 0.55); color: var(--gold); }
.lb-row { display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.6rem; align-items: center; padding: 0.5rem 0.6rem; border-radius: 10px; }
.lb-row:nth-child(odd) { background: rgba(255,255,255,0.03); }
.lb-row.me { background: rgba(255, 210, 63, 0.1); border: 1px solid rgba(255, 210, 63, 0.4); }
.lb-row .rk { font-weight: 900; color: var(--muted); text-align: center; }
.lb-row:nth-child(1) .rk { color: #ffd23f; }
.lb-row:nth-child(2) .rk { color: #e2e8f0; }
.lb-row:nth-child(3) .rk { color: #f0b27a; }
.lb-row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .nm small { color: var(--muted); font-weight: 600; margin-left: 0.3rem; }
.lb-row .vl { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--gold); text-align: right; }
.lb-row .vl small { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.stat { padding: 0.65rem; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--stroke); }
.stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.stat.wide { grid-column: span 2; }
.stat.wide b { font-size: 0.95rem; }

/* ---------- Anleitung ---------- */
.howto ol { padding-left: 1.2rem; display: grid; gap: 0.5rem; color: #cbd5e1; }
.howto kbd { padding: 0.1rem 0.4rem; border-radius: 5px; background: rgba(255,255,255,0.1); border: 1px solid var(--stroke); font-size: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .lobby-layout, .lb-layout { grid-template-columns: 1fr; }
    .game-layout.sm { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    :root { --stage-h: 46vh; }
    .mode-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-grid.three { grid-template-columns: 1fr 1fr; }
    .controls { grid-template-columns: auto 1fr auto; }
    .controls .lock-btn { grid-column: 1 / -1; }
    .controls .conf-group { grid-column: 1 / -1; justify-content: center; }
    .menu-grid { grid-template-columns: 1fr; }
    .team-cols { grid-template-columns: 1fr; }
    .my-result .mr-pts { font-size: 1.8rem; }
    .truth-banner { left: auto; right: 8px; top: 8px; transform: none; padding: 0.35rem 0.7rem; text-align: right; }
    .truth-banner .tb-ref { display: none; }
    .volume-box { display: none; }
    .brand { font-size: 1rem; white-space: nowrap; }
    .truth-banner .tb-val { font-size: 1.15rem; }
    .lobby-head .room-code { font-size: 1.9rem; }
}
