:root{--bg: #0d0f12;--surface: #16191e;--surface-high: #1e2228;--surface-higher: #282d35;--stroke: #2c323b;--orange: #ff6b00;--orange-deep: #d95700;--orange-glow: rgba(255, 107, 0, .15);--pitch: #1b8e4e;--green: #2fd27a;--gold: #ffc233;--silver: #c9d1db;--bronze: #e08a4b;--red: #ff5a4e;--sky: #4da3ff;--text-hi: #f3f4f6;--text-mid: #a3abb8;--text-low: #6b7380;--radius: 18px;--nav-h: 64px;color-scheme:dark;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg);color:var(--text-hi);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg)}body{overscroll-behavior-y:none}h1,h2,h3,p{margin:0}a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.45}input,textarea{font:inherit;color:var(--text-hi);background:var(--surface-high);border:1px solid var(--stroke);border-radius:12px;padding:12px 14px;width:100%;outline:none}input:focus,textarea:focus{border-color:var(--orange);box-shadow:0 0 0 3px var(--orange-glow)}:focus-visible{outline:2px solid var(--orange);outline-offset:2px}label{font-size:13px;font-weight:700;color:var(--text-mid);letter-spacing:.2px}.shell{max-width:560px;margin:0 auto;min-height:100dvh;padding:env(safe-area-inset-top) 16px 24px}.shell.center{display:grid;place-items:center}.shell.with-nav{padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px)}.page{display:flex;flex-direction:column;gap:14px;padding-top:8px}.muted{color:var(--text-mid)}.small-note{font-size:13px;margin-top:-6px}.error-text{color:var(--red);font-size:13px}.link{color:var(--orange);font-weight:700;font-size:14px}.up{color:var(--green)}.down{color:var(--red)}.page-header{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;min-height:52px}.page-header h1{font-size:20px;font-weight:900;text-align:center;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-btn{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:var(--surface);border:1px solid var(--stroke);font-size:22px;line-height:1}.icon-spacer{width:40px}.card{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);padding:16px}.section{display:flex;flex-direction:column;gap:10px;margin-top:6px}.section-head{display:flex;justify-content:space-between;align-items:baseline}.section-head h2{font-size:13px;text-transform:uppercase;letter-spacing:1.2px;color:var(--text-mid);font-weight:800}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:999px;padding:12px 20px;font-weight:800;font-size:15px;letter-spacing:.2px;min-height:46px}.btn-small{min-height:36px;padding:8px 14px;font-size:13px}.btn-block{width:100%}.btn-primary{background:var(--orange);color:#fff}.btn-primary:active:not(:disabled){background:var(--orange-deep)}.btn-ghost{background:var(--surface-high);border:1px solid var(--stroke)}.btn-danger{background:var(--red);color:#fff}.btn-danger-ghost{background:transparent;color:var(--red);border:1px solid rgba(255,90,78,.4)}.pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 10px;font-size:11px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;background:var(--surface-higher);color:var(--text-mid);white-space:nowrap}.pill-open{background:var(--orange-glow);color:var(--orange)}.pill-finished{background:#2fd27a1f;color:var(--green)}.tag{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.8px;color:var(--text-low);border:1px solid var(--stroke);border-radius:6px;padding:1px 5px;margin-left:6px;vertical-align:2px}.crest{object-fit:contain;flex-shrink:0}.crest-fallback{display:inline-grid;place-items:center;border-radius:50%;font-size:9px;font-weight:900;color:#fff}.avatar{display:inline-grid;place-items:center;border-radius:50%;color:#0d0f12;font-weight:900;flex-shrink:0}.user-line{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.user-line-text{display:flex;flex-direction:column;min-width:0}.user-line-text strong,.user-line-text small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-line-text small{color:var(--text-mid)}.list{display:flex;flex-direction:column;gap:8px}.list-row{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--stroke);border-radius:14px;padding:12px 14px;min-height:60px}.list-row.flat{background:none;border:0;padding:0;min-height:0}.list-row.me{border-color:var(--orange);background:linear-gradient(90deg,var(--orange-glow),var(--surface) 60%)}.list-main{display:flex;flex-direction:column;flex:1;min-width:0}.list-main strong,.list-main small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-side{display:flex;flex-direction:column;align-items:flex-end;font-variant-numeric:tabular-nums}.list-side strong{font-size:18px;font-weight:900}.badge{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-weight:900;color:#0d0f12;background:var(--orange);flex-shrink:0}.badge[data-color="1"]{background:#2fd27a}.badge[data-color="2"]{background:#4da3ff}.badge[data-color="3"]{background:#ffc233}.badge[data-color="4"]{background:#ff5a7a}.badge[data-color="5"]{background:#22c7c7}.badge[data-color="6"]{background:#b98cff}.badge[data-color="7"]{background:#e8e2d0}.medal{min-width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:13px;background:var(--surface-higher);color:var(--text-mid);flex-shrink:0}.medal.gold{background:var(--gold);color:#261a00}.medal.silver{background:var(--silver);color:#1b1f24}.medal.bronze{background:var(--bronze);color:#2a1300}.spinner-wrap{display:flex;align-items:center;justify-content:center;gap:10px;padding:24px;color:var(--text-mid)}.spinner{width:22px;height:22px;border-radius:50%;border:3px solid var(--stroke);border-top-color:var(--orange);animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-box{display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px;text-align:center;color:var(--text-mid)}.empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:24px 16px;border:1px dashed var(--stroke);border-radius:var(--radius);color:var(--text-mid)}.empty strong{color:var(--text-hi)}.tabbar{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:center;background:#0d0f12eb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid var(--stroke);padding-bottom:env(safe-area-inset-bottom);z-index:20}.tab{flex:1;max-width:112px;height:var(--nav-h);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;font-weight:700;color:var(--text-low)}.tab-icon{font-size:20px;line-height:1}.tab.active{color:var(--orange)}.toasts{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);display:flex;flex-direction:column;gap:8px;width:min(520px,calc(100% - 32px));z-index:40;pointer-events:none}.toast{background:var(--surface-higher);border:1px solid var(--stroke);border-radius:14px;padding:12px 14px;font-size:14px;font-weight:600;box-shadow:0 10px 30px #00000073;animation:rise .2s ease-out}.toast-success{border-color:#2fd27a80}.toast-error{border-color:#ff5a4e99}@keyframes rise{0%{opacity:0;transform:translateY(8px)}}.offline-banner{position:sticky;top:0;z-index:30;margin:0 -16px;padding:8px 16px;background:var(--surface-higher);color:var(--gold);font-size:13px;font-weight:700;text-align:center}.login{min-height:100dvh;display:flex;flex-direction:column;justify-content:space-between;padding:48px 0 24px}.login-hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px}.login-hero h1{font-size:44px;font-weight:900;letter-spacing:-1.6px}.login-hero p{color:var(--text-mid);font-size:17px;line-height:1.45;max-width:340px}.login-actions{display:flex;flex-direction:column;align-items:center;gap:16px}.google-button{min-height:44px;display:flex;justify-content:center}.dev-login{display:flex;flex-direction:column;gap:8px;width:100%;max-width:320px;padding:14px;border:1px dashed var(--stroke);border-radius:var(--radius)}.login-facts{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-direction:column;gap:8px;color:var(--text-mid);font-size:13px;text-align:center}.onboarding,.form{display:flex;flex-direction:column;gap:10px;padding:24px 0}.form{padding:0}.onboarding h1{font-size:30px;font-weight:900;letter-spacing:-.8px}.avatar-preview{width:88px;height:88px;border-radius:50%;display:grid;place-items:center;font-size:34px;font-weight:900;color:#0d0f12;margin:12px auto 4px}.color-row{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}.color-dot{width:32px;height:32px;border-radius:50%;border:3px solid transparent}.color-dot.selected{border-color:var(--text-hi)}.input-prefix{display:flex;align-items:center;background:var(--surface-high);border:1px solid var(--stroke);border-radius:12px;padding-left:14px}.input-prefix span{color:var(--text-mid);font-weight:700}.input-prefix input{border:0;background:transparent;box-shadow:none}.team-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;margin-bottom:12px}.team-chip{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:12px;background:var(--surface);border:1px solid var(--stroke);font-size:13px;font-weight:700}.team-chip.selected{border-color:var(--orange);background:var(--orange-glow)}.home-header{display:flex;justify-content:space-between;align-items:center;padding-top:12px}.home-header h1{font-size:30px;font-weight:900;letter-spacing:-.8px}.balance-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;background:var(--surface);border:1px solid var(--stroke);font-weight:900;font-variant-numeric:tabular-nums}.coin{color:var(--gold)}.bonus-banner,.invite-banner{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;border-radius:var(--radius);padding:14px 16px;border:1px solid rgba(255,194,51,.4);background:linear-gradient(120deg,rgba(255,194,51,.16),var(--surface))}.bonus-banner span{color:var(--text-mid);font-size:13px}.invite-banner{border-color:#4da3ff66;background:linear-gradient(120deg,rgba(77,163,255,.16),var(--surface));font-weight:700}.hero-card{cursor:pointer;display:flex;flex-direction:column;gap:12px;background:radial-gradient(120% 140% at 100% 0%,rgba(27,142,78,.35),var(--surface) 55%)}.hero-top,.hero-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.hero-card h2{font-size:32px;font-weight:900;letter-spacing:-.8px}.crest-strip{display:flex;gap:10px;flex-wrap:wrap}.mini-match{display:inline-flex;gap:2px;align-items:center}.progress{height:6px;border-radius:6px;background:var(--surface-higher);overflow:hidden}.progress-bar{height:100%;background:var(--orange);border-radius:6px;transition:width .3s}.last-round{display:flex;justify-content:space-between;align-items:center;cursor:pointer}.last-round h3{font-size:22px;font-weight:900}.last-round-stats{display:flex;flex-direction:column;align-items:flex-end;font-size:13px;color:var(--text-mid)}.round-number{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--surface-higher);font-weight:900;flex-shrink:0}.status-open .round-number{background:var(--orange);color:#fff}.round-status{display:flex;flex-direction:column;gap:6px;font-size:14px}.score-summary{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.score-summary strong{font-size:34px;font-weight:900;color:var(--orange)}.score-summary span{color:var(--text-mid)}.queued-note{color:var(--gold);font-weight:700}.match{display:flex;flex-direction:column;gap:10px;padding:14px}.match-joker{border-color:var(--gold);box-shadow:inset 0 0 0 1px #ffc2334d}.match-meta{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--text-mid);text-transform:capitalize}.joker-btn{border:1px solid var(--stroke);background:var(--surface-high);border-radius:999px;padding:4px 10px;font-size:12px;font-weight:800;color:var(--text-mid);text-transform:none}.joker-btn.on{border-color:var(--gold);color:var(--gold);background:#ffc2331f}.match-body{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.team{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:13px;font-weight:800;text-align:center}.score-edit{display:flex;align-items:center;gap:6px}.times{color:var(--text-low);font-weight:800}.stepper{display:flex;flex-direction:column;align-items:center;background:var(--surface-high);border:1px solid var(--stroke);border-radius:14px;overflow:hidden}.stepper button{width:44px;height:30px;border:0;background:transparent;font-size:20px;font-weight:700;color:var(--text-mid)}.stepper span{font-size:26px;font-weight:900;font-variant-numeric:tabular-nums;min-width:44px;text-align:center}.stepper-empty span{color:var(--text-low)}.score-box{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:120px}.result{font-size:30px;font-weight:900;font-variant-numeric:tabular-nums}.result span,.result.pending{color:var(--text-low);font-size:18px}.match-score{display:flex;justify-content:space-between;align-items:center;border-radius:10px;padding:8px 12px;font-size:13px;font-weight:700;background:var(--surface-high);color:var(--text-mid)}.match-score strong{font-size:16px}.outcome-exact{background:#ffc23324;color:var(--gold)}.outcome-difference,.outcome-outcome{background:#2fd27a1f;color:var(--green)}.goals{display:flex;flex-wrap:wrap;gap:6px}.goal{font-size:12px;color:var(--text-mid);background:var(--surface-high);border-radius:8px;padding:3px 8px}.goal.mine{color:var(--gold);background:#ffc23324}.search{margin-bottom:8px}.player-list{display:flex;flex-direction:column;gap:4px;max-height:340px;overflow-y:auto}.player-row{display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px;border:0;background:transparent;text-align:left}.player-row:hover{background:var(--surface-high)}.scorer-selected{display:flex;align-items:center;gap:12px}.scorer-selected>span{display:flex;flex-direction:column;flex:1}.hit{color:var(--green)}.miss{color:var(--text-low)}.save-bar{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px);width:min(528px,calc(100% - 32px));display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 10px 10px 16px;background:#1e2228f5;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--stroke);border-radius:999px;font-size:13px;font-weight:700;z-index:25;box-shadow:0 10px 30px #00000080}.round-page{padding-bottom:76px}.filter-row{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.chip{border:1px solid var(--stroke);background:var(--surface);border-radius:999px;padding:8px 14px;font-size:13px;font-weight:800;white-space:nowrap;color:var(--text-mid)}.chip.active{background:var(--orange);border-color:var(--orange);color:#fff}.my-rank{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-radius:var(--radius);background:linear-gradient(120deg,var(--orange-glow),var(--surface));border:1px solid rgba(255,107,0,.4);font-weight:700}.my-rank strong{font-size:28px;font-weight:900;color:var(--orange)}.join-code{display:flex;gap:8px}.join-code input{text-transform:uppercase;letter-spacing:3px;font-weight:800}.invite-card{display:flex;flex-direction:column;gap:10px}.row-actions{display:flex;justify-content:flex-end;gap:8px}.group-info{display:flex;flex-direction:column;gap:12px}.group-tags{display:flex;gap:6px;flex-wrap:wrap}.rules-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.rules-summary span{display:flex;flex-direction:column;font-size:11px;color:var(--text-mid);background:var(--surface-high);border-radius:10px;padding:8px}.rules-summary strong{font-size:16px;color:var(--text-hi)}.code-card{display:flex;flex-direction:column;align-items:center;gap:8px}.invite-code{font-size:34px;font-weight:900;letter-spacing:8px;color:var(--orange)}.leave{margin-top:16px}.segmented{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:var(--surface);border:1px solid var(--stroke);border-radius:14px;padding:4px}.segmented button{border:0;background:transparent;border-radius:10px;padding:10px;font-size:13px;font-weight:800;color:var(--text-mid)}.segmented button.active{background:var(--surface-higher);color:var(--text-hi)}.rules-editor{display:flex;flex-direction:column;gap:10px}.preset-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.preset{display:flex;flex-direction:column;gap:4px;text-align:left;padding:12px;border-radius:14px;border:1px solid var(--stroke);background:var(--surface)}.preset small{color:var(--text-mid);font-size:12px;line-height:1.3}.preset.selected{border-color:var(--orange);background:var(--orange-glow)}.rules-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rule-input{display:flex;flex-direction:column;gap:6px;background:var(--surface);border:1px solid var(--stroke);border-radius:12px;padding:10px}.rule-value{display:flex;align-items:center;gap:6px;color:var(--text-hi)}.rule-value input{padding:8px;width:70px}.profile-card{display:flex;align-items:center;gap:14px}.profile-card>div{flex:1;display:flex;flex-direction:column;min-width:0}.profile-card h2{font-size:20px;font-weight:900}.favorite{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--text-mid);margin-top:4px}.stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.stat-grid div{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--stroke);border-radius:14px;padding:14px}.stat-grid strong{font-size:26px;font-weight:900;font-variant-numeric:tabular-nums}.stat-grid small{color:var(--text-mid);font-size:12px}.account,.danger-zone{display:flex;flex-direction:column;gap:10px;font-size:14px;line-height:1.45}.danger-zone{border-color:#ff5a4e66}.privacy{line-height:1.55;padding-bottom:32px}.privacy h2{font-size:17px;font-weight:800;margin-top:8px}.privacy p,.privacy li{color:var(--text-mid);font-size:15px}.privacy ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}@media(min-width:600px){.stat-grid{grid-template-columns:repeat(4,1fr)}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
