:root {
  --bg: #041f2e;
  --bg-2: #072b3f;
  --card: #0a3047;
  --card-2: #0f3d58;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef6f9;
  --muted: #8db0c0;
  --green: #6fd000;
  --green-2: #35a300;
  --green-ink: #062205;
  --danger: #ff6b5e;
  --warn: #ffc233;
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.9rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1rem; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px; }
.topbar {
  position: sticky; top: 0; z-index: 40; background: rgba(4, 31, 46, 0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 10px; height: 82px; }
.brand { display: flex; align-items: center; flex: 1; min-width: 0; }
.brand img { height: 32px; width: auto; }
main.page { padding: 22px 0 90px; }
.page-title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-title .sport-badge { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(145deg, var(--green), var(--green-2)); color: var(--green-ink); display: grid; place-items: center; flex: none; }
.page-title .sport-badge svg { width: 30px; height: 30px; }
.page-title .sub { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 700; font-size: 0.98rem; background: var(--card-2); color: var(--text);
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #8be000 0%, #46b400 100%); color: var(--green-ink); box-shadow: 0 6px 18px rgba(80, 200, 0, 0.25); }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); }
.btn.danger { background: rgba(255, 107, 94, 0.14); color: var(--danger); }
.btn.sm { padding: 8px 16px; font-size: 0.88rem; }
.btn.lg { padding: 16px 28px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2);
  display: grid; place-items: center; padding: 0; color: var(--text);
}
.icon-btn:hover { background: var(--card); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.danger { color: var(--danger); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; font-size: 0.9rem; }
.link-btn:hover { color: var(--text); }

/* ---------- Cards & forms ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.flat { background: var(--bg-2); }
.card h2 + * { margin-top: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.section-title h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.input, select.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px;
  font-size: 1rem; outline: none; transition: border-color 0.15s, box-shadow 0.15s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238db0c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(111, 208, 0, 0.18); }
.input::placeholder { color: #5f8393; }
input[type="time"].input, input[type="date"].input { min-height: 48px; }
.hint { font-size: 0.85rem; color: var(--muted); }
.note { background: rgba(111, 208, 0, 0.08); border: 1px solid rgba(111, 208, 0, 0.22); color: #c9ec9a; border-radius: 12px; padding: 11px 14px; font-size: 0.88rem; }
.error { background: rgba(255, 107, 94, 0.12); border: 1px solid rgba(255, 107, 94, 0.35); color: #ffb3ab; border-radius: 12px; padding: 11px 14px; font-size: 0.92rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .grid-2.stack-sm { grid-template-columns: 1fr; } }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 36px 18px 60px; }
.auth-wrap .logo { width: 270px; margin: 0 auto 28px; }
.auth-wrap h1 { text-align: center; font-size: 1.6rem; margin-bottom: 8px; }
.auth-wrap .lede { text-align: center; color: var(--muted); margin-bottom: 24px; }

/* ---------- Wizard ---------- */
.wizard { max-width: 560px; margin: 0 auto; }
.progress { display: flex; gap: 6px; margin: 4px 0 22px; }
.progress span { flex: 1; height: 5px; border-radius: 5px; background: var(--card-2); }
.progress span.done { background: var(--green); }
.step-kicker { color: var(--green); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.wizard h1 { margin-bottom: 8px; }
.wizard .lede { color: var(--muted); margin-bottom: 22px; }
.wizard-actions { display: flex; gap: 10px; margin-top: 26px; align-items: center; }
.wizard-actions .grow { display: block; }
.sport-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 520px) { .sport-grid { grid-template-columns: repeat(4, 1fr); } }
.sport-tile {
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 18px 8px 14px; display: flex; flex-direction: column;
  align-items: center; gap: 10px; font-weight: 600; font-size: 0.92rem; transition: 0.15s;
}
.sport-tile svg { width: 44px; height: 44px; color: #cfe5ee; }
.sport-tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.sport-tile.on { border-color: var(--green); background: rgba(111, 208, 0, 0.1); }
.sport-tile.on svg { color: var(--green); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: var(--bg-2); font-weight: 600; font-size: 0.92rem; transition: 0.12s;
}
.pill:hover { border-color: var(--muted); }
.pill.on { border-color: var(--green); background: rgba(111, 208, 0, 0.14); }
.pill:disabled, .pill.off { opacity: 0.35; cursor: not-allowed; }
.pill .dot, .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.35); flex: none; display: inline-block; }
.day-pills .pill { min-width: 62px; justify-content: center; }
.colour-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .colour-cols { grid-template-columns: 1fr; } }
.colour-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.colour-col h3 { display: flex; align-items: center; gap: 9px; }
.colour-col h3 .muted { font-weight: 500; }
.add-colour { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.add-colour .row { gap: 8px; }
.add-colour input[type="color"] { width: 44px; height: 44px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); flex: none; }
.add-colour .input { padding: 11px 12px; }
.photo-pick { display: flex; align-items: center; gap: 16px; }
.photo-pick .avatar { width: 84px; height: 84px; font-size: 1.6rem; }
.points-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preview { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.preview th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 8px 8px 0; }
.preview td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); }
.preview td.pts, .preview th.pts { text-align: center; }
.preview td.pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.preview .up { color: var(--green); } .preview .down { color: var(--warn); }

/* ---------- Avatar ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  font-weight: 800; font-size: 0.95rem; color: #fff; background: #2a5b78; object-fit: cover; user-select: none;
}
.avatar.lg { width: 92px; height: 92px; font-size: 2rem; }
.avatar.md { width: 48px; height: 48px; font-size: 1.05rem; }
.avatar.sm { width: 32px; height: 32px; font-size: 0.8rem; }

/* ---------- Dashboard ---------- */
.next-match { background: linear-gradient(135deg, #0f4a3a 0%, var(--card) 70%); border: 1px solid rgba(111, 208, 0, 0.3); border-radius: var(--radius); padding: 18px; }
.next-match .kicker { color: var(--green); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.next-match .when { font-size: 1.25rem; font-weight: 800; margin: 6px 0 2px; letter-spacing: -0.01em; }
.next-match .where { color: var(--muted); font-size: 0.93rem; }
.wins-bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.wins-bar .side { border-radius: 14px; padding: 14px 10px; text-align: center; border: 1px solid var(--line); background: var(--card); position: relative; overflow: hidden; }
.wins-bar .side::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.wins-bar .num { font-size: 2.2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wins-bar .lab { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.wins-bar .mid { display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--muted); font-size: 0.75rem; padding: 0 4px; }
.wins-bar .mid b { font-size: 1.2rem; color: var(--text); }
.rank { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.rank-head, .rank-row { display: grid; grid-template-columns: 30px 1fr 56px 112px; align-items: center; gap: 10px; padding: 0 14px; }
.rank-head { height: 38px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: rgba(0, 0, 0, 0.15); }
.rank-row { min-height: 62px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; transition: background 0.12s; }
button.rank-row:hover { background: rgba(255, 255, 255, 0.04); }
.rank-row .pos { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-row:nth-child(2) .pos { color: #ffd54a; }
.rank-row:nth-child(3) .pos { color: #cfd8dc; }
.rank-row:nth-child(4) .pos { color: #e0a070; }
.rank-row .who { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 600; }
.rank-row .pts { font-weight: 800; font-size: 1.1rem; text-align: right; font-variant-numeric: tabular-nums; }
.rank-head .pts { text-align: right; }
.form-dots { display: flex; gap: 4px; justify-content: flex-end; }
.fd { width: 18px; height: 18px; border-radius: 5px; font-size: 0.65rem; font-weight: 800; display: grid; place-items: center; color: #04210a; }
.fd.W { background: var(--green); } .fd.D { background: var(--warn); } .fd.L { background: var(--danger); color: #2b0a07; }
.fd.none { background: rgba(255, 255, 255, 0.08); }
.rank-foot { padding: 14px; border-top: 1px solid var(--line); }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat .lab { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.stat .val { font-size: 1.25rem; font-weight: 800; margin: 6px 0 2px; letter-spacing: -0.01em; }
.stat .nm { font-weight: 600; font-size: 0.95rem; }
.stat .nt { color: var(--muted); font-size: 0.78rem; }
.match-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.match-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; width: 100%; }
.match-item:first-child { border-top: 0; }
button.match-item:hover { background: rgba(255, 255, 255, 0.04); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; background: var(--card-2); }
.badge .dot { width: 10px; height: 10px; }
.badge.ok { background: rgba(111, 208, 0, 0.16); color: #b6ee6c; }
.badge.warn { background: rgba(255, 194, 51, 0.15); color: var(--warn); }

/* ---------- Menu (drops from top) ---------- */
.menu-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(2, 12, 18, 0.62); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.menu-panel {
  position: fixed; left: 0; right: 0; top: 0; z-index: 70; background: var(--bg-2); border-bottom: 1px solid var(--line-2);
  border-radius: 0 0 22px 22px; padding: 14px 18px 22px; transform: translateY(-105%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}
.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
.menu-open .menu-panel { transform: none; }
.menu-panel .inner { max-width: 760px; margin: 0 auto; }
.menu-top { display: flex; align-items: center; justify-content: space-between; height: 46px; margin-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 12px; border: 0; background: none; border-radius: 12px; font-size: 1.1rem; font-weight: 600; text-align: left; }
.menu-item:hover { background: rgba(255, 255, 255, 0.05); }
.menu-item svg { width: 22px; height: 22px; color: var(--green); }
.menu-item.out svg { color: var(--muted); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- Modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(2, 12, 18, 0.72); animation: fade 0.18s; }
@media (min-width: 640px) { .modal-wrap { align-items: center; } }
.modal { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 22px 22px 0 0; padding: 22px 20px 26px; animation: rise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (min-width: 640px) { .modal { border-radius: 22px; } }
.modal h2 { font-size: 1.3rem; margin-bottom: 4px; }
.modal .actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal .actions .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.winner-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 14px; }
.winner-btn { border: 0; border-radius: 20px; padding: 34px 10px; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; transition: transform 0.1s; box-shadow: inset 0 -6px 0 rgba(0,0,0,0.18); }
.winner-btn:active { transform: scale(0.96); }
.winner-btn small { font-size: 0.78rem; font-weight: 600; opacity: 0.75; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { background: #e8f3f8; color: #062033; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 0.93rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: rise 0.2s; max-width: 420px; }
.toast.bad { background: #ffd9d4; color: #4a0e08; }

/* ---------- Match page ---------- */
.match-head { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.match-head .date { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.meta-row { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--muted); font-size: 0.93rem; }
.meta-row b { color: var(--text); font-weight: 600; }
.group-head { display: flex; align-items: center; gap: 10px; padding: 14px 4px 8px; font-weight: 700; font-size: 0.92rem; }
.group-head .dot { width: 16px; height: 16px; }
.group-head .count { margin-left: auto; color: var(--muted); font-weight: 600; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.prow .name { font-weight: 600; flex: 1; min-width: 0; }
.prow .earned { font-size: 0.8rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(111,208,0,0.16); color: #b6ee6c; }
.prow .earned.L { background: rgba(255,107,94,0.14); color: #ffb3ab; }
.prow .earned.D { background: rgba(255,194,51,0.15); color: var(--warn); }
.team-box { width: 38px; height: 38px; border-radius: 11px; border: 2px solid var(--c); background: transparent; display: grid; place-items: center; padding: 0; color: transparent; transition: 0.12s; position: relative; }
.team-box.on { background: var(--c); color: var(--ink, #fff); box-shadow: 0 0 0 3px rgba(255,255,255,0.14); }
.team-box svg { width: 20px; height: 20px; }
.team-box:not(.on):hover { background: color-mix(in srgb, var(--c) 28%, transparent); }
.result-banner { border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; background: rgba(111,208,0,0.1); border: 1px solid rgba(111,208,0,0.3); }
.result-banner.pending { background: rgba(255,194,51,0.1); border-color: rgba(255,194,51,0.35); }
.result-banner .dot { width: 22px; height: 22px; }
.pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; margin: 14px 0; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); width: 100%; text-align: left; }
.pick.on { border-color: var(--green); background: rgba(111,208,0,0.1); }
.pick .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; flex: none; }
.pick.on .tick { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.pick .tick svg { width: 14px; height: 14px; }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; }
.chip b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.chip span { font-size: 0.7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.chart-card h3 { font-size: 0.88rem; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.chart-card svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-card text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 0.92rem; margin-bottom: 14px; background: none; border: 0; padding: 0; }
.back:hover { color: var(--text); text-decoration: none; }
.back svg { width: 18px; height: 18px; }

/* ---------- Cropper ---------- */
.crop-stage { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin: 16px auto 8px; border-radius: 14px; overflow: hidden; background: #000; touch-action: none; cursor: grab; user-select: none; }
.crop-stage.drag { cursor: grabbing; }
.crop-stage canvas { width: 100%; height: 100%; display: block; }
.crop-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.85); background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px); background-size: 33.333% 33.333%; }
.zoom { width: 100%; accent-color: var(--green); }

/* ---------- Install banner / games menu ---------- */
.install { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 16px 40px rgba(0,0,0,.5); max-width: 520px; margin: 0 auto; animation: rise .25s; }
.install img { width: 46px; height: 46px; border-radius: 11px; }
.install .t { font-weight: 700; } .install .s { font-size: .84rem; color: var(--muted); }
.game-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); width: 100%; text-align: left; transition: .15s; color: inherit; text-decoration: none !important; }
.game-card:hover { border-color: rgba(111,208,0,.5); transform: translateY(-1px); }
.game-card .sport-badge { width: 48px; height: 48px; border-radius: 13px; background: linear-gradient(145deg, var(--green), var(--green-2)); color: var(--green-ink); display: grid; place-items: center; flex: none; }
.game-card .sport-badge svg { width: 28px; height: 28px; }
.game-card .name { font-weight: 700; font-size: 1.05rem; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--card-2); border-top-color: var(--green); animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.share-link { display: flex; gap: 8px; }
.share-link .input { font-size: .92rem; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.venue-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.venue-row:first-child { border-top: 0; }
.tag-x { background: none; border: 0; color: var(--muted); padding: 0 0 0 2px; font-size: 1.1rem; line-height: 1; }
.tag-x:hover { color: var(--danger); }

/* chevron / trailing icons in list cards */
.game-card > svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.nick { color: var(--muted); font-weight: 500; }
.nick-line { color: var(--green); font-weight: 600; margin-top: 2px; }

.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.nick-sub { color: var(--muted); font-weight: 500; font-size: 0.78rem; margin-top: 1px; }
.prow .name .who-text { font-weight: 600; }
@media (max-width: 480px) {
  .rank-head, .rank-row { grid-template-columns: 22px 1fr 46px 104px; gap: 8px; padding: 0 12px; }
  .rank-row .who { gap: 10px; }
  .rank-row .avatar { width: 36px; height: 36px; font-size: 0.85rem; }
}
