:root{color-scheme:light dark;--bg: #f2f4ef;--surface: #ffffff;--surface-2: #f5f7f2;--surface-3: #e7ebe4;--text: #0f1512;--text-2: #4d5850;--muted: #6b766e;--line: #d9ded8;--lime: #a8e600;--lime-ink: #0f1512;--lime-text: #4f7a00;--lime-soft: #edf9cc;--court: #0f5b3a;--court-deep: #083d27;--court-soft: #dcefe4;--danger: #d8402a;--danger-soft: #fde6e1;--warn: #c27a00;--warn-soft: #fff1d6;--info: #2a6fd6;--info-soft: #e3edfc;--accent: var(--court);--accent-deep: var(--court-deep);--shadow-float: 0 12px 32px -12px rgba(15, 21, 18, .35);--shadow-card: 0 1px 2px rgba(15, 21, 18, .04), 0 8px 24px -16px rgba(15, 21, 18, .18);--radius-card: 22px;--radius-field: 14px;--radius-pill: 999px;--font-display: "Kanit", "Noto Sans Thai", system-ui, sans-serif;--font-body: "Noto Sans Thai", "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif;--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--tabbar-h: 0px}@media(prefers-color-scheme:dark){:root{--bg: #0b0f0d;--surface: #151b18;--surface-2: #1d2521;--surface-3: #27302b;--text: #f2f5f0;--text-2: #b8c2ba;--muted: #8a958d;--line: #2b3530;--lime: #c6ff3d;--lime-ink: #0b0f0d;--lime-text: #c6ff3d;--lime-soft: rgba(198, 255, 61, .14);--court: #1e7a4e;--court-deep: #0f4a2f;--court-soft: rgba(30, 122, 78, .22);--danger: #ff6a52;--danger-soft: rgba(255, 106, 82, .16);--warn: #ffb547;--warn-soft: rgba(255, 181, 71, .16);--info: #6ea8ff;--info-soft: rgba(110, 168, 255, .16);--shadow-float: 0 16px 40px -12px rgba(0, 0, 0, .7);--shadow-card: none}}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-body);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit;color:inherit}h1,h2,h3{margin:0;line-height:1.2;font-family:var(--font-display);font-weight:600;letter-spacing:.005em}p{margin:0}.app{display:flex;flex-direction:column;min-height:100%;max-width:640px;margin:0 auto}.app.wide{max-width:1100px}.app.center{align-items:center;justify-content:center}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;padding:calc(var(--safe-top) + 14px) 18px 12px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}.topbar-text{flex:1;min-width:0}.topbar h1{font-size:24px;font-weight:700;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar .sub{font-size:13px;color:var(--muted);margin-top:-1px}.content{flex:1;padding:4px 16px calc(var(--safe-bottom) + 40px);display:flex;flex-direction:column;gap:16px}.avatar{flex:0 0 42px;width:42px;height:42px;border-radius:999px;background:var(--lime);color:var(--lime-ink);display:grid;place-items:center;font-family:var(--font-display);font-weight:700;font-size:17px}.avatar-btn{border:none;padding:0;cursor:pointer;overflow:hidden;box-shadow:0 0 0 2px var(--surface)}.avatar-btn img{width:100%;height:100%;object-fit:cover}.avatar-btn:active{transform:scale(.94)}.avatar.small{flex-basis:36px;width:36px;height:36px;font-size:14px;background:var(--court-soft);color:var(--court)}.row{display:flex;align-items:center;gap:10px}.row.between{justify-content:space-between}.stack{display:flex;flex-direction:column;gap:12px}.stack.form{gap:18px}.muted{color:var(--muted);font-size:13px}.empty{padding:22px 12px;text-align:center;color:var(--muted);font-size:14px}.error{padding:11px 14px;border-radius:var(--radius-field);background:var(--danger-soft);color:var(--danger);font-size:14px;font-weight:500}.or{text-align:center;color:var(--muted);font-size:13px;margin:12px 0}.card{background:var(--surface);border-radius:var(--radius-card);padding:18px;box-shadow:var(--shadow-card)}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.card h2,.card-head h2{font-size:16px;font-weight:600;letter-spacing:0;color:var(--text)}.card-head .count{display:inline-flex;align-items:center;min-height:24px;padding:0 10px;border-radius:var(--radius-pill);background:var(--surface-2);font-family:var(--font-display);font-size:12px;font-weight:500;color:var(--text-2);font-variant-numeric:tabular-nums;white-space:nowrap}.item{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.item:last-child{border-bottom:none;padding-bottom:0}.item:first-of-type{padding-top:0}.item-main{flex:1;min-width:0}.item-title{font-family:var(--font-display);font-size:17px;font-weight:500;line-height:1.3;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}.card-live{box-shadow:inset 0 0 0 2px var(--court)}.card-live .card-head h2{color:var(--court)}.session-row.is-done .item-title{color:var(--text-2);font-weight:400}.members-link{align-self:center;gap:6px}.item-sub{font-size:13px;color:var(--muted);margin-top:1px}.item.me{box-shadow:inset 3px 0 0 var(--lime);padding-left:12px;margin-left:-4px}.item-tap,.item-link{font:inherit;color:inherit;text-align:left;background:none;border:none;padding:0;cursor:pointer}.item-tap{display:flex;align-items:center;gap:12px;width:100%}.hero{position:relative;overflow:hidden;background:linear-gradient(150deg,var(--court) 0%,var(--court-deep) 100%);color:#fff;border-radius:var(--radius-card);padding:22px 20px;box-shadow:0 16px 36px -18px #083d2799}.hero:before{content:"";position:absolute;right:-40px;top:-40px;width:180px;height:180px;border:2px solid rgba(255,255,255,.08);border-radius:50%;pointer-events:none}.hero .hero-label{font-size:12px;text-transform:uppercase;letter-spacing:.1em;opacity:.8}.hero .hero-value{font-family:var(--font-display);font-size:40px;font-weight:700;line-height:1.05;letter-spacing:-.01em;color:var(--lime);font-variant-numeric:tabular-nums;margin:4px 0 8px}.hero-note{margin:10px 0 0;font-size:13px;opacity:.85;line-height:1.45}.hero .badge{background:#ffffff24;color:#fff;margin-top:8px}.hero-split{display:grid;grid-template-columns:1fr 1fr;gap:10px}.hero-split>div{background:#00000038;border-radius:12px;padding:10px 12px}.hero-split .label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;opacity:.8}.hero-split .value{display:block;font-family:var(--font-display);font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}.hero .btn{margin-top:14px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:10px 22px;border:none;border-radius:var(--radius-pill);background:var(--lime);color:var(--lime-ink);font-family:var(--font-display);font-size:16px;font-weight:600;letter-spacing:.01em;cursor:pointer;transition:transform .12s ease,filter .12s ease,opacity .12s ease,box-shadow .12s ease;box-shadow:0 6px 18px -8px #a8e600b3}.btn:active:not(:disabled){transform:scale(.97);filter:brightness(.94)}.btn:disabled{opacity:.4;cursor:not-allowed}.btn.full{width:100%}.btn.secondary{background:var(--surface-3);color:var(--text);box-shadow:none}.btn.accent{background:var(--court);color:#fff}.btn.ghost,.btn.danger,.btn.accent,.btn.line{box-shadow:none}.btn.ghost,.btn.danger{min-height:44px;padding:8px 12px;background:none;font-size:14px;font-weight:500}.btn.ghost{color:var(--muted)}.btn.danger{color:var(--danger)}.btn.danger.full{width:100%;background:var(--danger-soft)}.btn.line{background:#06c755;color:#fff;text-decoration:none;display:flex;justify-content:center}.icon-btn{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border:none;border-radius:999px;background:var(--surface);box-shadow:var(--shadow-card);color:var(--text-2);cursor:pointer;transition:background-color .14s ease}.icon-btn:active{background:var(--surface-3)}.badge{display:inline-flex;align-items:center;padding:2px 9px;border-radius:var(--radius-pill);background:var(--lime-soft);color:var(--lime-text);font-family:var(--font-display);font-size:12px;font-weight:500;letter-spacing:0;white-space:nowrap;line-height:1.6}.badge.private{background:var(--info-soft);color:var(--info)}.badge.warn{background:var(--warn-soft);color:var(--warn)}.badge.open{background:var(--court-soft);color:var(--court)}.badge.live{background:var(--court-deep);color:var(--lime);padding-left:7px}.badge.live:before{content:"";width:6px;height:6px;border-radius:999px;background:var(--lime);margin-right:6px;animation:live-pulse 1.4s ease-in-out infinite}@keyframes live-pulse{50%{opacity:.25}}.badge.muted{background:var(--surface-3);color:var(--muted)}.badge.danger{background:var(--danger-soft);color:var(--danger)}@media(prefers-reduced-motion:reduce){.badge.live:before{animation:none}}.field label{display:block;font-size:13px;font-weight:600;color:var(--text-2);margin-bottom:6px}input,select,textarea{width:100%;font-size:16px;min-height:50px;padding:12px 16px;border:1.5px solid transparent;border-radius:var(--radius-field);background:var(--surface-2);transition:border-color .14s ease,background-color .14s ease}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--lime);background:var(--surface)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:.7}textarea{resize:vertical}.amount-input{display:flex;align-items:baseline;justify-content:center;gap:6px;padding:6px 0}.amount-input span{font-family:var(--font-display);font-size:22px;font-weight:500;color:var(--muted)}.amount-input input{width:auto;max-width:260px;min-height:0;padding:0;border:none;border-radius:0;background:transparent;font-family:var(--font-display);font-size:44px;font-weight:700;line-height:1;text-align:center;color:var(--text)}.amount-input input:focus{background:transparent}.seg button,.chip,.icon-grid button,.toggle{font:inherit;color:var(--text);border:1.5px solid transparent;cursor:pointer;transition:background-color .14s ease,border-color .14s ease,color .14s ease}.seg{display:flex;gap:4px;padding:4px;border-radius:var(--radius-field);background:var(--surface-2)}.seg button{flex:1;min-height:42px;border-radius:9px;background:transparent;font-family:var(--font-display);font-size:15px;font-weight:500;color:var(--muted)}.seg button[aria-checked=true]{background:var(--text);color:var(--bg)}.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;border-radius:999px;background:var(--surface-2);font-size:14px;font-weight:500}.chip[aria-checked=true]{background:var(--lime);color:var(--lime-ink);font-weight:600}.icon-grid{display:grid;gap:8px}.icon-grid button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 4px;border-radius:var(--radius-field);background:var(--surface-2);font-size:12px;font-weight:500;color:var(--muted)}.icon-grid-ic{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:var(--surface)}.icon-grid button[aria-checked=true]{border-color:var(--lime);color:var(--text);font-weight:600}.toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:12px 14px;border-radius:var(--radius-field);background:var(--surface-2);text-align:left}.toggle-label{display:block;font-size:14px;font-weight:500}.toggle-hint{display:block;margin-top:2px;font-size:12px;color:var(--muted)}.toggle-track{position:relative;flex:0 0 50px;height:30px;border-radius:999px;background:var(--surface-3);transition:background-color .14s ease}.toggle-track:after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:999px;background:var(--surface);box-shadow:0 1px 3px #0000004d;transition:left .14s ease}.toggle[aria-checked=true] .toggle-track{background:var(--lime)}.toggle[aria-checked=true] .toggle-track:after{left:23px}.sheet-backdrop{position:fixed;inset:0;z-index:40;display:flex;align-items:flex-end;justify-content:center;background:#0000008c;animation:fade-in .18s ease}.sheet{width:100%;max-width:640px;max-height:88vh;display:flex;flex-direction:column;background:var(--surface);border-radius:28px 28px 0 0;padding-bottom:var(--safe-bottom);box-shadow:var(--shadow-float);animation:slide-up .24s cubic-bezier(.22,1,.36,1)}.sheet-grip{width:40px;height:4px;margin:10px auto 2px;border-radius:999px;background:var(--surface-3)}.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 18px 12px}.sheet-head h2{font-size:20px;font-weight:600}.sheet-body{overflow-y:auto;padding:0 18px 18px;-webkit-overflow-scrolling:touch}@keyframes slide-up{0%{transform:translateY(100%)}}@keyframes fade-in{0%{opacity:0}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}.auth{min-height:100%;display:flex;flex-direction:column;justify-content:center;gap:22px;padding:28px 22px calc(var(--safe-bottom) + 28px);max-width:420px;margin:0 auto}.auth-logo{text-align:center}.auth-logo img{width:72px;height:72px;border-radius:20px}.auth-logo h1{margin:16px 0 2px;font-size:30px;font-weight:700;text-transform:uppercase;letter-spacing:.02em;line-height:1.1}.auth-card{background:var(--surface);border-radius:var(--radius-card);padding:20px}.switch{text-align:center;font-size:14px;color:var(--muted)}.switch button{min-height:44px;padding:4px 8px;background:none;border:none;color:var(--lime-text);font-weight:600;cursor:pointer}.courts{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.card.court{background:transparent;border:1.5px dashed var(--line);box-shadow:none}.card.court.busy{position:relative;overflow:hidden;background:linear-gradient(150deg,var(--court) 0%,var(--court-deep) 100%);border:1.5px solid transparent;color:#fff;box-shadow:0 14px 30px -18px #083d27b3}.card.court.busy:before{content:"";position:absolute;inset:10px;border:1.5px solid rgba(255,255,255,.12);border-radius:10px;pointer-events:none}.card.court.busy>*{position:relative}.court .card-head h2{color:inherit;font-size:15px}.card.court.busy .card-head .count{background:#ffffff24;color:#fff}.card.court.busy .vs{color:var(--lime)}.card.court.busy .btn.ghost,.card.court.busy .btn.danger{color:#fffc}.card.court.busy .btn.secondary{background:#ffffff24;color:#fff}.teams{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;font-family:var(--font-display);font-size:16px;font-weight:500}.teams .team div{padding:2px 0}.teams .team:last-child{text-align:right}.vs{color:var(--lime-text);font-size:12px;font-weight:700;letter-spacing:.1em}.pick-no{width:28px;height:28px;border-radius:50%;border:2px solid var(--line);display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-display);font-size:13px;font-weight:700;flex-shrink:0}.pick-no.on{background:var(--lime);border-color:var(--lime);color:var(--lime-ink)}.stat-strip{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px;font-size:12px;color:var(--muted)}.stat-strip>*{display:flex;flex-direction:column;align-items:center;padding:10px 6px;border-radius:16px;background:var(--surface);box-shadow:var(--shadow-card);text-align:center}.stat-strip b{font-family:var(--font-display);font-size:24px;line-height:1.1;color:var(--text)}.stat-strip .warn b{color:var(--warn)}.qchips{display:flex;flex-wrap:wrap;gap:8px}.qchip{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:4px 12px 4px 6px;border-radius:var(--radius-pill);background:var(--surface-2);font-family:var(--font-display);font-size:15px;font-weight:500;white-space:nowrap}.qchip>b{display:inline-grid;place-items:center;min-width:26px;height:26px;border-radius:50%;background:var(--surface-3);font-size:12px;font-weight:700;color:var(--muted)}.qchip.me{background:var(--lime);color:var(--lime-ink)}.qchip.me>b{background:#0000002e;color:var(--lime-ink)}.qchip-meta{font-family:var(--font-body);font-size:12px;font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums}.qchip-buddy{color:var(--danger);font-size:12px}.court-line{display:flex;align-items:baseline;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:15px}.court-line:last-child{border-bottom:none;padding-bottom:0}.court-line.me{box-shadow:inset 3px 0 0 var(--lime);padding-left:10px}.court-line-label{flex:0 0 64px;font-family:var(--font-display);font-weight:600}.court-line-teams{flex:1;min-width:0}.court-line .vs{margin:0 4px}.bill .hero-value{margin:6px 0 2px}.bill-confirmed{background:var(--court-soft);color:var(--text)}.bill-confirmed .hero-value{color:var(--court)}.bill-confirmed .hero-label,.bill-confirmed .hero-note{color:var(--text-2)}.btn.ghost.on-dark{color:#ffffffd9}.game-row{padding:12px 0;border-bottom:1px solid var(--line)}.game-row:last-child{border-bottom:none;padding-bottom:0}.game-meta{display:flex;gap:10px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;margin-bottom:6px}.game-teams{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px}.game-team{display:flex;flex-direction:column;gap:4px;align-items:flex-end;text-align:right}.game-team.me{align-items:flex-start;text-align:left}.who{font-family:var(--font-display);font-size:15px;line-height:1.25}.who.you{font-weight:600;color:var(--court)}.game-vs{font-family:var(--font-display);font-size:11px;font-weight:700;letter-spacing:.1em;color:var(--muted);background:var(--surface-2);border-radius:999px;padding:3px 8px}.progress{height:6px;border-radius:999px;background:var(--surface-3);overflow:hidden;margin-bottom:6px}.progress-bar{height:100%;background:var(--court);border-radius:999px;transition:width .3s ease}.item.is-done .item-title{color:var(--text-2)}.date-tile{flex:0 0 56px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60px;padding:6px 0;border-radius:16px;background:var(--surface-2);line-height:1.05;text-align:center}.date-tile-wd{font-size:11px;color:var(--muted)}.date-tile-day{font-family:var(--font-display);font-size:22px;font-weight:700;margin:1px 0}.date-tile-mo{font-size:11px;color:var(--muted)}.session-row.is-live .date-tile{background:var(--court);color:#fff}.session-row.is-live .date-tile-wd,.session-row.is-live .date-tile-mo{color:#ffffffbf}.session-row.is-done .date-tile{opacity:.6}.card.court.busy .muted{color:#fff9}.card.court.busy .badge{background:#ffffff24;color:#fff}.session-hero .hero-value{font-size:28px}.app.wide .session-hero.compact{padding:14px 20px}.app.wide .session-hero.compact .hero-value{font-size:22px;margin:0}.app.wide .session-hero.compact .hero-label{display:none}.item .btn{min-height:40px;padding:6px 16px;font-size:14px;box-shadow:none}
