/* AVL Ranked. Phone first. Each surface is its own colour world: sand, gym, field. Leagues and Play sit on paper. */
@font-face { font-family: 'Anybody'; font-style: normal; font-weight: 300 900; font-stretch: 50% 150%; font-display: swap;
  src: url(/fonts/anybody-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Anybody'; font-style: normal; font-weight: 300 900; font-stretch: 50% 150%; font-display: swap;
  src: url(/fonts/anybody-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Next'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/atkinson-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Next'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/atkinson-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --f-num: 'Anybody', ui-sans-serif, system-ui, sans-serif;
  --f-body: 'Atkinson Next', ui-sans-serif, system-ui, sans-serif;
  --t-cap: .8125rem; --t-body: 1rem; --t-big: 1.375rem; --t-hero: 2.75rem;
  --gut: 16px; --r: 14px; --r-sheet: 22px;
  --dock-h: 64px; --top-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);

  /* paper (Leagues, Play) */
  --ground: #F1EDE4; --ink: #1D232B; --up: #2D7A4B; --hot: #B5452A;
}
/* the colour worlds. body[data-world] is set from the room + the chosen ladder */
[data-world="sand"]       { --ground: #EBDFC7; --ink: #1F2B38; --up: #2E6E43; --hot: #B5452A; }
[data-world="indoor"]     { --ground: #142131; --ink: #F0E8D9; --up: #7FD39C; --hot: #FF9A70; }
[data-world="grass"]      { --ground: #1C3526; --ink: #EEF1E1; --up: #B9E07A; --hot: #FFB28A; }
[data-world="pickleball"] { --ground: #D5E2DE; --ink: #15303A; --up: #23704A; --hot: #B5452A; }
[data-world="roundnet"]   { --ground: #F0E3CF; --ink: #3A1D16; --up: #2E6E43; --hot: #C2410C; }
[data-world="hoops"]      { --ground: #241B16; --ink: #F3E5D2; --up: #9AD7A4; --hot: #FF9466; }
@media (prefers-color-scheme: dark) {
  :root                         { --ground: #121417; --ink: #ECE7DD; --up: #84D3A0; --hot: #FF9A70; }
  [data-world="sand"]       { --ground: #2A241B; --ink: #F0E3CB; --up: #9CD9A8; --hot: #FFA27A; }
  [data-world="pickleball"] { --ground: #10262D; --ink: #DCEBE6; --up: #8EDBAE; --hot: #FFA27A; }
  [data-world="roundnet"]   { --ground: #2B1A14; --ink: #F3E2CB; --up: #9CD9A8; --hot: #FF9F6E; }
}
:root, body, .sheet {
  --ink-2: color-mix(in oklab, var(--ink) 66%, var(--ground));
  --ink-3: color-mix(in oklab, var(--ink) 42%, var(--ground));
  --line:  color-mix(in oklab, var(--ink) 13%, var(--ground));
  --raise: color-mix(in oklab, var(--ink) 5%, var(--ground));
  --raise-2: color-mix(in oklab, var(--ink) 9%, var(--ground));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground); color: var(--ink);
  font-family: var(--f-body); font-size: var(--t-body); line-height: 1.4;
  font-style: normal; font-synthesis: none;
  -webkit-font-smoothing: antialiased; overflow: hidden;
  transition: background-color .6s ease, color .6s ease;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-stretch: 72%; font-weight: 700; letter-spacing: -.01em; }
.cap { font-size: var(--t-cap); color: var(--ink-2); }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

/* ---------- top bar ---------- */
#top {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) var(--gut) 0; display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in oklab, var(--ground) 92%, transparent);
  transition: background-color .6s ease;
}
#mark { font-family: var(--f-num); font-weight: 800; font-stretch: 140%; font-size: 1.0625rem; letter-spacing: .02em; text-transform: uppercase; display: flex; gap: .4em; align-items: baseline; }
#mark span { font-weight: 400; color: var(--ink-2); }
#meBtn { display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 0 2px; }
#meBtn .who { font-weight: 700; }
#meBtn .num { font-size: 1.05rem; }
#meBtn.join { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* ---------- rooms (swipe sideways) ---------- */
#rooms {
  position: fixed; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
#rooms::-webkit-scrollbar { display: none; }
.room {
  scrollbar-width: none;
  flex: 0 0 100%; height: 100%; overflow-y: auto; overflow-x: hidden; scroll-snap-align: start; scroll-snap-stop: always;
  padding: calc(var(--top-h) + var(--safe-t) + 4px) 0 calc(var(--dock-h) + var(--safe-b) + 40px);
  overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------- dock ---------- */
#dock {
  position: fixed; inset: auto 0 0 0; z-index: 20; height: calc(var(--dock-h) + var(--safe-b));
  padding: 0 var(--gut) var(--safe-b); display: flex; align-items: center; gap: 4px;
  background: color-mix(in oklab, var(--ground) 94%, transparent);
  transition: background-color .6s ease;
}
#dock .tab { min-height: 44px; padding: 0 8px; white-space: nowrap; font-weight: 700; color: var(--ink-3); transition: color .25s; }
#dock .tab:first-child { padding-left: 0; }
#dock .tab[aria-current="true"] { color: var(--ink); }
#logBtn {
  margin-left: auto; height: 48px; padding: 0 16px; border-radius: 14px; white-space: nowrap; flex: 0 0 auto; background: var(--ink); color: var(--ground);
  font-weight: 700; display: flex; align-items: center; gap: 8px; transition: transform .2s, background-color .6s, color .6s;
}
#logBtn:active { transform: scale(.97); }
#logBtn svg { width: 18px; height: 18px; }

/* ---------- ladder room ---------- */
.ladders { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; padding: 8px var(--gut) 2px; margin: 0 calc(-1 * var(--gut)); }
.ladders::-webkit-scrollbar { display: none; }
.ladders button { font-family: var(--f-num); font-stretch: 100%; font-weight: 800; font-size: 1.25rem; color: var(--ink-3); white-space: nowrap; min-height: 44px; transition: color .25s; }
.ladders button[aria-pressed="true"] { color: var(--ink); }

.pano { position: relative; margin: 6px calc(-1 * var(--gut)) 0; height: 260px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pano svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pano .far { fill: color-mix(in oklab, var(--ink) 7%, var(--ground)); }
.pano .mid { fill: color-mix(in oklab, var(--ink) 11%, var(--ground)); }
.pano .main { fill: color-mix(in oklab, var(--ink) 16%, var(--ground)); }
.pano .contour { stroke: color-mix(in oklab, var(--ink) 10%, transparent); stroke-width: 1; }
.pano .mitchell, .pano .riverline { stroke: color-mix(in oklab, var(--ink) 30%, transparent); stroke-width: 1; stroke-dasharray: 2 4; }
.pano .clabel { font-family: var(--f-num); font-stretch: 76%; font-size: 10px; fill: var(--ink-2); font-weight: 600; }
.pano .clabel.on { fill: color-mix(in oklab, var(--ground) 75%, transparent); }
.pano .people { fill: color-mix(in oklab, var(--ink) 78%, var(--ground)); }
.pano .people-edge { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.pano .notch { stroke: var(--ground); stroke-width: 1; opacity: .55; }
.pano .notch.me { stroke: var(--hot); stroke-width: 3; opacity: 1; }
.pano .stick { stroke: var(--ink); stroke-width: 1; opacity: .6; }
.pano .tag { font-family: var(--f-body); font-weight: 700; font-size: 12px; fill: var(--ink); }
.pano .tag.lead { font-size: 13px; }
.pano .tag.mine { fill: var(--hot); }
.pano .tag.low { font-weight: 400; font-size: 11px; fill: var(--ink-2); }
.pano .tag .ft { font-family: var(--f-num); font-stretch: 76%; font-weight: 600; fill: var(--ink-2); }
.pano .scrub { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.pano .pl { fill: var(--ground); stroke: var(--ink); stroke-width: 2; }

.lede { margin: 14px 0 6px; font-size: var(--t-body); color: var(--ink-2); max-width: 34em; }
.lede b { color: var(--ink); }
.sample { margin: 10px 0 4px; padding: 12px 14px; border-radius: var(--r); background: var(--raise-2); font-size: var(--t-cap); color: var(--ink-2); }
.sample b { color: var(--ink); }

.board { list-style: none; margin: 10px 0 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px 12px;
  min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left;
}
.row .rk { font-family: var(--f-num); font-stretch: 70%; font-weight: 800; font-size: 1.5rem; color: var(--ink-2); text-align: left; }
.row .rk.top { color: var(--ink); }
.row .nm { display: block; font-weight: 700; font-size: 1.0625rem; line-height: 1.2; }
.row .sub { display: block; font-size: var(--t-cap); color: var(--ink-2); margin-top: 2px; }
.row .el { text-align: right; }
.row .el .num { font-size: 1.375rem; display: block; line-height: 1.05; }
.row .el .mv { display: block; white-space: nowrap; font-size: var(--t-cap); font-family: var(--f-num); font-stretch: 80%; font-weight: 600; color: var(--ink-3); }
.mv.up { color: var(--up) !important; } .mv.down { color: var(--ink-2) !important; }
.row.me .nm::after { content: 'you'; margin-left: 8px; font-size: var(--t-cap); font-weight: 700; color: var(--hot); }

h2.sec { font-family: var(--f-num); font-stretch: 112%; font-weight: 800; font-size: var(--t-big); margin: 34px 0 4px; letter-spacing: 0; }
h2.sec + .cap { margin: 0 0 8px; }

.feed { list-style: none; margin: 8px 0 0; padding: 0; }
.feed li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed .line { font-size: var(--t-body); }
.feed .line b { font-weight: 700; }
.feed .meta { font-size: var(--t-cap); color: var(--ink-2); margin-top: 2px; }
.feed .moves { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: var(--t-cap); }
.feed .moves span { white-space: nowrap; }

.empty { padding: 28px 0; color: var(--ink-2); }
.empty b { color: var(--ink); }

/* ---------- leagues ---------- */
.sports { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 8px var(--gut) 2px; margin: 0 calc(-1 * var(--gut)); }
.sports::-webkit-scrollbar { display: none; }
.sports button { font-weight: 700; color: var(--ink-3); white-space: nowrap; min-height: 44px; }
.sports button[aria-pressed="true"] { color: var(--ink); }
.league { padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.league .org { font-size: var(--t-cap); color: var(--ink-2); font-weight: 700; letter-spacing: .02em; }
.league h3 { margin: 2px 0 2px; font-family: var(--f-num); font-stretch: 100%; font-weight: 800; font-size: 1.25rem; line-height: 1.15; }
.league .when { font-size: var(--t-cap); color: var(--ink-2); }
.div { margin-top: 12px; width: 100%; text-align: left; display: block; }
.div .dn { font-size: var(--t-cap); font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; }
.mini { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 10px; margin-top: 4px; }
.mini .p { font-family: var(--f-num); font-stretch: 72%; font-weight: 800; color: var(--ink-3); }
.mini .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .r { font-family: var(--f-num); font-stretch: 72%; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.more { font-size: var(--t-cap); font-weight: 700; color: var(--ink); margin-top: 6px; display: inline-block; }
.nostand { font-size: var(--t-cap); color: var(--ink-2); margin-top: 8px; }
.nostand a { font-weight: 700; color: var(--ink); }

table.stand { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9375rem; }
table.stand th { font-size: var(--t-cap); color: var(--ink-2); font-weight: 700; text-align: right; padding: 6px 0 6px 8px; border-bottom: 1px solid var(--line); }
table.stand th:nth-child(2), table.stand td:nth-child(2) { text-align: left; }
table.stand td { white-space: nowrap; padding: 10px 0 10px 8px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--f-num); font-stretch: 76%; font-weight: 600; font-variant-numeric: tabular-nums; }
table.stand td:first-child, table.stand th:first-child { padding-left: 0; text-align: left; width: 26px; color: var(--ink-3); font-weight: 800; }
table.stand td.team { font-family: var(--f-body); font-stretch: 100%; font-weight: 700; white-space: normal; width: 100%; }
.form i { width: .9em !important; }
.form i { font-style: normal; display: inline-block; width: 1.1em; text-align: center; }
.form i.w { color: var(--up); } .form i.l { color: var(--ink-3); }
.src { font-size: var(--t-cap); color: var(--ink-2); margin-top: 10px; }
.src a { font-weight: 700; color: var(--ink); }

/* ---------- play ---------- */
.day { margin-top: 18px; }
.day h3 { font-family: var(--f-num); font-stretch: 112%; font-weight: 800; font-size: 1.125rem; margin: 0 0 4px; }
.slot { display: grid; grid-template-columns: 76px 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.slot .tm { font-family: var(--f-num); font-stretch: 76%; font-weight: 700; color: var(--ink-2); }
.slot .wh { font-weight: 700; }
.slot .ds { grid-column: 2; font-size: var(--t-cap); color: var(--ink-2); }
.place { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.place .pn { font-weight: 700; }
.place .pd { font-size: var(--t-cap); color: var(--ink-2); grid-column: 1; }
.place .go { grid-row: 1 / span 2; grid-column: 2; }
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--raise-2); color: var(--ink);
}
.btn.solid { background: var(--ink); color: var(--ground); }
.btn.quiet { background: none; padding: 0 4px; text-decoration: underline; text-underline-offset: 4px; }
.btn:disabled { opacity: .4; }
.joinrow { display: flex; gap: 8px; margin-top: 12px; }
.field {
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; width: 100%;
  font-size: 1.0625rem; outline: none;
}
.field:focus { border-color: var(--ink); }
.field.code { text-transform: uppercase; letter-spacing: .3em; font-family: var(--f-num); font-weight: 800; font-stretch: 100%; }
textarea.field { padding: 12px 14px; min-height: 96px; resize: vertical; }

/* ---------- sheets (grow from what you tapped) ---------- */
#scrim { position: fixed; inset: 0; z-index: 40; background: color-mix(in oklab, var(--ink) 30%, transparent); opacity: 0; pointer-events: none; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; top: calc(var(--safe-t) + 10px);
  background: var(--ground); color: var(--ink); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  display: flex; flex-direction: column; will-change: transform, clip-path;
  box-shadow: 0 -10px 40px color-mix(in oklab, #000 18%, transparent);
}
.sheet .grab { flex: 0 0 auto; height: 28px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet .grab::before { content: ''; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet .x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; z-index: 2; }
.sheet .x svg { width: 18px; height: 18px; }
.sheet .body { flex: 1; overflow-y: auto; padding: 0 var(--gut) calc(var(--safe-b) + 28px); overscroll-behavior: contain; }
.sheet .body > .inner { max-width: 640px; margin: 0 auto; }
.sheet h2 { font-family: var(--f-num); font-stretch: 100%; font-weight: 800; font-size: 1.75rem; margin: 2px 48px 4px 0; line-height: 1.1; }
.sheet .kick { font-size: var(--t-cap); color: var(--ink-2); font-weight: 700; }

/* player card */
.big { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.big .num { font-size: var(--t-hero); line-height: 1; }
.big .unit { font-weight: 700; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 6px; }
.facts div { font-size: var(--t-cap); color: var(--ink-2); }
.facts b { display: block; font-family: var(--f-num); font-stretch: 76%; font-weight: 800; font-size: 1.375rem; color: var(--ink); line-height: 1.1; }
.path { width: 100%; height: 140px; margin-top: 8px; display: block; }
.path .ln { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.path .ar { fill: color-mix(in oklab, var(--ink) 10%, var(--ground)); }
.path .gl { stroke: var(--line); }
.path text { font-family: var(--f-num); font-stretch: 72%; font-size: 10px; fill: var(--ink-3); font-weight: 600; }
.mates { list-style: none; padding: 0; margin: 6px 0 0; }
.mates li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mates li span:last-child { color: var(--ink-2); font-size: var(--t-cap); }
.lad-pick { display: flex; gap: 14px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.lad-pick button { font-weight: 700; color: var(--ink-3); min-height: 36px; }
.lad-pick button[aria-pressed="true"] { color: var(--ink); }

/* log a game */
.step { margin-top: 18px; }
.step > .lbl { font-size: var(--t-cap); font-weight: 700; color: var(--ink-2); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--raise-2); font-weight: 700; font-size: .9375rem; }
.choice[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side {
  min-height: 132px; border-radius: var(--r); padding: 10px 12px 12px; background: var(--raise); text-align: left; display: flex; flex-direction: column; gap: 6px;
  border: 2px solid transparent; transition: border-color .2s;
}
.side.on { border-color: var(--ink); }
.side .sl { font-family: var(--f-num); font-stretch: 112%; font-weight: 800; font-size: 1.0625rem; }
.side .hint { font-size: var(--t-cap); color: var(--ink-2); }
.side .ppl { display: flex; flex-direction: column; gap: 4px; }
.pp { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 700; min-height: 30px; }
.pp > span:last-child { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.pp > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp .mv { font-family: var(--f-num); font-stretch: 80%; font-weight: 700; font-size: .875rem; }
.pp .rm { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-2); margin-right: -6px; }
.pp .rm svg { width: 12px; height: 12px; }
.picker { margin-top: 10px; }
.picker .list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.picker .person { min-height: 38px; padding: 0 12px; border-radius: 10px; background: var(--raise-2); font-weight: 700; font-size: .9375rem; }
.picker .person.new { background: none; border: 1.5px dashed var(--ink-3); }
.score { display: flex; align-items: center; gap: 10px; }
.score input { width: 72px; text-align: center; font-family: var(--f-num); font-weight: 800; font-stretch: 90%; font-size: 1.375rem; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; width: 100%; text-align: left; }
.switch .knob { width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; flex: 0 0 auto; transition: background-color .2s; }
.switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--ground); transition: transform .28s cubic-bezier(.3,1.2,.5,1); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch[aria-checked="true"] .knob { background: var(--ink); }
.switch[aria-checked="true"] .knob::after { transform: translateX(20px); }
.odds { margin-top: 14px; font-size: var(--t-body); color: var(--ink-2); min-height: 1.4em; }
.odds b { color: var(--ink); }
.submit { margin-top: 18px; width: 100%; height: 54px; border-radius: 14px; background: var(--ink); color: var(--ground); font-weight: 800; font-size: 1.0625rem; }
.submit:disabled { opacity: .35; }
.err { color: var(--hot); font-weight: 700; font-size: var(--t-cap); margin-top: 10px; min-height: 1em; }
.done { text-align: left; padding-top: 6px; }
.done .num { font-size: var(--t-hero); }

/* court */
.court-code { font-family: var(--f-num); font-weight: 900; font-stretch: 130%; font-size: 3.5rem; letter-spacing: .08em; line-height: 1; margin: 6px 0 2px; }
.qr { width: 168px; height: 168px; margin: 12px 0 4px; background: #fff; padding: 10px; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.roster { list-style: none; padding: 0; margin: 8px 0 0; }
.roster li { display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); }
.roster .num { color: var(--ink-2); font-size: 1rem; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.teams > div { background: var(--raise); border-radius: var(--r); padding: 10px 12px; }
.teams .tn { font-family: var(--f-num); font-stretch: 112%; font-weight: 800; }
.teams ul { list-style: none; padding: 0; margin: 4px 0 0; }
.teams li { font-weight: 700; padding: 3px 0; }
.rowbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* confirm cards */
.confirm { margin: 12px 0 0; padding: 14px; border-radius: var(--r); background: var(--raise-2); }
.confirm .line { font-weight: 700; }
.confirm .meta { font-size: var(--t-cap); color: var(--ink-2); margin-top: 2px; }
.confirm .rowbtns { margin-top: 10px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + var(--safe-b) + 14px); transform: translateX(-50%) translateY(20px);
  z-index: 60; background: var(--ink); color: var(--ground); padding: 12px 16px; border-radius: 12px; font-weight: 700; opacity: 0;
  transition: opacity .25s, transform .35s cubic-bezier(.2,.9,.3,1); pointer-events: none; max-width: calc(100% - 32px);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 900px) {
  :root { --gut: 32px; }
  .pano { height: 340px; margin-left: 0; margin-right: 0; }
  .wrap { max-width: 860px; }
  .sheet { left: 50%; right: auto; width: 640px; margin-left: -320px; top: 40px; border-radius: var(--r-sheet); bottom: 40px; }
}
@media (max-width: 360px) {
  #dock .tab { padding: 0 6px; font-size: .9375rem; }
  #logBtn { padding: 0 12px; font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.room::-webkit-scrollbar { display: none; }
