/* Botly styles. © 2026 Northstar Backgammon */
:root {
  --ns-blue: #1A5F89;
  --ns-blue-dark: #134866;
  --rookie: #F57231; /* board point orange: the Botly for Rookies marker */
  --ink: #1B2733;
  --muted: #5B6875;
  --line: #DCE3EA;
  --bg: #F5F7F9;
  --card: #FFFFFF;
  --best: #1E7B34;
  --best-bg: #E3F4E7;
  --error: #8A5300;
  --error-bg: #FFF0CC;
  --blunder: #B3261E;
  --blunder-bg: #FDE3E1;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.45;
  padding-bottom: env(safe-area-inset-bottom);
}
button { font: inherit; }
.brand { text-align: center; padding: calc(14px + env(safe-area-inset-top)) 12px 4px; background: var(--card); position: relative; z-index: 11; }
.wordmark { display: block; font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: var(--ns-blue); letter-spacing: 1px; font-size: 17px; text-decoration: none; }
.wordmark:visited { color: var(--ns-blue); }
.rule { width: 56px; height: 3px; background: var(--ns-blue); margin: 7px auto 4px; border-radius: 2px; }
main { max-width: 760px; margin: 0 auto; padding: 8px 10px 16px; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 2px 4px; }
h1 { font-size: 24px; margin: 0; color: var(--ns-blue); letter-spacing: 0.3px; }
h2 { font-size: 19px; margin: 0 0 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: 999px; background: #E8EFF5; color: var(--ns-blue-dark); font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.chip-btn { cursor: pointer; background: var(--card); border-color: var(--line); }
.chip-btn:active { background: #E8EFF5; }
.chip-btn[aria-pressed="true"] { background: #E8EFF5; color: var(--ns-blue-dark); border-color: #E8EFF5; font-weight: 700; }
.chip-btn[aria-pressed="false"] { color: var(--muted); }
.status { min-height: 46px; margin: 18px 2px 12px; font-size: 16px; font-weight: 600; }
.board-wrap { background: #fff; border-radius: var(--radius); padding: 4px; box-shadow: 0 1px 3px rgba(20, 40, 60, 0.12); }
.board-wrap svg { display: block; width: 100%; height: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
.info { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 10px 4px 2px; font-size: 14px; color: var(--muted); }
.info b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1px solid #333; }
.dot-blue { background: #1E63C9; }
.dot-white { background: #fff; }
.lastmove { min-height: 22px; margin: 2px 4px 6px; font-size: 14px; color: var(--muted); }
.actions { display: flex; gap: 10px; margin: 14px 0 18px; min-height: 44px; }
.actions .btn { flex: 1; }
.btn { min-height: 44px; border-radius: 10px; padding: 8px 16px; font-size: 16px; font-weight: 700; cursor: pointer; border: 2px solid var(--ns-blue); transition: background 0.15s, opacity 0.15s; }
.btn.primary { background: var(--ns-blue); color: #fff; }
.btn.primary:active { background: var(--ns-blue-dark); }
.btn.secondary { background: #fff; color: var(--ns-blue); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.wide { width: 100%; margin-top: 10px; }
.coach { background: var(--card); border-radius: var(--radius); border-left: 5px solid var(--ns-blue); padding: 12px 14px; box-shadow: 0 1px 3px rgba(20, 40, 60, 0.1); }
.coach.best { border-left-color: var(--best); }
.coach.error { border-left-color: #D99100; }
.coach.blunder { border-left-color: var(--blunder); }
.coach p { margin: 6px 0; }
.coach-head { display: flex; align-items: center; gap: 8px; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; padding: 3px 8px; border-radius: 6px; }
.badge-best { background: var(--best-bg); color: var(--best); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-blunder { background: var(--blunder-bg); color: var(--blunder); }
table.nums { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 15px; font-variant-numeric: tabular-nums; }
table.nums td { padding: 6px 4px; border-top: 1px solid var(--line); }
table.nums td:nth-child(n+2) { text-align: right; white-space: nowrap; }
table.nums tr.mine td { font-weight: 700; }
table.nums em { font-style: normal; color: var(--muted); font-weight: 500; }
.small { font-size: 13px; color: var(--muted); }
.overlay { position: fixed; inset: 0; padding-top: 70px; background: rgba(15, 30, 45, 0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 10; padding: 10px; }
.overlay[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 16px; padding: 20px 18px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); max-height: 92vh; overflow: auto; }
@media (min-height: 700px) { .overlay { align-items: center; } }
.lead { margin: 0 0 14px; color: var(--muted); }
.field { margin: 10px 0; }
.label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; background: #EEF2F5; border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ns-blue); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.hint-text { font-size: 13px; color: var(--muted); margin: 6px 2px 0; }
.load { margin: 14px 0 4px; }
.load-track { height: 6px; background: #E6ECF1; border-radius: 3px; overflow: hidden; }
.load-bar { height: 100%; width: 0; background: var(--ns-blue); transition: width 0.2s; }
.load p { margin: 6px 0 0; }
.fine { font-size: 12px; color: var(--muted); margin: 14px 2px 0; }
.fine a { color: var(--ns-blue); }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 10px 0 18px; }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.stat { background: #fff; border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 1px 3px rgba(20, 40, 60, 0.1); display: flex; flex-direction: column; }
.stat.big { grid-column: 1 / -1; }
.stat .k { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat .v { font-size: 28px; font-weight: 800; color: var(--ns-blue); font-variant-numeric: tabular-nums; }
.stat.big .v { font-size: 36px; }
.stat .n { font-size: 12px; color: var(--muted); }
.detail { margin-top: 10px; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin: 16px 2px 6px; }
.list-head h2 { margin: 0; }
.rev-list { display: flex; flex-direction: column; gap: 6px; }
.rev-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rev-head { width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "no what badge" "no best badge"; column-gap: 10px; text-align: left; background: transparent; border: 0; padding: 9px 12px; cursor: pointer; font: inherit; color: inherit; }
.rev-head:active { background: #F3F6F9; }
.rev-body { padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.rev-body .small-board { margin: 8px 0; }
.rev-detail p { margin: 8px 0; }
.play-name { font-weight: 600; }
.play-probs { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl { display: block; white-space: nowrap; }
.nums.plays td.eq, .nums.plays th.eq { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nums.plays th { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; text-align: left; padding: 4px 4px 2px; }
.nums.plays td { vertical-align: top; }
.lead.split { display: flex; justify-content: space-between; }
#scoreSpan.full { flex-basis: 100%; text-align: center; }
.nums.plays .diff { font-size: 12px; color: var(--muted); }
.deep-one { margin-top: 10px; }
.rev-item.active { border-color: var(--ns-blue); box-shadow: 0 0 0 2px rgba(26, 95, 137, 0.2); }
.rev-no { grid-area: no; font-size: 12px; font-weight: 700; color: var(--muted); align-self: center; min-width: 52px; }
.rev-what { grid-area: what; font-weight: 600; font-size: 15px; }
.rev-best { grid-area: best; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.rev-head .badge { grid-area: badge; align-self: center; }
@media (max-width: 380px) { .chip { padding: 4px 9px; font-size: 13px; } h1 { font-size: 21px; } }
.chip-btn:disabled { opacity: 0.4; cursor: default; }
@media (max-width: 480px) {
  .chip { font-size: 13px; padding: 4px 8px; min-height: 32px; }
  .chips { gap: 4px; flex-wrap: nowrap; }
  h1 { font-size: 22px; }
}
.deep { margin: 10px 0 14px; }
.deep .small { margin-top: 6px; }
[hidden] { display: none !important; }
.nums.plays tr.mine .play-probs { font-weight: 400; }

/* Sheet buttons a little smaller for breathing room */
.sheet .btn.wide { min-height: 46px; font-size: 16px; }
/* Mode chip pair */
.chip-pair { display: inline-flex; }
.chip-pair .chip { border-radius: 0; }
.chip-pair .chip:first-child { border-radius: 999px 0 0 999px; }
.chip-pair .chip:last-child { border-radius: 0 999px 999px 0; border-left-width: 0; }
.chip-pair .chip[aria-pressed="true"] + .chip { border-left-color: var(--ns-blue); }
/* Keep the board and buttons on one screen on laptops and desktops */
@media (min-width: 700px) {
  .board-wrap { max-width: min(100%, calc((100vh - 380px) * 1.2821)); margin-left: auto; margin-right: auto; }
  .board-wrap svg { max-height: calc(100vh - 380px); }
}
/* Welcome page */
.welcome { position: fixed; inset: 0; z-index: 30; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: opacity 0.35s; padding-top: env(safe-area-inset-top); }
.welcome.leaving { opacity: 0; }
.welcome-brand { position: absolute; top: 0; left: 0; right: 0; }
.welcome::after { content: "\00a9\00a0 2026 Northstar Backgammon"; position: absolute; bottom: 16px; left: 0; right: 0; font-size: 12px; color: var(--muted); }
.welcome-mid { position: relative; width: 100%; max-width: 480px; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.tile { width: clamp(120px, 28vmin, 200px); height: clamp(120px, 28vmin, 200px); margin: 0 auto; border-radius: 22%; background: linear-gradient(160deg, #2A78A8 0%, var(--ns-blue) 55%, var(--ns-blue-dark) 100%); box-shadow: 0 10px 30px rgba(26, 95, 137, 0.28); display: flex; align-items: center; justify-content: center; }
.tile span { font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif; font-weight: 900; color: #fff; font-size: clamp(84px, 20vmin, 144px); line-height: 1; transform: translateY(-2%); }
.welcome-title { margin-top: clamp(20px, 4vmin, 32px); font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-size: clamp(38px, 8vmin, 60px); letter-spacing: 1px; color: var(--ns-blue); line-height: 1.05; }
.checkers { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #333; display: inline-block; }
.ck-blue { background: radial-gradient(circle at 40% 35%, #EEEEEE 0%, #1E63C9 50%, #000 100%); }
.ck-white { background: radial-gradient(circle at 40% 35%, #EEEEEE 0%, #FFFFFF 50%, #000 100%); }
.welcome-tap { margin-top: 2px; font-size: 13px; color: var(--muted); letter-spacing: 0.3px; }
.welcome-engine { margin-top: -6px; }
.welcome-engine a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* Wide screens: keep each play on one line */
@media (min-width: 700px) {
  .nums.plays td:first-child { display: flex; align-items: center; gap: 14px; }
  .nums.plays .play-name { min-width: 150px; }
}
#scoreSpan.full b { font-weight: 400; }
.coach-head .badge { margin-left: 4px; }
.says-wrap { margin-top: 10px; }
.says-btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.says { margin: 10px 0 0; padding: 10px 12px; background: #F3F7FA; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.deep-all { margin-top: 18px; }
.small-btn { min-height: 38px; font-size: 14px; font-weight: 600; }
@media (max-width: 420px) {
  .chip { font-size: 13px; padding: 4px 9px; min-height: 32px; white-space: nowrap; }
  .chips { gap: 5px; }
  h1 { font-size: 22px; }
}

/* ---- Reference sheet ---- */
.ref-scrim { position: fixed; inset: 0; background: rgba(27, 39, 51, 0.45); z-index: 30; }
.ref-sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh; max-height: 88dvh; background: var(--card); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(20, 40, 60, 0.18); display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
.ref-tabs { display: flex; gap: 5px; padding: 12px 10px 10px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.ref-tabs .chip { white-space: nowrap; font-size: 13px; padding: 4px 9px; min-height: 32px; flex: 0 0 auto; }
.ref-tabs .ref-close { margin-left: auto; }
@media (max-width: 400px) { .ref-tabs { gap: 4px; padding: 10px 8px 8px; } .ref-tabs .chip { font-size: 12px; padding: 4px 7px; min-height: 30px; letter-spacing: -0.1px; } }
.ref-pane { overflow: auto; padding: 10px 14px 14px; font-size: 15px; -webkit-overflow-scrolling: touch; }
.ref-pane p { margin: 6px 0; }
.ref-pane h3 { font-size: 15.5px; margin: 12px 0 4px; color: var(--ns-blue-dark); }
.ref-pane h3:first-child { margin-top: 2px; }
.ref-kicker { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.ref-note { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.ref-verdict { background: #E8EFF5; border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; font-weight: 600; }
table.ref { width: 100%; border-collapse: collapse; font-size: 15px; }
table.ref th, table.ref td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.ref th { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
table.ref td.num, table.ref th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.ref tr.neg td { color: var(--blunder); }
table.ref td.big { font-size: 21px; font-weight: 700; color: var(--ns-blue-dark); }
table.ref td.ml::after { content: " \25CF"; color: var(--ns-blue); font-size: 11px; vertical-align: middle; }
.ref-line { position: relative; height: 36px; margin: 14px 2px 24px; border-radius: 6px; background: linear-gradient(90deg, #FDE3E1 0 21.5%, #E3F4E7 21.5% 40%, #E8EFF5 40% 78.5%, #DCE3EA 78.5%); }
.ref-line b { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ref-line span { position: absolute; top: 100%; transform: translateX(-50%); font-size: 12px; margin-top: 3px; font-weight: 600; white-space: nowrap; }
.ref-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0 10px; }
.ref-busy { color: var(--muted); font-size: 14px; }
@media (max-width: 420px) { .ref-pane { font-size: 14.5px; } table.ref { font-size: 14px; } table.ref td.big { font-size: 19px; } }
/* ---- update toast ---- */
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ns-blue-dark); color: #fff; padding: 10px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 40; box-shadow: 0 4px 16px rgba(0,0,0,0.25); white-space: nowrap; }
.toast-btn { background: #fff; color: var(--ns-blue-dark); border: 0; border-radius: 999px; padding: 5px 11px; margin-left: 6px; font-weight: 700; cursor: pointer; }
.copyright { text-align: center; margin-top: 6px; }
@media (max-width: 372px) { .ref-tabs { gap: 3px; padding: 10px 6px 8px; } .ref-tabs .chip { font-size: 11.5px; padding: 4px 6px; min-height: 30px; letter-spacing: -0.2px; } }

.titlebar-game { justify-content: flex-start; }
.titlebar-game .chips { justify-content: flex-start; width: 100%; flex-wrap: wrap; }
/* Numerics table: the play column takes what is left; the two number columns keep a fixed width so nothing can run off the right edge on narrow phones or with wide system fonts. */
table.nums.plays { table-layout: fixed; }
table.nums.plays th.eq { width: 64px; }
.pl { white-space: normal; }

.says-note { color: var(--muted); font-size: 13px; }

/* ---- One app, two versions ---- */
body.rookie .botly-only { display: none !important; }
body:not(.rookie) .rookie-only { display: none !important; }

/* Welcome card: How Do You Want to Play? */
.welcome-mid { display: flex; flex-direction: column; gap: 16px; }
.welcome-q { line-height: 1; margin-bottom: 2px; }
.q-small { font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
.q-script { font-family: Pacifico, "Brush Script MT", cursive; font-weight: 400; font-size: clamp(38px, 10vmin, 46px); letter-spacing: 0; padding: 6px 0 4px; color: #1d2733; }
.vcard { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; text-align: left; border-radius: 20px; padding: 14px 16px 14px; border: 2px solid; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07); cursor: pointer; font: inherit; color: var(--ink); transition: transform 0.12s, box-shadow 0.12s; }
.vcard:active { transform: scale(0.985); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08); }
.vcard:focus-visible { outline: 3px solid var(--ns-blue); outline-offset: 2px; }
.vcard-botly { border-color: var(--ns-blue); }
.vcard-rookie { border-color: var(--rookie); }
.vcard-ask { border-color: var(--ns-blue); }
.vhead { display: flex; align-items: center; gap: 14px; }
.vtile { flex: none; width: 56px; height: 56px; border-radius: 22%; display: flex; align-items: center; justify-content: center; }
.vtile span { font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif; font-weight: 900; color: #fff; font-size: 40px; line-height: 1; transform: translateY(-2%); }
.vcard-botly .vtile { background: linear-gradient(160deg, #2A78A8 0%, var(--ns-blue) 55%, var(--ns-blue-dark) 100%); }
.vcard-rookie .vtile { background: linear-gradient(160deg, #FF9A5C 0%, var(--rookie) 55%, #D95C1E 100%); }
.vcard-ask .vtile { background: linear-gradient(160deg, #2A78A8 0%, var(--ns-blue) 55%, var(--ns-blue-dark) 100%); }
.vtext { display: flex; flex-direction: column; min-width: 0; }
.vask { font-size: 13px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.vname { font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-size: 22px; line-height: 1.1; margin: 2px 0 0; white-space: nowrap; }
.vcard-botly .vname { color: var(--ns-blue); }
.vcard-rookie .vname { color: #D95C1E; }
.vcard-ask .vname { color: var(--ns-blue); }
.vlist { margin: 0; padding: 0 0 0 18px; font-size: 14px; line-height: 1.4; color: #2b3844; font-weight: 500; white-space: nowrap; }
.vlist li { margin: 1px 0; }
.vcard-botly .vlist li::marker { color: var(--ns-blue); }
.vcard-rookie .vlist li::marker { color: #D95C1E; }
.vcard-ask .vlist li::marker { color: var(--ns-blue); }
.vchev { margin-left: auto; font-size: 30px; color: #7d8996; flex: none; }
@media (max-width: 374px) { .vlist { font-size: 12.5px; } .vname { font-size: 20px; } }
@media (max-height: 760px) { .vtile { width: 48px; height: 48px; } .vtile span { font-size: 34px; } .vcard { padding: 9px 14px; gap: 5px; } .q-script { font-size: 30px; padding: 2px 0 0; } .q-small { font-size: 13px; } .welcome-q { margin-top: 6px; } .welcome-mid { gap: 8px; } .welcome-tap { margin-top: 0; } .welcome-engine { margin-top: -4px; } .vlist { line-height: 1.3; } }

/* Setup sheet: which version, and the way back to the welcome card */
.setup-top { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; }
.setup-mark { display: flex; align-items: center; gap: 10px; }
.setup-mark .mini { width: 34px; height: 34px; border-radius: 22%; background: linear-gradient(160deg, #2A78A8 0%, var(--ns-blue) 55%, var(--ns-blue-dark) 100%); display: flex; align-items: center; justify-content: center; font-family: "Arial Black", Arial, sans-serif; font-weight: 900; color: #fff; font-size: 24px; }
body.rookie .setup-mark .mini { background: linear-gradient(160deg, #FF9A5C 0%, var(--rookie) 55%, #D95C1E 100%); }
.setup-mark .t { font-weight: 800; font-size: 17px; color: #1d2733; line-height: 1.15; }
.setup-mark .t small { display: block; font-weight: 600; font-size: 11.5px; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
.setup-mark .t { min-width: 0; }
#changeVersion, #askFromMenu { flex: none; padding: 4px 9px; font-size: 13px; }
.setup-links { display: flex; justify-content: center; gap: 8px; margin: 0 0 12px; }

/* ---- Botly for Rookies ---- */
.rookie-how { margin: 4px 2px 0; }
.coach .better { font-weight: 600; }
.rookie-sum { grid-column: 1 / -1; background: #fff; border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 1px 3px rgba(20, 40, 60, 0.1); }
.rookie-sum .big-line { font-size: 18px; font-weight: 700; color: var(--ns-blue-dark); margin: 0 0 8px; }
.rookie-sum .badges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 15px; font-weight: 600; }
.rookie-sum .badges span.cnt { display: inline-flex; align-items: center; gap: 6px; }
body.rookie .coach .says { margin-top: 8px; }
.says strong { color: var(--ns-blue-dark); }
body.rookie .actions:empty { min-height: 0; height: 0; margin: 0; padding: 0; }
.chip.rookie { background: var(--rookie); color: #1d2733; font-weight: 700; border-color: var(--rookie); }
body.rookie .chip-btn[aria-pressed="true"] { background: var(--ns-blue); color: #fff; border-color: var(--ns-blue); font-weight: 700; }
body.rookie .titlebar-game .chip { padding: 4px 7px; font-size: 12.5px; }
body.rookie .titlebar-game .chips { gap: 4px; }

/* v34: Botly's own errors sit below your coach panel */
#slip { margin-top: 8px; }
#slipHead { margin-top: 22px; }
/* v36: why-not rows, history card, loading card, welcome progress, game-plan summary */
.nums.plays tr.why { cursor: pointer; }
.nums.plays tr.why:active td { background: #F3F7FA; }
.nums.plays .why-tag { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ns-blue); white-space: nowrap; }
.nums.plays tr.why[aria-expanded="true"] .why-tag { color: var(--muted); }
.nums.plays tr.why-row td { padding: 0 0 8px; font-weight: 400; }
.nums.plays tr.why-row .says { margin: 4px 0 0; }
.history { margin: 14px 0 0; padding: 10px 12px; background: #F3F7FA; border-radius: 10px; }
.hist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hist-head .label { margin: 0; }
.hist-head .chip-btn { min-height: 30px; padding: 2px 10px; font-size: 13px; }
ul.hist { list-style: none; margin: 8px 0 0; padding: 0; }
ul.hist li { padding: 7px 0; border-top: 1px solid #E6ECF1; font-size: 14px; line-height: 1.4; }
ul.hist li:first-child { border-top: 0; padding-top: 2px; }
ul.hist .h-top { display: block; color: var(--ns-blue-dark); }
ul.hist .h-sub { display: block; font-size: 13px; color: var(--muted); }
.load-card { margin: 12px 0 0; padding: 10px 12px; background: #fff; border: 1px solid #E6ECF1; border-radius: 10px; }
.load-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--ns-blue-dark); }
.load-card p { margin: 0; font-size: 14px; line-height: 1.45; }
.load-card .label { margin-bottom: 2px; }
/* while Botly loads, the progress line takes the place of the Powered by line, so the welcome keeps its height */
.welcome-progress { width: min(340px, 86vw); margin: -8px auto 0; }
.welcome-progress .load-track { height: 4px; margin-bottom: 3px; }
.welcome-progress .welcome-tap { font-size: 12px; margin: 0; }
.welcome-progress.done { display: none; }
.welcome-progress:not(.done) + .welcome-engine { display: none; }
.plans { grid-column: 1 / -1; background: #fff; border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 1px 3px rgba(20, 40, 60, 0.1); }
.plans h3 { margin: 0 0 6px; font-size: 15px; color: var(--ns-blue-dark); }
.plans ul { list-style: none; margin: 0; padding: 0; }
.plans li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid #E6ECF1; font-size: 14px; }
.plans li:first-child { border-top: 0; }
.plans .plan { font-weight: 700; }
.plans .plan-n { color: var(--muted); white-space: nowrap; }
.plans p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.in-person { text-align: center; margin-top: 12px; }
/* very short screens (first-generation iPhone SE size): the welcome scrolls instead of overlapping its footer */
@media (max-height: 600px) { .welcome { justify-content: flex-start; overflow-y: auto; padding-top: calc(env(safe-area-inset-top) + 72px); padding-bottom: 8px; } .welcome::after { position: static; display: block; margin-top: 12px; } .welcome-q { margin-top: 0; } }
/* v37: Play It Out */
.from-chip{background:#fff3e6;color:#b4480c;border-color:#f5c7a3}
.from-ask-row{display:flex;flex-direction:column;gap:8px;margin:0 0 8px}
.again-choice{display:flex;flex-direction:column;gap:6px;padding:8px 10px;border:1px dashed #cfd9e2;border-radius:10px}
.h-open{margin-top:6px;align-self:flex-start}
.from-note{grid-column:1 / -1;color:#3d4b57;margin:2px 0;line-height:1.5}
.from-note .chip{display:inline-block;vertical-align:middle;margin:0 6px 2px 0}
.from-ask-row .btn.wide{margin-top:0}
