/* The caddy-training portal (2.336; 2.339 like the web app: shared/tokens.css's colors, shared/components.js's cards, top bar
   and tab bar): phone first, a grey page, white cards, Apple's own font, a frosted top and tab bar; dark when the phone is.
   cards.css (made by tools/portal/build.mjs) holds the web app's scorecard and tiles and Sim Link's shot card and graph. */
:root { --bg: #F2F2F7; --paper: #FFFFFF; --paper-2: #F2F2F7; --ink: #1C1C1E; --muted: #6C6C70; --line: #E2E2E7; --fill: rgba(118,118,128,.12);
  --fairway: #0B6936; --fairway-text: #0B6936; --link: #2F6DB5; --danger: #B42318; --warn: #9A6B00; --robot: #5B2A86;
  --ui: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --num: ui-rounded, -apple-system, BlinkMacSystemFont, system-ui, sans-serif; --body: var(--ui); --cond: var(--ui); --r-md: 14px;
  /* the names Sim Link's cards use (tools/hole-map/caddy-cards.mjs, last-shot.mjs) */
  --mute: var(--muted); --paper2: var(--paper-2); --good: var(--fairway-text); --bad: var(--danger); --card: var(--paper); --now: var(--fairway);
  color-scheme: light dark; font: 17px/1.35 var(--ui); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-color-scheme: dark) { :root { --bg: #000000; --paper: #1C1C1E; --paper-2: #2C2C2E; --ink: #F2F2F7; --muted: #98989F; --line: #38383A; --fill: rgba(118,118,128,.24);
  --fairway: #2F7D55; --fairway-text: #6CC495; --link: #78AEEA; --danger: #F0776C; --warn: #E8B339; --robot: #C9A6F0; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
a { color: var(--link); text-decoration: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.topbar .brand { color: var(--ink); min-width: 0; display: block; } .topbar .wordmark { display: block; height: 21px; width: auto; max-width: 100%; fill: currentColor; }
.signout { flex: none; font-size: 15px; }
main { padding: 4px 16px 16px; max-width: 760px; margin: 0 auto; }
.ptitle { margin: 10px 0 2px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.psub { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.back { display: inline-block; margin: 10px 0 0; font-size: 16px; } .back::before { content: '‹ '; font-size: 20px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
.tabbar a { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); }
.tabbar svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--fairway-text); }
.card { background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; margin: 12px 0; }
.card > h2, .card .h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.card h3 { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sec { margin: 22px 4px 6px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .good { color: var(--fairway-text); } .bad { color: var(--danger); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.row:first-of-type, h2 + .row, .card > p + .row { border-top: 0; }
.row .k { min-width: 0; } .row .k b { display: block; font-weight: 600; } .row .v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
a.row { color: inherit; } a.row::after { content: '›'; color: var(--muted); font-size: 22px; margin-left: 2px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--ink); vertical-align: 1px; }
.pill.robot { background: color-mix(in srgb, var(--robot) 16%, transparent); color: var(--robot); } .pill.you { background: color-mix(in srgb, var(--fairway) 16%, transparent); color: var(--fairway-text); }
.pill.ok { background: color-mix(in srgb, var(--fairway) 16%, transparent); color: var(--fairway-text); } .pill.no { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
/* the web app's tiles, inside a card */
.card .tiles { display: grid; grid-template-columns: minmax(0,1fr); column-gap: 28px; background: none; padding: 0; margin: 4px 0 0; }
@media (min-width: 640px) { .card .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.card .tiles .tile:first-child { border-top: 0; }
/* a screen: GSPro's or Sim Link's, as big as the card */
.screen { margin: 0; } .screen img { display: block; width: 100%; height: auto; border-radius: 10px; background: #000; }
.screen figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.screen.none { padding: 26px 12px; text-align: center; color: var(--muted); background: var(--paper-2); border-radius: 10px; font-size: 14px; }
/* pictures in a strip, swiped sideways, each tapped to see it whole */
.pics { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin: 6px -2px 4px; overscroll-behavior-x: contain; }
.pics figure { flex: 0 0 86%; margin: 0; scroll-snap-align: center; } .pics.two figure { flex-basis: 48%; }
.pics img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; display: block; background: var(--paper-2); cursor: zoom-in; }
.pics figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; } .lightbox p { color: #EBEBF5; font-size: 14px; margin: 10px 16px 0; text-align: center; }
.lightbox button { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; background: rgba(255,255,255,.18); color: #fff; }
/* a shot: its line, its pictures, Sim Link's card */
.shot .when { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.shot .when b { font-size: 17px; } .shot .shot-card { margin: 8px -8px 0; padding: 14px 14px; background: var(--paper-2); }
.shot .shot-card .shot-card-foot { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; } .shot .shot-card .shot-card-head { margin-left: -14px; margin-right: -14px; }
@media (max-width: 420px) { .shot .shot-card-groups dl { font-size: .8rem; } .shot .shot-card-groups dl dt:nth-of-type(2n) { margin-left: 10px; } }
/* 2.353: only a card with no verdict is grey: a good one stays green, a miss red (shared/components.js) */
.shot .shot-card .shot-card-head.none { background: color-mix(in srgb, var(--ink) 7%, var(--paper-2)); }
.shot .shot-card .shot-card-head.good { background: color-mix(in srgb, var(--fairway) 18%, var(--paper-2)); color: var(--fairway-text); }
.shot .shot-card .shot-card-head.miss { background: color-mix(in srgb, var(--danger) 15%, var(--paper-2)); color: var(--danger); }
/* 2.379 (owner: "a different header color for the robot SIM card for survey shots (since they are excluded from analysis, maybe make them yellow)") */
.shot .shot-card .shot-card-head.survey { background: color-mix(in srgb, #F5C400 30%, var(--paper-2)); color: #6B4E00; }
.shot-card-chip.c-survey { background: #F5C400; color: #3A2A00; font-weight: 600; }
@media (prefers-color-scheme: dark) { .shot .shot-card .shot-card-head.survey { background: color-mix(in srgb, #F5C400 22%, var(--paper-2)); color: #F5D46A; } }
.shot .open { display: block; margin-top: 8px; font-size: 15px; }
/* a hole */
.hole .graph { margin: 8px 0 2px; } .hole .shots .row { padding: 9px 0; }
/* the engines: a line each, graphs, the log */
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin: 2px 0 10px; }
.seg button { flex: 1; font: 500 13px var(--ui); border: 0; background: none; color: var(--ink); padding: 6px 4px; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: #636366; } }
.eng { padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; } .eng:first-child { border-top: 0; }
.eng b { font-weight: 600; } .eng .ref { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.spark { display: block; width: 100%; height: auto; } .spark text { font: 500 10.5px var(--ui); fill: var(--muted); }
.spark .ln { fill: none; stroke: var(--fairway-text); stroke-width: 2; } .spark .pt { fill: var(--paper); stroke: var(--fairway-text); stroke-width: 2; } .spark .gd { stroke: var(--line); stroke-dasharray: 2 4; }
.gbox { padding: 8px 0 4px; border-top: 1px solid var(--line); } .gbox:first-of-type { border-top: 0; } .gbox .t { display: flex; justify-content: space-between; font-size: 13px; }
.log { white-space: pre-wrap; font-size: 14px; line-height: 1.45; margin: 4px 0 0; }
/* training */


.how { margin: 6px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.45; } .how li { margin: 4px 0; }
.from { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.entry pre { white-space: pre-wrap; font: 14px/1.45 var(--ui); margin: 6px 0 0; }
details.card > summary { cursor: pointer; font-weight: 600; }
/* map feedback */
.tapmap { position: relative; touch-action: manipulation; } .tapmap img { width: 100%; border-radius: 10px; display: block; }
.tapmap .dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.grounds { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
button, .btn { font: inherit; font-size: 15px; font-weight: 600; border: 0; border-radius: 10px; padding: 9px 14px; background: var(--fill); color: var(--ink); cursor: pointer; }
button.on { outline: 2px solid var(--link); } button.primary { background: var(--fairway); color: #fff; } button:disabled { opacity: .5; }
/* the sheet's tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
table.t { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th, table.t td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
table.t th { position: sticky; top: 0; background: var(--paper); font-weight: 600; } table.t td.num { text-align: right; }
input[type=search] { font: inherit; font-size: 16px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: var(--fill); color: var(--ink); }
.tabs-seg { display: flex; gap: 4px; overflow-x: auto; padding: 2px 0 8px; } .tabs-seg button { flex: none; font-size: 13px; padding: 6px 10px; }
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 10px; font-size: 14px; z-index: 60; }
/* 2.345: the training progress star chart, in the graphs' one look (the route graph's green and grey, its type) */
.star { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; } .star text { font: 500 12px var(--ui); fill: var(--muted); }
.st-ring { fill: none; stroke: var(--line); stroke-width: 1; } .st-ring:last-of-type { stroke-dasharray: none; }
.st-now { fill: color-mix(in srgb, var(--fairway-text) 22%, transparent); stroke: var(--fairway-text); stroke-width: 2.5; stroke-linejoin: round; } .st-now-pt { fill: var(--paper); stroke: var(--fairway-text); stroke-width: 2.5; }
.st-then { fill: color-mix(in srgb, var(--muted) 12%, transparent); stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; } .st-then-pt { fill: var(--muted); }
.rg-k.st-k::before { border-top: 1.5px dashed var(--muted); }
/* 2.348 (owner: "make everything much more concise so you can see up to the star graph from above the fold"): Home's title on
   one line with its time, the robot in two lines, the two pictures in one swiped strip, the star chart's toggle by its title */
.hhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 8px 0 0; } .hhead .ptitle { margin: 0; font-size: 26px; }
.card.now { padding: 10px 14px; margin: 8px 0; } .nowline { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.nowline b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .nowline .pill { flex: none; }
.nowbits { margin: 4px 0 0; line-height: 1.5; }
.card.gal { padding: 10px 10px 8px; margin: 8px 0; } .gal .pics { margin: 0; gap: 8px; }
.pics.screens figure { flex: 0 0 88%; } .pics.screens img { aspect-ratio: 16 / 9; object-position: top; }
.pics.screens .screen.none { aspect-ratio: 16 / 9; margin: 0; display: flex; align-items: center; justify-content: center; }
.pics.screens figcaption { display: flex; justify-content: space-between; gap: 6px; } .pics.screens figcaption b { color: var(--ink); font-weight: 600; }
.galhint { margin: 4px 2px 0; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; } .cardhead h2 { margin: 0; font-size: 20px; font-weight: 700; }
.cardhead .seg { margin: 0; flex: 0 0 auto; } .cardhead .seg button { padding: 4px 14px; }
#star .rg-legend { margin: 0 0 2px; }
.starwrap { position: relative; touch-action: pan-y; } .star { max-width: 320px; cursor: crosshair; }
.st-spoke.on { stroke: var(--fairway-text); stroke-width: 2; }
.st-tip { position: absolute; z-index: 3; max-width: 240px; padding: 7px 10px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.35; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.st-tip span { display: block; } .st-tip em { font-style: normal; font-weight: 600; } .st-tip .good { color: #8BE0AE; } .st-tip .bad { color: #FF9B91; }
@media (prefers-color-scheme: dark) { .st-tip .good { color: var(--fairway); } .st-tip .bad { color: var(--danger); } }
.st-row.hl { background: color-mix(in srgb, var(--fairway) 10%, transparent); border-radius: 8px; }
.lightbox.tall { justify-content: flex-start; overflow-y: auto; } .lightbox.tall img { max-height: none; width: 100%; }
/* 2.349: the shot card's extra chips (a mulligan, OB, the robot's carry against the plan); the header wraps them */
.shot .shot-card-head { flex-wrap: wrap; row-gap: 6px; }
.shot-card-chip.c-good { background: color-mix(in srgb, var(--fairway) 18%, var(--paper)); color: var(--fairway-text); font-weight: 600; }
.shot-card-chip.c-bad { background: color-mix(in srgb, var(--danger) 16%, var(--paper)); color: var(--danger); font-weight: 600; }
.shot-card-chip.c-warn { background: color-mix(in srgb, #E8890C 20%, var(--paper)); color: #9A5B00; font-weight: 600; }
@media (prefers-color-scheme: dark) { .shot-card-chip.c-warn { color: var(--warn); } }
/* 2.349: a strip of graphs (Rounds, Training), swiped sideways */
.pics.graphs figure.gcard { flex: 0 0 82%; background: var(--paper-2); border-radius: 10px; padding: 8px 10px 6px; }
.gcard .t { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; } .gcard .t b { font-size: 17px; font-variant-numeric: tabular-nums; }
/* 2.353: the robot's card: one column of label and value on a phone (its values are longer: "166 planned · 128.7 GSPro") */
@media (max-width: 560px) { .shot .rcard .shot-card-groups dl { grid-template-columns: auto 1fr !important; } .shot .rcard .shot-card-groups dl dt:nth-of-type(2n) { margin-left: 0 !important; } }

/* 2.356: the Shots tab's filters, how concerning a shot is, its flag and the prompt for Claude */
.filters { padding-bottom: 4px; }
.filters .seg button .muted { font-weight: 400; }
.concern { margin: 6px 0 0; font: 13px var(--ui); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.concern span { background: var(--fill); border-radius: 6px; padding: 1px 6px; }
.concern.high b { color: #D70015; } .concern.mid b { color: #B25000; } .concern.low b { color: var(--muted, #6E6E73); }
.flagrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 2px; }
.flagbtn { font: 500 13px var(--ui); border: 0; border-radius: 8px; padding: 6px 10px; background: var(--fill); color: var(--link, #0A66D8); cursor: pointer; }
.flagbtn.quiet { color: var(--muted, #6E6E73); }
.flagchip { font: 600 13px var(--ui); color: #B25000; }
.promptbox { width: 100%; box-sizing: border-box; margin-top: 6px; font: 12px ui-monospace, monospace; border-radius: 8px; border: 0; background: var(--fill); color: var(--ink); padding: 8px; }
