:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --card: #ffffff;
  --card-soft: #f6f8fc;
  --text: #162033;
  --muted: #66768b;
  --accent: #1976d2;
  --accent-text: #ffffff;
  --success: #36d392;
  --warning: #ffc660;
  --danger: #ff7b87;
  --line: rgba(25, 49, 80, .13);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { min-height: 50px; border: 0; border-radius: 15px; cursor: pointer; font-weight: 850; }
.shell { width: min(100%, 520px); margin: 0 auto; padding: 14px 14px calc(40px + env(safe-area-inset-bottom)); }
.app-head { min-height: 130px; display: flex; align-items: center; justify-content: space-between; padding: 15px 8px 10px; }
.app-head .eyebrow { margin: 0 0 8px; }
.app-head h1 { margin: 0; font-size: 42px; }
.ball-small { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: #dceeff; font-size: 38px; transform: rotate(5deg); box-shadow: 0 14px 35px rgba(35, 78, 125, .16); }
.title-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 3px 10px; }
.title-row h2 { margin: 0; }
.mini { min-height: 36px; padding: 0 12px; font-size: 12px; }
.games { display: grid; gap: 10px; }
.game-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; width: 100%; min-height: 112px; padding: 17px 48px 17px 18px; text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.game-card.is-confirmed { border-color: rgba(20, 157, 101, .38); }
.game-card .game-day { color: var(--accent); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.game-card strong { grid-column: 1; font-size: 25px; letter-spacing: -.03em; }
.game-card .game-info { grid-column: 1 / span 2; color: var(--muted); font-size: 12px; }
.game-status { align-self: start; justify-self: end; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.game-status.confirmed { color: #071d15; background: var(--success); }
.game-status.pending { color: #241603; background: var(--warning); }
.game-card i { position: absolute; right: 17px; top: 50%; transform: translateY(-50%); font-size: 28px; color: var(--muted); font-style: normal; }
.profile-card { border-color: rgba(25, 118, 210, .3); }
.profile-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.profile-summary .eyebrow { margin: 0 0 5px; }
.profile-summary strong { font-size: 17px; }
.hero { min-height: 285px; padding: 24px; position: relative; overflow: hidden; border-radius: 30px; background: radial-gradient(circle at 82% 18%, rgba(25, 118, 210, .18) 0 12%, transparent 37%), linear-gradient(135deg, #dceeff, #f4f9ff); border: 1px solid rgba(25, 118, 210, .22); }
.hero::after { content: ""; position: absolute; inset: auto -60px -130px auto; width: 300px; height: 300px; border: 1px solid rgba(25, 118, 210, .18); border-radius: 50%; }
.ball { position: absolute; right: 25px; top: 55px; font-size: 72px; filter: drop-shadow(0 15px 20px rgba(35, 78, 125, .2)); transform: rotate(12deg); }
.back { position: relative; z-index: 2; min-height: 34px; padding: 0 11px; color: var(--text); background: rgba(255, 255, 255, .72); border: 1px solid var(--line); font-size: 12px; }
.eyebrow { margin: 52px 0 6px; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(45px, 13vw, 68px); line-height: .95; letter-spacing: -.06em; }
h2 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.03em; }
h3 { color: var(--text); }
.meta { position: absolute; left: 24px; bottom: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.meta span { padding: 8px 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .72); border-radius: 100px; font-size: 13px; }
.card { margin-top: 12px; padding: 20px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.section-head .eyebrow, .card > .eyebrow, .game-state-card .eyebrow { margin: 0 0 5px; }
.meter { width: 82px; height: 7px; background: #e3eaf3; border-radius: 99px; overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s ease; }
.roster { margin: 20px 0; padding: 0; list-style-position: inside; }
.roster-group { margin-top: 20px; padding-top: 2px; }
.roster-group + .roster-group { border-top: 1px solid var(--line); padding-top: 18px; }
.roster-group h3 { display: flex; justify-content: space-between; margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.roster-group h3 span { color: var(--text); }
.roster-group .roster { margin: 8px 0 15px; }
.substitutes { background: rgba(98, 185, 255, .035); margin-inline: -10px; padding-inline: 10px; border-radius: 14px; }
.reserve h3 { color: var(--warning); }
.roster li { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.roster li::before { content: attr(data-number); width: 23px; color: var(--muted); font-variant-numeric: tabular-nums; }
.roster .empty { color: var(--muted); }
.name { flex: 1; font-weight: 700; }
.you, .paid, .checking, .guest-badge { padding: 4px 7px; border-radius: 99px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.you { color: #0f5a9e; background: #e1f0ff; }
.guest-badge { color: #66500b; background: #fff1b9; }
.paid { color: #061c14; background: var(--success); }
.checking { color: #271802; background: var(--warning); }
.remove-guest { min-height: 28px; padding: 0 8px; color: #b32635; background: #fff0f2; border: 1px solid #ffd0d5; font-size: 10px; }
.actions { display: grid; gap: 8px; }
.primary { background: var(--accent); color: var(--accent-text); }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.danger-button { width: 100%; margin-top: 22px; color: #2b0509; background: var(--danger); }
.delete-hint { margin: 8px 4px 0; text-align: center; font-size: 11px; line-height: 1.4; }
.game-state-card { display: flex; align-items: center; gap: 14px; border-color: rgba(255, 189, 89, .38); }
.game-state-card.confirmed { border-color: rgba(53, 215, 149, .42); }
.game-state-card .state-icon { flex: 0 0 50px; display: grid; place-items: center; width: 50px; height: 50px; color: #261702; background: var(--warning); border-radius: 16px; font-size: 24px; font-weight: 900; }
.game-state-card.confirmed .state-icon { color: #061c14; background: var(--success); }
.game-state-card p:last-child { margin: 7px 0 0; line-height: 1.45; }
.payment-card { text-align: center; border-color: rgba(98, 185, 255, .34); }
.payment-card > img { display: block; width: min(100%, 290px); aspect-ratio: 1; object-fit: contain; margin: 18px auto 12px; background: white; border-radius: 18px; padding: 10px; }
.payment-card #save-qr { width: min(100%, 290px); }
.save-hint { max-width: 330px; margin: 8px auto 18px; font-size: 12px; line-height: 1.4; }
.payment-note { margin: 16px 0; font-weight: 800; }
.receipt-state { display: grid; gap: 14px; padding: 16px; text-align: left; background: var(--card-soft); border: 1px solid var(--line); border-radius: 17px; }
.receipt-state strong { font-size: 17px; }
.receipt-state p { margin: 5px 0 0; line-height: 1.4; }
.receipt-pending { border-color: rgba(255, 189, 89, .45); }
.receipt-approved { border-color: rgba(53, 215, 149, .48); }
.receipt-rejected { border-color: rgba(255, 113, 128, .48); }
.file-button { display: grid; place-items: center; min-height: 48px; border-radius: 14px; font-size: 14px; cursor: pointer; }
.muted, .status { color: var(--muted); }
form { display: grid; gap: 13px; margin-top: 18px; }
.friend-form { margin-top: 16px; padding: 16px; background: #f6f9fd; border: 1px solid var(--line); border-radius: 17px; }
.friend-form h3, .friend-form p { margin: 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select { width: 100%; min-height: 45px; padding: 0 12px; color: var(--text); background: #ffffff; border: 1px solid var(--line); border-radius: 11px; }
input[type="file"] { padding: 10px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payments-list { margin-top: 24px; }
.payments-list > h3 { margin: 0 0 8px; }
.payment-row { display: grid; grid-template-columns: 50px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.payment-row > span { min-width: 0; }
.payment-row small { display: block; margin: 3px 0 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.receipt-thumb, .receipt-empty { width: 50px; height: 50px; border-radius: 10px; }
.receipt-thumb { object-fit: cover; background: white; cursor: zoom-in; }
.receipt-empty { display: grid; place-items: center; color: var(--muted); background: #eef2f7; }
.status-badge { display: inline-block; padding: 4px 7px; border-radius: 999px; font-size: 9px; }
.status-badge.approved { color: #061c14; background: var(--success); }
.status-badge.pending { color: #271802; background: var(--warning); }
.status-badge.rejected { color: #2b0509; background: var(--danger); }
.status-badge.none { color: var(--muted); background: #eef2f7; }
.friend-payments { display: grid; gap: 10px; margin-top: 12px; text-align: left; }
.friend-payment { display: grid; gap: 12px; padding: 16px; background: var(--card-soft); border: 1px solid var(--line); border-radius: 17px; }
.friend-payment strong { display: block; margin-top: 3px; font-size: 16px; }
.friend-payment p { margin: 5px 0 0; }
.friend-payment-label { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.friend-paid { justify-self: start; padding: 7px 10px; color: #061c14; background: var(--success); border-radius: 999px; font-size: 11px; }
.reserve-payment { border-color: rgba(255, 174, 48, .42); }
.payment-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.payment-actions button { min-height: 38px; padding: 0 10px; font-size: 12px; }
.payment-actions .approve { color: #061c14; background: var(--success); }
.payment-actions .reject { color: #2b0509; background: var(--danger); }
.status { min-height: 20px; text-align: center; font-size: 13px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
@media (prefers-reduced-motion: no-preference) { .card { animation: rise .35s ease both; } @keyframes rise { from { opacity: 0; transform: translateY(8px); } } }
@media (max-width: 380px) { .app-head h1 { font-size: 36px; } .grid { grid-template-columns: 1fr; } .roster li { gap: 5px; } .you, .paid, .checking, .guest-badge { font-size: 8px; padding-inline: 5px; } }
