/* PackRats · Sunny Pack. Mobile first; laptop (1024px+) and desktop (1440px+) layouts at the bottom. */

@font-face {
  font-family: 'Concert One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/concert-one.woff2') format('woff2');
}

/* ---------- colour tokens ---------- */
:root {
  --page: #EAF3FB; --screen: #F7FAFD; --surface: #FFFFFF; --lip: #D6E2EF; --raised: #EEF3F9;
  --ink: #1F2A44; --muted: #5B6785; --line: #E3EAF3;
  --aqua: #3FC1B7; --aqualip: #2C9F96; --aquasoft: #DDF4F2; --navon: #1F2A44;
  --coral: #FF7B8A; --corallip: #E05A6B; --lav: #B9A7FF; --lavsoft: #EEE9FF; --mint: #7FD99A; --sky: #9CC8FF;
  --rare: #6A4BD6; --pt: #E0566A; --green: #1F8A4C; --greensoft: #DFF5E1; --greenink: #1F6F3A;
  --red: #B42318; --redsoft: #FDE8E8; --onred: #FFFFFF; --note: #EDF0F4; --toggleoff: #DCE4EE; --knob: #FFFFFF;
  --of: #1F2A44; --scrim: rgba(31,42,68,.45); --segsel: #FFFFFF;
  --starempty: #D6E2EF; --starbg: #1F2A44; --starlip: #0E1526;
  --foil: linear-gradient(125deg, #7DE3DA 0%, #A5C8FF 35%, #C9B5FF 62%, #FFB3C1 100%);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --page: #0C1220; --screen: #141B2D; --surface: #1E2740; --lip: #0A0F1C; --raised: #2A3452;
  --ink: #F2F6FF; --muted: #A9B5D1; --line: #34405E;
  --aqua: #5ED6CC; --aqualip: #38A59C; --aquasoft: #1F3A44; --navon: #5ED6CC;
  --coral: #FF8C99; --corallip: #D35F70; --lav: #C3B5FF; --lavsoft: #2E2A55; --mint: #8FE0B8; --sky: #9CC8FF;
  --rare: #C3B5FF; --pt: #FF8C99; --green: #8FE0B8; --greensoft: #173A30; --greenink: #8FE0B8;
  --red: #FF7A7A; --redsoft: #3A1E28; --onred: #141B2D; --note: #2A3452; --toggleoff: #34405E; --knob: #F2F6FF;
  --of: #141B2D; --scrim: rgba(0,0,0,.6); --segsel: #3A4670;
  --starempty: #3A4670; --starbg: #2A3452; --starlip: #0A0F1C;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --page: #0C1220; --screen: #141B2D; --surface: #1E2740; --lip: #0A0F1C; --raised: #2A3452;
    --ink: #F2F6FF; --muted: #A9B5D1; --line: #34405E;
    --aqua: #5ED6CC; --aqualip: #38A59C; --aquasoft: #1F3A44; --navon: #5ED6CC;
    --coral: #FF8C99; --corallip: #D35F70; --lav: #C3B5FF; --lavsoft: #2E2A55; --mint: #8FE0B8; --sky: #9CC8FF;
    --rare: #C3B5FF; --pt: #FF8C99; --green: #8FE0B8; --greensoft: #173A30; --greenink: #8FE0B8;
    --red: #FF7A7A; --redsoft: #3A1E28; --onred: #141B2D; --note: #2A3452; --toggleoff: #34405E; --knob: #F2F6FF;
    --of: #141B2D; --scrim: rgba(0,0,0,.6); --segsel: #3A4670;
    --starempty: #3A4670; --starbg: #2A3452; --starlip: #0A0F1C;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--screen); color: var(--ink);
  font: 400 15px/1.4 'Nunito', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: 'Concert One', sans-serif; font-weight: 400; line-height: 1.1; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--rare); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cf { font-family: 'Concert One', sans-serif; font-weight: 400; }
.lb { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.mu { color: var(--muted); }
.small { font-size: 13px; font-weight: 700; }
.tiny { font-size: 12px; font-weight: 600; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ic { flex: none; }
.stack, .cols, .cols-wide, .cols-side, .cols-3 { display: flex; flex-direction: column; gap: 14px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
@media (max-width: 639px) { .hide-sm { display: none; } }
@media (min-width: 1024px) { .hide-lg { display: none !important; } }
form.li { margin: 0; }

/* ---------- app shell ---------- */
.side { display: none; }
.main {
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: calc(var(--safe-top) + 22px) 18px calc(var(--safe-bottom) + 124px);
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .sub { font-weight: 700; color: var(--muted); }

/* mobile bottom nav */
.tabbar {
  position: fixed; z-index: 20; left: 14px; right: 14px; bottom: calc(var(--safe-bottom) + 14px);
  max-width: 520px; margin: 0 auto; height: 68px; border-radius: 34px;
  display: flex; align-items: center; justify-content: space-around;
  background: var(--surface); box-shadow: 0 5px 0 var(--lip), 0 10px 30px rgba(0,0,0,.08);
}
.tab {
  width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none;
}
.tab.on { background: var(--aquasoft); color: var(--navon); }
.tab-star {
  width: 68px; height: 68px; margin-top: -32px; border-radius: 999px; border: 5px solid var(--screen);
  background: var(--starbg); box-shadow: 0 5px 0 var(--starlip); display: flex; align-items: center; justify-content: center;
}

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: 24px; box-shadow: 0 5px 0 var(--lip); }
.pad { padding: 16px; }
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; text-decoration: none; color: inherit; }
a.li:hover { background: var(--raised); }
.list > :first-child { border-radius: 24px 24px 0 0; } .list > :last-child { border-radius: 0 0 24px 24px; }
.list > :only-child { border-radius: 24px; }
.raised { background: var(--raised); border-radius: 16px; }
.note { background: var(--note); border-radius: 20px; padding: 16px 18px; }
.foil { background: var(--foil); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--raised); color: var(--ink); font-weight: 800; font-size: 14px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: translateY(2px); }
.btn-aqua { background: var(--aqua); color: var(--of); box-shadow: 0 3px 0 var(--aqualip); }
.btn-coral { background: var(--coral); color: var(--of); box-shadow: 0 3px 0 var(--corallip); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn-red { background: var(--redsoft); color: var(--red); }
.btn-raised { background: var(--surface); box-shadow: 0 3px 0 var(--lip); }
.btn-wide { width: 100%; min-height: 50px; font-size: 15px; }
.btn-s { min-height: 36px; padding: 0 14px; font-size: 13px; }
/* Google / Apple: their brand rules set these colours, so they skip the theme tokens. */
.sso { gap: 10px; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-weight: 600; }
.sso svg { flex: none; }
.sso-google { background: #FFFFFF; color: #1F1F1F; box-shadow: inset 0 0 0 1px #747775; }
.sso-apple { background: #000000; color: #FFFFFF; }
[data-theme="dark"] .sso-google { background: #131314; color: #E3E3E3; box-shadow: inset 0 0 0 1px #8E918F; }
[data-theme="dark"] .sso-apple { background: #FFFFFF; color: #000000; }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .sso-google { background: #131314; color: #E3E3E3; box-shadow: inset 0 0 0 1px #8E918F; }
  [data-theme="auto"] .sso-apple { background: #FFFFFF; color: #000000; }
}
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.linkbtn { border: 0; background: none; padding: 0; font-weight: 800; color: var(--rare); cursor: pointer; }
.iconbtn {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 999px; display: inline-flex; align-items: center;
  justify-content: center; background: var(--surface); color: var(--ink); box-shadow: 0 3px 0 var(--lip); text-decoration: none; cursor: pointer;
}
.big {
  width: 100%; min-height: 70px; border: 0; border-radius: 999px; display: flex; align-items: center; gap: 14px;
  padding: 8px; color: var(--of); text-align: left; cursor: pointer;
}
.big .bi { width: 54px; height: 54px; border-radius: 999px; background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; flex: none; }
.big .bt { font-family: 'Concert One', sans-serif; font-size: 23px; line-height: 1.1; display: block; }
.big .bs { font-weight: 700; font-size: 13px; display: block; }
.big-aqua { background: var(--aqua); box-shadow: 0 5px 0 var(--aqualip); }
.big-coral { background: var(--coral); box-shadow: 0 5px 0 var(--corallip); }
.big:active { transform: translateY(3px); box-shadow: none; }
.big[disabled] { opacity: .6; cursor: progress; }

/* ---------- small parts ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; flex: none; }
.tag-green { background: var(--greensoft); color: var(--greenink); }
.tag-red { background: var(--redsoft); color: var(--red); }
.tag-lav { background: var(--lavsoft); color: var(--rare); }
.tag-aqua { background: var(--aquasoft); color: var(--navon); }
.tag-plain { background: var(--raised); color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; display: inline-block; }
.av { width: var(--s); height: var(--s); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--of); font-weight: 800; font-size: calc(var(--s) * .36); }
.blob { width: var(--s); height: var(--s); flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--of); font-family: 'Concert One', sans-serif; font-size: calc(var(--s) * .46); }
.b0 { border-radius: 38% 52% 41% 55%; } .b1 { border-radius: 52% 38% 55% 41%; } .b2 { border-radius: 41% 55% 38% 52%; } .b3 { border-radius: 48% 40% 52% 36%; }
.tile { width: 40px; height: 40px; flex: none; border-radius: 14px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; }
.mascot { flex: none; border-radius: 999px; background: var(--aqua); display: inline-flex; align-items: center; justify-content: center; }
.mascot img { width: 68%; height: 68%; object-fit: contain; filter: brightness(0); }
.st-empty { fill: var(--starempty); } .st-line { stroke: var(--ink); }
.bar { height: 8px; border-radius: 999px; background: var(--raised); overflow: hidden; flex: 1; }
.raised .bar { background: var(--surface); }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--aqua); }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--raised); }
.seg a, .seg button { flex: 1; min-height: 36px; border: 0; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--muted); text-decoration: none; background: transparent; cursor: pointer; padding: 0 10px; }
.seg .on { background: var(--segsel); color: var(--ink); box-shadow: 0 2px 0 var(--lip); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 800; font-size: 13px; background: var(--raised); color: var(--ink); text-decoration: none; white-space: nowrap; flex: none; }
.chip.on { background: var(--aqua); color: var(--of); }
button.chip { border: 0; cursor: pointer; }

.tg { width: 52px; height: 30px; flex: none; border: 0; border-radius: 999px; padding: 3px; display: flex; background: var(--toggleoff); cursor: pointer; }
.tg span { width: 24px; height: 24px; border-radius: 999px; background: var(--knob); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tg[aria-pressed="true"] { background: var(--aqua); }
.tg[aria-pressed="true"] span { transform: translateX(22px); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.inp { width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--raised); font-weight: 700; color: var(--ink); }
.inp::placeholder { color: var(--muted); font-weight: 600; opacity: .8; }
.hint { font-size: 12px; font-weight: 600; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.flash { border-radius: 16px; padding: 12px 14px; font-weight: 700; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.flash-ok { background: var(--greensoft); color: var(--greenink); }
.flash-error { background: var(--redsoft); color: var(--red); }

/* ---------- player card ---------- */
.pcard { padding: 3px; border-radius: 26px; box-shadow: 0 5px 0 var(--lip); }
.pcard-in { background: var(--surface); border-radius: 23px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.rare { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--raised); font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--rare); }
.rare i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--foil); display: inline-block; }
.pcard-art { position: relative; height: 128px; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, rgba(94,214,204,.22), rgba(195,181,255,.28)), var(--raised); }
.pcard-art .mascot { position: absolute; left: 16px; bottom: 10px; width: 104px; height: 104px; box-shadow: 0 0 0 7px var(--aquasoft); }
.bubble { position: absolute; right: 12px; top: 18px; width: 158px; padding: 10px 12px; border-radius: 18px; background: var(--surface); }
.bubble::before { content: ''; position: absolute; left: -6px; top: 24px; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); }
.bubble > * { position: relative; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.stat { background: var(--raised); border-radius: 14px; padding: 8px 4px; }
.stat .cf { font-size: 21px; display: block; }
.meter { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 14px; background: var(--raised); text-decoration: none; color: inherit; }

/* ---------- events ---------- */
.ev { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; }
.ev h3 { font-size: 18px; line-height: 1.15; }
.ev-group + .ev-group { margin-top: 14px; }
.ev-group > .lb { display: block; margin-bottom: 6px; }

.cal { padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wk { text-align: center; letter-spacing: 0; }
.day {
  min-height: 44px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: inherit; font-weight: 800; font-size: 14px;
}
.day:hover { background: var(--raised); }
.day.out { opacity: .35; }
.day.today { box-shadow: inset 0 0 0 2px var(--aqua); }
.day.sel { background: var(--aqua); color: var(--of); }
.day .dots { display: flex; gap: 3px; height: 6px; }
.day .dots i { width: 6px; height: 6px; border-radius: 999px; display: block; }
.day.sel .dots i { background: var(--of) !important; }
.cal-ev { display: none; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--muted); margin: 10px 0 14px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: calc(var(--safe-top) + 24px) 18px calc(var(--safe-bottom) + 24px); background: var(--page); }
.auth-card { width: 100%; max-width: 420px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }

/* ---------- staff tools ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .inp { padding-left: 42px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border-radius: 20px; padding: 12px 14px; box-shadow: 0 4px 0 var(--lip); text-decoration: none; color: inherit; }
.kpi .cf { font-size: 28px; display: block; line-height: 1.1; }
.code { font-family: 'Concert One', sans-serif; font-size: 26px; letter-spacing: .14em; color: var(--rare); }
.code-inp { text-transform: uppercase; font-family: 'Concert One', sans-serif; font-size: 30px; letter-spacing: .3em; text-align: center; min-height: 64px; }
.pts { font-family: 'Concert One', sans-serif; font-size: 18px; white-space: nowrap; }
.pts-up { color: var(--green); } .pts-down { color: var(--pt); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.grid-f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-f .full { grid-column: 1 / -1; }
textarea.inp { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--raised);
  font-weight: 800; font-size: 13px; cursor: pointer; user-select: none; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick:has(input:checked) { background: var(--aqua); color: var(--of); }
.pick:has(input:focus-visible) { outline: 3px solid var(--rare); outline-offset: 2px; }
.seg label { flex: 1; min-height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--segsel); color: var(--ink); box-shadow: 0 2px 0 var(--lip); }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 18px; background: var(--raised); }
.notif .app { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--aqua); display: flex; align-items: center; justify-content: center; }
.notif .app img { width: 70%; filter: brightness(0); }
.danger-zone { border-radius: 24px; padding: 16px; box-shadow: inset 0 0 0 2px var(--redsoft); }
.mini-empty { padding: 14px 16px; color: var(--muted); font-weight: 600; }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }

/* popups: a sheet from the bottom on phones, a centred card on bigger screens */
dialog.sheet { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: hidden; }
dialog.sheet::backdrop { background: var(--scrim); }
.sheet-in { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(var(--safe-bottom) + 20px); display: flex; flex-direction: column; gap: 14px; animation: sheet-up .25s cubic-bezier(.2, .8, .2, 1); }
.sheet-in::before { content: ''; width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) {
  .sheet-in { left: 50%; top: 50%; bottom: auto; width: min(480px, 92vw); transform: translate(-50%, -50%); border-radius: 28px; padding: 22px; animation: sheet-pop .2s ease-out; }
  .sheet-in::before { display: none; }
  @keyframes sheet-pop { from { transform: translate(-50%, -48%); opacity: 0; } }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- tournaments ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.tcard { background: var(--surface); border-radius: 20px; padding: 14px; box-shadow: 0 4px 0 var(--lip); display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.tcard.done { box-shadow: inset 4px 0 0 var(--aqua), 0 4px 0 var(--lip); }
.tcard.mine { box-shadow: inset 0 0 0 3px var(--aqua), 0 4px 0 var(--lip); }
.tcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard-head b { font-family: 'Concert One', sans-serif; font-weight: 400; font-size: 18px; }
.seatrow { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.seatrow.me b { color: var(--rare); }
.vs { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-align: center; }
.inp-s { min-height: 38px; border-radius: 12px; padding: 0 10px; width: auto; }
.place { min-width: 38px; text-align: center; }
.place-1 { background: var(--foil); color: var(--of); }
.myline { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--aquasoft); color: var(--navon); font-weight: 800; }
.myline .ic { color: var(--navon); }
.stand { width: 100%; border-collapse: collapse; font-size: 14px; }
.stand th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 6px 8px; }
.stand td { padding: 8px; border-top: 1px solid var(--line); font-weight: 700; }
.stand .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stand tr.me td { background: var(--aquasoft); }
.stand tr.me td:first-child { border-radius: 12px 0 0 12px; } .stand tr.me td:last-child { border-radius: 0 12px 12px 0; }
.stand tr.out td { opacity: .5; }
.bracket { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.bracket > div { flex: 0 0 210px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.match { background: var(--raised); border-radius: 14px; overflow: hidden; font-size: 13px; font-weight: 700; }
.match > span { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; }
.match > span + span { border-top: 1px solid var(--line); }
.match .won { background: var(--aquasoft); color: var(--navon); font-weight: 800; }
.match.mine { box-shadow: inset 0 0 0 2px var(--aqua); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; text-align: center; }
.podium > div { border-radius: 16px; background: var(--raised); padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.podium .p1 { background: var(--foil); color: var(--of); padding-top: 16px; padding-bottom: 16px; order: 2; }
.podium .p2 { order: 1; } .podium .p3 { order: 3; }
.fmt-picks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fmt-pick { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--raised); cursor: pointer; }
.fmt-pick input { position: absolute; opacity: 0; pointer-events: none; }
.fmt-pick:has(input:checked) { background: var(--aquasoft); box-shadow: inset 0 0 0 2px var(--aqua); }
.fmt-pick:has(input:focus-visible) { outline: 3px solid var(--rare); outline-offset: 2px; }
@media (min-width: 640px) {
  .fmt-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- staff: admin banner, find-a-player, scanner, QR codes ---------- */
.admin-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: calc(var(--safe-top) + 3px) 12px 3px; background: var(--lav); color: var(--of);
  font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5; }
.admin-bar a { letter-spacing: .02em; text-transform: none; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.admin-bar + .shell .side { top: 23px; height: calc(100vh - 23px); }
@media (max-width: 1023px) { .admin-bar + .shell .main { padding-top: 18px; } }
.picker { display: flex; flex-direction: column; gap: 8px; }
.picker-bar { display: flex; gap: 8px; align-items: stretch; }
.picker-bar .search { min-width: 0; }
.picker-bar .btn { min-height: 46px; }
.picker-results { max-height: 380px; overflow: auto; }
.picker-row { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.picker-row:hover, .picker-row:focus-visible { background: var(--raised); }
.picker-msg { padding: 10px 12px; border-radius: 14px; background: var(--aquasoft); color: var(--navon); margin: 0; }
.picker-msg.is-error { background: var(--redsoft); color: var(--red); }
mark { background: var(--lav); color: var(--of); border-radius: 4px; padding: 0 1px; }
.seatrow.found, [data-seat-user].found .av { animation: found 1.6s ease-out 2; }
.seatrow.found { border-radius: 12px; background: var(--lavsoft); }
@keyframes found { 0% { box-shadow: 0 0 0 0 var(--lav); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick .btn { min-height: 54px; }
.scan-view { position: relative; aspect-ratio: 1; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #000; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 16%; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35), inset 0 0 0 3px var(--aqua); }
.qr { width: min(240px, 70vw); margin: 0 auto; padding: 10px; border-radius: 20px; background: #FFFFFF; box-shadow: 0 4px 0 var(--lip); }
.qr svg { display: block; width: 100%; height: auto; }
.ev-wrap { position: relative; }
.ev-wrap .ev { padding-right: 58px; }
.ev-edit { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; }

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .main { max-width: 640px; }
  .chips { margin: 0; padding: 0 0 4px; flex-wrap: wrap; overflow: visible; }
}

/* ---------- laptop: sidebar replaces the bottom nav ---------- */
@media (min-width: 1024px) {
  body { background: var(--page); }
  .tabbar { display: none; }
  .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
  .side {
    display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; padding: 26px 18px;
    background: var(--surface); box-shadow: 1px 0 0 var(--line);
  }
  .side .brand { margin: 0 6px 18px; text-decoration: none; color: inherit; }
  .side-link {
    display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 16px;
    color: var(--muted); font-weight: 800; text-decoration: none;
  }
  .side-link:hover { background: var(--raised); color: var(--ink); }
  .side-link.on { background: var(--aquasoft); color: var(--navon); }
  .side-star { width: 26px; height: 26px; border-radius: 999px; background: var(--starbg); display: inline-flex; align-items: center; justify-content: center; }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .side-status { padding: 12px; border-radius: 18px; background: var(--raised); font-size: 13px; font-weight: 700; }
  .main { max-width: 1160px; padding: 36px 40px 48px; margin: 0; }
  .page-head { margin-bottom: 22px; }
  h1 { font-size: 34px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cols-wide { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cols-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .card { box-shadow: 0 5px 0 var(--lip), 0 12px 30px rgba(15,25,45,.05); }
  /* the month calendar shows event names right in the boxes */
  .cal { padding: 18px; }
  .day { min-height: 96px; align-items: stretch; justify-content: flex-start; padding: 8px; gap: 4px; border-radius: 16px; background: var(--raised); font-size: 13px; }
  .day.sel { background: var(--aquasoft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--aqua); }
  .day .dots { display: none; }
  .cal-ev { display: block; font-size: 11px; font-weight: 800; padding: 3px 6px; border-radius: 8px; color: var(--of); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cal-grid { gap: 6px; }
  .cal-wrap { grid-template-columns: minmax(0, 1fr); }  /* full-width month on laptops */
  .auth-card { max-width: 440px; }
}

/* small laptops: split home and event pages evenly so event names have room */
@media (min-width: 1024px) and (max-width: 1279px) {
  .cols-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- desktop ---------- */
@media (min-width: 1440px) {
  .shell { grid-template-columns: 280px minmax(0, 1fr); }
  .main { max-width: 1320px; padding: 44px 56px 56px; margin: 0 auto; }
  .cols-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .day { min-height: 112px; }
  .cal-wrap { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* =====================================================================
   Motion. Mouse users get hover; phones get press feedback; everyone gets
   a slow holo border and twinkling stars. All of it stops for reduced motion.
   ===================================================================== */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.55); } }
@keyframes sheen { 0%, 72% { transform: translate(-16px, 0); } 100% { transform: translate(16px, 0); } }
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes holo { 0%, 100% { filter: hue-rotate(0deg) saturate(1); } 50% { filter: hue-rotate(-35deg) saturate(1.25); } }
@keyframes bob { 0%, 100% { transform: rotate(0deg) translateY(0); } 30% { transform: rotate(-7deg) translateY(-3px); } 60% { transform: rotate(4deg) translateY(-1px); } }

html { -webkit-tap-highlight-color: transparent; }

/* Player card: the holo border slowly travels around the card, with a soft glow. */
.pcard {
  position: relative; isolation: isolate;
  background: conic-gradient(from var(--spin), #7DE3DA, #A5C8FF, #C9B5FF, #FFB3C1, #7DE3DA);
  animation: spin 9s linear infinite;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
}
.pcard::before {
  content: ''; position: absolute; inset: 2px; z-index: -1; border-radius: inherit;
  background: inherit; filter: blur(14px); opacity: .35; pointer-events: none;
}
.pcard-in { position: relative; }
.pcard-in::after {  /* glare that follows the pointer */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.10), transparent 60%);
}
.rare i { background: linear-gradient(90deg, #7DE3DA, #A5C8FF, #C9B5FF, #FFB3C1, #7DE3DA) 0 0 / 200% 100%; animation: shimmer 3s linear infinite; }

/* Stars: sparkles twinkle, a light sheen sweeps across now and then, colours drift. */
.star { overflow: visible; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.star .spark { transform-box: fill-box; transform-origin: center; animation: twinkle 2.6s ease-in-out infinite; }
.star .spark + .spark { animation-delay: 1.3s; }
.star .sheen { animation: sheen 6s ease-in-out infinite; }
.star .holo { animation: holo 7s ease-in-out infinite; }
.tab-star .star .sheen { animation-delay: 2s; }

/* Things that move on hover and on press */
.btn, .big, .iconbtn, .chip, .tab, .tab-star, .meter, .ev, .li, .stat, .seg a, .seg button, .side-link, .day, .linkbtn {
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .2s, box-shadow .2s, filter .2s, color .2s;
}
.blob, .av, .tile, .mascot, .ic { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }

@media (hover: hover) and (pointer: fine) {
  .pcard:hover { box-shadow: 0 6px 0 var(--lip), 0 12px 28px rgba(15, 25, 45, .08); }
  .pcard:hover::before { opacity: .42; }
  .pcard:hover .pcard-in::after { opacity: .6; }

  .meter:hover { background: color-mix(in srgb, var(--aquasoft) 55%, var(--raised)); }
  .meter:hover .star, .tab-star:hover .star, .side-link:hover .star { transform: rotate(-6deg) scale(1.04); }
  .meter:hover .ic { transform: translateX(2px); }
  .tab-star:hover { transform: translateY(-1px); }

  .btn:hover { filter: brightness(1.03); }
  .btn[disabled]:hover { filter: none; }
  .big:hover { filter: brightness(1.03); }
  .big:hover .bi .ic { transform: translateX(2px); }
  .iconbtn:hover { background: var(--raised); }

  .ev:hover, a.li:hover, button.li:hover { background: var(--raised); }
  .ev:hover .blob { transform: rotate(-4deg); }
  a.li:hover > .ic:last-child { transform: translateX(2px); }

  .tab:hover { color: var(--ink); }
  .chip:not(.on):hover { background: var(--lavsoft); }
  .seg a:not(.on):hover, .seg button:not(.on):hover { color: var(--ink); }
  .linkbtn:hover { text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .tg:hover { filter: brightness(1.04); }
}

/* Phones: no hover, so every tap gets a quick squish instead. */
.ev:active, a.li:active, button.li:active { background: var(--raised); }
.ev:active, a.li:active, .meter:active, .chip:active, .day:active, .stat:active { transform: scale(.98); }
.tab:active, .iconbtn:active { transform: scale(.9); }
.tab-star:active { transform: scale(.92); }
.tab-star:active .star, .meter:active .star { transform: rotate(-20deg) scale(1.15); }
.ev:active .blob { transform: rotate(-8deg) scale(1.05); }
.pcard:active { transform: scale(.99); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .pcard { background: var(--foil); }
}
.new-total { margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--raised); }
.new-total b { font-family: 'Concert One', sans-serif; font-size: 18px; font-weight: 400; color: var(--ink); }
.new-total.is-bad { background: var(--redsoft); color: var(--red); }
.new-total.is-bad b { color: var(--red); }

/* ---------- check-in codes ---------- */
.checkin-code { font-family: 'Concert One', sans-serif; font-size: 48px; line-height: 1.05; letter-spacing: .08em; color: var(--rare); font-variant-numeric: tabular-nums; white-space: nowrap; }
.codebox summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.codebox summary::-webkit-details-marker { display: none; }
.codebox summary .bi, .codecard .bi { width: 42px; height: 42px; border-radius: 999px; background: var(--raised); display: flex; align-items: center; justify-content: center; flex: none; }
.codebox[open] summary > svg:last-child { transform: rotate(90deg); }
.codecard { gap: 12px; text-decoration: none; color: inherit; }
.kiosk { min-height: 100vh; min-height: 100dvh; display: flex; }
.kiosk-in { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 96px); padding: clamp(20px, 5vw, 64px); flex-wrap: wrap; position: relative; }
.kiosk-side { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.kiosk-side h1 { font-size: clamp(32px, 5vw, 56px); }
.kiosk-steps { margin: 0; padding-left: 1.3em; font-size: clamp(16px, 2vw, 21px); font-weight: 700; display: grid; gap: 6px; }
.kiosk-code { font-size: clamp(64px, 11vw, 132px); }
.kiosk-qr { width: min(46vh, 80vw, 460px); }
.kiosk-full { position: absolute; top: 16px; right: 16px; }

/* ---------- privacy policy and other long reading ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 28px 20px 64px; line-height: 1.6; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin: 26px 0 8px; font-size: 20px; }
.legal p, .legal li { margin: 0 0 10px; }
.legal ul { padding-left: 1.2em; margin: 0 0 10px; }
.legal .brand { display: flex; align-items: center; gap: 10px; }

