:root {
  --bg: #e9eeeb;
  --surface: #ffffff;
  --surface-2: #f4f7f5;
  --ink: #16201b;
  --muted: #5d6b64;
  --line: #d3dbd6;
  --accent: #2346d8;
  --accent-ink: #ffffff;
  --stub: #f2c94c;
  --hand: #8a5a00;
  --up: #0b7a4b;
  --down: #c2412d;
  --shadow: 0 1px 2px rgba(22, 32, 27, .06), 0 6px 24px rgba(22, 32, 27, .06);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
/* Classic (the default): the app's original look. Light by day, the original green-tinted dark when the phone is in dark mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0e1411; --surface: #161f1a; --surface-2: #1c2721; --ink: #e5ece8; --muted: #93a29a;
    --line: #29352f; --accent: #7d95ff; --accent-ink: #0e1411; --stub: #e2b93b; --hand: #e2b93b;
    --up: #45c48a; --down: #ff7a63; --shadow: none; color-scheme: dark;
  }
}
/* Dark: black and white (pure black, charcoal cards, white text and buttons); gold and green/red keep their meaning */
:root[data-theme="dark"] {
  --bg: #000000; --surface: #111111; --surface-2: #1b1b1b; --ink: #f5f5f5; --muted: #a3a3a3;
  --line: #2e2e2e; --accent: #ffffff; --accent-ink: #000000; --stub: #e2b93b; --hand: #e2b93b;
  --up: #45c48a; --down: #ff7a63; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--body);
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.eyebrow { margin: 0; font: 600 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.brand { font: 700 44px/1 var(--display); letter-spacing: .01em; margin: 6px 0 0; text-transform: uppercase; }
.brand.small { font-size: 24px; margin: 0; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
.error { color: var(--down); margin: 0; font-size: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: var(--down); color: #fff; }
.btn.danger-ghost { background: transparent; border-color: var(--line); color: var(--down); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.link-btn { background: none; border: 0; padding: 4px; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.warn { background: var(--stub); color: #2a2103; }
.pill.leader { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }

/* Join */
.join { min-height: 100vh; display: grid; place-items: center; padding-block: 32px; }
.join-card {
  width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border-radius: 16px; padding: 28px 22px; box-shadow: var(--shadow);
  border-top: 6px solid var(--stub);
}
.join-copy { color: var(--muted); margin: 0 0 8px; }
.join-card label { font-weight: 600; font-size: 14px; margin-top: 4px; }
.hint { font-weight: 400; color: var(--muted); }
input, select {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.join-card .btn { margin-top: 8px; }

/* Groups screen */
.join-card.wide { max-width: 640px; gap: 18px; }
.groups-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.group-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.group-item {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  cursor: pointer; text-align: left;
}
.group-item:hover { border-color: var(--accent); }
.group-item-name { font: 700 22px/1.1 var(--display); text-transform: uppercase; }
.unread-badge {
  display: inline-block; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 8px; vertical-align: 3px;
  border-radius: 11px; background: #d93a26; color: #fff; font: 700 13px/22px var(--body); text-align: center;
}
.group-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; border-top: 2px dashed var(--line); padding-top: 18px; }
.group-form { display: flex; flex-direction: column; gap: 8px; }
.group-form label { font-weight: 600; font-size: 14px; }
.group-form .btn { margin-top: auto; }
.form-title { margin: 0; font: 700 22px/1.1 var(--display); text-transform: uppercase; }
.code-input { text-transform: uppercase; letter-spacing: .2em; font: 600 20px/1 var(--display); }

/* Owner screen (only the app's owner sees it) */
.owner-panel { border-top: 2px dashed var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.owner-panel summary { cursor: pointer; font-weight: 700; }
.owner-panel[open] summary { margin-bottom: 10px; }
.owner-panel > p { margin: 0 0 10px; }
.owner-odds {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 14px;
}
.owner-odds p { margin: 2px 0 0; }
.owner-odds .btn { flex-shrink: 0; }
.owner-sub { margin: 0 0 6px; font-size: 15px; }
.owner-admin-link { align-self: flex-start; margin-bottom: 12px; text-decoration: none; }

/* Your plan + upgrade */
.plan-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
}
.plan-card p { margin: 2px 0 0; }
.plan-card .btn { flex-shrink: 0; }
.plan-buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.upgrade-dialog {
  width: min(420px, calc(100vw - 32px)); padding: 22px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: inherit;
}
.upgrade-dialog::backdrop { background: rgb(0 0 0 / 0.6); }
.upgrade-dialog form { display: flex; flex-direction: column; gap: 12px; }
.upgrade-dialog p { margin: 0; }
.upgrade-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.upgrade-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.owner-form { display: flex; gap: 8px; margin-bottom: 10px; }
.owner-form input { flex: 1; min-width: 0; }
.owner-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.owner-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
}
.owner-who { display: flex; flex-direction: column; min-width: 0; }
.owner-who span:first-child { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Group switcher + info */
.group-switch { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.caret { color: var(--muted); font-size: 14px; }
.group-info { margin-top: 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 4px 18px; }
.group-info summary { cursor: pointer; padding: 12px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.invite { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 6px 0 12px; }
.invite-code { font: 700 30px/1 var(--display); letter-spacing: .18em; user-select: all; }
.members { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.member { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.leave-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 0 14px; }
#leave-confirm { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gone-note { color: var(--down); }

/* Auth */
.mode-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 4px; margin-bottom: 4px; }
.mode-tab { flex: 1; min-height: 38px; border: 0; border-radius: 8px; background: none; font-weight: 600; color: var(--muted); cursor: pointer; }
.mode-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form label { font-weight: 600; font-size: 14px; margin-top: 4px; }
.auth-form > .hint { font-size: 13px; margin-top: -4px; }
.auth-form .btn { margin-top: 8px; }
.link-btn.center { align-self: center; }

/* Locked groups */
.lock-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 4px 0 12px; }
.lock-row > div { display: flex; flex-direction: column; gap: 2px; max-width: 46ch; }
.pill.editor { background: var(--surface-2); border: 1px solid var(--accent); color: var(--accent); }
.view-only { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--surface); border-left: 4px solid var(--accent); font-size: 14px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .panels.single { grid-template-columns: minmax(0, 720px); justify-content: center; } }

/* Free plan leg count on the slip */
.leg-cap { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.leg-cap.full { color: var(--stub); }

/* Games on this slip: each game's FanDuel page */
.slip-games { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.slip-games-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.slip-games-list { display: flex; flex-wrap: wrap; gap: 6px; }
.slip-game {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px;
}
.slip-game:hover { background: var(--surface-2); }
.slip-game-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.leg-link-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* Add legs to FanDuel one at a time */
.leg-links { margin-top: 10px; }
.leg-links-toggle { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; }
.leg-links-toggle[aria-expanded="true"] .caret { display: inline-block; transform: rotate(180deg); }
.leg-links-panel { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 8px 12px 10px; }
.leg-links-panel > p { margin: 0 0 6px; }
.leg-links-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.leg-link-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 4px 0; }
.leg-link-row::marker { font-weight: 600; color: var(--muted); }
.leg-link-name { font-weight: 600; font-size: 14px; }
.leg-link-row.done .leg-link-name { color: var(--muted); }

/* "Placed" list under Place bet */
.placed { margin-top: 8px; }
.placed-chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer;
}
.placed-chip[aria-expanded="true"] .caret { display: inline-block; transform: rotate(180deg); }
.placed-panel { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 6px 12px 10px; max-width: 420px; }
.placed-list { list-style: none; margin: 0; padding: 0; }
.placed-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.placed-row:last-child { border-bottom: 0; }
.placed-name { font-weight: 600; flex: 1 1 auto; }
.placed-when { font-size: 13px; color: var(--muted); }
.placed-stale { color: var(--down); }
.placed-note { margin: 6px 0 0; }

/* Profit boost calculator */
.boost-wrap { margin-top: 12px; }
.boost-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px;
  border-radius: 10px; border: 1px dashed var(--stub); background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer; text-align: left;
}
.boost-toggle-title { flex: 1; }
.boost-summary { font: 700 15px/1 var(--display); color: var(--stub); font-variant-numeric: tabular-nums; }
.boost-toggle .caret { color: var(--muted); transition: transform .15s; }
.boost-toggle[aria-expanded="true"] { border-radius: 10px 10px 0 0; border-bottom-style: none; }
.boost-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.boost { padding: 12px 14px; border-radius: 0 0 12px 12px; background: var(--surface-2); border: 1px dashed var(--stub); border-top: 0; display: flex; flex-direction: column; gap: 10px; }
.boost-head { display: flex; justify-content: space-between; align-items: baseline; }
.boost-label { font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.boost-pct { font: 700 22px/1 var(--display); color: var(--stub); font-variant-numeric: tabular-nums; }
#boost-range { width: 100%; min-height: 28px; padding: 0; border: 0; background: none; accent-color: var(--stub); }
.boost-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--stub); color: #2a2103; border-color: var(--stub); }
.boost-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.boost-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.boost-cap { font-size: 12px; color: var(--muted); }
.boost-odds, .boost-pays { font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.boost-extra { color: var(--up); font-weight: 600; overflow-wrap: anywhere; }
.stake-wrap { display: inline-flex; align-items: center; gap: 2px; font: 700 20px/1 var(--display); }
.stake-wrap input { width: 100%; min-height: 36px; padding: 4px 8px; font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.boost-note { margin: 0; }
@media (max-width: 380px) { .boost-grid { grid-template-columns: 1fr 1fr; } .boost-grid .boost-cell:last-child { grid-column: 1 / -1; } }

/* Game picker */
.game-picker { display: flex; flex-direction: column; gap: 8px; }
.game-picker-head { display: flex; justify-content: space-between; align-items: center; }
.day-chip { display: inline-flex; align-items: center; gap: 6px; }
.day-count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--line); color: var(--ink); font-size: 11px; text-align: center; }
.day-chip[aria-selected="true"] .day-count { background: rgba(255, 255, 255, .25); color: inherit; }
.game-filter { min-height: 38px; }
.game-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; max-height: min(420px, 55vh); overflow-y: auto; overscroll-behavior: contain; }
.game-card {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  cursor: pointer; text-align: left;
}
.game-card:hover { border-color: var(--accent); }
.game-card.selected { border-color: var(--stub); box-shadow: inset 3px 0 0 var(--stub); }
.game-teams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.team-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-time { flex: none; font: 600 14px/1 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.game-time.started { color: var(--down); }
.team-badge {
  flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  font: 700 12px/1 var(--display); letter-spacing: .02em;
}
.team-badge.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }
.game-chosen {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--stub); background: var(--surface-2);
}
.game-chosen-teams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.game-chosen-when { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.player-name.with-badge { display: flex; align-items: center; gap: 8px; }


/* By game / By market switch */
.view-switch { display: flex; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 4px; }
.view-tab { flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: none; font-weight: 600; color: var(--muted); cursor: pointer; }
.view-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.by-game, .by-market { display: flex; flex-direction: column; gap: 10px; }

/* By market: game sections with player ladders (FanDuel-style) */
.mk-hint { margin: 0; }
.mk-list { display: flex; flex-direction: column; gap: 8px; }
.mk-game { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.mk-game.open { border-color: var(--accent); }
.mk-head {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px;
  background: none; border: 0; color: inherit; cursor: pointer; text-align: left;
}
.mk-teams { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; font-weight: 600; }
.mk-team { display: inline-flex; align-items: center; gap: 6px; }
.mk-time { font: 600 13px/1 var(--display); color: var(--muted); white-space: nowrap; }
.mk-time.started { color: var(--down); }
.mk-head .caret { color: var(--muted); transition: transform .15s; }
.mk-head[aria-expanded="true"] .caret { transform: rotate(180deg); }
.mk-body { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.mk-msg { margin: 10px 0 0; }
.mk-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; padding-top: 8px; }
.mk-player { font-weight: 600; font-size: 14px; line-height: 1.2; overflow-wrap: normal; word-break: normal; }
.mk-cols { overflow-x: auto; display: flex; flex-direction: column; gap: 6px; padding-bottom: 2px; }
.mk-cols-head, .mk-cols-row { min-width: max-content; }
.mk-rungs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.mk-cell {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 72px; min-height: 50px; padding: 4px 6px; border-radius: 10px; border: 1.5px solid var(--accent);
  background: var(--surface); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
}
.mk-cell:hover { background: var(--surface-2); }
.mk-cell.none { border: 1px dashed var(--line); color: var(--muted); cursor: default; min-height: 44px; }
.mk-top { font-size: 13px; font-weight: 600; line-height: 1.1; }
.mk-price { font: 700 17px/1.1 var(--display); color: var(--accent); }
.mk-cell.added { border-color: var(--up); background: var(--surface); }
.mk-cell.added .mk-price { color: var(--up); }
.mk-cell.added .mk-price::after { content: " ✓"; font-size: 13px; }
.mk-cols-head, .mk-cols-row { display: grid; align-items: center; gap: 6px; }
.mk-cols-head { padding-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.mk-cols-head span { text-align: center; }
.mk-cols-row .mk-cell { min-width: 0; width: 100%; min-height: 46px; padding: 4px 2px; }
.mk-cols-row .mk-price { font-size: 16px; }
.mk-lines .mk-cols-head, .mk-lines .mk-cols-row { min-width: 0; }
.mk-lines .mk-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mk-lines .mk-team > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-lines .mk-cols-head span { letter-spacing: .04em; }
.mk-seeall { align-self: center; font-weight: 600; text-decoration: none; color: var(--accent); padding-top: 4px; }

/* Market rows in Find props */
.market-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* Edges: tappable prices + the add/bet picker */
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pick-chip { min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 700 13px var(--body); cursor: pointer; white-space: nowrap; }
.pick-chip.best { border-color: var(--up); color: var(--up); }
.pick-actions { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.pick-actions .btn { width: 100%; text-align: center; }
/* Best odds for my slip */
.best-top { background: color-mix(in srgb, var(--up) 12%, transparent); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.best-pill { margin-left: 6px; background: var(--up); color: #062014; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
/* Legal links, delete account, report */
.legal-links { text-align: center; margin: 18px 0 0; }
.legal-links a, .legal-note a { color: inherit; }
.legal-links .link-btn { font-size: inherit; }
.legal-note { margin: 4px 0 0; text-align: center; }
.member .report-link { font-size: 13px; color: var(--muted); margin-left: 6px; }
/* State rules */
.state-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 12px; }
.state-why { flex-basis: 100%; }
.state-select { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); max-width: 100%; }
.state-note { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--stub); }
.state-note .state-select { margin-left: 4px; }
.state-block { color: var(--down); font-weight: 600; }
/* Who can join: three-way switch + waiting list */
.lock-row > .join-switch { flex-direction: row; max-width: none; }
.requests-wrap { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--stub); }
.requests-wrap .eyebrow { margin: 0 0 4px; }
.group-item.pending { cursor: default; opacity: .75; border-style: dashed; }
/* Game lines card under the picked game (By game) */
.game-lines-card { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.game-lines-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.row-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Multiple slips */
.slip-switcher { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.slip-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1; min-width: 0; padding-bottom: 2px; scrollbar-width: thin; }
.slip-tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px;
  border-radius: 10px 10px 4px 4px; border: 1px solid var(--line); background: var(--surface-2);
  font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); max-width: 200px;
}
.slip-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slip-tab-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--ink); font-size: 12px; text-align: center; }
.slip-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); border-color: var(--stub); box-shadow: inset 0 3px 0 var(--stub); }
.slip-tab[aria-selected="true"] .slip-tab-count { background: var(--stub); color: #2a2103; }
.new-slip { flex: none; }
.slip-name-form { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.slip-name-form.inline { box-shadow: none; padding: 10px 0 0; margin: 0; background: none; }
.slip-name-row { display: flex; flex-wrap: wrap; gap: 6px; }
.slip-name-row input { flex: 1 1 160px; width: auto; min-height: 38px; }
.slip-title { min-width: 0; }
.slip-name { margin: 4px 0 0; font: 700 26px/1.1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.slip-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.move-select { width: auto; min-height: 34px; padding: 4px 8px; font-size: 14px; border-radius: 8px; }
.add-to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.add-to select { width: auto; flex: 1 1 180px; min-height: 40px; font-weight: 600; }

/* Notifications */
.notify-card {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;
  background: var(--surface); border: 1px solid var(--stub); border-radius: 14px; padding: 12px 16px;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.notify-text { display: flex; flex-direction: column; gap: 2px; }
.notify-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.notify-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 4px 0 12px; }
.notify-row > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.notify-row-title { font-weight: 600; }
/* Add to Home Screen card on "Your groups" */
.install-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1.5px solid var(--accent); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; animation: install-in .35s ease-out; }
.install-icon { width: 48px; height: 48px; border-radius: 11px; flex-shrink: 0; }
.install-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.install-body > p { margin: 0; }
.install-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.install-buttons { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
@keyframes install-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .install-card { animation: none; } }
.ios-install { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.ios-install ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.live { color: var(--up); font-weight: 600; }
.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); margin-right: 5px; vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .live::before { animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .35; } }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.storage-warning { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--stub); color: #2a2103; font-weight: 600; font-size: 14px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.join-card .pw-wrap .pw-toggle { margin-top: 0; }
.invite-banner { border: 1px solid var(--stub); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.invite-banner-text { margin: 4px 0 0; font-weight: 600; }

/* Invite link */
.invite-link { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.invite-link-text { font-size: 14px; word-break: break-all; color: var(--ink); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; user-select: all; }
.invite-link-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Leader controls */
.code-form { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }
.code-form-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.code-form-row .code-input { flex: 1 1 140px; width: auto; min-height: 38px; }
.member-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; justify-content: flex-end; }
.danger-link { color: var(--down); }
.removed-title { margin-top: 14px; }

/* App shell */
.app { max-width: 1120px; margin: 0 auto; padding-block: 12px 32px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 6px 12px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.who #me-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.tabs { display: flex; gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; margin-bottom: 14px; box-shadow: var(--shadow); }
.tab { flex: 1; min-height: 42px; border: 0; border-radius: 9px; background: none; font-weight: 600; cursor: pointer; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--stub); color: #2a2103; font-size: 13px; }

.panel { display: none; }
.panel.active { display: block; }
@media (min-width: 900px) {
  .tabs { display: none; }
  .panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
  .panel, .panel.active { display: block; }
  #panel-slip { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); }
}

/* Slip — styled like a printed bet ticket */
.slip {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  padding: 18px 18px 14px; position: relative;
  border-top: 6px solid var(--stub);
}
/* Fold the slip: legs and the bits under them tuck away; name, odds and Place bet stay */
.slip-fold {
  width: 100%; margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font: 600 14px var(--body); cursor: pointer; text-align: left;
}
.slip-fold[aria-expanded="true"] .caret { display: inline-block; transform: rotate(180deg); }
.slip.folded #legs, .slip.folded #slip-rules, .slip.folded #rules-form, .slip.folded .slip-foot,
.slip.folded #boost-wrap, .slip.folded .book-row, .slip.folded #slip-games, .slip.folded #leg-links { display: none !important; }
.slip.folded .bet-row { margin-top: 12px; }
.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.slip-odds { margin: 2px 0 0; font: 700 44px/1 var(--display); font-variant-numeric: tabular-nums; }
.slip-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#open-all-note { margin-top: 10px; }

.legs { list-style: none; margin: 16px 0 0; padding: 0; border-top: 2px dashed var(--line); }
.leg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.leg:last-child { border-bottom: 0; }
.leg-title { font-weight: 600; font-size: 17px; line-height: 1.25; }
.leg-meta { color: var(--muted); font-size: 13px; }
.leg-odds { font: 700 26px/1 var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.move { display: block; font: 600 12px/1.4 var(--body); text-align: right; }
.move.up { color: var(--up); }
.move.down { color: var(--down); }
.leg-note { grid-column: 1 / -1; font-size: 14px; background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin: 2px 0; }
.leg-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.leg-foot .by { font-size: 13px; color: var(--muted); }
.leg-foot .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.leg.gone .leg-title, .leg.gone .leg-odds { text-decoration: line-through; opacity: .55; }

.group-limit { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.group-limit p { margin: 0; }
.group-limit:has(> [hidden]:first-child):has(> [hidden]:last-child) { display: none; }

/* Slip rules ("2 legs each, + odds only") */
.slip-rules { margin-top: 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--stub); display: flex; flex-direction: column; }
.slip-rules-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.slip-rules-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 10px; }
.slip-rules-head[aria-expanded="true"] .caret { display: inline-block; transform: rotate(180deg); }
.rules-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rules-title .eyebrow { margin: 0; flex-shrink: 0; }
.rules-peek { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rules-new { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--stub); color: #2a2103; }
.rules-body { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.rules-body .link-btn { align-self: flex-end; }
.slip-rules-text { margin: 0; white-space: pre-line; font-weight: 600; font-size: 15px; }
.slip-rules-text.empty { font-weight: 400; color: var(--muted); font-size: 14px; }
.rules-input { width: 100%; font: inherit; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); resize: vertical; min-height: 44px; }
.add-to-rules { margin: 0; }
.add-to-rules .rules-title .eyebrow { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rules-new { flex-shrink: 0; }

/* Find edges */
.edges-view { background: var(--surface); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; max-width: 900px; margin: 0 auto; }
.app.edges-open .panels, .app.edges-open .tabs { display: none !important; }
.edges-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.edges-head .form-title { margin: 0; }
.edges-view > p { margin: 0; }
.edges-opts { display: flex; flex-direction: column; gap: 6px; }
.edges-opts select { width: 100%; }
.edges-scan-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.edges-stake { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.edges-stake input { width: 90px; min-height: 36px; }
.edges-section { display: flex; flex-direction: column; gap: 8px; }
.edges-section h3 { margin: 6px 0 0; font: 700 20px/1.1 var(--display); text-transform: uppercase; }
.arb-card { border: 1.5px solid var(--up); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.arb-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.arb-profit { font: 700 22px/1 var(--display); color: var(--up); }
.arb-leg { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 14px; }
.arb-leg .btn { padding-inline: 10px; }
.best-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.best-row:last-child { border-bottom: 0; }
.best-price { font-weight: 700; color: var(--up); text-align: right; white-space: nowrap; }
.best-others { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.edges-game { font-weight: 700; margin-top: 4px; }

/* Upload slip */
.upload-view select { width: 100%; }
.upload-pick-row { display: flex; align-items: center; gap: 12px; }
.upload-thumb { height: 64px; width: auto; max-width: 96px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
#upload-results { display: flex; flex-direction: column; }
.upload-pick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.upload-pick:last-child { border-bottom: 0; }
.upload-pick input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.upload-pick.off { cursor: default; }
.upload-pick.off .upload-pick-top { color: var(--muted); }
.upload-pick-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.upload-pick-top { display: flex; justify-content: space-between; gap: 10px; }
.upload-price { font-weight: 700; white-space: nowrap; }
.upload-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.upload-add-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.upload-add-row .field-label { margin: 0; }
.upload-read summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.upload-read pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 240px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: 8px; margin: 6px 0 0; }

/* Maintenance screen (app switched off in /admin) */
.maintenance { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16px; }
.maintenance .join-card { text-align: center; gap: 14px; }

/* My legs: uncheck a leg to leave it off your own bet */
.leg-title-row { display: flex; align-items: flex-start; gap: 10px; }
.leg-check {
  flex-shrink: 0; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface-2); color: var(--accent-ink);
  font-weight: 700; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.leg-check.on { background: var(--accent); border-color: var(--accent); }
.leg-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.leg.skipped .leg-title, .leg.skipped .leg-odds { opacity: .45; }
.skip-note { color: var(--hand); font-weight: 600; }
.skip-count { color: var(--muted); }

/* Results (game lines only) and Past slips */
.leg-result { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.leg-result.won, .past-result.won { color: var(--up); }
.leg-result.lost, .past-result.lost { color: var(--down); }
.clears-note { margin: 8px 0 0; }
/* Leaderboard */
.board-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.board-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 64px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.board-row:last-child { border-bottom: 0; }
.board-row.me .board-name { color: var(--accent); }
.board-rank { font: 700 20px/1 var(--display); text-align: center; }
.board-name { font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.board-rec { font: 700 22px/1 var(--display); text-align: right; display: flex; flex-direction: column; gap: 2px; }
.board-streak { font-size: 13px; font-weight: 700; text-align: right; }
.board-streak.hot { color: var(--up); }
.board-streak.cold { color: var(--muted); }
/* Feedback button & "view as" bar */
.feedback-btn { padding-inline: 10px; font-size: 16px; }
.groups-head-links { display: flex; gap: 14px; align-items: center; }
.viewas-bar { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -16px 10px; padding: 8px 16px; background: var(--stub); color: #1a1405; font-weight: 600; font-size: 14px; }
.viewas-bar .btn { background: #1a1405; color: #fff; min-height: 34px; }
/* Share dialog */
.share-slip { width: 100%; margin-top: 8px; }
.share-img { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 12px; background: #0e1411; }
.share-link-row { display: flex; gap: 8px; }
.share-link-row input { flex: 1; min-width: 0; font-size: 14px; }
.share-dialog .upgrade-actions { flex-wrap: wrap; }
.past-slips { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 16px; }
.past-slips > summary { cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.past-slips > p { margin: 8px 0; }
.past-list { list-style: none; margin: 0; padding: 0; }
.past-item { border-top: 1px solid var(--line); padding: 8px 0; }
.past-item summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.past-name { font-weight: 600; }
.past-item summary .past-result { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.past-legs { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 4px; }
.past-legs li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; flex-wrap: wrap; }
/* Hit / Miss / Push on player props */
.mark-row { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mark-chip {
  min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); font: 700 13px var(--body); cursor: pointer;
}
.mark-chip.won.on { background: var(--up); border-color: var(--up); color: #fff; }
.mark-chip.lost.on { background: var(--down); border-color: var(--down); color: #fff; }
.mark-chip.push.on { background: var(--muted); border-color: var(--muted); color: var(--surface); }
/* Leaderboard: best hits */
.best-hits { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--stub); }
.best-hits .eyebrow { margin: 0 0 6px; }
.best-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.best-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: start; }
.best-odds { font: 700 20px/1.1 var(--display); color: var(--up); }
.best-name { font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.past-legs .past-result { font-weight: 700; color: var(--muted); white-space: nowrap; }
.past-remove { margin-top: 6px; font-size: 13px; }
.empty { padding: 28px 4px; color: var(--muted); text-align: center; }

.slip-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 2px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.bet-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.place-bet { flex: 1 1 200px; min-height: 48px; font-size: 17px; }
.place-bet[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.bet-note { margin-top: 8px; }
/* Each slip's sportsbook: FanDuel | DraftKings */
.new-slip-book { width: auto; min-height: 38px; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; }
.theme-row p { margin: 2px 0 0; }
.theme-switch { margin-top: 0; }
.book-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.book-row .field-label { margin: 0; }
.slip-book { display: inline-flex; flex-wrap: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.slip-book .book-opt { white-space: nowrap; }
.bk-short { display: none; }
/* Phones: short book names (FD, DK, MGM, CZR, FAN) so all five fit on one line */
@media (max-width: 560px) {
  .bk-full { display: none; }
  .bk-short { display: inline; }
  .slip-book .book-opt { padding: 5px 10px; }
}
.book-opt {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.book-opt.on { background: var(--accent); color: var(--accent-ink); }
.book-opt:disabled { cursor: default; }
.book-opt:not(.on):not(:disabled):hover { color: inherit; }
#clear-confirm { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Finder */
.finder { background: var(--surface); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.field-label { font-weight: 600; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip {
  flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.outcomes { list-style: none; margin: 0; padding: 0; }
.player-group { border-top: 1px solid var(--line); padding: 10px 0; }
.player-group:first-child { border-top: 0; }
.player-name { font-weight: 600; margin-bottom: 6px; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.option {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 46px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; text-align: left;
}
.option:hover { border-color: var(--accent); }
.option .side { font-size: 14px; }
.option .price { font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.option.added { border-color: var(--up); background: transparent; } /* tap again to remove */
/* Pro-only lines and markets on free accounts: visible, but dimmed */
.option.locked, .mk-cell.locked, .chip.locked { opacity: 0.55; }
.option.added .price::after { content: " ✓"; color: var(--up); }
/* Lines the sportsbook gives no betslip code for (Place bet can't load them) */
.option.by-hand, .mk-cell.by-hand { border-style: dashed; }
.option .side { display: flex; flex-direction: column; gap: 2px; }
.hand-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  color: var(--hand);
}
.hand-legend { margin: 0 0 8px; }
.hand-legend .hand-tag { margin-right: 2px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; max-width: calc(100% - 32px); z-index: 10;
}

@media (prefers-reduced-motion: no-preference) {
  .leg.new { animation: in .35s ease-out; }
  @keyframes in { from { transform: translateY(4px); opacity: .4; } to { transform: none; opacity: 1; } }
}
