/* Stadium Log — light "day game" theme. Team logos are drawn for light backgrounds,
   so the map stays pale and lets the logos carry the colour. */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url(/vendor/fonts/atkinson-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url(/vendor/fonts/atkinson-700.woff2) format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 600 800; font-display: swap; src: url(/vendor/fonts/bigshoulders.woff2) format("woff2"); }

:root {
  --paper: #f1ead6;      /* behind the map */
  --land: #ffffff;
  --border: #c7bfa4;     /* state outlines */
  --canada: #f4f6f8;
  --ink: #0f3322;
  --ink-2: #3f4f45;
  --mute: #6b7a6f;
  --rule: #ddd5bd;
  --panel: #ffffff;
  --wash: #f8f3e3;
  --pole: #ffb800;       /* foul-pole yellow: planned */
  --pole-soft: #fff4c2;
  --pole-ink: #5b4600;
  --turf: #1b7a47;       /* visited */
  --turf-soft: #dff2e6;
  --mlb: #3b6fb6; --mlb-tint: #eaf1fb;   /* league colours: blue / leather brown / orange, clear of the status colours */
  --nfl: #8a5a2b; --nfl-tint: #f6ede2;
  --nba: #e0701f; --nba-tint: #fdeee0;
  --nhl: #0f8aa6; --nhl-tint: #e3f3f7;
  --cfb: #8e2a3e; --cfb-tint: #f6e4e8;
  --cbb: #2b3a67; --cbb-tint: #e5e9f4;
  --wnba: #c2347f; --wnba-tint: #fbe6f1;
  --f1: #3a3f4b; --f1-tint: #eceef2;
  --banana: #f2c12e; --banana-tint: #fdf4d6;
  --venue: #6b4fb3; --venue-tint: #efeaf9;
  --milb: #6f7d1f; --milb-tint: #f1f4dc;
  --nascar: #c2312d; --nascar-tint: #fbe9e8;
  --violet: #5b3fc4;     /* team seen, new stadium not yet */
  --violet-soft: #ebe6fb;
  --focus: #1a56c4;
  --danger: #b3261e;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top-h: 64px;
}
* { box-sizing: border-box; }
/* iOS tints the status bar from the page's top edge: a plain colour on the root (a gradient is ignored) */
html { background-color: #0f3322; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.45; color: var(--ink);
  background: var(--ink); -webkit-text-size-adjust: 100%; overflow: hidden;
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; height: var(--fullh, 100dvh);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.top {
  position: relative; z-index: 20; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  flex: none; padding: 8px 20px; background: var(--ink); color: #fff;
}
.top { position: relative; }
.top::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: min(400px, 100%); pointer-events: none; opacity: .11;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20460%2070'%20preserveAspectRatio='xMinYMax%20slice'%3E%3Cg%20fill='none'%20stroke='white'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M30%2066Q230%20-6%20430%2066'/%3E%3Cpath%20d='M70%2066Q230%2020%20390%2066'/%3E%3Cpath%20d='M120%2066Q230%2038%20340%2066'/%3E%3Cpath%20d='M10%2066H450'/%3E%3Cpath%20d='M40%2066V22M34%2012h12v10H34zM38%2015v4M42%2015v4'/%3E%3Cpath%20d='M420%2066V22M414%2012h12v10h-12zM418%2015v4M422%2015v4'/%3E%3Cpath%20d='M230%2050V36M222%2030h16v6h-16z'/%3E%3C/g%3E%3C/svg%3E") no-repeat left bottom / 400px 100%;
}
.top > * { position: relative; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: 6px; color: #fff; text-decoration: none; border-radius: 10px; padding: 2px 6px 2px 0; }
.brand:focus-visible { outline: 3px solid var(--pole); outline-offset: 3px; }
.brand .mark { flex: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); transition: transform .15s ease; }
.brand:hover .mark { transform: rotate(-4deg) scale(1.04); }
.brandtext { display: grid; line-height: 1; }
.brand h1 { margin: 0; font: 800 31px/.95 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.brand .tag { margin-top: 4px; font: 400 12px/1 var(--body); color: #bcd3c4; letter-spacing: .02em; }
.score { display: flex; flex-wrap: wrap; gap: 8px 18px; flex: 1; min-width: 0; }
.tally { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; min-width: 112px; }
.tally b { font: 800 34px/.9 var(--display); }
.tally span { font-size: 13px; color: #bcd3c4; }
.tally .sub2 { grid-column: 1 / -1; font-size: 12.5px; color: #bcd3c4; margin-top: 3px; }
.tally .bar { grid-column: 1 / -1; height: 4px; margin-top: 5px; background: #2c6a49; border-radius: 2px; overflow: hidden; }
.tally .bar i { display: block; height: 100%; background: var(--pole); border-radius: 2px; transition: width .4s ease; }

.btn {
  border: 1.5px solid var(--ink); background: var(--ink); color: #fff; border-radius: 8px; padding: 7px 14px; font-weight: 700; min-height: 40px;
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { padding: 4px 10px; min-height: 32px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.pole { background: var(--pole); border-color: var(--pole); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- menu button + dropdown ---------- */
.menuwrap { position: relative; margin-left: auto; }
.menubtn { position: relative; width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid #4f8266; background: rgba(255,255,255,.04); color: #fff; display: grid; place-items: center; }
.menubtn[aria-expanded="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 220px; padding: 8px; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 16px 40px rgba(20,32,46,.35); }
.menu nav { display: grid; gap: 2px; }
.menu a, .menu .menuitem { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font: 700 17px var(--body); border: 0; background: none; text-align: left; cursor: pointer; }
.menu a:hover, .menu .menuitem:hover { background: var(--wash); }
.menu a[aria-current="page"] { background: var(--pole-soft); box-shadow: inset 4px 0 0 var(--pole); }
.menu .menuitem { margin-top: 6px; border-top: 1px solid var(--rule); border-radius: 0 0 9px 9px; padding-top: 10px; }

/* ---------- league filter bar ---------- */
.filterbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); min-height: 46px; }
.filterbar .asof { margin: 0; font-size: 13px; color: var(--mute); }
.seg { display: inline-flex; margin-left: auto; background: #e7dfc6; border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--ink-2); padding: 6px 14px; border-radius: 7px; font-weight: 700; min-height: 36px; }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }

/* ---------- views ---------- */
main { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; }
#view-map { background: var(--paper); }
#map { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#map:active { cursor: grabbing; }
.land { fill: var(--land); stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.canada { fill: var(--canada); stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.geo-label { font: 600 13px var(--body); fill: #9aa7b3; letter-spacing: .12em; }

.node { cursor: pointer; outline: none; }
.node .disc { fill: var(--tint, #fff); stroke: #c3ccd5; stroke-width: 1.5; stroke-linejoin: round; }
.node image { transition: opacity .15s; }
.node.todo image { filter: grayscale(1); opacity: .62; }
.node.todo .disc { fill: color-mix(in srgb, var(--tint, #f6f8fa) 55%, #fff); }
.node.visited .disc { stroke: var(--turf); stroke-width: 2.5; }
.node.planned .disc { stroke: var(--pole); stroke-width: 2.5; stroke-dasharray: 4 3; }
.node:hover .disc, .node:focus-visible .disc, .node.active .disc { stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: none; }
.node:hover image, .node:focus-visible image, .node.active image { filter: none; opacity: 1; }
.node .leader { stroke: #8e9ba8; stroke-width: 1; }
.node .anchor { fill: #8e9ba8; }
.node.visited .anchor { fill: var(--turf); }
.node .stub { fill: var(--turf); stroke: #fff; stroke-width: 1.5; }
.node .tick { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.node.newstad .disc { stroke: var(--violet); stroke-width: 2.5; }
.node.newstad .anchor { fill: var(--violet); }
.node.stadonly .disc { stroke: var(--turf); stroke-width: 2.5; stroke-dasharray: 2 3; }
.hub.best-none .hubdisc { stroke: #c3ccd5; stroke-width: 1.5; fill: #f6f8fa; }
.hub.best-none .hubcount circle { fill: #8e9ba8; }
.hub.best-none .hublabel { fill: var(--ink-2); }
.hub.best-none:hover .hubdisc, .hub.best-none:focus-visible .hubdisc { stroke: var(--ink); stroke-width: 2.5; fill: #fff; }
.hub.best-none:hover .hubcount circle, .hub.best-none:focus-visible .hubcount circle { fill: var(--ink); }
.hub.best-none .hublogos image { filter: grayscale(1); opacity: .62; transition: opacity .15s; }
.hub.best-none:hover .hublogos image, .hub.best-none:focus-visible .hublogos image, .hub.best-none.open .hublogos image { filter: none; opacity: 1; }
.hub.best-stadium-only .hublogos image { filter: grayscale(.7); opacity: .8; }
.node.stadonly image { filter: grayscale(.7); opacity: .8; }
.node .stub.new { fill: var(--violet); }
.node .star { fill: #fff; }
.node .stub.stad { fill: #fff; stroke: var(--turf); }
.node .tick-stad { stroke: var(--turf); }
.node .diamond { fill: var(--pole); stroke: var(--ink); stroke-width: 1.2; }
.places { pointer-events: none; }
.place .pstar { fill: #a7b2bd; }
.place .pdot { fill: #8d9aa7; }
.plabel { font: 600 11.5px var(--body); fill: #56636f; paint-order: stroke; stroke: rgba(255,255,255,.92); stroke-width: 3.5px; stroke-linejoin: round; }
.place.cap .plabel { fill: #6a7682; font-weight: 500; }
.place.team .plabel { fill: #3f4c58; font-weight: 700; }
.lg-cap { color: #a7b2bd; font-style: normal; font-size: 15px; line-height: 1; margin-right: 5px; vertical-align: -1px; }
.node.dim { opacity: .12; pointer-events: none; }
.node:focus-visible .disc { stroke: var(--focus); stroke-width: 3.5; }

.legend {
  position: static; font-size: 14px; color: var(--ink-2);
  background: rgba(255,255,255,.92); padding: 7px 12px; border-radius: 8px; border: 1px solid var(--rule);
}
.mapctl { position: absolute; left: 16px; bottom: 16px; max-width: calc(100% - 90px); display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.legend summary { cursor: pointer; font-weight: 700; list-style: none; }
.legend summary::-webkit-details-marker { display: none; }
.legend summary::after { content: "  ▾"; }
.legend:not([open]) summary::after { content: "  ▸"; }
.legendbody { display: flex; gap: 8px 14px; flex-wrap: wrap; margin-top: 8px; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; border: 2.5px solid; background: #fff; }
.lg-visited { border-color: var(--turf); }
.lg-todo { border-color: #c3ccd5; background: #eef1f4; }
.lg-plan { border-color: var(--pole); border-style: dashed; }
.lg-new { border-color: var(--violet); }
.lg-stad { border-color: var(--turf); border-style: dotted; }
.zoom { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.zoom button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 20px; line-height: 1; font-weight: 700; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--mute); }


/* league glyphs: circle = MLB, rounded square = NFL, hexagon = NBA (the same shapes the map uses) */
.lgl { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; flex: none; }
.lgl.mlb { background: var(--mlb); border-radius: 50%; }
.lgl.nfl { background: var(--nfl); border-radius: 3px; }
.lgl.cbb { background: var(--cbb); border-radius: 3px; width: 14px; height: 10px; vertical-align: 0; }
.lgl.cfb { background: var(--cfb); border-radius: 50%; width: 15px; height: 10px; vertical-align: 0; }
.lgl.nba { background: var(--nba); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.lgl.wnba { background: var(--wnba); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.lgl.f1 { background: var(--f1); clip-path: polygon(50% 2%, 98% 38%, 80% 98%, 20% 98%, 2% 38%); }
.lgl.banana { background: var(--banana); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.lgl.venue { background: var(--venue); border-radius: 8px 8px 2px 2px; }
.lgl.milb { background: var(--milb); clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%); }
.lgl.nascar { background: var(--nascar); border-radius: 6px / 50%; width: 14px; }
.lgl.nhl { background: var(--nhl); clip-path: polygon(8% 6%, 92% 6%, 92% 55%, 50% 98%, 8% 55%); }
.legend .lgkey { display: inline-flex; align-items: center; gap: 2px; }
.legend .lgkey .lgl { margin-left: 8px; }
.legend .lgkey .lgl:first-child { margin-left: 0; }
.node.l-mlb { --tint: var(--mlb-tint); }
.node.l-nfl { --tint: var(--nfl-tint); }
.node.l-nba { --tint: var(--nba-tint); }
.node.l-nhl { --tint: var(--nhl-tint); }
.node.l-wnba { --tint: var(--wnba-tint); }
.node.l-f1 { --tint: var(--f1-tint); }
.node.l-banana { --tint: var(--banana-tint); }
.node.l-venue { --tint: var(--venue-tint); }
.node.l-milb { --tint: var(--milb-tint); }
.node.l-cfb { --tint: var(--cfb-tint); }
.node.l-cbb { --tint: var(--cbb-tint); }
.node.l-nascar { --tint: var(--nascar-tint); }

/* city hubs */
.hub { cursor: pointer; outline: none; }
.hub .hubdisc { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.hub:hover .hubdisc, .hub:focus-visible .hubdisc { stroke-width: 3; }
.hub.best-visited .hubdisc { stroke: var(--turf); stroke-width: 3.5; }
.hub.best-new-stadium .hubdisc { stroke: var(--violet); stroke-width: 3; }
.hub.best-stadium-only .hubdisc { stroke: var(--turf); stroke-width: 3; stroke-dasharray: 3 3; }
.hub.best-visited:hover .hubdisc { stroke-width: 4.5; }
.hub:focus-visible .hubdisc { stroke: var(--focus); }
.hub .stub { fill: var(--turf); stroke: #fff; stroke-width: 1.5; }
.hub .tick { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hub .hubcount circle { fill: var(--ink); stroke: #fff; stroke-width: 1.5; }
.hub .hubcount text { fill: #fff; font: 700 11px var(--body); }
.hub .hublabel { font: 700 11.5px var(--body); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.hub .hubx { fill: var(--ink); font: 700 18px var(--body); }
.hub.open .hubdisc { fill: var(--pole); stroke: var(--ink); stroke-dasharray: none; }
.hub .leader { stroke: #8e9ba8; stroke-width: 1; }
/* the lens an open city turns into (drawn under the logos); everything outside it steps back */
.lensdisc { fill: rgba(255,255,255,.9); stroke: var(--ink-2); stroke-width: 2; filter: drop-shadow(0 6px 14px rgba(20,32,46,.28)); pointer-events: none; }
#map .node, #map .hub, #map .places { transition: opacity .25s ease; }
#map.lens-open .node:not(.inlens), #map.lens-open .hub:not(.open) { opacity: .22; }
#map.lens-open .places { opacity: .4; }
@media (prefers-reduced-motion: reduce) { #map .node, #map .hub, #map .places { transition: none; } }
.hubrows { display: grid; gap: 6px; margin-top: 10px; }
.hubrow { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hubrow img { width: 26px; height: 26px; object-fit: contain; }
.hubrow small { color: var(--ink-2); }

/* ---------- hover / tap card ---------- */
.card {
  position: fixed; z-index: 40; width: 300px; max-width: calc(100vw - 20px); background: var(--panel); border-radius: 12px;
  border: 1px solid var(--rule); box-shadow: 0 10px 30px rgba(20,32,46,.22); padding: 14px 14px 12px; pointer-events: auto;
}
.card header { display: flex; gap: 12px; align-items: center; }
.card img.logo { width: 52px; height: 52px; object-fit: contain; flex: none; }
.card h3 { margin: 0; font: 800 24px/1.05 var(--display); letter-spacing: .01em; }
.card .sub { font-size: 14px; color: var(--ink-2); }
.card dl { margin: 10px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 14px; }
.card dt { color: var(--mute); }
.card dd { margin: 0; }
.card .row { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.dia { width: 14px; height: 14px; display: inline-block; transform: rotate(45deg) scale(.82); border: 2px solid var(--ink); background: transparent; flex: none; }
.dia.on { background: var(--turf); border-color: var(--turf); }
.dia.new { background: var(--violet); border-color: var(--violet); }
.dia.stad { background: var(--turf-soft); border-color: var(--turf); }
.dia.planned { background: var(--pole); border-color: var(--ink); }
.asof-note { font-size: 12.5px; color: var(--mute); }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 44; background: rgba(20,32,46,.35); }
.drawer {
  position: fixed; z-index: 50; top: var(--top-h); right: 0; bottom: 0; width: min(520px, 100vw); background: var(--panel);
  border-left: 1px solid var(--rule); box-shadow: -12px 0 32px rgba(20,32,46,.16); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(105%); transition: transform .22s ease; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.dr-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--panel); border-bottom: 1px solid var(--rule); }
.dr-head img { width: 76px; height: 76px; object-fit: contain; flex: none; }
.dr-head h2 { margin: 0; font: 800 36px/.98 var(--display); letter-spacing: .01em; }
.dr-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.dr-close { margin-left: auto; align-self: flex-start; border: 0; background: var(--wash); width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 1; flex: none; }
.dr-body { padding: 4px 18px 40px; }
.sec { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.sec:last-child { border-bottom: 0; }
.sochead { margin: 12px 0 4px; font: 700 13px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
ul.soc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
details.sugg { margin-top: 10px; font-size: 15px; }
details.sugg summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
ul.soc a { font-weight: 600; }
ul.soc .note { color: var(--mute); font-size: 14px; }
.sec h3 { margin: 0 0 10px; font: 800 22px/1 var(--display); letter-spacing: .02em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 18px; margin: 0; }
.facts dt { font-size: 13px; color: var(--mute); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.facts > .wide { grid-column: 1 / -1; }
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; }
.linkrow .linkbtn { flex: 1 1 160px; justify-content: center; }
.facts dd small { display: block; font-weight: 400; color: var(--ink-2); }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; min-height: 40px; }
.stamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.stamp.yes { background: var(--turf-soft); color: var(--turf); }
.stamp.newst { background: var(--violet-soft); color: var(--violet); }
.stamp.stadonly { background: var(--turf-soft); color: var(--turf); }
.stamp.no { background: var(--wash); color: var(--ink-2); }
.stamp.planned { background: var(--pole-soft); color: var(--pole-ink); }

/* trip "ticket stubs" */
.trip { position: relative; margin: 0 0 14px; padding: 14px 14px 12px 18px; background: var(--wash); border-radius: 10px; border-left: 6px solid var(--turf); }
.trip::after { content: ""; position: absolute; right: 74px; top: 8px; bottom: 8px; border-left: 2px dashed #cdd6dd; }
.trip .when { font: 800 22px/1.1 var(--display); letter-spacing: .02em; }
.trip .match { margin-top: 2px; font-weight: 700; }
.trip .meta { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.trip .notes { margin: 8px 0 0; white-space: pre-wrap; }
.trip .when, .trip .match, .trip .meta { padding-right: 84px; }
.trip .stubscore { position: absolute; right: 8px; top: 12px; width: 60px; text-align: center; font: 800 26px/1 var(--display); white-space: nowrap; }
.trip .stubscore small { display: block; font: 700 12px var(--body); margin-top: 4px; letter-spacing: .06em; }
.trip .stubscore.w { color: var(--turf); } .trip .stubscore.l { color: var(--danger); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; cursor: zoom-in; background: #dde3e8; }
.linkish { background: none; border: 0; padding: 4px 0; color: var(--focus); font-weight: 700; text-align: left; cursor: pointer; justify-self: start; }
.photos .cover { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(20,32,46,.75); color: #cfd8e0; font-size: 15px; line-height: 1; }
.photos .cover.on { background: var(--pole); color: var(--ink); }
.photos .cover.static { display: grid; place-items: center; }
.chooser.drop { outline: 3px dashed var(--focus); outline-offset: 4px; border-radius: 8px; }
.photos .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(20,32,46,.8); color: #fff; font-size: 16px; line-height: 1; }
.trip .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.empty { color: var(--ink-2); margin: 0 0 8px; }

/* postseason */
.ribbon { display: inline-block; margin: 0 0 6px; padding: 2px 10px; border-radius: 6px; background: var(--pole); color: var(--ink); font-weight: 700; font-size: 14px; }
.ribbon.dh { background: #e6e9ee; color: var(--ink); margin-right: 6px; }
.dhbox { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--wash); }
.dhrow { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.dhrow input { width: 20px; height: 20px; margin-top: 2px; }
.ribbon.event { background: #dbe8fb; color: #1d3f73; }
.lg-post { border: 0 !important; background: none !important; color: #b58900; font-style: normal; width: auto; height: auto; margin-right: 4px; font-size: 16px; line-height: 1; }
.node .postbadge { fill: var(--pole); stroke: var(--ink); stroke-width: 1.2; }
.node .poststar { fill: var(--ink); }

.res-W { color: var(--turf); } .res-L { color: var(--danger); }
.stagechip { display: inline-block; background: var(--pole-soft); color: var(--pole-ink); border: 1px solid #ecd780; border-radius: 6px; padding: 0 6px; font-size: 12.5px; font-weight: 700; margin-left: 6px; }

.found { margin: 0; padding: 9px 12px; border-radius: 8px; font-weight: 700; font-size: 15px; background: var(--wash); color: var(--ink-2); }
.found.ok { background: var(--turf-soft); color: var(--turf); }
.found.warn { background: var(--pole-soft); color: var(--pole-ink); }
.more > summary { cursor: pointer; font-weight: 700; color: var(--focus); padding: 6px 0; }
.moreBody { display: grid; gap: 12px; margin-top: 8px; }
.road + .road { margin-top: 12px; }

.shared { margin: 4px 0 14px; padding: 10px 12px; background: var(--wash); border-radius: 10px; }
.srow { padding: 5px 0; font-size: 15px; }

/* A real input kept in the layout (so it behaves on iOS) but visually replaced by its label button. */
.filebtn { position: relative; overflow: hidden; display: inline-flex; align-items: center; cursor: pointer; }
.file-overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.filebtn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.picks .perr { color: var(--danger); background: #fdecea; }
.updatebar { position: fixed; z-index: 100; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(20,32,46,.35); font-weight: 700; }
.chooser { display: grid; gap: 8px; justify-items: start; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; width: 100%; }
.picks figure { margin: 0; position: relative; }
.picks img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: #dde3e8; }
.picks .pname { display: grid; place-items: center; aspect-ratio: 1; padding: 4px; text-align: center; font-size: 11px; overflow: hidden; word-break: break-all; background: var(--wash); border-radius: 8px; }
.picks .x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(20,32,46,.85); color: #fff; font-size: 16px; line-height: 1; }

.visits { display: grid; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.visit { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; background: none; border: 0; padding: 0; text-align: left; width: 100%; cursor: pointer; }
.visit img { width: 84px; height: 62px; object-fit: cover; border-radius: 8px; background: #dde3e8; }
.visit .nophoto { width: 14px; height: 62px; border-left: 4px solid var(--turf); border-radius: 2px; }
.visit b { display: block; font-size: 15px; }
.visit small { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.3; }
.cardcta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.years.ahead { align-items: flex-start; }
.yr { min-width: 230px; flex: 1 1 230px; max-width: 420px; }
.thisyr { margin-left: 8px; font-size: 12.5px; font-weight: 700; color: var(--pole-ink); background: var(--pole-soft); border-radius: 6px; padding: 1px 7px; }
.yr .goalhead b { font: 700 16px var(--body); letter-spacing: 0; }
.goalrow { margin-top: 8px; }
.goalhead { display: flex; gap: 8px; align-items: center; width: 100%; background: none; border: 0; padding: 6px 0; text-align: left; font-size: 15px; }
button.goalhead { cursor: pointer; border-radius: 6px; }
button.goalhead:hover { background: var(--wash); }
.goalform { margin-top: 6px; padding: 12px; gap: 10px; }
.addyear { align-self: center; }
.goalglyph { width: 56px; height: 56px; display: grid; place-items: center; }
.goalglyph .lgl { width: 34px; height: 34px; margin: 0; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lgpick { gap: 6px; align-self: end; padding: 8px 6px; }
.finds { display: grid; gap: 10px; margin-top: 8px; }
.find { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--rule); border-left: 6px solid var(--rule); border-radius: 12px; }
.find.none { border-left-color: var(--turf); }
.find.new-stadium { border-left-color: var(--violet); }
.find.stadium-only { border-left-color: #7fc79b; }
.find img { width: 52px; height: 52px; object-fit: contain; }
.find .fbody b { display: block; font: 800 22px/1.05 var(--display); letter-spacing: .01em; }
.find .when { font-weight: 700; margin-top: 3px; }
.find .sub { font-size: 14px; color: var(--ink-2); }
.find .why { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.find .fact { display: grid; gap: 6px; justify-items: end; }
.linkbtn.sm { padding: 4px 10px; min-height: 32px; font-size: 14px; }
.seengrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin-top: 10px; }
.seen { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 8px 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; cursor: pointer; }
.seen img { width: 44px; height: 44px; object-fit: contain; }
.seen.no img { filter: grayscale(1); opacity: .5; }
.seen.yes { border-color: #b8dcc6; background: #f3fbf6; }
.seen .sn b { display: block; font-size: 16px; }
.seen .sn small { color: var(--ink-2); font-size: 13.5px; }
.seen.no .sn small { color: var(--mute); }
.bar2 { height: 6px; background: #d3dbe2; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar2 i { display: block; height: 100%; background: var(--turf); }
#view-seen { overflow-y: auto; background: var(--paper); }

.every .everyhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.every .everyhead .lede { margin: 0; }
.minihead { margin: 18px 0 6px; font: 800 20px/1 var(--display); letter-spacing: .03em; display: flex; align-items: center; gap: 6px; }
.minihead small { margin-left: 8px; font: 400 13px var(--body); color: var(--mute); letter-spacing: 0; }
.minigrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 0 18px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 4px 8px; }
.mini { display: grid; grid-template-columns: 16px 30px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 6px 6px; background: none; border: 0; border-bottom: 1px solid var(--rule); text-align: left; cursor: pointer; border-radius: 6px; }
.mini:hover { background: var(--wash); }
.mini img { width: 30px; height: 30px; object-fit: contain; }
.mini:not(.done) img { filter: grayscale(1); opacity: .65; }
.mini .mn b { display: block; font-size: 15.5px; line-height: 1.2; }
.mini .mn small { display: block; font-size: 13px; color: var(--mute); line-height: 1.2; }
.mini .mnote { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.mini.done .mn b { color: var(--ink-2); }

.dlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 4px; font-size: 13.5px; color: var(--ink-2); }
.dlegend span { display: inline-flex; align-items: center; gap: 7px; }
.dlegend .dia { margin: 0 2px; }
.dlegend.leagues { margin-top: 0; }
.finderwrap .ffrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.finderwrap input[type=text], .finderwrap input[type=date], .finderwrap select { border: 1.5px solid #aab6c1; border-radius: 8px; padding: 6px 9px; background: #fff; min-height: 38px; font-size: 15px; }
.finderwrap input[type=text] { flex: 1 1 200px; min-width: 160px; }
.fplace { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.lgchip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; border: 1.5px solid #aab6c1; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 38px; }
.lgchip input { position: absolute; opacity: 0; pointer-events: none; }
.lgchip.on { border-color: var(--ink); background: var(--wash); }
.lgchip:not(.on) { opacity: .55; }
.fhead { justify-content: space-between; margin-top: 14px; }
.fcount { font-weight: 700; }
.seg.sorter { margin-left: 0; flex: none; }
.seg.sorter button { padding: 4px 10px; min-height: 32px; font-size: 14px; white-space: nowrap; }
.finderwrap { max-width: 100%; overflow-x: clip; }
.finderwrap .ffrow > * { min-width: 0; }
.finderwrap input[type=date] { flex: 0 1 150px; }
.flist { margin-top: 6px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.fline { display: grid; grid-template-columns: 92px 28px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--rule); }
.fline:last-child { border-bottom: 0; }
.fline.old { opacity: .72; }
.fline img { width: 28px; height: 28px; object-fit: contain; }
.fdate b { display: block; font-size: 14.5px; line-height: 1.15; }
.fdate small { color: var(--mute); font-size: 12.5px; }
.fwho b { display: block; font-size: 15.5px; line-height: 1.2; }
.fwho small { color: var(--mute); font-size: 13px; }
.fwho .star { color: #b58900; }
.ntag, .otag { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.ntag { background: var(--turf-soft); color: var(--turf); }
.ttag { background: var(--pole-soft); color: var(--pole-ink); }
.otag { background: var(--wash); color: var(--mute); }
.ttag, .ntag, .otag { white-space: nowrap; }
.fmore { display: block; width: 100%; text-align: left; padding: 7px 12px 7px 50px; border: 0; border-bottom: 1px solid var(--rule); background: #fff; color: var(--focus); font-weight: 700; font-size: 14px; cursor: pointer; min-height: 38px; }
.fgroup { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--wash); border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.fgroup img { width: 24px; height: 24px; object-fit: contain; }
.fgroup span:not(.ntag):not(.otag) { color: var(--ink-2); font-size: 13.5px; }
.fgroup .ntag, .fgroup .otag, .fgroup .ttag { margin-left: auto; }

/* history timeline: a real sequence, so it gets a spine */
.tl { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.tl::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--rule); }
.tl li { position: relative; padding: 0 0 14px; }
.tl li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; background: #fff; border: 2.5px solid var(--ink); transform: rotate(45deg) scale(.8); }
.tl li.now::before { background: var(--turf); border-color: var(--turf); }
.tl b { display: block; }
.tl .yrs { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.tl .note { font-size: 14px; color: var(--ink-2); }
.titles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.titles li { background: var(--pole-soft); border: 1px solid #ecd780; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.titles b { font: 800 20px/1 var(--display); margin-right: 6px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 12px; margin-top: 12px; padding: 14px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; }
.form h4 { margin: 0; font: 800 20px/1 var(--display); letter-spacing: .02em; }
.fld { display: grid; gap: 4px; font-size: 14px; }
.fld > span { font-weight: 700; color: var(--ink-2); }
.fld input, .fld select, .fld textarea { border: 1.5px solid #aab6c1; border-radius: 8px; padding: 9px 10px; background: #fff; min-height: 42px; width: 100%; }
.fld textarea { min-height: 76px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hint { font-size: 13px; color: var(--mute); margin: 0; }
.err { color: var(--danger); font-weight: 700; font-size: 14px; margin: 0; }
.owner-only { display: none; }
body.is-owner .owner-only { display: revert; }
body.is-owner span.owner-only, body.is-owner a.owner-only { display: inline; }
body.is-owner .owner-only.flex { display: flex; }
body.is-owner .owner-only.block { display: block; }

/* ---------- plan tab ---------- */
#view-plan, #view-numbers { overflow-y: auto; background: var(--paper); }
.plan { max-width: 1100px; margin: 0 auto; padding: 22px 20px 80px; display: grid; gap: 28px; }
.plan h2 { margin: 0 0 12px; font: 800 30px/1 var(--display); letter-spacing: .02em; }
.plan .lede { margin: -6px 0 14px; color: var(--ink-2); max-width: 62ch; }
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.nx { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; border-top: 5px solid var(--pole); cursor: pointer; text-align: left; width: 100%; }
.nx img { width: 56px; height: 56px; object-fit: contain; }
.nx b { display: block; font: 800 24px/1.05 var(--display); }
.nx .when { font-weight: 700; margin-top: 4px; }
.nx .sub { font-size: 14px; color: var(--ink-2); }
.nx .match { margin-top: 6px; font-size: 13.5px; background: var(--turf-soft); color: var(--turf); padding: 3px 8px; border-radius: 6px; display: inline-block; font-weight: 700; }
.years { display: flex; gap: 10px; flex-wrap: wrap; }
.yr { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 14px; min-width: 150px; }
.yr.now { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.yr b { font: 800 24px/1 var(--display); }
.yr .lg-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; }
.yr .lg-row .dia { margin: 0 2px; }
.yr .need { font-size: 13px; color: var(--pole-ink); background: var(--pole-soft); border-radius: 6px; padding: 2px 8px; margin-top: 8px; display: inline-block; }
.div-block { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.div-block + .div-block { margin-top: 12px; }
.div-block h3 { margin: 0; padding: 10px 16px; font: 800 20px/1 var(--display); letter-spacing: .03em; background: var(--wash); border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: baseline; }
.div-block h3 small { font: 400 13px var(--body); color: var(--mute); letter-spacing: 0; }
.trow { display: grid; grid-template-columns: 30px 44px minmax(0, 1.2fr) minmax(0, 1.4fr); gap: 10px 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.trow:last-child { border-bottom: 0; }
.trow.done .nm { color: var(--ink-2); }
.trow .lg-img { width: 40px; height: 40px; object-fit: contain; }
.trow.todo .lg-img { filter: grayscale(1); opacity: .6; }
.trow .nm { font-weight: 700; background: none; border: 0; padding: 0; text-align: left; font-size: 16px; }
.trow .nm:hover { text-decoration: underline; }
.trow .vn { font-size: 13.5px; color: var(--ink-2); display: block; font-weight: 400; }
.trow .pl { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; background: var(--wash); border: 1px solid var(--rule); color: var(--ink); }
button.chip:hover { border-color: var(--ink); }
.chip.pl-chip { background: var(--pole-soft); border-color: #ecd780; color: var(--pole-ink); }
.chip.newst { background: var(--violet-soft); border-color: #cfc5f3; color: var(--violet); }
.chip.road { background: var(--turf-soft); border-color: #b8dcc6; color: var(--turf); }
.trow .editor { grid-column: 1 / -1; }
.diabtn { width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 0; padding: 0; }

/* ---------- dialogs, toast, lightbox ---------- */
.dialog { border: 0; border-radius: 14px; padding: 0; width: min(420px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(20,32,46,.35); color: var(--ink); }
.dialog::backdrop { background: rgba(20,32,46,.5); }
.dialog form, .dialog .box { padding: 22px; display: grid; gap: 14px; }
.dialog h2 { margin: 0; font: 800 30px/1 var(--display); }
.divider { text-align: center; color: var(--mute); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.pk { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: calc(100vw - 32px); font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(8,14,22,.92); display: grid; place-items: center; padding: 20px; }
.lightbox .lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.88); color: var(--ink); font-size: 36px; line-height: 1; cursor: pointer; }
.lightbox .lb-nav { display: grid; place-items: center; padding: 0; }
.lightbox .lb-chev { display: block; line-height: 0; }
.lightbox .lb-nav:hover { background: #fff; }
.lightbox .lb-nav.prev { left: 12px; }
.lightbox .lb-nav.next { right: 12px; }
.lightbox .lb-count { font-size: 13px; opacity: .75; margin-top: 4px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 6px; }
.lightbox p { color: #e6edf3; text-align: center; margin: 10px 0 0; }
.lightbox .lb-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; font-size: 24px; background: #fff; }

/* ---------- small screens: compact header, drawer becomes a bottom sheet ---------- */
@media (max-width: 760px) {
  .top { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 10px 10px; align-items: center; }
  .brand { grid-column: 1; grid-row: 1; margin: 0; }
  .brand h1 { font-size: 19px; letter-spacing: .03em; }
  .brand .tag { display: none; }
  .brand .mark { width: 32px; height: 32px; }
  .menuwrap { grid-column: 2; grid-row: 1; }
  .filterbar { padding: 6px 10px; }
  .score { grid-column: 1 / -1; grid-row: 3; gap: 10px 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tally { min-width: 0; }
  .tally b { font-size: 26px; }
  .tally span { font-size: 12.5px; }
  .seg button { padding: 6px 12px; }
  .drawer { top: max(3dvh, calc(env(safe-area-inset-top, 0px) + 10px)); width: 100vw; border-left: 0; border-radius: 16px 16px 0 0; transform: translateY(105%); box-shadow: 0 -10px 30px rgba(20,32,46,.25); }
  .dr-head img { width: 60px; height: 60px; }
  .dr-head h2 { font-size: 30px; }
  .mapctl { left: 8px; bottom: 8px; max-width: calc(100% - 70px); }
  .legend { font-size: 13px; padding: 5px 9px; }
  .hub .hublabel { display: none; }
  .zoom { right: 8px; bottom: 8px; }
  .zoom button { width: 44px; height: 44px; }
  .trow { grid-template-columns: 30px 40px 1fr; }
  .trow .pl { grid-column: 2 / -1; }
  .card { left: 10px !important; right: 10px; top: auto !important; bottom: 10px; width: auto; max-width: none; }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .plabel { font-size: 10.5px; }
  .fline { grid-template-columns: 70px 24px 1fr auto; }
  .fline .ntag, .fline .otag, .fline .ttag { display: none; }
  .fline.new .fwho b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--turf); margin-right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .toast, .tally .bar i, .node image { transition: none; }
}

/* Added to a phone's home screen the page runs full screen under the status bar: keep it clear of the
   notch, the clock and the home indicator. All insets are 0 in a normal browser tab. */
.top { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-left: calc(20px + env(safe-area-inset-left, 0px)); padding-right: calc(20px + env(safe-area-inset-right, 0px)); }
.filterbar { padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); }
.legend { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: calc(16px + env(safe-area-inset-left, 0px)); }
.zoom { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
.toast { margin-bottom: env(safe-area-inset-bottom, 0px); }
@media (max-width: 760px) {
  .top { padding-left: calc(10px + env(safe-area-inset-left, 0px)); padding-right: calc(10px + env(safe-area-inset-right, 0px)); }
  .filterbar { padding-left: calc(10px + env(safe-area-inset-left, 0px)); padding-right: calc(10px + env(safe-area-inset-right, 0px)); }
  .drawer { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* ---------- log a game from photos ---------- */
.dialog.wide { width: min(760px, calc(100vw - 24px)); }
.imp { max-height: calc(100dvh - 40px); overflow: auto; }
.imp h2 { margin: 0; }
.imp, .imp > * { min-width: 0; }
.dialog .box.imp { grid-template-columns: minmax(0, 1fr); }
.imp-drop { display: grid; gap: 6px; padding: 18px; border: 2px dashed var(--border); border-radius: 12px; background: var(--wash); cursor: pointer; text-align: center; justify-items: center; position: relative; }
.imp-drop.over { border-color: var(--turf); background: var(--turf-soft); border-style: solid; }
.imp-drop .imp-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.imp-ico { font-size: 34px; line-height: 1; }
.imp-sub { color: var(--ink-2); }
.imp-btn { background: var(--pole); color: var(--ink); font-weight: 800; border-radius: 10px; padding: 11px 18px; margin: 4px 0; }
.imp-drop .hint { font-size: 13.5px; }
.imp-drop:hover, .imp-drop:focus-within { border-color: var(--focus); }
.imp-big { font: 800 24px/1 var(--display); text-transform: uppercase; }
.imp-file { font-size: 15px; max-width: 100%; }
.imp-date { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.imp-date .fld { flex: 1; min-width: 180px; }
.imp-list { display: grid; gap: 12px; }
.imp-card { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: var(--panel); }
.imp-card.skipped { opacity: .5; }
.imp-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.imp-thumbs { display: flex; gap: 6px; align-items: center; }
.imp-th { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--wash); }
.imp-th.none { display: inline-grid; place-items: center; font-size: 11px; color: var(--mute); }
.imp-more { font-weight: 700; color: var(--ink-2); padding-left: 4px; }
.imp-games { display: grid; gap: 6px; }
.imp-game { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--rule); border-radius: 10px; cursor: pointer; background: #fff; }
.imp-game.on { border-color: var(--turf); background: var(--turf-soft); }
.imp-game input { width: 20px; height: 20px; flex: none; }
.imp-game img, .imp-nologo { width: 34px; height: 34px; flex: none; object-fit: contain; }
.imp-gtext { display: grid; gap: 1px; min-width: 0; }
.imp-gtext b { overflow-wrap: anywhere; }
.imp-gsub { font-size: 14px; color: var(--ink-2); }
.imp-tag { display: inline-block; justify-self: start; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.imp-tag.match { background: var(--turf); color: #fff; }
.imp-tag.have { background: var(--violet-soft); color: var(--violet); }
.imp-other summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.imp-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.imp-attach input { width: 64px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.imp-skip { display: inline-flex; gap: 6px; align-items: center; }
.imp-actions { position: sticky; bottom: 0; background: var(--panel); padding-top: 10px; justify-content: flex-end; flex-wrap: wrap; }
.imp-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 40vh; overflow: auto; }
.imp-log li.ok::before { content: "✓ "; color: var(--turf); font-weight: 800; }
.imp-log li.bad::before { content: "! "; color: var(--danger); font-weight: 800; }
.imp progress { width: 100%; }
.menu .menuitem.plain { margin-top: 0; border-top: 0; border-radius: 9px; padding-top: 8px; }

.sportboxes { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 12px; }
.sportbox { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.sportbox input { width: 18px; height: 18px; }

/* Six league buttons do not fit one phone row: the filter bar wraps and the segmented control spans it. */
@media (max-width: 760px) {
  .filterbar { flex-wrap: wrap; row-gap: 6px; padding-top: 6px; padding-bottom: 8px; }
  .filterbar .seg { width: 100%; margin-left: 0; }
  .filterbar .seg button { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 14px; }
  .filterbar .seg button.more { flex: 0 0 44px; font-size: 20px; }
}

/* ---------- Seen: ledger of games, dates, photos, and the ESPN check ---------- */
.seenctl { display: flex; gap: 10px 16px; flex-wrap: wrap; margin: 8px 0 4px; }
.seengrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-top: 10px; align-items: start; }
.seencard { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 8px 10px 10px; display: grid; gap: 8px; }
.seencard.yes { border-color: #b8dcc6; background: #f7fcf9; }
.seenhead { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; background: none; border: 0; padding: 2px 0; cursor: pointer; width: 100%; }
.seenhead img { width: 44px; height: 44px; object-fit: contain; }
.seencard.no .seenhead img { filter: grayscale(1); opacity: .5; }
.seenhead .sn b { display: block; font-size: 16px; }
.seenhead .sn small { color: var(--ink-2); font-size: 13.5px; }
.seencard.no .sn small { color: var(--mute); }
.vlist { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { display: inline-flex; gap: 6px; align-items: baseline; flex-wrap: wrap; text-align: left; padding: 4px 9px; border-radius: 9px; border: 1px solid var(--rule); background: #fff; font-size: 13.5px; cursor: pointer; }
.vchip b { font-weight: 700; }
.vchip small { color: var(--mute); }
.vchip.flag { border-color: #e0a020; background: #fff8e6; }
.vwarn { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #e0a020; color: #fff; font-size: 11px; font-weight: 800; align-self: center; }
.vthumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.vthumb { padding: 0; border: 0; border-radius: 8px; overflow: hidden; width: 60px; height: 60px; background: var(--wash); cursor: pointer; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkbox { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 12px; display: grid; gap: 10px; margin-top: 12px; }
.checkbox .ok { color: var(--turf); font-weight: 700; margin: 0; }
.issue { border: 1px solid #e0a020; background: #fff8e6; border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.issue.weak { border-style: dashed; }
.espnrow { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }

.formerTag { font-size: 12px; font-weight: 700; color: var(--violet); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- scoreboard: league columns, three rows ---------- */
.score { display: block; flex: 1; min-width: 0; }
.stats { display: grid; grid-template-columns: auto repeat(var(--n, 4), minmax(58px, 1fr)); column-gap: 16px; row-gap: 3px; align-items: baseline; max-width: 780px; }
.st-h { display: flex; align-items: center; gap: 2px; font: 800 15px/1 var(--display); letter-spacing: .06em; color: #fff; }
.st-h .lgl { margin-right: 5px; }
.st-bar { height: 4px; background: #2c6a49; border-radius: 2px; overflow: hidden; align-self: center; }
.st-bar i { display: block; height: 100%; background: var(--pole); border-radius: 2px; transition: width .4s ease; }
.st-l { font-size: 12px; color: #bcd3c4; white-space: nowrap; }
.st-l .short { display: none; }
.st-v { white-space: nowrap; }
.st-v b { font: 800 18px/1.1 var(--display); color: #fff; letter-spacing: .01em; }
.st-v i { font-style: normal; font-size: 12.5px; color: #bcd3c4; margin-left: 1px; }
.st-v.main b { font-size: 24px; line-height: 1; }
.st-v b.na { color: #7f8e9c; }
.st-h.dim, .st-bar.dim, .st-v.dim { opacity: .4; }
@media (max-width: 760px) {
  .score { grid-column: 1 / -1; grid-row: 3; display: block; }
  .stats { column-gap: 8px; grid-template-columns: auto repeat(var(--n, 4), minmax(0, 1fr)); max-width: none; }
  .st-l .long { display: none; }
  .st-l .short { display: inline; }
  .st-h { font-size: 13.5px; letter-spacing: .03em; }
  .st-h .lgl { margin-right: 3px; }
  .st-v b { font-size: 16px; }
  .st-v.main b { font-size: 21px; }
  .st-v i { font-size: 11.5px; }
}

/* Game Log league headings: seen / to go, the one the filter is showing in bold */
.plan h2 .cnt { margin-left: 14px; font: 400 17px/1 var(--body); letter-spacing: 0; color: var(--mute); white-space: nowrap; }
.plan h2 .cnt b { font-weight: 700; }
.plan h2 .cnt.on { color: var(--ink); }
.plan h2 .cnt.on b { font: 800 26px/1 var(--display); }

/* photo visibility: owner-only chip on each photo, and the "keep new photos private" checkbox beside uploaders */
.photos .vis { position: absolute; left: 4px; bottom: 4px; border: 0; border-radius: 999px; padding: 2px 9px; min-height: 24px; font: 700 12px/1 var(--body); background: rgba(255,255,255,.92); color: var(--ink-2); }
.photos .vis.on { background: var(--ink); color: #fff; }
.photos img.is-private { opacity: .62; outline: 2px dashed var(--ink-2); outline-offset: -2px; }

.brand .tag { display: flex; align-items: center; gap: 6px; }
.pavatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; border: 1px solid #4f8266; }

/* ---------- page navigation: a rail on wide screens, a bottom bar on phones ---------- */
.shell { flex: 1; min-height: 0; display: flex; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--paper); }
.pages { flex: none; width: calc(86px + env(safe-area-inset-left, 0px)); padding: 8px 0 8px env(safe-area-inset-left, 0px); background: var(--ink); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.pages .ico { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pages a { order: var(--o, 0); position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 4px; color: #bcd3c4; text-decoration: none; font: 700 11.5px/1.15 var(--body); text-align: center; }
.pages a:hover { color: #fff; }
.pages a[aria-current="page"] { color: #fff; background: #1b4d33; }
.pages a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 0 3px 3px 0; background: var(--pole); }
.pages a:focus-visible, .pages .navlog:focus-visible { outline: 3px solid var(--pole); outline-offset: -3px; }
.pages .short { display: none; }
.pages .navlog { order: 99; margin: auto 10px 6px; padding: 8px 2px; border: 0; border-radius: 10px; background: var(--pole); color: var(--ink); font: 800 12px/1.15 var(--body); text-align: center; }
.pages .navlog .ico { display: block; margin: 0 auto 2px; width: 20px; height: 20px; }
body.is-owner .pages .navlog { display: block; }
.menubtn { overflow: hidden; }
.menubtn .whoimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  :root { --tabbar-h: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .shell { flex-direction: column; }
  .stage { order: 1; }
  .pages { order: 2; width: auto; flex-direction: row; align-items: flex-end; gap: 0; overflow: visible; background: var(--ink); border-top: 0;
    padding: 4px calc(2px + env(safe-area-inset-right, 0px)) max(4px, calc(env(safe-area-inset-bottom, 0px) - 14px)) calc(2px + env(safe-area-inset-left, 0px)); }
  .pages a { flex: 1 1 0; min-width: 0; color: #bcd3c4; font-size: 11px; padding: 6px 0 2px; }
  .pages a:hover { color: #fff; }
  .pages a[aria-current="page"] { color: #fff; background: none; }
  .pages a[aria-current="page"]::before { left: 50%; top: -5px; bottom: auto; width: 28px; height: 4px; margin-left: -14px; border-radius: 0 0 4px 4px; }
  .pages .full { display: none; } .pages .short { display: block; }
  .pages .navlog { order: 2; flex: none; width: 52px; height: 52px; margin: -24px 8px 0; padding: 0; border-radius: 50%; box-shadow: 0 3px 8px rgba(0,0,0,.45); display: none; place-items: center; align-content: center; }
  body.is-owner .pages .navlog { display: grid; }
  .pages .navlog span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pages .navlog .ico { width: 26px; height: 26px; margin: 0; }
  .toast { bottom: calc(var(--tabbar-h) + 14px); margin-bottom: 0; }
  .updatebar { bottom: calc(var(--tabbar-h) + 8px); }
  .card { bottom: calc(var(--tabbar-h) + 10px); }
}

.favbtn { background: var(--wash); color: var(--ink); box-shadow: inset 0 0 0 2px #aab6c1; margin-left: auto; margin-right: 10px; }
.favbtn.on { background: var(--pole); box-shadow: none; }
.favbtn:disabled { opacity: .6; }
.favbtn + .seg { margin-left: 0; }
.favbtn[hidden] + .seg { margin-left: auto; }

/* Banana Ball / concert: the manual add in the importer, and "use this" suggestions in the visit form */
.imp-addrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.imp-addrow input { flex: 1 1 140px; min-width: 0; font: inherit; padding: 8px 10px; border: 2px solid #c7bfa4; border-radius: 8px; background: #fff; color: inherit; }
.imp-addrow select { font: inherit; padding: 8px; border-radius: 8px; border: 2px solid #c7bfa4; background: #fff; }
.extras { margin: 6px 0 2px; }
.extras .chip { margin: 2px 4px 2px 0; }

/* "Log a game": look at a photo closer, with its file name */
.imp-thbtn { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 8px; line-height: 0; }
.imp-thbtn:focus-visible, button.imp-more:focus-visible { outline: 3px solid var(--focus, #1a56c4); outline-offset: 2px; }
button.imp-more { border: 0; background: var(--paper, #f1ead6); color: inherit; font: inherit; cursor: pointer; border-radius: 8px; padding: 0 10px; min-height: 56px; }
.imp-files { margin: 4px 0 8px; font-size: 14.5px; }
.imp-files summary { cursor: pointer; color: var(--ink-2, #3f4f45); }
.imp-files ul { margin: 6px 0 0; padding-left: 18px; }
.imp-files li { overflow-wrap: anywhere; }
.imp-viewer { position: fixed; inset: 0; z-index: 50; background: rgba(8, 14, 22, .94); color: #fff; display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 12px 12px; }
.imp-vbar { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.imp-vbar > div { flex: 1; min-width: 0; }
.imp-vname { display: block; overflow-wrap: anywhere; font-size: 17px; }
.imp-vmeta { font-size: 13.5px; opacity: .8; }
.imp-vcount { opacity: .8; font-size: 14px; white-space: nowrap; }
.imp-vstage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.imp-vimg { max-width: 100%; max-height: 100%; min-width: 0; object-fit: contain; border-radius: 6px; }
.imp-vnav { flex: none; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 30px; line-height: 1; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.imp-viewer .hint { color: #cfd8e1; text-align: center; margin: 6px 0 0; min-height: 1.4em; }

/* Minor league levels: a second filter row under the league chips, and level headings in the lists */
.levelbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.levelbar[hidden] { display: none; }
.levelbar .lvlabel { font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.lvlhead { grid-column: 1 / -1; margin: 10px 0 2px; font: 800 17px/1.2 var(--display, inherit); text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2, #3f4f45); }
.lvlhead small { margin-left: 10px; font: 400 13px var(--body, inherit); text-transform: none; letter-spacing: 0; color: var(--mute, #6b7a6f); }
/* conferences are many: keep each label on one line and let the row scroll sideways when it cannot fit */
.levelbar .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.levelbar .seg button { white-space: nowrap; }
@media (max-width: 760px) { .levelbar { padding: 6px 10px; flex-wrap: wrap; } .levelbar .seg { width: 100%; overflow-x: auto; scrollbar-width: none; } .levelbar .seg button { flex: 1 0 auto; min-width: 64px; padding: 6px 8px; font-size: 13.5px; white-space: nowrap; } }

/* ★ Sports: every sport with a star on the ones this board shows */
.sportsdlg { border: 0; padding: 0; background: transparent; max-width: min(520px, 94vw); width: 100%; }
.sportsdlg::backdrop { background: rgba(10, 18, 28, .55); }
.sportsbox { background: var(--panel, #fff); border-radius: 16px; padding: 18px; max-height: 88vh; overflow: auto; }
.sportsbox h2 { margin: 0 0 4px; font: 800 26px/1 var(--display, inherit); text-transform: uppercase; }
ul.sportlist { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 6px; }
.sportrow { width: 100%; display: grid; grid-template-columns: 30px 18px 1fr auto; align-items: center; gap: 8px; text-align: left; border: 2px solid var(--rule, #ddd5bd); background: #fff; color: inherit; border-radius: 12px; padding: 8px 12px; font: inherit; cursor: pointer; min-height: 52px; }
.sportrow.on { border-color: var(--pole, #ffb800); background: #fffbea; }
.sportrow:focus-visible { outline: 3px solid var(--focus, #1a56c4); outline-offset: 2px; }
.sportrow .star { font-size: 24px; line-height: 1; color: #c7bfa4; }
.sportrow.on .star { color: #d9a400; }
.sportrow .lgl { margin: 0; }
.sportname b { display: block; }
.sportname small { color: var(--ink-2, #3f4f45); font-size: 13.5px; }
.sportstate { font-size: 13px; color: var(--mute, #6b7a6f); }
.sportrow.on .sportstate { color: var(--turf, #1b7a47); font-weight: 700; }

/* Game Log: timeline, folding league lists, home/away */
.timeline { margin-bottom: 18px; }
.tlhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.tlhead h2 { margin: 0; }
.tlctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tlyear { display: flex; align-items: baseline; gap: 8px; width: 100%; border: 0; background: none; padding: 10px 0 4px; font: inherit; color: inherit; cursor: pointer; text-align: left; border-bottom: 1px solid var(--rule, #ddd5bd); margin-top: 6px; }
.tlyear b { font: 800 22px/1 var(--display, inherit); }
.tlyear small { color: var(--mute, #6b7a6f); }
.tlyear .chev, .secfold .chev { display: inline-block; width: 1.1em; color: var(--ink-2, #3f4f45); }
.tlyear:focus-visible, .secfold:focus-visible, .tlcard:focus-visible { outline: 3px solid var(--focus, #1a56c4); outline-offset: 2px; }
ol.tl2 { list-style: none; margin: 8px 0 4px 8px; padding: 0 0 0 20px; border-left: 3px solid var(--rule, #ddd5bd); display: grid; gap: 6px; }
.tlitem { position: relative; }
.tldot { position: absolute; left: -29px; top: 15px; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--paper, #f1ead6); box-sizing: content-box; }
.tlcard { width: 100%; display: grid; grid-template-columns: 8.5em 1fr auto; align-items: center; gap: 4px 12px; text-align: left; border: 0; background: var(--panel, #fff); border-radius: 12px; padding: 9px 12px; font: inherit; color: inherit; cursor: pointer; }
.tlcard:hover { box-shadow: 0 3px 12px rgba(20, 32, 46, .14); }
.tlwhen { font-weight: 700; color: var(--ink-2, #3f4f45); font-size: 14.5px; }
.tlmain b { display: block; overflow-wrap: anywhere; }
.tlmain small { color: var(--ink-2, #3f4f45); font-size: 13.5px; }
.tlimg { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.tlph { color: var(--mute, #6b7a6f); }
@media (max-width: 560px) { .tlcard { grid-template-columns: 1fr auto; } .tlwhen { grid-column: 1 / -1; } }
.secfold { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
section.folded .bar2 { display: none; }
.vchip .ha { font-style: normal; font: 800 11px/1 var(--body, inherit); text-transform: uppercase; letter-spacing: .05em; padding: 3px 6px; border-radius: 5px; margin-right: 6px; }
.vchip .ha.home { background: #dff2e6; color: #12603a; }
.vchip .ha.away { background: #e1ebfa; color: #1a4a8f; }
.vchip.home { box-shadow: inset 4px 0 0 #1b7a47; }
.vchip.away { box-shadow: inset 4px 0 0 #3b6fb6; }

/* Game Log timeline as a chart: a row per year, months left to right, a dot per game */
.tlchart { margin-top: 10px; display: grid; gap: 3px; }
.tlaxis, .tlrow { display: grid; grid-template-columns: 3.4em 1fr 3.6em; align-items: center; gap: 8px; }
.tlmonths { display: grid; grid-template-columns: repeat(12, 1fr); font-size: 11px; color: var(--mute, #6b7a6f); text-align: center; }
.tltrack { position: relative; height: 30px; border-radius: 6px; background: repeating-linear-gradient(to right, #fff 0, #fff calc(100% / 12 - 1px), #e4eaef calc(100% / 12 - 1px), #e4eaef calc(100% / 12)); }
.tlrow.empty .tltrack { background: repeating-linear-gradient(to right, #f3f6f8 0, #f3f6f8 calc(100% / 12 - 1px), #e4eaef calc(100% / 12 - 1px), #e4eaef calc(100% / 12)); height: 14px; }
.tlrow.on .tltrack { box-shadow: 0 0 0 2px var(--focus, #1a56c4); }
button.tlylab { border: 0; background: none; font: 800 17px/1 var(--display, inherit); text-align: left; padding: 4px 0; cursor: pointer; color: inherit; }
.tlrow.empty .tlylab { color: var(--mute, #6b7a6f); font-weight: 600; font-size: 14px; }
button.tlylab:hover { text-decoration: underline; }
.tldotb { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-sizing: content-box; cursor: pointer; }
.tldotb:hover, .tldotb:focus-visible { transform: scale(1.5); z-index: 2; outline: 2px solid var(--ink, #0f3322); }
.tldotb.undated { border-radius: 2px; }
.tlcount { position: relative; font-size: 13px; font-weight: 700; text-align: right; min-width: 3.4em; display: block; }
.tlcount i { position: absolute; inset: auto auto 0 0; height: 3px; background: var(--pole, #ffb800); border-radius: 2px; }
.tlmore { margin: 10px 0 0 calc(3.4em + 8px); }
.tlkey { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0 calc(3.4em + 8px); font-size: 13px; color: var(--ink-2, #3f4f45); }
.tlkey i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
h3.tlpicked { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; font: 800 20px/1 var(--display, inherit); text-transform: uppercase; }
@media (max-width: 560px) { .tlaxis, .tlrow { grid-template-columns: 2.8em 1fr 2.6em; gap: 5px; } .tlmore, .tlkey { margin-left: 0; } }

/* My Box Score */
.nbtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.nbtile { background: var(--panel, #fff); border-radius: 14px; padding: 12px 14px; border-top: 5px solid var(--pole, #ffb800); }
.nbtile b { display: block; font: 800 34px/1 var(--display, inherit); }
.nbtile span { display: block; color: var(--ink-2, #3f4f45); }
.nbtile small { display: block; color: var(--mute, #6b7a6f); font-size: 13px; margin-top: 2px; }
.nbsec { margin-top: 24px; }
.nbsec h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 800 24px/1.1 var(--display, inherit); text-transform: uppercase; }
.nbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.nbstat { background: var(--panel, #fff); border-radius: 12px; padding: 9px 12px; }
.nbstat b { display: block; font: 800 26px/1.05 var(--display, inherit); }
.nbstat span { color: var(--ink-2, #3f4f45); font-size: 14px; }
.nbnote { background: var(--pole-soft, #fff4c2); border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.nbcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.nbcard { text-align: left; border: 0; background: var(--panel, #fff); border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; border-left: 5px solid var(--turf, #1b7a47); }
.nbcard:hover { box-shadow: 0 3px 12px rgba(20, 32, 46, .14); }
.nbcard b { display: block; font-size: 17px; }
.nbcard span { display: block; color: var(--ink-2, #3f4f45); }
.nbcard small { display: block; color: var(--mute, #6b7a6f); margin-top: 2px; }
ul.nbhof, ul.nbgames { list-style: none; margin: 0; padding: 0; }
ul.nbhof > li { background: var(--panel, #fff); border-radius: 10px; margin-bottom: 6px; padding: 8px 12px; }
ul.nbhof summary { cursor: pointer; }
ul.nbgames { margin-top: 6px; padding-left: 12px; }
ul.nbgames li { padding: 2px 0; }
.nblists { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.nblists h4 { margin: 0 0 6px; font: 800 16px/1 var(--display, inherit); text-transform: uppercase; color: var(--ink-2, #3f4f45); }
.nblists ol, ol.nbrank { margin: 0; padding-left: 22px; }
.nblists li, ol.nbrank li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.nblists li span, ol.nbrank li span { flex: 1; }
.nblists li small, ol.nbrank li small { color: var(--mute, #6b7a6f); }

/* the line saying whose board this is, then the "records updated" note */
.filterbar .lead { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.whose { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.whose[hidden] { display: none; }
.whose .pavatar { border-color: var(--rule); }

/* planned stadiums: a date label under each planned logo */
.node .planlbl { display: none; pointer-events: none; }
.node .planlbl rect { fill: var(--pole); stroke: var(--ink); stroke-width: 1; }
.node .planlbl text { font: 700 11px/1 var(--body, system-ui); fill: var(--ink); }
.node.planned .planlbl { display: block; }
.node.planned .disc { filter: drop-shadow(0 0 4px rgba(245,197,24,.9)); }

/* a sport added since this person last looked: badge on the Sports button, tag and tint on its row */
#filter button.more { position: relative; flex: 0 0 auto; min-width: 44px; font-size: 20px; line-height: 1; letter-spacing: .1em; }
#filter button.more.hasnew::after { content: ""; position: absolute; top: 5px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--pole); box-shadow: 0 0 0 2px var(--paper, #f1ead6); }
.sportrow.fresh { box-shadow: 0 0 0 3px rgba(245, 197, 24, .45); }
.newtag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--pole); color: var(--ink); font: 800 11px/1.4 var(--display); letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }

.linkbtn.tix { background: var(--pole); border-color: #b08a00; color: var(--ink); font-weight: 700; }

/* On Deck: a still map of what is ahead, then a board of small cards */
.planmap { position: relative; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 6px 8px 8px; }
/* full page width like My Board, even though .plan is capped at 1100px */
.planmap { width: calc(100vw - 32px); margin-left: calc(50% - 50vw + 16px); }
#view-plan { overflow-x: clip; }
.planmap svg { display: block; width: 100%; height: clamp(230px, 36vh, 360px); margin: 0 auto; }
@media (max-width: 700px) { .planmap svg { height: clamp(150px, 24vh, 250px); } }
.planmap .land { fill: #f8f3e3; stroke: #cdd6dd; stroke-width: .7; }
.planmap .canada { fill: #eaeef2; stroke: none; }
.planmap .pm { cursor: pointer; outline: none; }
.planmap .pm .pmdisc { fill: #fff; }
.planmap .pm:hover .pmdisc, .planmap .pm:focus-visible .pmdisc { stroke: var(--ink); stroke-width: 2.5; }
.pmleg { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 6px 0; font-size: 13px; color: var(--ink-2); }
.pmleg span { display: inline-flex; align-items: center; gap: 6px; }
.pmleg i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #0f3322; }
.ondeck { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px; align-items: start; }
.odcard { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.odcard h2, .odsmall h2 { font-size: 22px; margin: 0 0 6px; }
.odcard .lede { margin: 0 0 8px; font-size: 14px; }
.odcard .next { grid-template-columns: 1fr; gap: 8px; }
.odcard .nx { padding: 10px; grid-template-columns: 44px 1fr; gap: 10px; border-top-width: 4px; }
.odcard .nx img { width: 44px; height: 44px; }
.odcard .nx b { font-size: 19px; }
.odcard .nx .sub:nth-of-type(n+3) { display: none; }
.seeall { margin-top: 6px; }
.odback { margin-bottom: -10px; }
.everyfold { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; }
.everyfold > summary { cursor: pointer; font-size: 18px; list-style-position: inside; }
.everyfold > summary span { color: var(--mute); font-weight: 400; font-size: 15px; }
.everyfold .every > h2 { display: none; }

/* choosing which photos go into a visit */
.imp-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; max-height: 52vh; overflow-y: auto; margin: 6px 0 12px; }
.imp-pbtn { position: relative; border: 3px solid transparent; padding: 0; border-radius: 10px; background: var(--wash, #f8f3e3); line-height: 0; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.imp-pbtn[aria-pressed="true"] { border-color: var(--pole, #ffb800); }
.imp-pimg { width: 100%; height: 100%; object-fit: cover; }
.imp-tick { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.85); color: transparent; display: grid; place-items: center; font: 700 15px/1 system-ui; line-height: 24px; }
.imp-pbtn[aria-pressed="true"] .imp-tick { background: var(--pole, #ffb800); color: var(--ink, #0f3322); }
.imp-choose { margin-left: 6px; }

/* the guided start for a new account */
.onboard .obstep { margin: 0; font: 800 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--mute, #6b7a6f); }
.onboard .obgrp { margin: 12px 0 4px; font: 700 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--mute, #6b7a6f); }
.obchips { display: flex; flex-wrap: wrap; gap: 8px; }
.onboard .sp { border: 2px solid var(--rule, #ddd5bd); border-radius: 999px; padding: 8px 14px; background: #fff; font: inherit; font-size: 15px; color: inherit; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.onboard .sp::before { content: "☆"; color: #c7bfa4; }
.onboard .sp.on { border-color: var(--pole, #ffb800); background: #fffbea; font-weight: 700; }
.onboard .sp.on::before { content: "★"; color: #d9a400; }

/* Windows scroll under a footer that stays put: the row of buttons at the bottom (Done, Close, Sign out) is always visible. */
.dialog { overflow: hidden; }
.dialog { inset-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px); max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
.dialog .box, .dialog form { max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; align-content: start; }
.dialog .box > .frow:last-child, .dialog form > .frow:last-child {
  position: sticky; bottom: -22px; z-index: 3; margin: 0 -22px -22px; padding: 12px 22px; background: var(--panel, #fff); border-top: 1px solid var(--rule, #ddd5bd);
}
.sportsbox > .frow:last-child { position: sticky; bottom: -18px; z-index: 3; margin: 0 -18px -18px; padding: 12px 18px; background: var(--panel, #fff); border-top: 1px solid var(--rule, #ddd5bd); }
.sportsdlg { overflow: visible; }

/* Account window: rows that open in place (plain text with a chevron, not buttons) */
.accs { border-top: 1px solid var(--rule, #ddd5bd); }
.acc { border-bottom: 1px solid var(--rule, #ddd5bd); }
.acc > summary, .accrow { display: flex; align-items: center; gap: 10px; padding: 13px 2px; cursor: pointer; list-style: none; color: inherit; text-decoration: none; min-height: 48px; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary b, .accrow b { font: 700 16px/1.2 system-ui, sans-serif; }
.accsum { margin-left: auto; color: var(--mute, #6b7a6f); font-size: 13px; text-align: right; }
.acc > summary::after { content: "›"; font-size: 24px; line-height: 1; color: var(--mute, #6b7a6f); transition: transform .15s; margin-left: 2px; }
.acc[open] > summary::after { transform: rotate(90deg); }
.acc > summary:hover b, .accrow:hover b { text-decoration: underline; }
.acc > summary:focus-visible, .accrow:focus-visible { outline: 3px solid var(--focus, #1a56c4); outline-offset: 2px; border-radius: 6px; }
.accbody { padding: 0 2px 16px; display: grid; gap: 10px; }
.accbody .stitle { display: none; }
.accgroup { margin: 14px 0 2px; font: 800 13px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--mute, #6b7a6f); }
.adminarea { border-top: 0; }
.accrow { border-bottom: 1px solid var(--rule, #ddd5bd); }
.accrow::after { content: none; }
.signin-body { display: grid; gap: 16px; }
.signin-body .sub { margin: 0 0 4px; font: 700 14px system-ui, sans-serif; color: var(--ink-2, #3f4f45); }
.pwrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 560px) { .pwrow { grid-template-columns: 1fr; } }
.sprows { display: grid; }
.sprow { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--wash, #f8f3e3); }
.sprow:not(.on) { opacity: .65; }
.sprow .sportbox { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sprow select { width: 100%; min-width: 0; }
@media (max-width: 560px) { .sprow { grid-template-columns: 1fr; } }

/* a second way in to Log a game, in the filter bar of the owner's page (the rail button and the phone's + stay) */
.filterbar .logcta { margin-left: auto; background: var(--pole); color: var(--ink); font-weight: 800; border: 0; white-space: nowrap; }
.filterbar .logcta ~ .seg { margin-left: 12px; }
@media (max-width: 700px) { .filterbar .logcta { display: none !important; } .filterbar .logcta ~ .seg { margin-left: 0; } }

/* narrowing a long list of games in "Log a game" */
.imp-filter { display: grid; gap: 8px; }
.imp-q { width: 100%; font: inherit; padding: 9px 11px; border: 2px solid #c7bfa4; border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; }
.imp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.imp-chip { border: 2px solid var(--rule); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 3px 11px; font: 700 13px var(--body); min-height: 32px; }
.imp-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.imp-shows { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.imp-shows .hint { flex: 1 0 100%; margin: 0; }
.imp-addrow[hidden], .imp-shows[hidden] { display: none; }

/* following part of a league (levels, conferences) in the Sports window */
.sgpick { margin: 4px 0 8px 34px; }
.sgpick summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-2); padding: 2px 0; }
.sgbox { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; }
.sgitem { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.sgitem input { width: 18px; height: 18px; }

/* prototype features: a small tag where one is on */
.protag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #e3dcf6; color: #4a3597; font: 800 11px/1.6 var(--display); letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.protag.live { background: #d9f0e2; color: #1b7a47; }

/* Share: a quiet outlined button with the share arrow, and the sheet that makes the picture */
.sharebtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border, #c7bfa4); background: #fff; color: var(--ink-2); border-radius: 8px; padding: 4px 10px; min-height: 32px; font: 700 14px var(--body); cursor: pointer; }
.sharebtn:hover { color: var(--ink); border-color: var(--ink-2); }
.sharebtn.icon { padding: 4px 7px; margin-right: 6px; }
.dr-head .sharebtn { align-self: flex-start; margin-top: 4px; }
.filterbar .sharebtn { margin-left: 8px; }
@media (max-width: 700px) { .filterbar .sharebtn { display: none; } }
.dialog.sharedlg { width: min(560px, calc(100vw - 24px)); }
.sharebox .seg { justify-self: start; }
.sharepre { display: grid; place-items: center; background: #0e1722; border-radius: 12px; padding: 10px; min-height: 120px; }
.sharecv { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.sharecv.story { max-height: min(52vh, 460px); width: auto; }
.sharecv.square { max-height: min(46vh, 380px); width: auto; }
.sharetog { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sharebox textarea, .sharebox input[type=text] { width: 100%; font: inherit; padding: 9px 11px; border: 2px solid #c7bfa4; border-radius: 10px; background: #fff; color: var(--ink); }
.sharebtns { flex-wrap: wrap; gap: 8px; }
.rangepick { position: relative; }
.rangebtn { min-height: 38px; padding: 6px 12px; border: 1.5px solid #aab6c1; border-radius: 8px; background: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.calpop { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: min(300px, 86vw); background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 10px; box-shadow: 0 8px 24px rgba(20,32,46,.18); }
.calhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.calhead .linkish { font-size: 22px; padding: 0 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal .dow { font-size: 12px; font-style: normal; color: var(--ink-2); }
.cal .day { min-height: 38px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 15px; cursor: pointer; }
.cal .day:disabled { opacity: .3; cursor: default; }
.cal .day.mid { background: var(--wash); }
.cal .day.on { background: var(--ink); color: #fff; font-weight: 700; }
.ondeckbtn { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ondeckbtn.on { background: var(--pole-soft); border-color: #ecd780; color: var(--pole-ink); }
@media (max-width: 620px) { .ondeckbtn span { display: none; } .ondeckbtn { padding: 4px 9px; } }
.planmap svg { touch-action: pan-x pan-y; }
.pmctl { position: absolute; top: 10px; right: 12px; display: flex; flex-direction: column; gap: 4px; }
.pmzoom { min-width: 34px; min-height: 34px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; }
.ondeckrow { display: grid; gap: 8px; }
.ondeckrow .empty { margin: 0; }
.pagehead { display: block; }
.pagehead .score { display: block; background: var(--ink); color: #fff; padding: 8px 20px; }
@media (max-width: 760px) { .pagehead .score { padding: 8px 10px; } }
.yrgoal { margin: 0 0 10px; }
.yrgoal .lede { margin: 0 0 6px; }
.yrgoal.met .lede { color: var(--turf); font-weight: 700; }
.yrchips { display: flex; flex-wrap: wrap; gap: 6px; }
.yrchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; border: 1.5px solid #aab6c1; font-size: 13px; font-weight: 700; color: var(--mute); background: #fff; }
.yrchip.done { border-color: var(--turf); background: var(--turf-soft); color: var(--turf); }

/* My Box Score: facts from the log */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.fact { background: var(--panel, #fff); border-radius: 12px; padding: 10px 12px; border-left: 5px solid var(--turf, #1b7a47); min-width: 0; }
.fact span { display: block; color: var(--mute, #6b7a6f); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.fact b { display: block; font: 800 22px/1.15 var(--display, inherit); overflow-wrap: anywhere; }
.fact small { display: block; color: var(--ink-2, #3f4f45); font-size: 14px; margin-top: 2px; }
.fcharts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.fbars { background: var(--panel, #fff); border-radius: 12px; padding: 10px 12px; }
.fbars h4 { margin: 0 0 6px; font-size: 14px; color: var(--ink-2, #3f4f45); }
.fbarrow { display: flex; gap: 3px; align-items: flex-end; overflow-x: auto; padding-bottom: 2px; }
.fbar { flex: 1 0 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 18px; }
.fbar i { display: block; width: 100%; max-width: 28px; background: var(--ink-2, #3f4f45); border-radius: 3px 3px 0 0; }
.fbar.top i { background: var(--pole, #ffb800); }
.fbar small { font-size: 11px; color: var(--mute, #6b7a6f); }
.fbar b { font-size: 11px; min-height: 13px; order: -1; }
.fprog { display: grid; gap: 10px; }
.fp { display: grid; grid-template-columns: 120px 1fr; gap: 2px 12px; align-items: center; }
.fp span { font-weight: 700; }
.fp .meter { height: 10px; background: #e7dfc6; border-radius: 6px; overflow: hidden; }
.fp .meter i { display: block; height: 100%; background: var(--turf, #1b7a47); }
.fp small { grid-column: 2; color: var(--mute, #6b7a6f); }
.imp-pbtn { position: relative; }
.imp-dup { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 6px; background: rgba(20,32,46,.85); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.imp-dupnote { align-self: center; }

/* batch progress checklist */
.pg-total { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.pg-total progress { flex: 1; height: 12px; }
.pg-total b { min-width: 3.2em; text-align: right; font: 800 18px var(--display, inherit); }
.pg { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pg li { display: grid; grid-template-columns: 26px 1fr; gap: 0 10px; align-items: center; }
.pg .pg-ico { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rule, #cdd6dd); box-sizing: border-box; display: grid; place-items: center; font-style: normal; }
.pg li.active .pg-ico { border-color: var(--rule, #cdd6dd); border-top-color: var(--turf, #1b7a47); animation: pgspin .8s linear infinite; }
.pg li.done .pg-ico { background: var(--turf, #1b7a47); border-color: var(--turf, #1b7a47); }
.pg li.done .pg-ico::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 800; line-height: 1; }
.pg li.pending .pg-label { color: var(--mute, #6b7a6f); }
.pg .pg-label { font-weight: 700; }
.pg .pg-detail { grid-column: 2; color: var(--ink-2, #3f4f45); min-height: 1em; }
@keyframes pgspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pg li.active .pg-ico { animation: none; border-top-color: var(--turf, #1b7a47); } }
.imp-bulk { display: flex; gap: 8px; align-items: center; margin: 6px 0 10px; padding: 8px 12px; background: #eef3f7; border-radius: 10px; font-weight: 700; }

/* the batch viewer's arrows are fixed to the screen edges so they stay put whatever the photo's shape */
.imp-vnav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; padding: 0; width: 48px; height: 64px; border-radius: 10px; background: rgba(255, 255, 255, .88); color: var(--ink, #0f3322); }
.imp-vnav:hover { background: #fff; }
.imp-vnav.prev { left: 10px; }
.imp-vnav.next { right: 10px; }
.imp-chev { display: block; line-height: 0; }
.imp-datefix { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2, #3f4f45); }
.imp-datefix input { font: inherit; padding: 2px 6px; border: 1px solid var(--rule, #cdd6dd); border-radius: 6px; }
.pg-foot { margin-top: 16px; align-items: center; }
@keyframes impflash { 0%, 60% { box-shadow: 0 0 0 4px var(--pole, #ffb800); } 100% { box-shadow: 0 0 0 0 transparent; } }
.imp-flash { animation: impflash 2.4s ease-out; }

/* review filters: find the outings that still need a game */
.imp-filters { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0; background: var(--panel, #fff); }
.imp-filters .chip { border: 1.5px solid var(--rule, #cdd6dd); background: #fff; border-radius: 999px; padding: 6px 12px; font: 700 14px var(--body, inherit); cursor: pointer; }
.imp-filters .chip.on { background: var(--ink, #0f3322); border-color: var(--ink, #0f3322); color: #fff; }
.imp-filters .chip.warn:not(.on) { border-color: #d68910; background: #fff4de; }
.imp-filters .imp-next { margin-left: auto; }
.imp-card.fix { border-left: 5px solid #d68910; }

/* The account menu hangs from the header; while it is open the header sits above the drawer and the event window. */
body.menuopen .top { z-index: 75; }

/* Terms of Service dialog */
.termsdlg .termstext { max-height: 42vh; overflow: auto; border: 1px solid var(--rule); border-radius: 10px; padding: 4px 14px 10px; margin: 8px 0; font-size: 15px; }
.termsdlg .termstext h3 { margin: 12px 0 2px; font-size: 16px; }
.termsdlg .termstext p { margin: 0; color: var(--ink-2); }
.termsagree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 8px 0; }
.termsagree input { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.imp-pmrow { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 15px; margin: 6px 0; }
.imp-pm { display: inline-flex; gap: 4px; align-items: center; }
.obtabs { display: flex; gap: 6px; margin: 6px 0 10px; } .obtabs button { flex: 1; }

/* ---------- scoreboard as the league picker (green wall, cream plates, amber lamps) ---------- */
#filter { display: none; }
.score { background: #0f3322; border: 3px solid #07170f; border-radius: 10px; padding: 8px 12px; box-shadow: inset 0 0 0 2px #1f5a3b, 0 2px 8px rgba(0,0,0,.5); position: relative; max-width: 820px; }
.stats { column-gap: 0; row-gap: 0; max-width: none; align-items: center; }
.stats > span { padding: 3px 8px; text-align: center; }
.stats .st-l { text-align: left; font: 700 11px system-ui; letter-spacing: .08em; text-transform: uppercase; color: #a9c9b6; padding-left: 2px; }
.st-h { justify-content: center; color: #f4ead2; border-left: 1px solid #2c6a49; border-bottom: 1px solid #2c6a49; padding-bottom: 5px !important; }
.st-h .lgl { display: none; }
.stats > span.st-bar { padding: 0; height: 6px; margin: 5px 10px 6px; background: #0a2416; border-radius: 3px; border: 0; align-self: center; overflow: hidden; box-shadow: inset 0 0 0 1px #2c6a49; }
.st-bar i { background: var(--pole); box-shadow: 0 0 6px var(--pole); display: block; height: 100%; }
.st-v { border-left: 1px solid #2c6a49; text-align: center; }
.st-v b { color: var(--pole); font-family: var(--display); text-shadow: 0 0 6px rgba(255,184,0,.55); }
.st-v i { color: #8fb59d; }
.st-v.main b { font-size: 26px; }
.st-corner { display: block; }
.pk { all: unset; cursor: pointer; display: block; width: 100%; box-sizing: border-box; text-align: center; font: inherit; letter-spacing: inherit; color: inherit; padding: 2px 0; border-radius: 4px; }
.pk:hover { background: rgba(255,255,255,.1); }
.pk:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.allbtn { font: 800 13px var(--display); letter-spacing: .08em; color: #f4ead2; border: 1px solid #2c6a49; padding: 3px 8px; width: auto; display: inline-block; }
.pk.on { background: #f4ead2; color: #0f3322; box-shadow: 0 0 0 2px #fff; }
.pk .mk { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 5px; box-shadow: 0 0 0 1px #2c6a49; vertical-align: -1px; }
.pk.on .mk { box-shadow: 0 0 0 1px #0f3322; }
.scoremore { position: absolute; right: 4px; top: 4px; }
.scoremore .more { background: transparent; border: 1px solid #2c6a49; color: #f4ead2; border-radius: 6px; padding: 0 7px; line-height: 20px; }
.levelbar { background: #0f3322; border-bottom: 3px solid #07170f; box-shadow: inset 0 -2px 0 #1f5a3b; gap: 6px; padding: 7px 16px; }
.levelbar .lvlabel { font: 700 11px system-ui; letter-spacing: .1em; color: #a9c9b6; margin-right: 4px; white-space: nowrap; }
.levelbar .seg { background: transparent; padding: 0; gap: 6px; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
.sp { all: unset; cursor: pointer; white-space: nowrap; padding: 3px 10px; border-radius: 5px; border: 1px solid #2c6a49; color: #f4ead2; font: 800 13px var(--display); letter-spacing: .06em; display: inline-flex; gap: 6px; align-items: baseline; opacity: .55; }
.sp b { color: var(--pole); font-size: 15px; text-shadow: 0 0 6px rgba(255,184,0,.5); }
.sp i { font-style: normal; color: #8fb59d; font-size: 11px; margin-left: -4px; }
.sp.on { opacity: 1; background: #f4ead2; color: #0f3322; box-shadow: 0 0 0 2px #fff; }
.sp.on b { color: #7a4f00; text-shadow: none; }
.sp.on i { color: #4a6b57; }
@media (max-width: 760px) { .score { padding: 6px; border-radius: 8px; } .stats > span { padding: 2px; } .st-v.main b { font-size: 20px; } .st-v b { font-size: 15px; } .levelbar { padding: 6px 8px; } }

/* share sheet: close at top right, icon row under the picture, copy-text icon inside the caption */
.sharehd { display: flex; align-items: center; gap: 10px; }
.sharehd h2 { flex: 1; }
.sclose { all: unset; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--rule); display: grid; place-items: center; font-size: 24px; line-height: 1; background: #fff; }
.sharerow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sicon { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--ink); color: var(--ink); font: 700 14px system-ui; min-height: 20px; }
.sicon[hidden] { display: none; }
.sicon.main { background: var(--pole); border-color: var(--pole); font-weight: 800; }
.sicon.tiny { position: absolute; right: 6px; top: 6px; padding: 6px; border-color: var(--rule); background: #fff; }
.sicon.tiny span { display: none; }
.capwrap { position: relative; display: block; }
.capwrap textarea { width: 100%; padding-right: 44px; box-sizing: border-box; }

/* Add a game: the one amber button, its stadium icon, and the window behind it */
.addgame { display: inline-flex; align-items: center; gap: 8px; line-height: 1; white-space: nowrap; }
.addgame .stadico { flex: none; }
.dr-add { padding: 0 16px 10px; }
.navlog .stadico { display: block; }
.agh { display: flex; align-items: center; gap: 8px; }
.agh h2 { flex: 1; }
.agback { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; font-size: 26px; border-radius: 10px; }
.btn.full { width: 100%; justify-content: center; }
.agsum { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 7px 10px; }
.agsum > span { flex: 1; } .agsum small { display: block; font: 700 10px system-ui; letter-spacing: .1em; color: var(--mute); }
.agwhere { position: relative; }
.agdd { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: #fff; border: 1.5px solid var(--rule); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.agopt { all: unset; cursor: pointer; display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.agopt:hover { background: var(--paper); }
.aggames { display: grid; gap: 8px; }
.aggame { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; }
.aggame > span { flex: 1; } .aggame small { display: block; color: var(--mute); font-size: 12px; }
.imp-drop .imp-ico { display: none; }

/* Schedule and Tickets are quiet links; the amber Add a game is the one loud button */
.linkbtn, .linkbtn.tix { background: transparent; border: 1.5px solid var(--rule); color: var(--ink-2); font-weight: 600; }
/* the sub-league strip: beat the generic .seg rules so it reads on the green wall */
.levelbar .seg button.sp { all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap; flex: 0 0 auto; min-width: 0; min-height: 36px; padding: 4px 12px; border-radius: 6px; border: 1px solid #2c6a49; background: transparent; color: #f4ead2; font: 800 15px var(--display); letter-spacing: .06em; display: inline-flex; gap: 6px; align-items: center; opacity: .55; }
.levelbar .seg button.sp.on { opacity: 1; background: #f4ead2; color: #0f3322; box-shadow: 0 0 0 2px #fff; }
.levelbar .seg button.sp b { font-size: 16px; color: var(--pole); text-shadow: none; }
.levelbar .seg button.sp.on b { color: #7a4f00; }
.levelbar .seg button.sp i { font-size: 12px; margin: 0; color: #8fb59d; }
.levelbar .seg button.sp.on i { color: #4a6b57; }
.levelbar .seg { flex-wrap: nowrap; }
.levelbar .seg { padding: 3px 4px; }
/* Schedule and Tickets: small muted underlined text links (approved popup and drawer designs); Details sits right */
.card .row .linkbtn, .linkrow .linkbtn, .linkbtn.tix { all: unset; cursor: pointer; font: 13px system-ui; color: var(--mute); text-decoration: underline; min-height: 0; padding: 4px 2px; margin-right: 10px; flex: none; }
.linkrow .linkbtn { flex: none; }
.card .row .linkbtn:hover, .linkrow .linkbtn:hover { color: var(--ink); }
.card .row .btn { margin-left: auto; }
#mapshow button.locked { opacity: .4; }
/* Not signed in: say so, top right */
.menuwrap { display: flex; align-items: center; gap: 8px; }
.topsignin { height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #f1ead6; background: transparent; color: #f1ead6; font: 800 15px var(--display, inherit); letter-spacing: .04em; white-space: nowrap; }
.topsignin[hidden] { display: none; }
/* iPhone Safari zooms the whole page when a field under 16px is tapped: keep every field at 16px on phones */
@media (max-width: 760px) { input, select, textarea { font-size: 16px !important; } }
.menu .ver { margin: 6px 14px 4px; font-size: 12px; color: var(--mute); }
