/* Layout: a lane runs through the page — hero headline over a drawn lane, then two "approaches" (new bowlers / improving bowlers), a lane-facts strip, contact. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #14213a;
  --muted: #55607a;
  --line: #d9dde6;
  --red: #a8172f;
  --logo-glow: transparent;
  --maple: #d9a868;
  --maple-dark: #b9874a;
  --display: "Bowlby One", "Arial Black", Impact, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1628; --surface: #16203a; --ink: #eef1f7; --muted: #a3adc4;
    --line: #2a3654; --red: #f04a5f; --maple: #c9965a; --maple-dark: #a7783f;
    --logo-glow: rgba(238,241,247,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1628; --surface: #16203a; --ink: #eef1f7; --muted: #a3adc4;
  --line: #2a3654; --red: #f04a5f; --maple: #c9965a; --maple-dark: #a7783f;
  --logo-glow: rgba(238,241,247,.6); color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.6;
}
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
.label {
  font-family: var(--label); font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; font-size: .85rem; color: var(--red);
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* Header */
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { filter: drop-shadow(0 0 1.5px var(--logo-glow)) drop-shadow(0 0 1.5px var(--logo-glow)); }
.brand .logo { flex: none; width: 46px; height: auto; }
.brand-name { font-family: var(--display); font-size: 1.15rem; letter-spacing: .01em; }
.brand-name small { font-family: var(--label); font-size: .8rem; letter-spacing: .14em; color: var(--muted); margin-left: 4px; }
nav { display: flex; gap: 20px; font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }

/* Hero */
.hero .wrap { padding-block: 40px 28px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-text { display: grid; gap: 22px; min-width: 0; }
.hero-logo { width: 100%; max-width: 360px; height: auto; justify-self: center; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); max-width: 12ch; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede { font-size: 1.2rem; max-width: 56ch; color: var(--muted); }

/* The lane */
.lane-band { padding-block: 18px 56px; }
.lane {
  position: relative; height: 150px; border-radius: 6px; overflow: hidden;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(100% / 39 - 1px), rgba(0,0,0,.09) calc(100% / 39 - 1px) calc(100% / 39)),
    linear-gradient(to right, var(--maple-dark), var(--maple) 30%, var(--maple) 70%, var(--maple-dark));
  box-shadow: inset 0 0 0 10px var(--ink);
}
.lane::before { /* foul line */
  content: ""; position: absolute; left: 10%; top: 10px; bottom: 10px; width: 4px; background: var(--ink); opacity: .85;
}
.arrows { position: absolute; left: 27%; top: 10px; bottom: 10px; width: 7%; }
.arrows span {
  position: absolute; width: 0; height: 0;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  border-left: 20px solid var(--ink); transform: translateY(-50%);
}
.pins { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); display: grid; grid-auto-flow: column; gap: 9px; align-items: center; }
.pins div { display: grid; gap: 9px; }
.pins i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 4px var(--surface), inset 0 0 0 6px var(--red); }
.ball {
  position: absolute; left: 4%; top: 58%; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4b5f8f, var(--ink) 70%);
  transform: translateY(-50%);
  animation: roll 3.6s cubic-bezier(.35,.05,.5,1) 0.6s 1 both;
}
@keyframes roll {
  0% { left: 4%; top: 58%; }
  70% { top: 66%; }
  100% { left: 86%; top: 52%; }
}
@media (prefers-reduced-motion: reduce) { .ball { animation: none; } }
.lane-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-family: var(--label); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); flex-wrap: wrap; }

/* About */
.about { border-top: 1px solid var(--line); }
.about .wrap { padding-block: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; align-items: start; }
.about h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 10px; }
.about .body { display: grid; gap: 18px; font-size: 1.15rem; }
.about .mission { font-size: 1.35rem; line-height: 1.5; border-left: 4px solid var(--red); padding-left: 20px; }

/* Approaches */
.approaches { background: var(--surface); border-block: 1px solid var(--line); }
.approaches .wrap { padding-block: 64px; display: grid; gap: 36px; }
.approaches h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.track { display: grid; gap: 14px; align-content: start; min-width: 0; }
.track h3 { font-size: 1.6rem; }
.track > p { color: var(--muted); }
.track ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 0; }
.track li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.track li:last-child { border-bottom: 1px solid var(--line); }
.track li svg { margin-top: 5px; }
.track li strong { display: block; font-weight: 600; }
.track li span { color: var(--muted); font-size: 1rem; }

/* Lane facts */
.facts .wrap { padding-block: 64px; display: grid; gap: 28px; }
.facts h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.fact-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--ink); }
.fact { padding: 18px 18px 6px 0; display: grid; gap: 4px; align-content: start; }
.fact + .fact { padding-left: 18px; border-left: 1px solid var(--line); }
.fact b { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.fact b small { font-family: var(--label); font-size: 1rem; letter-spacing: .08em; margin-left: 4px; color: var(--muted); }
.fact span { color: var(--muted); font-size: .98rem; }

/* Contact */
.contact { background: var(--ink); color: var(--bg); }
.contact .wrap { padding-block: 64px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.contact h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.contact p { opacity: .82; margin-top: 14px; max-width: 46ch; }
.contact .label { color: var(--maple); }
.email-box { background: color-mix(in srgb, var(--bg) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); border-radius: 8px; padding: 22px; display: grid; gap: 14px; }
.email { font-size: 1.25rem; font-weight: 600; word-break: break-all; user-select: all; }
.copy { justify-self: start; font: 600 .9rem var(--label); text-transform: uppercase; letter-spacing: .12em; background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.copy:hover { filter: brightness(1.08); }

footer .wrap { padding-block: 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 24px 20px; }
  .hero-logo { max-width: 220px; order: -1; }
  .about .wrap, .contact .wrap, .tracks { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .fact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .fact:nth-child(4) { border-top: 1px solid var(--line); }
  .lane { height: 120px; }
  .pins { gap: 6px; } .pins div { gap: 6px; } .pins i { width: 11px; height: 11px; }
}
[hidden] { display: none !important; }

/* ---------- Shared: navigation ---------- */
nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
nav a { padding-block: 6px; white-space: nowrap; }
@media (max-width: 980px) {
  header .wrap { padding-block: 16px 0; }
  nav {
    width: 100%; overflow-x: auto; gap: 18px; padding-bottom: 8px;
    border-top: 1px solid var(--line); padding-top: 10px; scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
}

/* ---------- Shared: page header band ---------- */
.page-head { border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-block: 44px 40px; display: grid; gap: 16px; }
.page-head h1 { font-size: clamp(2.3rem, 6.5vw, 4.2rem); max-width: 16ch; }
.page-head h1 em { font-style: normal; color: var(--red); }
.page-head .lede { font-size: 1.18rem; color: var(--muted); max-width: 60ch; }

.section .wrap { padding-block: 56px; display: grid; gap: 28px; }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.section-head { display: grid; gap: 10px; }
.section-head p { color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .95rem; }

/* ---------- Shared: buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  font: 600 .9rem var(--label); text-transform: uppercase; letter-spacing: .12em;
  background: var(--red); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 20px; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn[aria-disabled="true"] { background: var(--line); color: var(--muted); cursor: default; filter: none; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search {
  flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 4px 18px;
}
.search:focus-within { border-color: var(--ink); }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 500 1.05rem var(--body); padding: 10px 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 600 .85rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  background: transparent; color: var(--muted); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:focus-visible, .search input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.result-count { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; color: var(--muted); }
.empty { padding: 28px; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }

/* ---------- Home: explore grid ---------- */
.explore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0; border-top: 3px solid var(--ink); }
.explore-card {
  display: grid; gap: 8px; align-content: start; padding: 24px 22px 26px 0;
  text-decoration: none; border-bottom: 1px solid var(--line); min-width: 0;
}
.explore-card h3 { font-size: 1.45rem; display: flex; align-items: center; gap: 10px; }
.explore-card h3 svg { transition: transform .2s ease; }
.explore-card:hover h3 svg { transform: translateX(4px); }
.explore-card p { color: var(--muted); }

/* ---------- Center cards (leagues + pro shops) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.place {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px; display: grid; gap: 12px; align-content: start; min-width: 0;
}
.place-top { display: flex; flex-direction: column-reverse; align-items: start; gap: 8px; }
.place h3 { font-size: 1.3rem; }
.city-tag {
  flex: none; font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  color: var(--red); border: 1.5px solid currentColor; border-radius: 4px; padding: 3px 8px;
}
.place dl { margin: 0; display: grid; gap: 6px; }
.place dl div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
.place dt { white-space: nowrap; }
.place dt { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-top: 2px; }
.place dd { margin: 0; overflow-wrap: anywhere; }
.place dd a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.place dd a:hover { text-decoration-color: var(--red); }
.place .note { font-size: .95rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.place .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.place .links a {
  font: 600 .82rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  text-decoration: none; border-radius: 999px; padding: 7px 14px;
  background: var(--ink); color: var(--bg);
}
.place .links a.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------- Steps / guide lists ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0; border-top: 3px solid var(--ink); counter-reset: step; }
.steps li { counter-increment: step; padding: 18px 20px 6px 0; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: "Frame " counter(step); font: 600 .82rem var(--label); text-transform: uppercase; letter-spacing: .12em; color: var(--red); }
.steps strong { font-weight: 600; font-size: 1.08rem; }
.steps span { color: var(--muted); font-size: .98rem; }

.service-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 32px; }
.service-list div { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.service-list strong { font-weight: 600; }
.service-list span { color: var(--muted); font-size: .98rem; }

/* ---------- Tournaments ---------- */
.events { display: grid; gap: 0; border-top: 3px solid var(--ink); }
.event {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.event-date { font-family: var(--display); font-size: 1.35rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.event-date small { display: block; font: 600 .8rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.event-body { display: grid; gap: 6px; min-width: 0; }
.event-body h3 { font-size: 1.3rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .97rem; color: var(--muted); }
.event-meta b { font-weight: 600; color: var(--ink); }
.event-body p { font-size: 1rem; }
.tag {
  font: 600 .75rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  border-radius: 4px; padding: 3px 8px; justify-self: start;
}
.tag-local { background: var(--ink); color: var(--bg); }
.tag-state { background: var(--red); color: #fff; }
.tag-national { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.tag-live { background: var(--maple); color: #14213a; }
.event-cta { justify-self: end; }
.event-cta a { white-space: nowrap; }
.event.is-past { opacity: .55; }
.spotlight {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 32px;
}
.spotlight .label { color: var(--maple); }
.spotlight h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-top: 8px; }
.spotlight p { opacity: .85; }
.spotlight ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.spotlight li { border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); padding-top: 10px; }
.spotlight li b { display: block; font: 600 .82rem var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--maple); }

/* ---------- Hall of Fame ---------- */
.ballot-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.month-badge { font-family: var(--display); font-size: 1.1rem; background: var(--red); color: #fff; padding: 6px 14px; border-radius: 6px; }
.nominees { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.nominee {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px 22px 22px; display: grid; gap: 10px; align-content: start; min-width: 0;
}
.nominee .num {
  font-family: var(--display); font-size: 2.6rem; line-height: .9; color: var(--red);
  font-variant-numeric: tabular-nums;
}
.nominee .score { font-family: var(--display); font-size: 1.05rem; letter-spacing: .02em; }
.nominee h3 { font-size: 1.35rem; }
.nominee p { color: var(--muted); font-size: 1rem; }
.nominee .src { font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.vote-bar {
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between;
  border: 2px solid var(--ink); border-radius: 12px; padding: 22px 24px;
}
.vote-bar p { max-width: 56ch; }
.hof-empty { display: grid; gap: 8px; padding: 32px; border: 2px dashed var(--line); border-radius: 10px; text-align: center; justify-items: center; }
.hof-empty b { font-family: var(--display); font-weight: 400; font-size: 1.3rem; }

/* ---------- Promotions ---------- */
.placements { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.placement { border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: grid; gap: 8px; align-content: start; background: var(--surface); }
.placement h3 { font-size: 1.2rem; }
.placement p { color: var(--muted); font-size: 1rem; }
.placement .where { font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.partner-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.slot {
  aspect-ratio: 3 / 2; max-width: 100%; border: 2px dashed var(--line); border-radius: 10px;
  display: grid; place-content: center; text-align: center; gap: 4px; padding: 16px; color: var(--muted);
}
.slot b { font-family: var(--display); font-weight: 400; color: var(--ink); font-size: 1.05rem; }
.audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0; border-top: 3px solid var(--ink); }
.audience div { padding: 16px 18px 4px 0; display: grid; gap: 4px; }
.audience strong { font-weight: 600; font-size: 1.08rem; }
.audience span { color: var(--muted); font-size: .98rem; }

/* ---------- Sources footnote ---------- */
.sources { font-size: .92rem; color: var(--muted); display: grid; gap: 6px; }
.sources a { text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .event { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px 0; }
  .event-cta { justify-self: start; }
  .spotlight { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .place dl div { grid-template-columns: 78px minmax(0, 1fr); }
  .vote-bar { padding: 18px; }
}

/* ---------- High school standings ---------- */
.hs-controls { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: end; }
.hs-field { display: grid; gap: 6px; min-width: 0; }
.hs-field select {
  font: 500 1rem var(--body); color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: 8px; padding: 9px 12px; min-width: 170px; max-width: 100%;
}
.hs-field select:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.hs-label { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.hs-reset { padding-block: 9px; }
#hs-results { display: grid; gap: 28px; }
.hs-block { display: grid; gap: 10px; min-width: 0; }
.hs-block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; border-bottom: 3px solid var(--ink); padding-bottom: 8px; }
.hs-block-head h3 { font-size: 1.35rem; }
.hs-table-wrap { overflow-x: auto; }
.hs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 520px; }
.hs-table th { font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); text-align: left; padding: 6px 10px; }
.hs-table th.grp { text-align: center; border-bottom: 1px solid var(--line); }
.hs-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.hs-table .num { text-align: right; white-space: nowrap; }
.hs-table th.num { text-align: right; }
.hs-table td.name { width: 44%; }
.hs-table td.div { white-space: nowrap; color: var(--muted); }
.hs-table tr.is-champ td { background: color-mix(in srgb, var(--maple) 18%, transparent); }
.hs-table tr.is-champ td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.hs-link {
  font: 500 1rem var(--body); color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-align: left; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px;
}
.hs-link:hover { text-decoration-color: var(--red); }
.hs-link:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 2px; }
.hs-season { font-weight: 600; }
.champ-chip {
  display: inline-block; margin-left: 6px; font: 600 .7rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  background: var(--red); color: #fff; border-radius: 4px; padding: 2px 7px; vertical-align: 2px; white-space: nowrap;
}
.hs-note { border: 2px solid var(--ink); border-radius: 10px; padding: 16px 18px; }
@media (max-width: 760px) {
  .hs-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs-controls .hs-field:first-child { grid-column: 1 / -1; }
  .hs-field select { min-width: 0; width: 100%; }
  .hs-reset { justify-self: start; }
  .hs-table td.name { width: auto; }
}

/* ---------- High school section tabs ---------- */
.hs-head .wrap { padding-bottom: 0; }
.hs-tabs {
  display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line); margin-bottom: -1px;
}
.hs-tabs::-webkit-scrollbar { display: none; }
.hs-tabs a {
  flex: none; font: 600 .9rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  text-decoration: none; color: var(--muted); padding: 12px 14px; border-bottom: 3px solid transparent;
}
.hs-tabs a:hover { color: var(--ink); }
.hs-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.hs-tabs a:first-child { padding-left: 0; }
.hs-check { display: flex; align-items: center; gap: 8px; font-weight: 500; padding-bottom: 10px; cursor: pointer; }
.hs-check input { width: 18px; height: 18px; accent-color: var(--red); }
.hs-check:has(input:disabled) { color: var(--muted); cursor: default; }
#hs-results[aria-busy="true"] { opacity: .5; transition: opacity .15s; }

/* Schedule */
.hs-sched td.time { width: 90px; white-space: nowrap; color: var(--muted); }
.hs-sched td.match .m { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.hs-sched td.match .vs { font: 600 .75rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hs-sched td.match b { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.hs-sched td.match .win, .hs-sched td.match .win b { color: var(--ink); font-weight: 600; }
.hs-sched td.loc { color: var(--muted); white-space: nowrap; }
.hs-sched td.det { text-align: right; white-space: nowrap; }
.hs-sched td.det a { font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; text-underline-offset: 3px; }

/* Statistics */
.sort-btn { font: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sort-btn:hover { color: var(--ink); }
.sort-btn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
th[aria-sort="ascending"] .sort-btn, th[aria-sort="descending"] .sort-btn { color: var(--ink); }
.hs-stats td a { text-underline-offset: 3px; text-decoration-color: var(--line); }

/* Teams */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.team-top { display: flex; flex-direction: column-reverse; align-items: start; gap: 8px; }
.team-card h3 { font-size: 1.25rem; }
.team-card dl { margin: 0; display: grid; gap: 6px; }
.team-card dl div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; }
.team-card dt { font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.team-card dd { margin: 0; overflow-wrap: anywhere; }
.team-card .links { display: flex; flex-wrap: wrap; gap: 8px; }
.team-card .links a { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .1em; text-decoration: none; border-radius: 999px; padding: 7px 13px; background: var(--ink); color: var(--bg); }
.team-card .links a.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }

@media (max-width: 760px) {
  .hs-sched td.time { width: auto; }
  .hs-sched td.loc { white-space: normal; }
}

/* ---------- Lessons ---------- */
:root { --gold: #a87b12; --gold-bg: #f6e7b8; --silver: #5c6573; --silver-bg: #e3e7ee; --bronze: #93532a; --bronze-bg: #f1dccb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --gold: #f0c75a; --gold-bg: #3d3216; --silver: #c9d1dd; --silver-bg: #2c3446; --bronze: #e6a274; --bronze-bg: #3d2617; }
}
:root[data-theme="dark"] { --gold: #f0c75a; --gold-bg: #3d3216; --silver: #c9d1dd; --silver-bg: #2c3446; --bronze: #e6a274; --bronze-bg: #3d2617; }
.coach-top { display: flex; flex-direction: column-reverse; align-items: start; gap: 8px; }
.coach h3 { font-size: 1.3rem; }
.level-badge {
  display: inline-block; flex: none; font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  border-radius: 4px; padding: 4px 9px; white-space: nowrap;
}
.level-gold { background: var(--gold-bg); color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); }
.level-silver { background: var(--silver-bg); color: var(--silver); box-shadow: inset 0 0 0 1.5px var(--silver); }
.level-bronze { background: var(--bronze-bg); color: var(--bronze); box-shadow: inset 0 0 0 1.5px var(--bronze); }
.level-level1 { background: var(--ink); color: var(--bg); }
.level-none { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.level-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0 24px; }
.level-list div { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.level-list .level-badge { justify-self: start; }
.level-list strong { font-weight: 600; }
.level-list span:last-child { color: var(--muted); font-size: .98rem; }
[data-filter-list] > .chips { margin-top: -8px; }
.coach dl div { grid-template-columns: 96px minmax(0, 1fr); }
.coach dd a[href^="mailto"] { overflow-wrap: normal; word-break: normal; }
.search input:focus-visible { outline: none; }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 30%, transparent); }

/* ---------- Coach cards & profiles ---------- */
:root { --star: #d29a0c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --star: #f2c14e; } }
:root[data-theme="dark"] { --star: #f2c14e; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sample-tag {
  display: inline-block; font: 600 .72rem var(--label); text-transform: uppercase; letter-spacing: .1em;
  color: var(--red); border: 1.5px dashed currentColor; border-radius: 4px; padding: 3px 8px; white-space: nowrap;
}
.coach-link { text-decoration: none; }
.coach-link:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.stars { letter-spacing: 1px; font-size: 1.05rem; line-height: 1; }
.stars .on { color: var(--star); }
.stars .off { color: var(--line); }
.review-sum { display: inline-flex; align-items: center; gap: 6px; font-size: .98rem; }
.review-sum b { font-weight: 600; }
.review-sum.none { color: var(--muted); font-style: italic; }
.profile-link { justify-self: start; font: 600 .85rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--red); text-decoration: none; }
.profile-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.back-link { justify-self: start; font: 600 .85rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.page-head .review-sum { font-size: 1.1rem; }
.page-head .review-sum .stars { font-size: 1.3rem; }
.coach-profile { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.coach-main { display: grid; gap: 36px; min-width: 0; }
.coach-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 20px); min-width: 0; }
.coach-side .place dl div { grid-template-columns: 96px minmax(0, 1fr); }
.profile-block { display: grid; gap: 14px; }
.profile-block h2 { font-size: 1.5rem; padding-bottom: 8px; border-bottom: 3px solid var(--ink); }
.profile-block p { max-width: 65ch; }
.spec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.spec-list li { font: 600 .85rem var(--label); text-transform: uppercase; letter-spacing: .08em; padding: 7px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.acc-list { margin: 0; padding: 0; list-style: none; display: grid; }
.acc-list li { padding: 12px 0 12px 28px; border-top: 1px solid var(--line); position: relative; }
.acc-list li:last-child { border-bottom: 1px solid var(--line); }
.acc-list li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.reviews { display: grid; gap: 14px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: grid; gap: 10px; }
.review-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.review-by { font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 760px) {
  .coach-profile { grid-template-columns: minmax(0, 1fr); }
  .coach-side { position: static; order: -1; }
}

/* ---------- Coach request form ---------- */
.page-head .btn { margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cr-wrap { max-width: 760px; }
.cr-form { display: grid; gap: 28px; }
.cr-form fieldset { border: 0; margin: 0; padding: 0 0 26px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; min-width: 0; }
.cr-form legend { font-family: var(--display); font-size: 1.3rem; padding: 0; margin-bottom: 4px; }
.cr-help { color: var(--muted); font-size: .95rem; margin-top: -6px; }
.cr-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cr-field { display: grid; gap: 6px; min-width: 0; }
.cr-field > span, .cr-field > label > span { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.cr-form input[type=text], .cr-form input[type=tel], .cr-form input[type=email], .cr-form input[type=password], .cr-form select, .cr-form textarea {
  font: 500 1rem var(--body); color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0;
}
.cr-form textarea { resize: vertical; line-height: 1.5; }
.cr-form input:focus-visible, .cr-form select:focus-visible, .cr-form textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; border-color: var(--ink); }
.req { color: var(--red); }
.cr-centers { display: grid; gap: 10px; }
.cr-center-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cr-center-row select { grid-column: 1; }
.cr-center-row .cr-other { grid-column: 1; }
.cr-center-row .cr-remove { grid-column: 2; grid-row: 1; }
.cr-remove { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .1em; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; }
.cr-remove:hover { color: var(--red); }
.cr-add { padding: 9px 16px; font-size: .82rem; }
.cr-levels { display: grid; gap: 8px; }
.cr-level { display: grid; grid-template-columns: auto 150px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 14px; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--surface); }
.cr-level:has(input:checked) { border-color: var(--ink); }
.cr-level input { width: 18px; height: 18px; accent-color: var(--red); margin: 0; }
.cr-level .level-badge { justify-self: start; }
.cr-level-desc { font-weight: 500; }
.cr-file { padding: 16px; border: 2px dashed var(--line); border-radius: 10px; }
.cr-file input[type=file] { font: 500 .95rem var(--body); color: var(--ink); max-width: 100%; }
.cr-file input[type=file]::file-selector-button { font: 600 .82rem var(--label); text-transform: uppercase; letter-spacing: .1em; background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: 8px 14px; margin-right: 10px; cursor: pointer; }
.cr-file-name { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.cr-consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; }
.cr-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--red); }
.cr-actions { display: grid; gap: 10px; }
.cr-actions .btn { font-size: 1rem; padding: 13px 26px; }
.cr-actions .btn:disabled { opacity: .6; cursor: default; }
.cr-errors { border: 2px solid var(--red); border-radius: 10px; padding: 14px 18px; background: color-mix(in srgb, var(--red) 8%, transparent); }
.cr-errors ul { margin: 6px 0 0; padding-left: 20px; }
.cr-errors:focus { outline: none; }
.cr-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cr-sent { border: 2px solid var(--ink); border-radius: 12px; padding: 22px; display: grid; gap: 8px; }
.cr-sent b { font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
@media (max-width: 640px) {
  .cr-row { grid-template-columns: minmax(0, 1fr); }
  .cr-level { grid-template-columns: auto minmax(0, 1fr); }
  .cr-level .cr-level-desc { grid-column: 2; }
}

/* ---------- LeaguePals callout (Leagues page) ---------- */
.section.lp-band .wrap { padding-block: 40px 0; }
.lp-callout {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: center;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 28px 32px;
}
.lp-callout .label { color: var(--maple); }
.lp-callout h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 6px 0 10px; }
.lp-callout p { opacity: .85; max-width: 60ch; }
.lp-actions { display: grid; gap: 8px; justify-items: start; }
.lp-actions .muted { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.steps a { text-underline-offset: 3px; }
@media (max-width: 760px) {
  .lp-callout { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 18px; }
}

/* ---------- Member accounts ---------- */
header .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; }
header nav { grid-column: 1 / -1; }
.auth-bar { display: flex; align-items: center; gap: 14px; justify-self: end; }
.auth-link { font: 600 .9rem var(--label); text-transform: uppercase; letter-spacing: .1em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.auth-link:hover { color: var(--red); }
.auth-link .star-ic { color: var(--star); }
.auth-btn { padding: 8px 16px; font-size: .82rem; white-space: nowrap; }
@media (max-width: 420px) { .auth-bar { gap: 10px; } .auth-btn { padding: 7px 12px; } .brand-name small { display: none; } }

/* favorite stars */
.auth-off .fav { display: none; }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.title-row h3, .title-row h1 { min-width: 0; }
.fav {
  flex: none; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px; margin: -4px -4px 0 0;
  cursor: pointer; color: var(--muted); border-radius: 6px; font: 600 .75rem var(--label); text-transform: uppercase; letter-spacing: .08em;
}
.fav svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: transform .15s ease; }
.fav:hover { color: var(--star); }
.fav:hover svg { transform: scale(1.12); }
.fav[aria-pressed="true"] { color: var(--star); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.fav:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.fav .fav-text { display: none; }
.fav-big { margin-top: 10px; padding: 8px 12px; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 999px; }
.fav-big .fav-text { display: inline; }
.fav-big svg { width: 22px; height: 22px; }
.hs-block-head .fav { margin: 0; align-self: center; }
@media (prefers-reduced-motion: reduce) { .fav svg { transition: none; } }

/* toast */
.auth-toast {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); max-width: min(560px, calc(100% - 32px));
  background: var(--ink); color: var(--bg); border-radius: 10px; padding: 12px 44px 12px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.auth-toast a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.toast-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; padding: 4px 10px; }

/* forms */
.auth-wrap { display: grid; gap: 18px; }
.auth-wrap:not([data-auth-page="account"]) > * { max-width: 560px; width: 100%; }
.auth-wrap[data-auth-page="account"] > .auth-msg { max-width: 720px; }
.auth-form { gap: 18px; }
.auth-form .btn[type=submit] { justify-self: start; font-size: .95rem; padding: 12px 24px; }
.auth-step { font-size: 1.5rem; display: grid; gap: 4px; }
.auth-step span { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .12em; color: var(--red); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; cursor: pointer; padding: 8px; }
.pw-toggle:hover { color: var(--ink); }
.pw-rules { list-style: none; margin: -8px 0 0; padding: 0; display: grid; gap: 4px; font-size: .93rem; }
.pw-rules li { color: var(--muted); padding-left: 24px; position: relative; }
.pw-rules li::before { content: "○"; position: absolute; left: 4px; }
.pw-rules li.ok { color: var(--ink); }
.pw-rules li.ok::before { content: "✓"; color: #1d8a4a; font-weight: 700; }
.pw-rules li[data-rule="max"]:not(.ok) { color: var(--red); }
.pw-rules li[data-rule="max"]:not(.ok)::before { content: "✕"; }
.pw-rules .pw-note { padding-left: 0; font-size: .88rem; }
.pw-rules .pw-note::before { content: none; }
.code-input { font: 600 1.4rem var(--body) !important; letter-spacing: .3em; max-width: 260px; }
.link-btn { justify-self: start; background: none; border: 0; padding: 0; color: var(--ink); font: 500 .95rem var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: .95rem; }
.auth-msg { border-radius: 10px; padding: 14px 18px; border: 2px solid var(--ink); }
.auth-msg.error { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
.auth-msg.ok { border-color: #1d8a4a; background: color-mix(in srgb, #1d8a4a 9%, transparent); }
.auth-msg ul { margin: 6px 0 0; padding-left: 20px; }
.auth-msg:focus { outline: none; }

/* account page */
.acct-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.acct-main { display: grid; gap: 16px; min-width: 0; }
.acct-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.acct-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.acct-sub { font-size: 1.2rem; padding-bottom: 8px; border-bottom: 3px solid var(--ink); }
.acct-side { display: grid; gap: 18px; min-width: 0; }
.acct-side .place { gap: 14px; }
.acct-side h3 { font-size: 1.2rem; }
#fav-list { display: grid; gap: 24px; }
.fav-group h3 { font: 600 .85rem var(--label); text-transform: uppercase; letter-spacing: .12em; color: var(--red); margin-bottom: 6px; }
.fav-group ul { list-style: none; margin: 0; padding: 0; }
.fav-group li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.fav-group li:last-child { border-bottom: 1px solid var(--line); }
.fav-group li a { font-weight: 600; text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.fav-group li a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.fav-remove { flex: none; background: none; border: 0; color: var(--muted); font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; cursor: pointer; padding: 6px; }
.fav-remove:hover { color: var(--red); }
.fav-starts { font-size: .95rem; }
.foot-links a { text-underline-offset: 3px; }
.prose { max-width: 70ch; display: grid; gap: 12px; }
.prose h2 { font-size: 1.35rem; margin-top: 14px; }
@media (max-width: 760px) { .acct-grid { grid-template-columns: minmax(0, 1fr); } }

header .brand { min-width: 0; }
.brand-name { min-width: 0; }
@media (max-width: 520px) {
  .auth-link .fav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .auth-link .star-ic { font-size: 1.4rem; }
  .brand-name { font-size: 1rem; }
}

/* ---------- Admin ---------- */
.auth-admin { color: var(--red) !important; }
.auth-wrap[data-auth-page="admin"] > * { max-width: none; }
#admin-body { display: grid; gap: 48px; }
.admin-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.admin-section { display: grid; gap: 20px; min-width: 0; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--ink); }
.stat { padding: 16px 16px 6px 0; display: grid; gap: 4px; align-content: start; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat-label { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.stat b { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: .92rem; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.chart-head h3, .admin-two h3 { font-size: 1.15rem; }
.chart { overflow-x: auto; }
.chart svg { width: 100%; min-width: 520px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 500 11px var(--body); }
.chart .bar { fill: color-mix(in srgb, var(--red) 65%, var(--bg)); }
.chart .bar.today { fill: var(--red); }
.chart .bar:hover { fill: var(--ink); }
.admin-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.admin-two > div { display: grid; gap: 10px; align-content: start; min-width: 0; }
.admin-table { min-width: 0; }
.admin-table td { overflow-wrap: anywhere; }
#members-table .admin-table { min-width: 760px; }
.pill { display: inline-block; font: 600 .72rem var(--label); text-transform: uppercase; letter-spacing: .1em; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pill-ok { background: color-mix(in srgb, #1d8a4a 14%, transparent); color: #1d8a4a; }
.pill-warn { background: color-mix(in srgb, var(--maple) 30%, transparent); color: var(--ink); }
.pill-admin { background: var(--red); color: #fff; }
@media (max-width: 760px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .admin-two { grid-template-columns: minmax(0, 1fr); }
}

.admin-section > *, #admin-body > * { min-width: 0; }
.admin-table td.name { width: auto; }
#members-table .admin-table td { overflow-wrap: normal; white-space: nowrap; }

/* ---------- Invite & share ---------- */
.auth-wrap[data-auth-page="invite"] > * { max-width: none; }
.auth-wrap[data-auth-page="invite"] > .auth-msg { max-width: 720px; }
.invite-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.invite-main, .invite-side { display: grid; gap: 16px; min-width: 0; align-content: start; }
.share-box { display: grid; gap: 14px; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; font: 500 1rem var(--body); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-buttons .btn { padding: 9px 16px; font-size: .82rem; }
.invite-card { gap: 10px; }
.invite-card .btn { justify-self: start; padding: 9px 18px; font-size: .82rem; }
@media (max-width: 900px) { .auth-invite { display: none; } }
@media (max-width: 760px) { .invite-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.auth-wrap > * { min-width: 0; }
.share-link input { width: 100%; }

/* ---------- Pro shop and bowling center pages ---------- */
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.page-head .detail-actions .btn { margin-top: 0; }
.place .profile-link { margin-top: 2px; }
.page-head .city-tag { justify-self: start; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.team-member { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.team-member:hover { border-color: var(--red); }
.team-member > span:last-child { display: grid; gap: 2px; min-width: 0; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 .95rem var(--label); letter-spacing: .05em; }
.avatar.big { width: 72px; height: 72px; font-size: 1.5rem; background: var(--red); color: #fff; }
.staff-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ---------- Promotions and events ---------- */
.promo-list { display: grid; gap: 24px; margin-bottom: 28px; }
.promo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.promo.compact { grid-template-columns: minmax(0, 1fr); }
.promo-flyer { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.promo-flyer img { display: block; width: 100%; height: auto; }
.promo-info { gap: 12px; }
.promo-info h3 { font-size: 1.5rem; }
.promo.compact .promo-info h3 { font-size: 1.2rem; }
@media (max-width: 760px) { .promo { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Lessons: two paths, self-study lessons ---------- */
.lesson-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; margin-top: 6px; max-width: 900px; }
.lesson-path { display: grid; gap: 6px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.lesson-path:hover { border-color: var(--red); }
.lesson-path h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.lesson-path p { color: var(--muted); font-size: .95rem; }
#coaches > .wrap:first-child { padding-bottom: 0; }
.section-head .btn { margin-top: 6px; }
.type-badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.learn-card .badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.learn-card h3 { font-size: 1.25rem; }
.learn-card p { color: var(--muted); font-size: .97rem; }
.learn-card.soon { border-style: dashed; background: transparent; }
.learn-thumb { position: relative; display: block; margin: -22px -22px 4px; border-radius: 10px 10px 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink); }
.learn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.learn-thumb .play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: var(--red); }
.learn-thumb .play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.diagram-box { margin: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.diagram { display: block; width: 100%; height: auto; max-width: 560px; margin: 0 auto; }
.diagram.narrow { max-width: 340px; }
.diagram.wide { max-width: 100%; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.learn-body { display: grid; gap: 14px; max-width: 68ch; }
.learn-body h3 { font-size: 1.3rem; margin-top: 8px; }
.learn-body ul, .learn-body ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.learn-body a { text-decoration-color: var(--red); text-underline-offset: 3px; }
.learn-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.learn-table th, .learn-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.learn-table th { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.coach-side { display: grid; gap: 16px; }
.learn-more ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.learn-more a { text-decoration-color: var(--line); text-underline-offset: 3px; }
@media (max-width: 760px) { .learn-page .coach-side { order: 0; } }

/* ---------- Coach photos and logos ---------- */
.coach-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.coach-id .coach-top { min-width: 0; flex: 1; }
.coach-img { flex: none; display: block; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.coach-img.logo { object-fit: contain; }
.coach-id .coach-img { width: 72px; height: 72px; }
.coach-img.big { width: 132px; height: 132px; }
.coach-img.side-logo { width: 96px; height: 96px; }
.coach-business { font: 600 .82rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.coach-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.coach-head-text { display: grid; gap: 6px; min-width: 0; flex: 1; }
@media (max-width: 520px) { .coach-img.big { width: 96px; height: 96px; } }
.video-credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.video-credit > div { display: grid; gap: 4px; flex: 1 1 260px; }
.video-credit p { color: var(--muted); font-size: .95rem; }
.video-credit p b { color: var(--ink); }

/* ---------- Reviews ---------- */
.notice { padding: 14px 18px; border-left: 4px solid var(--red); background: var(--surface); border-radius: 0 8px 8px 0; font-size: .97rem; }
.notice a { text-decoration-color: var(--red); text-underline-offset: 3px; }
.review-card .review-title { color: var(--muted); font-style: italic; font-size: .95rem; }
.review-byline { font-size: .95rem; }
.prose h2[id] { scroll-margin-top: 20px; }

/* ---------- Tournaments: type filter ---------- */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tag-cat { box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red); }

/* ---------- Add to calendar ---------- */
.cal-btn { all: unset; cursor: pointer; display: inline; border-radius: 4px; text-decoration: underline dotted var(--line); text-underline-offset: 4px; }
.cal-btn:hover { text-decoration-color: var(--red); }
.cal-btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.cal-btn .cal-ic { display: inline-block; vertical-align: -2px; margin-left: 6px; color: var(--red); }
.event-date .cal-btn { display: block; text-decoration: none; }
.event-date .cal-btn:hover small { color: var(--red); }
.cal-dialog { max-height: calc(100dvh - 32px); overflow: auto; border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--ink); width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.cal-dialog::backdrop { background: rgba(14, 22, 40, .55); }
.cal-box { padding: 24px; display: grid; gap: 12px; }
.cal-title { font-size: 1.35rem; }
.cal-step { display: grid; gap: 14px; }
.cal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cal-list { display: grid; gap: 8px; }
.cal-list a { display: grid; gap: 2px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.cal-list a:hover, .cal-list a:focus-visible { border-color: var(--red); outline: none; }
.cal-list a span { color: var(--muted); font-size: .9rem; }

/* ---------- Suggestion link (top of every page) and form ---------- */
header .top-strip { background: var(--ink); color: var(--bg); }
header .top-strip .wrap { display: flex; justify-content: flex-end; padding-block: 7px; }
.suggest-link { color: inherit; font: 600 .78rem var(--label); text-transform: uppercase; letter-spacing: .1em; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; min-height: 24px; }
.suggest-link:hover, .suggest-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.suggest-link:focus-visible { outline: 2px solid var(--bg); outline-offset: 3px; }
.suggest-ic { font-size: 1rem; line-height: 1; }
@media (max-width: 980px) { header .top-strip .wrap { padding-block: 7px; } }
@media (max-width: 600px) { header .top-strip .wrap { justify-content: center; } }
.sg-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sg-type { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--surface); font-weight: 500; }
.sg-type:has(input:checked) { border-color: var(--ink); }
.sg-type input { width: 18px; height: 18px; accent-color: var(--red); margin: 0; flex: none; }
@media (max-width: 600px) { .sg-types { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Offers with packages (Promotions page) ---------- */
.promo-wide { grid-template-columns: minmax(0, 1fr); }
.promo { scroll-margin-top: 20px; }
.pkg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 6px; }
.pkg { border: 1px solid var(--line); border-top: 5px solid var(--tier, var(--ink)); border-radius: 10px; padding: 14px 16px; background: var(--surface); display: grid; gap: 8px; align-content: start; }
.pkg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pkg-tier { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .12em; }
.pkg-price { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.pkg ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: .95rem; }
.pkg-bronze { --tier: #a5683a; } .pkg-silver { --tier: #9aa3b2; } .pkg-gold { --tier: #c9a227; }
.pkg-platinum { --tier: #6f8fa6; } .pkg-diamond { --tier: #3a8fd6; }
.hs-offer { margin: 4px 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 8px; background: var(--surface); }
.hs-offer .label { margin-right: 6px; }
.hs-offer a { font-weight: 600; white-space: nowrap; }

/* ---------- Pro shop logos (kept on white so dark logo text stays readable in dark mode) ---------- */
.shop-logo { display: block; width: 150px; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-sizing: border-box; }
.shop-logo-link { display: block; justify-self: start; margin-bottom: 4px; }
.shop-logo-lg { width: 220px; margin: 8px 0 14px; }
.shop-logo-sm { width: 120px; padding: 6px 10px; }

/* ---------- OHSAA link card (high school pages) ---------- */
.hs-link-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; align-items: center; padding: 22px 24px; border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: 12px; background: var(--surface); }
.hs-link-card h2 { margin: 4px 0 8px; }
.hs-link-card p { margin: 0; max-width: 70ch; }
@media (max-width: 700px) { .hs-link-card { grid-template-columns: minmax(0, 1fr); } .hs-link-card .btn { justify-self: start; } }

/* Tournaments with a flyer get two buttons */
.event-cta { display: grid; gap: 8px; align-content: center; }

/* ---------- Bowling etiquette (Lessons page) ---------- */
.etiquette { list-style: none; counter-reset: et; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.etiquette li { counter-increment: et; position: relative; display: grid; gap: 4px; align-content: start; padding: 16px 18px 16px 62px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.etiquette li::before { content: counter(et); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 600 .95rem var(--label); }
.etiquette strong { font-size: 1.02rem; }
.etiquette span { color: var(--muted, inherit); }

/* ---------- Bowler profile search (Leagues page) ---------- */
.bp-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 640px; }
.bp-form .search { flex: 1 1 260px; }
.bp-region { margin: 10px 0 0; display: flex; gap: 8px; align-items: baseline; font-weight: 600; }
.bp-status { margin-top: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--red); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bp-results { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.bp-result { width: 100%; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; cursor: pointer; }
.bp-result span:not(.bp-go) { grid-column: 1; font-size: .9rem; opacity: .75; }
.bp-result .bp-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--red); font-size: 1.2rem; }
.bp-result:hover, .bp-result[aria-current] { border-color: var(--ink); }
.bp-viewer { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); scroll-margin-top: 16px; }
.bp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bp-bar strong { flex: 1 1 200px; }
.bp-bar a { font-weight: 600; }
.bp-close { padding: 6px 14px; }
.bp-viewer iframe { display: block; width: 100%; height: min(900px, 85vh); border: 0; background: #0f0d1a; }

/* ---------- News ---------- */
.news-list { display: grid; gap: 14px; }
.news-card { display: grid; gap: 8px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: 12px; }
.news-card[hidden] { display: none; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: .9rem; }
.news-meta time { font-weight: 600; }
.news-card h3 { margin: 0; font-size: 1.3rem; line-height: 1.3; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card { position: relative; }
.news-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.news-card h3 a:focus-visible { outline: none; }
.news-card:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
.news-card p { margin: 0; }
.news-by { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: .9rem; opacity: .8; }
.news-kind { font-weight: 600; color: var(--red); }
.news-article { max-width: 860px; }
.news-credit { padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 28px; display: grid; gap: 10px; justify-items: start; }
.news-credit p { margin: 0; }
.news-prose h2 { margin-top: 1.6em; }
.news-prose h3 { margin: 1.4em 0 .3em; font-size: 1.15rem; }
.news-prose ul { padding-left: 22px; }
.news-prose li { margin: 4px 0; }
.news-table td, .news-table th { white-space: normal; }
.news-more { margin-top: 28px; font-weight: 600; }

/* Wide screens: tighten the menu as it gets crowded, and wrap rather than push the page sideways */
@media (min-width: 981px) {
  header nav { flex-wrap: wrap; row-gap: 4px; column-gap: clamp(12px, 1.5vw, 20px); min-width: 0; }
}
@media (min-width: 981px) {
  header nav { font-size: .78rem; letter-spacing: .06em; column-gap: clamp(10px, 1.25vw, 18px); }
}
@media (min-width: 981px) and (max-width: 1080px) {
  header nav { font-size: .72rem; letter-spacing: .04em; column-gap: 10px; }
}
.news-prose img { display: block; max-width: min(100%, 520px); height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.news-credit-ext { padding: 22px 24px; gap: 12px; }
.news-credit-ext p { font-size: 1.05rem; }
.news-credit-ext .muted { font-size: .9rem; }
.news-related { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.news-related h2 { font-size: 1.4rem; margin: 0 0 10px; }
.news-related ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.news-related a { font-weight: 600; }

/* ---------- News: stories shown inside the site ---------- */
.news-head-compact .wrap { padding-block: 32px 28px; }
.news-head-compact h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 28ch; }
.news-embed-section .wrap { padding-top: 28px; }
.news-viewer { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.news-viewer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.news-viewer-bar a { font-weight: 700; white-space: nowrap; }
.news-viewer iframe { display: block; width: 100%; height: min(1100px, 82vh); border: 0; background: #fff; }
.news-viewer-note { margin-top: 10px; }
.fb-post-embed { max-width: 500px; }
.fb-post-embed iframe { display: block; width: 100%; max-width: 500px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fb-fallback { margin-top: 12px; }
.fb-fallback summary { cursor: pointer; font-weight: 600; }
.fb-fallback img { margin-top: 12px; }

/* ---------- People of Bowling ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.person-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.person-card:hover { border-color: var(--ink); }
.person-card-text { display: grid; gap: 4px; min-width: 0; }
.person-card b { font-size: 1.2rem; }
.person-photo, .person-initials { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.person-initials { display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 600 1.6rem var(--display); }
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.person-head > div { display: grid; gap: 12px; flex: 1 1 320px; min-width: 0; }
.person-hero-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
.ticks { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.person-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.person-links a { font-weight: 600; }
.person-interview-soon { border-left: 4px solid var(--red); padding-left: 16px; }
.qa { margin-bottom: 16px; } .qa .q { font-weight: 700; margin: 0 0 4px; } .qa .a { margin: 0; }
.person-card .badges, .person-head .badges { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.page-head .wrap.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.profile-grid .profile-block + .profile-block { margin-top: 32px; }
@media (max-width: 600px) { .person-hero-photo { width: 120px; height: 120px; } }
.person-stats dl { margin: 0; display: grid; gap: 0; }
.person-stats dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.person-stats dt { font-weight: 600; }
.person-stats dd { margin: 0; }
.person-stats dd.na { opacity: .55; }
.person-stats p { margin-top: 10px; }

/* ---------- Admin: news feed test ---------- */
.feed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.feed-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-bottom: 8px; }
.feed-filters label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.feed-filters label.search { flex: 1 1 240px; display: flex; }
.feed-filters label.check { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.feed-filters select, .feed-filters input[type=date] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 260px; }
.feed-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed-item { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 4px; }
.feed-item.is-hidden { opacity: .55; }
.feed-item > a { font-weight: 700; color: var(--ink); }
.feed-item p { margin: 0; }
.feed-meta { font-size: .85rem; }
.feed-btns { display: flex; gap: 16px; font-size: .85rem; }

/* Admin feed: "Add to News" */
.feed-onsite { margin: 2px 0 0; padding: 6px 10px; border-left: 3px solid var(--red); background: var(--bg, #fff); font-size: .9rem; }
.feed-add { font-weight: 700; }
.feed-pub { display: grid; gap: 10px; margin-top: 8px; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; }
.feed-pub label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.feed-pub label.check { display: inline-flex; gap: 6px; align-items: center; margin-right: 16px; font-weight: 500; }
.feed-pub input:not([type=checkbox]), .feed-pub textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.feed-pub fieldset { border: 0; padding: 0; margin: 0; }
.feed-pub legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.feed-pub [data-pub-msg] { margin: 0; color: var(--red); }

/* Leagues page: current and upcoming leagues */
.lg-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; align-items: end; margin-bottom: 14px; }
.lg-filters > label:not(.search) { display: grid; gap: 4px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #5b6476); }
.lg-filters select, .lg-filters input:not([type=search]) { font: inherit; font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--ink); padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); width: 100%; box-sizing: border-box; min-height: 42px; }
.lg-filters .lg-q { grid-column: span 2; }
.lg-btns { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lg-zipmsg { margin: -4px 0 12px; color: var(--red); font-size: .92rem; }
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.league-card { display: grid; gap: 8px; align-content: start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 12px; }
.league-card[hidden] { display: none; }
.league-card h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.league-card h3 a { color: var(--ink); text-decoration: none; }
.league-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lg-top { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font-size: .78rem; }
.lg-status { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #e6f4ea; color: #1e6b34; }
.lg-status.upcoming { background: #e5effb; color: #1d4f91; }
.lg-dist { margin-left: auto; font-weight: 700; color: var(--ink); }
.lg-center { margin: 0; color: var(--muted, #5b6476); }
.lg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.lg-chip { font: 600 .72rem var(--label); letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: rgba(200, 30, 45, .08); color: var(--red); border: 1px solid rgba(200, 30, 45, .2); }
.lg-facts { margin: 0; display: grid; gap: 4px; font-size: .92rem; }
.lg-facts div { display: grid; grid-template-columns: 74px 1fr; gap: 8px; }
.lg-facts dt { color: var(--muted, #5b6476); font-weight: 600; }
.lg-facts dd { margin: 0; }
.lg-spots { margin-left: 6px; font-weight: 700; color: #1e6b34; }
.lg-spots.full { color: var(--red); }
.lg-link { margin: 4px 0 0; font-weight: 700; font-size: .92rem; }
.lg-source { margin-top: 16px; }
@media (max-width: 640px) { .lg-filters { grid-template-columns: 1fr 1fr; gap: 10px; } .lg-filters .lg-q, .lg-btns { grid-column: 1 / -1; } .league-grid { grid-template-columns: 1fr; } }

/* Bowling Centers page */
.ctr-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 16px; }
.ctr-chips-label { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #5b6476); margin-right: 4px; }
.ctr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.ctr-card { display: grid; gap: 10px; align-content: start; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 12px; }
.ctr-card[hidden] { display: none; }
.ctr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ctr-head h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; flex: 1 1 auto; }
.ctr-dist { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.ctr-tags { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .78rem; }
.ctr-lanes { font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg, #f4f5f7); border: 1px solid var(--line); }
.ctr-facts dd { overflow-wrap: anywhere; }
.ctr-block h4 { margin: 0 0 4px; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #5b6476); }
.ctr-block p { margin: 0; font-size: .92rem; }
.ctr-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .92rem; }
.ctr-hours li span { display: inline-block; min-width: 78px; font-weight: 600; }
.ctr-feats { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 2px; }
.ctr-notes { margin: 0; font-size: .9rem; padding: 8px 10px; border-left: 3px solid var(--red); background: var(--bg, #f7f7f8); }
.ctr-src { margin: 0; font-size: .78rem; color: var(--muted, #5b6476); }
@media (max-width: 640px) { .ctr-grid { grid-template-columns: 1fr; } }

/* 12 menu items: keep them on one row on laptop widths */
@media (min-width: 981px) {
  header nav { font-size: .74rem; letter-spacing: .035em; column-gap: 12px; }
}
@media (min-width: 981px) and (max-width: 1180px) {
  header nav { font-size: .68rem; letter-spacing: .02em; column-gap: 9px; }
}

/* center profile: leagues from the database */
.cp-lg { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.cp-lg li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: grid; gap: 2px; }
.cp-lg-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; }
.cp-lg .lg-status { font-size: .7rem; }
#cp-details { margin-top: 16px; }
#cp-details[hidden] { display: none; }
.ctr-head h3 a { color: inherit; text-decoration: underline; text-decoration-color: rgba(200, 30, 45, .45); text-underline-offset: 3px; }
.ctr-head h3 a:hover, .ctr-head h3 a:focus-visible { color: var(--red); text-decoration-color: currentColor; }

/* center profile: food & drink menu */
#menu[hidden] { display: none; }
.cp-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 6px 0 10px; align-items: start; }
.cp-menu details { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 8px 14px; }
.cp-menu summary { cursor: pointer; font-weight: 600; }
.cp-menu ul { margin: 8px 0 4px; padding-left: 18px; font-size: .95rem; display: grid; gap: 3px; }

/* bowling centers: prices & specials */
.ctr-how { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: middle; }
.ctr-how span { font: 600 .66rem var(--label); letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: rgba(200, 30, 45, .08); color: var(--red); border: 1px solid rgba(200, 30, 45, .2); }
.ctr-price .lg-facts div { grid-template-columns: 92px 1fr; }
.ctr-deals { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 8px; }
.ctr-deals li { padding: 8px 12px; border-left: 3px solid var(--red); background: var(--bg, #f4f5f7); border-radius: 0 8px 8px 0; font-size: .92rem; line-height: 1.35; }
.ctr-deal-price { font-weight: 700; color: var(--red); }
#prices[hidden] { display: none; }
.cp-how { margin: 0 0 8px; }
.cp-prices div { grid-template-columns: 110px 1fr; }
.cp-sub { font-size: 1.05rem; margin: 16px 0 6px; }
.ctr-more { margin: 6px 0 8px; }
.ctr-more summary { cursor: pointer; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.ctr-kind { font: 600 .62rem var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #5b6476); }

/* ---------- Cards / List switch ---------- */
.view-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 6px 0 12px; }
.view-bar .result-count { margin: 0; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); gap: 2px; }
.view-toggle button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font: 600 .78rem var(--label); letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.view-toggle button svg { width: 14px; height: 14px; fill: currentColor; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.view-toggle button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Leagues as a list */
#lg-list[data-view="list"] { grid-template-columns: 1fr; gap: 0; border-top: 3px solid var(--ink); }
#lg-list[data-view="list"] .league-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 14px 4px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); column-gap: 24px; row-gap: 4px; align-items: start; }
#lg-list[data-view="list"] .league-card > .lg-top, #lg-list[data-view="list"] .league-card > h3, #lg-list[data-view="list"] .league-card > .lg-center { grid-column: 1; }
#lg-list[data-view="list"] .league-card > .lg-chips, #lg-list[data-view="list"] .league-card > .lg-facts, #lg-list[data-view="list"] .league-card > .lg-link { grid-column: 2; }
#lg-list[data-view="list"] .league-card > .lg-chips { grid-row: 1; margin: 0; }
#lg-list[data-view="list"] .league-card > .lg-facts { grid-row: 2 / span 3; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: .9rem; }
#lg-list[data-view="list"] .league-card > .lg-facts div { display: block; }
#lg-list[data-view="list"] .league-card > .lg-facts dt { display: inline; margin-right: 4px; }
#lg-list[data-view="list"] .league-card > .lg-facts dd { display: inline; }
#lg-list[data-view="list"] .league-card > .lg-link { margin: 0; }

/* Bowling centers as a list: the essentials on one row; hours, prices and features stay on the profile */
#ctr-list[data-view="list"] { grid-template-columns: 1fr; gap: 0; border-top: 3px solid var(--ink); }
#ctr-list[data-view="list"] .ctr-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 14px 4px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 24px; row-gap: 4px; }
#ctr-list[data-view="list"] .ctr-head, #ctr-list[data-view="list"] .ctr-tags { grid-column: 1; }
#ctr-list[data-view="list"] .ctr-facts { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: .9rem; }
#ctr-list[data-view="list"] .ctr-facts div { display: block; }
#ctr-list[data-view="list"] .ctr-facts dt { display: inline; margin-right: 4px; }
#ctr-list[data-view="list"] .ctr-facts dd { display: inline; }
#ctr-list[data-view="list"] .ctr-block, #ctr-list[data-view="list"] .ctr-notes, #ctr-list[data-view="list"] .ctr-src { display: none; }

/* Pro shops as a list */
#shop-list[data-view="list"] { grid-template-columns: 1fr; gap: 0; border-top: 3px solid var(--ink); }
#shop-list[data-view="list"] .place { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 14px 4px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; column-gap: 24px; align-items: center; }
#shop-list[data-view="list"] .shop-logo-link { display: none; }
#shop-list[data-view="list"] .place dl { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: .92rem; }
#shop-list[data-view="list"] .place dl div { display: block; }
#shop-list[data-view="list"] .place dt { display: inline; margin-right: 4px; }
#shop-list[data-view="list"] .place dd { display: inline; }
#shop-list[data-view="list"] .place .links { display: none; }

/* Tournaments as cards */
#ev-list[data-view="cards"] { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; border-top: 0; }
#ev-list[data-view="cards"] .event { grid-template-columns: 1fr; gap: 12px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: 12px; align-content: start; }
#ev-list[data-view="cards"] .event-date { font-size: 1.15rem; }
#ev-list[data-view="cards"] .event-body p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
#ev-list[data-view="cards"] .event-cta { justify-self: start; display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 720px) {
  #lg-list[data-view="list"] .league-card, #ctr-list[data-view="list"] .ctr-card, #shop-list[data-view="list"] .place { grid-template-columns: 1fr; }
  #lg-list[data-view="list"] .league-card > *, #ctr-list[data-view="list"] .ctr-card > *, #shop-list[data-view="list"] .place > * { grid-column: 1 !important; grid-row: auto !important; }
}

/* Map view */
#lg-list[data-view="map"], #ctr-list[data-view="map"] { display: none !important; }
.view-map[hidden] { display: none; }
.view-map-canvas { height: 560px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.view-map-note { margin: 8px 0 0; }
.vm-pin { background: transparent; border: 0; }
.vm-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--red, #c81e2d); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.vm-pin b { transform: rotate(45deg); color: #fff; font: 700 .72rem/1 var(--label, sans-serif); }
.vm-pin b:empty { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.leaflet-popup-content { font: .9rem/1.35 var(--body, sans-serif); }
.vm-head { display: block; font-size: 1rem; }
.vm-count { display: block; color: #5b6476; font-size: .8rem; margin-bottom: 4px; }
.vm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.vm-title, .vm-title a { font-weight: 600; color: #14213a; }
.vm-sub { color: #5b6476; font-size: .82rem; }
@media (max-width: 640px) { .view-map-canvas { height: 420px; } }

/* Bowl tonight */
.bt-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.bt-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.bt-check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; font: 600 .95rem var(--body, inherit) !important; color: var(--ink) !important; cursor: pointer; }
.bt-check input { width: 18px !important; height: 18px !important; min-height: 0 !important; padding: 0 !important; margin: 0; accent-color: var(--red); }
.bt-btns { display: inline-flex; gap: 10px; margin-left: auto; }
.bt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; margin: 10px 0 24px; }
.bt-card { display: grid; gap: 8px; align-content: start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 12px; }
.bt-card.has-deal { border-top-color: var(--red); }
.bt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bt-head h3 { margin: 0; font-size: 1.2rem; }
.bt-dist { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.bt-open { margin: 0; font-size: .92rem; }
.bt-later li { border-left-color: var(--line); opacity: .85; }
.bt-price { margin: 0; color: var(--muted); }
.bt-sub { font-size: 1.15rem; margin: 8px 0 0; }
.bt-unknown .bt-card { border-top-color: var(--line); }
@media (max-width: 900px) { .bt-filters { grid-template-columns: 1fr 1fr; } .bt-btns { margin-left: 0; } }

/* League finder */
.lf { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 12px; padding: 20px 22px; margin: 0 0 22px; display: grid; gap: 14px; }
.lf-head h3 { margin: 0 0 4px; font-size: 1.3rem; }
.lf-head p { margin: 0; color: var(--muted); }
.lf-q { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.lf-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; }
.lf-ask { margin: 2px 0 8px; font-weight: 600; }
.lf-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.lf-count { margin: 4px 0 10px; }
.lf-grid { margin-bottom: 6px; }
.lf-why { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.lf-why span { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(31, 122, 61, .1); color: #1f6b3a; }
.lf-more { margin: 4px 0 0; }
.lf-showing { margin: -4px 0 10px; font-weight: 600; }

/* ================= Homepage ================= */
.home-hero .wrap { padding-block: 30px 26px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.home-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.05; max-width: 30ch; }
.home-hero h1 em { font-style: normal; color: var(--red); }
.home-hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.home-search { position: relative; display: flex; gap: 10px; max-width: 760px; margin-top: 6px; }
.home-search .search { flex: 1 1 0; min-width: 0; border-width: 2px; }
.home-search .search input { font-size: 1.1rem; padding: 12px 0; }
.search-sug { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 36px rgba(10, 20, 40, .22); padding: 6px; display: grid; max-height: 70vh; overflow: auto; }
.search-sug[hidden] { display: none; }
.sug, .sr-item { display: grid; grid-template-columns: 112px 1fr; column-gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.sug:hover, .sug.on, .sr-item:hover { background: color-mix(in srgb, var(--red) 9%, transparent); }
.sr-kind { grid-row: span 2; font: 600 .72rem var(--label); text-transform: uppercase; letter-spacing: .1em; color: var(--red); padding-top: 3px; }
.sr-t { font-weight: 600; }
.sr-s { color: var(--muted); font-size: .88rem; }
.sug-all { grid-template-columns: 1fr; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.sug-all .sr-t { color: var(--red); }
.sr-bowler .sr-t { font-weight: 500; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.home-favs .wrap { padding-block: 0 18px; display: grid; gap: 10px; }
.fav-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.fav-chip { flex: 0 0 auto; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; max-width: 280px; }
.fav-chip b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.fav-chip small { color: var(--muted); }
.fav-chip .star-ic { color: #e0a800; }
.fav-more { font-weight: 600; }

.home-tiles .wrap { padding-block: 6px 36px; }
.ht-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px) { .ht-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ht-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ht { padding: 12px; } }
.ht { display: grid; align-content: start; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.ht:hover { border-color: var(--red); transform: translateY(-2px); }
.ht-num { font: 400 1.7rem/1 var(--display); color: var(--red); min-height: 1.7rem; }
.ht-num.ht-word { font-size: 1.15rem; padding-top: .35rem; }
.ht-title { font-weight: 700; }
.ht-blurb { color: var(--muted); font-size: .85rem; line-height: 1.3; }

.home-sec .wrap { padding-block: 44px; display: grid; gap: 20px; }
.home-sec.alt { background: var(--surface); border-block: 1px solid var(--line); }
.home-sec h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.hs-head { display: flex; justify-content: space-between; align-items: end; gap: 10px 20px; flex-wrap: wrap; }
.hs-head > a, .more { font-weight: 600; color: var(--red); text-decoration: none; }
.hs-head > a:hover, .more:hover { text-decoration: underline; }

.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.deal { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); color: var(--ink); text-decoration: none; }
.deal:hover { border-color: var(--red); }
.deal-when { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.deal-live { color: #1f7a3d; margin-right: 4px; }
.deal-name { font: 400 1.2rem/1.15 var(--display); }
.deal-price { font-weight: 700; color: var(--red); }
.deal-center { color: var(--muted); font-size: .9rem; }

.cu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cu-col { display: grid; gap: 10px; align-content: start; }
.cu-col h3 { font-size: 1.2rem; }
.cu-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 2px solid var(--ink); }
.cu-list li { border-bottom: 1px solid var(--line); }
.cu-list a { display: grid; grid-template-columns: 78px 1fr; column-gap: 14px; padding: 11px 2px; color: var(--ink); text-decoration: none; }
.cu-list a:hover .cu-name { color: var(--red); }
.cu-date { grid-row: span 2; font: 600 .9rem var(--label); text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.cu-name { font-weight: 600; }
.cu-sub { color: var(--muted); font-size: .88rem; }
.cu-list li.muted { padding: 12px 2px; }

.news-hof { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; gap: 36px !important; }
.news-hof > div { display: grid; gap: 16px; }
.hn-list { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.hn-item { padding: 14px 2px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.hn-item time { font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hn-item h3 { font: 600 1.1rem/1.3 var(--body); }
.hn-item h3 a { color: var(--ink); text-decoration: none; }
.hn-item h3 a:hover { color: var(--red); text-decoration: underline; }
.hof-card { display: grid; gap: 12px; padding: 22px; border-radius: 14px; background: var(--ink); color: var(--bg); }
.hof-card .label { color: var(--maple); }
.hof-card h2 { font-size: 1.45rem; color: var(--bg); }
.hof-mini { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.hof-mini li b { display: block; }
.hof-mini li span { opacity: .8; font-size: .9rem; }
.hof-card .muted { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.hof-card .btn { justify-self: start; }

.lanes2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lane2 { padding: 22px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 8px; align-content: start; }
.section .lane2 { background: var(--surface); }
.lane2 h3 { font-size: 1.35rem; }
.lane2 > p { color: var(--muted); }
.lane2 ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.lane2 li { display: grid; }
.lane2 li a { font-weight: 700; color: var(--red); text-decoration: none; }
.lane2 li a::after { content: ' →'; }
.lane2 li a:hover { text-decoration: underline; }
.lane2 li span { color: var(--muted); font-size: .92rem; }

.home-about { background: var(--ink); color: var(--bg); }
.about-contact { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 36px !important; }
.about-contact h2 { color: var(--bg); margin: 6px 0 10px; }
.about-contact p { opacity: .85; max-width: 60ch; }
.about-contact .label { color: var(--maple); }

/* search page */
.sr-group { display: grid; gap: 2px; margin-bottom: 22px; }
.sr-group h2 { font-size: 1.3rem; margin-bottom: 6px; }
#search-results .sr-item { border-bottom: 1px solid var(--line); border-radius: 0; }

@media (max-width: 820px) {
  .cu-cols, .news-hof, .lanes2, .about-contact { grid-template-columns: 1fr; }
  .home-search { gap: 6px; }
  .home-search .btn { padding: 10px 14px; }
  .home-search .search input::placeholder { font-size: .95rem; }
  .home-actions .btn { padding: 9px 14px; font-size: .8rem; }
  .sug, .sr-item { grid-template-columns: 1fr; }
  .sr-kind { grid-row: auto; }
}

/* ================= Mobile version ================= */
.menu-btn, .mnav, .tabbar, .back-mobile { display: none; }
.view-switch { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.view-switch button, .view-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.view-switch button[aria-current] { font-weight: 700; text-decoration: none; color: var(--ink); }
.back-mobile:not([hidden]) { display: block; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; font: 700 1.6rem var(--label); letter-spacing: .06em; text-transform: uppercase;
  background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 18px 34px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }

@media (max-width: 760px) {
  /* header: logo, account and a menu button; the full section list lives in the menu */
  header .top-strip { display: none; }
  body > header { position: sticky; top: 0; z-index: 56; background: var(--bg); border-bottom: 1px solid var(--line); }
  header > .wrap { flex-wrap: nowrap; padding-block: 10px !important; gap: 10px; }
  header > .wrap > nav { display: none; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand .logo { width: 38px; }
  .brand-name { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-name small { display: none; }
  .auth-bar { flex: none; }
  .auth-bar .fav-label { display: none; }
  .menu-btn { display: inline-grid; place-content: center; gap: 5px; flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
  .menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mnav:not([hidden]) { display: grid; gap: 16px; align-content: start; position: fixed; inset: 64px 0 0 0; z-index: 50; overflow-y: auto; background: var(--bg);
    padding: 16px max(18px, env(safe-area-inset-left)) calc(90px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  html.menu-open { overflow: hidden; }
  .mnav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: auto; overflow: visible; border-top: 0; padding: 0; text-transform: none; letter-spacing: 0; font: 600 1.05rem var(--body); }
  .mnav-links a { padding: 14px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
  .mnav-links a[aria-current] { border-color: var(--red); color: var(--red); }
  .mnav-foot { display: grid; gap: 14px; padding-top: 6px; color: var(--muted); }
  .mnav-foot a { color: var(--ink); }
  .mnav-foot .view-link { justify-self: start; color: var(--ink); font-weight: 600; }

  /* app-style tab bar */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--muted); text-decoration: none; font: 600 .72rem var(--label); letter-spacing: .04em; text-transform: uppercase; }
  .tabbar svg { width: 24px; height: 24px; fill: currentColor; }
  .tabbar a[aria-current] { color: var(--red); }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  footer .wrap { flex-direction: column; align-items: flex-start; }

  /* comfortable tap targets and type on phones */
  .btn { min-height: 44px; }
  .chip { min-height: 38px; }
  input, select, textarea { font-size: 16px !important; }   /* stops iPhone zooming into form fields */
  .page-head h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}
html.in-mframe .back-mobile { display: none !important; }

/* ---------- My Bowling ---------- */
.auth-bowl { font-weight: 700; }
@media (max-width: 760px) { .auth-bowl { display: none; } }
.cr-form input[type=number], .cr-form input[type=date], .cr-form input[type=search] {
  font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; min-width: 0; box-sizing: border-box; }
.bw-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 26px; padding-bottom: 4px; scrollbar-width: none; }
.bw-tabs::-webkit-scrollbar { display: none; }
.bw-tabs a { flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font: 600 .82rem var(--label); letter-spacing: .06em; text-transform: uppercase; }
.bw-tabs a[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }
.bw-head-act { display: flex; gap: 10px; flex-wrap: wrap; }
.bw-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; margin: 6px 0 20px; }
.bw-filters select { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.bw-avgs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.bw-avgs:has(> :nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bw-avg { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 2px; min-width: 0; }
.bw-avg.main { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.bw-avg-l { font: 600 .74rem var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bw-avg b { font-family: var(--display); font-size: 2.3rem; line-height: 1.1; color: var(--ink); }
.bw-avg.main b { color: var(--red); }
.bw-avg b.none { color: var(--muted); }
.bw-avg-s { font-size: .8rem; color: var(--muted); }
.bw-avg-note { margin: 10px 0 18px; }
.bw-highs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 10px; }
.bw-highs > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; background: var(--surface); }
.bw-highs span { font: 600 .72rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bw-highs b { font-family: var(--display); font-size: 1.6rem; }
.bw-highs small { color: var(--muted); font-size: .78rem; }
.bw-trend { margin: 18px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 6px; }
.bw-trend figcaption { font: 600 .74rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.bw-trend svg { width: 100%; height: auto; display: block; }
.bw-trend .g { stroke: var(--line); stroke-width: 1; }
.bw-trend text { fill: var(--muted); font: 11px var(--body); }
.bw-trend path { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; }
.bw-trend circle { fill: var(--surface); stroke: var(--red); stroke-width: 2.5; }
.bw-sess { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.bw-sess > header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bw-series { color: var(--muted); font-size: .9rem; }
.bw-series b { color: var(--ink); }
.bw-sess ul { list-style: none; margin: 0; padding: 0; }
.bw-sess li + li { border-top: 1px solid var(--line); }
.bw-sess summary { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; list-style: none; flex-wrap: wrap; min-height: 44px; }
.bw-sess summary::-webkit-details-marker { display: none; }
.bw-sess summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.bw-sess details[open] summary::after { content: '▴'; }
.bw-sess .g { color: var(--muted); font-size: .9rem; min-width: 64px; }
.bw-sess .sc { font-family: var(--display); font-size: 1.35rem; min-width: 44px; }
.tag { display: inline-block; font: 600 .66rem var(--label); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); vertical-align: middle; }
.tag.lt { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.bw-g-more { padding: 4px 16px 14px; }
.bw-g-act { display: flex; gap: 8px; margin-top: 10px; }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }

/* score sheet + keypad */
.bw-sheet { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)) minmax(0, 1.45fr); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--surface); }
.bw-fr { display: grid; grid-template-rows: auto auto 1fr; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink); padding: 0; font: inherit; min-height: 78px; min-width: 0; cursor: pointer; text-align: center; }
.bw-fr:first-child { border-left: 0; }
.bw-fr .n { font: 600 .66rem var(--label); color: var(--muted); padding: 3px 0 1px; border-bottom: 1px solid var(--line); }
.bw-fr .balls { display: flex; justify-content: flex-end; }
.bw-fr .balls i { font-style: normal; width: 50%; height: 26px; line-height: 26px; font-weight: 700; font-size: .95rem; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bw-fr .balls i:first-child { border-left: 0; }
.bw-fr.tenth .balls i { width: 33.34%; }
.bw-fr .balls i.x { color: var(--red); }
.bw-fr .t { font-family: var(--display); font-size: 1.15rem; display: grid; place-items: center; padding: 4px 0; }
.bw-fr.cur { background: color-mix(in srgb, var(--red) 9%, transparent); box-shadow: inset 0 -3px 0 var(--red); }
.bw-sheet.mini { margin: 6px 0; }
.bw-sheet.mini .bw-fr { min-height: 58px; cursor: default; }
.bw-sheet.mini .bw-fr .t { font-size: .95rem; }
.bw-score-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 12px 2px; flex-wrap: wrap; }
.bw-score-line b { font-family: var(--display); font-size: 2rem; color: var(--red); }
.bw-score-line small { color: var(--muted); }
#bw-pad-hint { color: var(--muted); }
.bw-pad { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.bw-pad button { min-height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1.3rem var(--body); cursor: pointer; touch-action: manipulation; }
.bw-pad button:active:not(:disabled) { transform: scale(.96); }
.bw-pad button:disabled { opacity: .3; cursor: default; }
.bw-pad .k-x, .bw-pad .k-s { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bw-pad .k-x { background: var(--red); border-color: var(--red); color: #fff; }
.bw-pad .k-u { font-size: .85rem; font-family: var(--label); text-transform: uppercase; letter-spacing: .06em; grid-column: span 3; }
.bw-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: var(--surface); gap: 4px; flex-wrap: wrap; }
.bw-modes button { border: 0; background: none; padding: 9px 16px; border-radius: 999px; font: 600 .82rem var(--label); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); cursor: pointer; min-height: 40px; }
.bw-modes button.on { background: var(--ink); color: var(--bg); }
.bw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bw-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bw-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.bw-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.bw-save-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lt-box { border: 1px dashed var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 12px; }
.lt-box h3 { margin: 0; }
.lt-box ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.lt-box textarea { font-family: ui-monospace, Menlo, Consolas, monospace !important; }
.lt-game { margin-top: 8px; }
.bw-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.bw-pill input { position: absolute; opacity: 0; pointer-events: none; }
.bw-pill span { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; min-height: 44px; box-sizing: border-box; }
.bw-pill input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bw-pill input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.bw-vis { display: grid; gap: 10px; }
.bw-opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.bw-opt input { width: 20px; height: 20px; accent-color: var(--red); margin-top: 2px; flex: none; }
.bw-opt span { display: grid; gap: 2px; }
.bw-opt small { color: var(--muted); }
.bw-opt:has(input:checked) { border-color: var(--red); }
.bw-drill { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 12px; }
.bw-drill[open] { display: grid; }
.bw-drill summary { cursor: pointer; font-weight: 700; }
.bw-drill > * + * { margin-top: 12px; }
#bp-share .share-link { display: flex; gap: 8px; margin: 10px 0; }
#bp-share .share-link input { flex: 1 1 0; min-width: 0; font: inherit; font-size: .9rem; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }

/* arsenal */
.ball-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-bottom: 10px; }
.ball-card.retired { opacity: .65; }
.ball-ic { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff8 0 8%, transparent 9%), radial-gradient(circle at 40% 38%, color-mix(in srgb, var(--red) 70%, #fff) 0, var(--red) 45%, #3a0710 100%); position: relative; }
.ball-ic::after { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #0008; top: 14px; left: 22px; box-shadow: 8px 2px 0 #0008, 4px 12px 0 1px #0008; }
.ball-main h3 { margin: 0 0 4px; font-size: 1.1rem; }
.ball-main p { margin: 2px 0; }
.ball-act { display: flex; flex-direction: column; gap: 6px; }

/* profile view + directory */
.bv-owner { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 20px; background: var(--surface); }
.bv-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.bv-facts > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); display: grid; gap: 2px; min-width: 0; }
.bv-facts span { font: 600 .72rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bv-facts b { font-size: 1.05rem; overflow-wrap: anywhere; }
.bv-bio { font-size: 1.05rem; max-width: 70ch; }
.bv-profile .acct-sub { margin-top: 30px; }
.bv-tabs { display: inline-flex; gap: 4px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.bv-tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 600 .8rem var(--label); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bv-tabs button.on { background: var(--ink); color: var(--bg); }
#bv-avgs .bw-highs { margin-top: 12px; }
.bv-recent { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bv-recent li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.bv-recent li + li { border-top: 1px solid var(--line); }
.bv-recent small { color: var(--muted); font-weight: 400; }
.bv-balls { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bv-balls .ball-card { grid-template-columns: 46px minmax(0, 1fr); margin: 0; }
.bv-search { max-width: 480px; margin-bottom: 16px; }
.bv-search .search { display: flex; }
.bv-search input { flex: 1; font: inherit; font-size: 1rem; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.bv-results { display: grid; gap: 8px; margin-bottom: 14px; }
.bv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.bv-row:hover { border-color: var(--red); }
.bv-row .muted { grid-column: 1; font-size: .88rem; }
.bv-row-avg { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--display); font-size: 1.5rem; color: var(--red); text-align: right; }
.bv-row-avg small { display: block; font: .72rem var(--body); color: var(--muted); }
.auth-msg.info { border-color: var(--line); }

@media (max-width: 980px) {
  .bw-avgs, .bw-avgs:has(> :nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bv-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bw-avgs, .bw-avgs:has(> :nth-child(6)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bw-avg { padding: 12px; }
  .bw-avg.main { grid-column: 1 / -1; }
  .bw-avg b { font-size: 1.9rem; }
  .bw-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bw-grid, .bw-grid.two { grid-template-columns: minmax(0, 1fr); }
  .bv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bv-facts > div:last-child { grid-column: 1 / -1; }
  .bw-sheet { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bw-fr.tenth { grid-column: span 1; }
  .bw-fr:nth-child(6) { border-left: 0; }
  .bw-fr:nth-child(n+6) { border-top: 1px solid var(--line); }
  .bw-pad { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
  .bw-pad .k-u { grid-column: span 2; }
  .bw-pad button { min-height: 56px; }
  .bw-modes { display: flex; }
  .bw-modes button { flex: 1 1 auto; padding: 9px 10px; }
  .ball-card { grid-template-columns: 40px minmax(0, 1fr); }
  .ball-ic { width: 40px; height: 40px; }
  .ball-act { grid-column: 1 / -1; flex-direction: row; }
}
.auth-wrap[data-auth-page^="bowl-"] > * { max-width: none; }
.auth-wrap[data-auth-page="bowl-add"] #game-form { max-width: 860px; }
.auth-wrap[data-auth-page="bowl-add"] .bw-pad { max-width: 620px; }
.mnav-acct { display: none; }
@media (max-width: 760px) {
  .auth-bar [data-logout], .auth-bar .auth-invite { display: none; }
  .mnav-acct:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 14px; }
  .mnav-acct a { display: block; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
  .mnav-acct .btn { min-height: 46px; }
}
@media (max-width: 760px) { header > .wrap { display: flex !important; align-items: center; } }
/* splits: red circle around the pin count */
.bw-fr .balls i.sp { display: grid; place-items: center; }
.bw-fr .balls i.sp b { display: inline-grid; place-items: center; width: 1.55em; height: 1.55em; border: 2px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 800; line-height: 1; box-sizing: border-box; }
.bw-sheet.mini .bw-fr .balls i.sp b { width: 1.45em; height: 1.45em; border-width: 1.5px; }
.bw-pad .k-sp { grid-column: span 2; font: 700 .9rem var(--label); text-transform: uppercase; letter-spacing: .06em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.bw-pad .k-sp .sp-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--red); border-radius: 50%; color: var(--red); font: 800 .95rem var(--body); letter-spacing: 0; }
.bw-pad .k-sp.on { background: var(--red); border-color: var(--red); color: #fff; }
.bw-pad .k-sp.on .sp-ic { border-color: #fff; color: #fff; }
.bw-pad .k-u { grid-column: span 2; }
@media (max-width: 760px) { .bw-pad .k-sp { grid-column: span 2; } .bw-pad .k-u { grid-column: span 1; } }
.bw-fr .balls i.sp b { width: min(1.55em, calc(100% - 3px)); height: auto; aspect-ratio: 1 / 1; }
/* series tools */
.bw-sess > header { align-items: center; }
.bw-sess-act { flex-basis: 100%; display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: .88rem; }
.linkish { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.linkish:hover { color: var(--red); }
.bw-sess-panel { padding: 14px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--red) 4%, var(--surface)); }
.bw-sess-form { gap: 14px; }
.bw-sess-form h3 { margin: 0; }
.bw-sess-form select, .bw-sess-form input[type=text] { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box; }
@media (max-width: 760px) { .bw-sess-act { font-size: .95rem; gap: 4px 16px; } }
/* fixing a single frame */
.bw-fr.edit { background: color-mix(in srgb, var(--red) 14%, transparent); box-shadow: inset 0 0 0 3px var(--red); }
.bw-fix { margin-top: 12px; border: 2px solid var(--red); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--red) 5%, var(--surface)); display: grid; gap: 10px; }
.bw-fix-t { display: grid; gap: 2px; }
.bw-fix-t span { color: var(--muted); font-size: .92rem; }
.bw-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bw-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .9rem var(--body); cursor: pointer; }
.bw-chip .sp-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 800; }
.bw-chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.bw-chip.on .sp-ic { border-color: #fff; color: #fff; }
.bw-fix-act { display: flex; gap: 8px; }
/* no-tap */
.tag.nt { background: color-mix(in srgb, #d97706 18%, transparent); color: #9a5200; }
html[data-theme="dark"] .tag.nt { color: #fbbf24; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .tag.nt { color: #fbbf24; } }
.bw-notap { margin-top: 14px; border: 1px dashed color-mix(in srgb, #d97706 60%, var(--line)); border-radius: 16px; padding: 12px 14px; display: grid; gap: 10px; }
.bw-notap-h { display: grid; gap: 2px; }
.bw-notap .bw-highs { margin: 0; }
.bw-nt-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #d97706 12%, var(--surface)); font-size: .92rem; }
/* bulk edit */
.bw-games-head { flex-wrap: wrap; gap: 10px; }
.bw-games-head #bw-select { margin-left: auto; }
.bw-sess li.bk-on { display: flex; align-items: flex-start; }
.bw-sess li.bk-on > details { flex: 1; min-width: 0; }
.bk-pick, .bk-sess { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.bk-pick { padding-left: 6px; }
.bk-pick input, .bk-sess input { width: 22px; height: 22px; accent-color: var(--red); }
.bk-sess { vertical-align: middle; margin: -10px 4px -10px -10px; }
.bw-sess li.picked { background: color-mix(in srgb, var(--red) 7%, transparent); }
.bk-bar { position: sticky; bottom: 12px; z-index: 40; margin-top: 14px; }
.bk-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px #0004; }
.bk-in select, .bk-in input { font: inherit; padding: 9px 12px; border-radius: 10px; border: 0; background: var(--surface); color: var(--ink); min-width: 0; max-width: 100%; }
.bk-in .bk-val { flex: 1 1 200px; display: flex; min-width: 0; }
.bk-in .bk-val > * { flex: 1; }
.bk-in .linkish { color: var(--bg); }
.bk-in .btn.ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 50%, transparent); }
.bk-in .btn:disabled { opacity: .45; }
.bk-n { flex: 1 1 100%; }
@media (max-width: 760px) {
  .bk-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .bk-in { gap: 8px; }
  .bk-in #bk-field { flex: 1 1 100%; }
}
/* bags */
.ar-bags { margin-bottom: 14px; }
.ar-bag-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-bag-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .9rem var(--body); cursor: pointer; }
.ar-bag-tabs button span:not(.bag-ic) { color: var(--muted); font-weight: 400; }
.ar-bag-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ar-bag-tabs button[aria-selected="true"] span:not(.bag-ic) { color: inherit; opacity: .8; }
.ar-bag-tabs .ar-bag-manage { border-style: dashed; }
.bag-ic { display: inline-block; width: 14px; height: 11px; border: 2px solid currentColor; border-radius: 3px 3px 4px 4px; position: relative; top: 1px; }
.bag-ic::before { content: ''; position: absolute; left: 2px; right: 2px; top: -5px; height: 4px; border: 2px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }
.ball-bags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px !important; }
.bag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); font-size: .8rem; font-weight: 600; }
.ar-manage { margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface); display: grid; gap: 10px; }
.ar-manage h3 { margin: 0; }
.ar-manage ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ar-manage li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ar-manage li input, .ar-newbag input { flex: 1 1 160px; font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-width: 0; }
.ar-manage li b { flex: 1; }
.ar-newbag { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-checks .bw-pill span { padding: 8px 14px; min-height: 40px; }
@media (max-width: 760px) {
  .bk-in { padding: 10px; gap: 6px; border-radius: 14px; }
  .bk-n { font-size: .9rem; }
  .bk-in #bk-field { flex: 1 1 38%; }
  .bk-in .bk-val { flex: 1 1 55%; }
  .bk-in select, .bk-in input { padding: 8px 10px; font-size: 16px; }
  .bk-in .btn { padding: 9px 16px; min-height: 40px; font-size: .8rem; }
  .bk-in .linkish { margin-left: auto; }
}
/* ball switches */
.bw-switch { display: grid; gap: 8px; }
.bw-switch:empty { display: none; }
.bw-sw-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bw-sw-row select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.bw-sw-row select[data-sw-b] { flex: 1 1 180px; min-width: 0; }
.bw-sw-l { font-size: .9rem; color: var(--muted); }
.bw-sw-x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
#g-switch .linkish { justify-self: start; }
.bw-fr.sw { box-shadow: inset 3px 0 0 #2563eb; }
.bw-fr.sw .n::before { content: '⇄ '; color: #2563eb; }
.bw-fr.sw.cur { box-shadow: inset 3px 0 0 #2563eb, inset 0 -3px 0 var(--red); }

/* ---------- Games ---------- */
.dev-banner { display: grid; gap: 4px; padding: 14px 18px; margin-bottom: 22px; border-radius: 14px; border: 1px solid #d97706; background: color-mix(in srgb, #d97706 12%, var(--surface)); }
.dev-banner b { font-family: var(--label); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; color: #9a5200; }
html[data-theme="dark"] .dev-banner b { color: #fbbf24; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .dev-banner b { color: #fbbf24; } }
.dev-banner a { color: inherit; font-weight: 700; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 18px; }
.game-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .12s ease, border-color .12s ease; }
.game-card:hover { transform: translateY(-3px); border-color: var(--red); }
.game-art { height: 170px; display: flex; align-items: center; justify-content: center; gap: 10px; background: repeating-linear-gradient(90deg, #cf9e5b 0 8px, #d7a866 8px 16px); }
.game-art.g-lane { background: #0e1a2b; }
.game-art .g-lane-art { width: 70px; height: 140px; background: repeating-linear-gradient(90deg, #cf9e5b 0 4px, #d7a866 4px 8px); border-radius: 4px; position: relative; box-shadow: 0 0 0 6px #1b2433; }
.game-art .g-lane-art::after { content: ""; position: absolute; left: 20px; bottom: 6px; width: 30px; height: 120px; border-right: 3px solid #f5a524; border-radius: 0 0 0 100%; }
.game-body { padding: 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.game-body h2 { margin: 0; }
.game-body p { margin: 0; color: var(--muted); }
.game-body .tag { justify-self: start; background: color-mix(in srgb, #d97706 18%, transparent); color: #9a5200; }
.game-body .btn { justify-self: start; margin-top: 6px; }

.game-art .ball-art { position: relative; border-radius: 50%; flex: none; box-shadow: inset -6px -8px 14px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.35); background-size: cover; background-position: center; }
.game-art .ball-art .hole { position: absolute; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #000 55%, #2a2a2a); }
/* 13 menu items (Games added): keep them on one row */
@media (min-width: 981px) {
  header nav { font-size: .72rem; letter-spacing: .03em; column-gap: 11px; }
}
@media (min-width: 981px) and (max-width: 1180px) {
  header nav { font-size: .64rem; letter-spacing: .015em; column-gap: 7px; }
}

/* ---------- weekly averages ---------- */
.chg { font-weight: 700; white-space: nowrap; color: var(--ink); }
.chg.up { color: #15803d; }
.chg.down { color: #dc2626; }
.chg.same { color: var(--ink); }
.chg.none { color: var(--muted); font-weight: 600; }
html[data-theme="dark"] .chg.up { color: #4ade80; } html[data-theme="dark"] .chg.down { color: #f87171; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .chg.up { color: #4ade80; } html:not([data-theme="light"]) .chg.down { color: #f87171; } }
.wk { margin: 22px 0 8px; border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: var(--surface); display: grid; gap: 14px; }
.wk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wk-head .acct-sub { margin: 0; }
.wk-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wk-nav select { flex: 1 1 220px; min-width: 0; font: inherit; font-weight: 600; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.wk-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.wk-btn:disabled { opacity: .35; cursor: default; }
.wk-pos { color: var(--muted); font-size: .85rem; }
.wk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wk-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; background: var(--bg); min-width: 0; }
.wk-l { font: 600 .72rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wk-big { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; }
.wk-box small { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.wk-chg { display: grid; gap: 2px; font-size: 1.25rem; padding: 2px 0; }
.wk-all summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.wk-tbl-wrap { overflow-x: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; }
.wk-tbl { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.wk-tbl th, .wk-tbl td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wk-tbl th:first-child { text-align: left; }
.wk-tbl thead th { font: 600 .7rem var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.wk-tbl tr.on { background: color-mix(in srgb, var(--red) 7%, transparent); }
.wk-tbl tbody tr:last-child th, .wk-tbl tbody tr:last-child td { border-bottom: 0; }
.wk-tbl .linkish { min-height: 0; padding: 0; }
@media (max-width: 980px) { .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .wk { padding: 12px; } .wk-grid { gap: 8px; } .wk-box { padding: 10px; } .wk-big { font-size: 1.6rem; } .wk-chg { font-size: 1.05rem; } .wk-pos { flex-basis: 100%; text-align: center; } }

/* ---------- help / FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq-toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.faq-toc a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.faq-sec { margin-bottom: 30px; scroll-margin-top: 90px; }
.faq-sec h2 { margin: 0 0 12px; }
.faq-q { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 8px; }
.faq-q summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; box-sizing: border-box; }
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary::after { content: '+'; color: var(--red); font-size: 1.3rem; line-height: 1; }
.faq-q[open] summary::after { content: '−'; }
.faq-a { padding: 0 16px 14px; }
.faq-a p, .faq-a ul { margin: 0 0 10px; }
.faq-a li { margin-bottom: 6px; }
.wk { grid-template-columns: minmax(0, 1fr); }
.wk > *, .wk-all { min-width: 0; }
/* game entry settings */
.bw-settings { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.set-leagues { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.set-leagues li:not(.muted) { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.set-leagues .bw-sw-x { width: 32px; height: 32px; margin: 0; }
.set-add { display: flex; gap: 8px; flex-wrap: wrap; }
.set-add input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.bw-sanc-why { margin: -4px 0 0 30px; font-size: .9rem; color: var(--muted); }
.bw-sanc-why .linkish { font-size: .9rem; color: var(--ink); }
.bb-tbl th[scope=row] { white-space: normal; min-width: 9em; }
.bb-tbl th[scope=row] .tag { display: table; margin-top: 4px; }

/* ---------- live scoring (Bowling now) ---------- */
.bw-when { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bw-when button { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; min-height: 56px; }
.bw-when button small { color: var(--muted); font-size: .8rem; }
.bw-when button.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.bw-live-bar { display: none; }
body.bw-live .bw-live-bar { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); }
body.bw-live .bw-live-bar .linkish { color: var(--bg); }
#bw-live-sum { flex: 1 1 auto; min-width: 0; }
.bw-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); flex: none; }
body.bw-live .bw-details:not(.open) { display: none; }
body.bw-live .bw-tabs, body.bw-live .bw-modes, body.bw-live #bw-mode-frames > p.muted, body.bw-live label[for=g-notes],
body.bw-live .bw-save-row, body.bw-live .tabbar, body.bw-live body > footer, body.bw-live .auth-head, body.bw-live footer { display: none !important; }
body.bw-live { padding-bottom: 0 !important; }
.bw-live-save, .bw-live-note { display: none; }
body.bw-live .bw-live-save:not([hidden]) { display: block; width: 100%; margin-top: 10px; min-height: 58px; font-size: 1.05rem; }
body.bw-live .bw-live-note { display: block; margin: 10px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
body.bw-live #bw-pad-hint { font-weight: 600; color: var(--ink); }
.bw-resume { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
@media (max-width: 760px) {
  body.bw-live .bw-pad { position: sticky; bottom: 0; z-index: 30; background: var(--bg); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); margin: 0 -2px; }
  body.bw-live .bw-pad button { min-height: 62px; font-size: 1.45rem; }
  body.bw-live .bw-fr { min-height: 70px; }
  .bw-when button { padding: 10px 12px; }
}
/* ---------- score.html (home-screen shortcut) ---------- */
.score-wrap .wrap { max-width: 560px; }
.score-head { margin-bottom: 16px; }
.score-head h1 { margin: 4px 0 0; }
.score-pick { display: grid; gap: 12px; }
.score-go { display: grid; gap: 4px; padding: 22px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.score-go b { font-size: 1.35rem; font-family: var(--display); }
.score-go small { color: var(--muted); font-size: .95rem; }
.score-go.live { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.score-go.live small { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.score-go.resume { background: var(--red); color: #fff; border-color: var(--red); margin-bottom: 12px; }
.score-go.resume small { color: #fffc; }
.score-links { text-align: center; margin: 16px 0 24px; }
.score-install { border: 1px dashed var(--line); border-radius: 18px; padding: 16px 18px; }
.score-install h2 { margin: 0 0 6px; font-size: 1.2rem; }
.score-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.score-steps h3 { margin: 6px 0; font-size: 1rem; }
.score-steps ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: .93rem; }
@media (max-width: 560px) { .score-steps { grid-template-columns: 1fr; } }
@media (max-width: 760px) { body.bw-live .bw-pad .k-u, body.bw-live .bw-pad .k-sp { font-size: .85rem; letter-spacing: .04em; } }
.game-art.g-ttt { background: #0e1a2b; }
.g-ttt-grid { display: grid; grid-template-columns: repeat(3, 38px); gap: 5px; padding: 6px; border-radius: 10px; background: repeating-linear-gradient(90deg, #c9934f 0 6px, #d6a462 6px 12px); }
.g-ttt-grid i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: rgba(255,248,235,.9); font: 900 1.5rem/1 var(--body); font-style: normal; }
.g-ttt-grid i.x { color: #d62b20; }
.g-ttt-grid i.s { color: #14213a; }
.game-art.g-mj { background: #0e1a2b; gap: 0; }
.g-mj .mj { position: relative; width: 62px; height: 80px; border-radius: 8px; background: #fbf6ea; box-shadow: 3px 3px 0 #cdbd98, 5px 5px 0 #a8946b, 0 8px 14px rgba(0,0,0,.4); display: grid; grid-template-columns: repeat(4, 9px); gap: 3px; justify-content: center; align-content: start; padding-top: 14px; }
.g-mj .mj.t1 { transform: rotate(-8deg) translateY(6px); margin-right: -10px; }
.g-mj .mj.t2 { z-index: 1; }
.g-mj .mj.t3 { transform: rotate(8deg) translateY(6px); margin-left: -10px; }
.g-mj .mj i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #d6c7a4; box-sizing: border-box; }
.g-mj .t1 i:first-child, .g-mj .t1 i:last-child, .g-mj .t2 i:first-child, .g-mj .t2 i:last-child, .g-mj .t3 i { background: #14213a; border-color: #14213a; }
.g-mj .t3 i { background: #b3261e; border-color: #b3261e; }
.g-mj .mj b { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font: 800 11px/1 system-ui, sans-serif; color: #14213a; }
/* new game card art */
.game-art.g-df, .game-art.g-tv, .game-art.g-si, .game-art.g-pt, .game-art.g-pp, .game-art.g-pm, .game-art.g-ws { background: #0e1a2b; }
.g-df-grid { display: grid; grid-template-columns: repeat(5, 30px); gap: 5px; }
.g-df-grid i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; font: 900 16px/1 system-ui, sans-serif; font-style: normal; color: #fff; background: #3a4656; }
.g-df-grid i.y { background: #d79a14; } .g-df-grid i.g { background: #2f9e5b; }
.g-tv { gap: 18px; }
.g-tv .g-q { width: 74px; height: 74px; border-radius: 50%; background: #f5a524; color: #1b1200; display: grid; place-items: center; font: 900 46px/1 system-ui, sans-serif; }
.g-tv .g-opts { display: grid; gap: 8px; }
.g-tv .g-opts i { width: 110px; height: 22px; border-radius: 7px; border: 2px solid rgba(255,255,255,.3); }
.g-tv .g-opts i.r { border-color: #3ccf7a; background: rgba(60,207,122,.3); }
.g-si-sheet { display: grid; grid-template-columns: repeat(4, 52px); background: #f7f1e3; border-radius: 8px; overflow: hidden; }
.g-si-sheet i { font-style: normal; border-left: 1px solid #c9bfa8; display: grid; color: #14213a; }
.g-si-sheet i:first-child { border-left: 0; }
.g-si-sheet b { font: 800 13px/22px system-ui, sans-serif; text-align: right; padding-right: 6px; border-bottom: 1px solid #c9bfa8; }
.g-si-sheet em { font: 900 18px/34px system-ui, sans-serif; font-style: normal; text-align: center; }
.g-si-sheet i:last-child em { color: #b3261e; background: #fff3cf; }
.g-pt-lane { position: relative; width: 74px; height: 140px; background: repeating-linear-gradient(90deg, #cf9e5b 0 4px, #d7a866 4px 8px); border-radius: 4px; box-shadow: 0 0 0 6px #5d6878; }
.g-pt-arrow { position: absolute; left: 44px; bottom: 6px; width: 5px; height: 96px; background: #ffcf3a; transform: rotate(-9deg); transform-origin: bottom; border-radius: 3px; }
.g-pt-arrow::before { content: ""; position: absolute; top: -10px; left: -6px; border: 8px solid transparent; border-bottom: 12px solid #ffcf3a; border-top: 0; }
.g-pt-meter { position: absolute; right: -40px; bottom: 0; width: 16px; height: 120px; border-radius: 4px; background: linear-gradient(0deg, #3ccf7a, #ffcf3a 60%, #ff6b5e); clip-path: inset(30% 0 0 0); }
.g-pp-rack { display: grid; grid-template-columns: repeat(7, 16px); grid-template-areas: "a . b . c . d" ". e . f . g ." ". . h . i . ." ". . . j . . ."; gap: 6px 2px; }
.g-pp-rack i { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px #c62a20; }
.g-pp-rack i.r { background: #e0483c; box-shadow: inset 0 0 0 3px #e0483c, inset 0 0 0 5px #fff; }
.g-pp-rack i:nth-child(1){grid-area:j}.g-pp-rack i:nth-child(2){grid-area:h}.g-pp-rack i:nth-child(3){grid-area:i}.g-pp-rack i:nth-child(4){grid-area:e}.g-pp-rack i:nth-child(5){grid-area:f}.g-pp-rack i:nth-child(6){grid-area:g}.g-pp-rack i:nth-child(7){grid-area:a}.g-pp-rack i:nth-child(8){grid-area:b}.g-pp-rack i:nth-child(9){grid-area:c}.g-pp-rack i:nth-child(10){grid-area:d}
.g-pm { gap: 10px; }
.g-pm-c { width: 50px; height: 68px; border-radius: 8px; border: 3px solid #f5a524; background: repeating-linear-gradient(90deg, #c9924d 0 5px, #d9a35c 5px 10px); display: grid; place-items: center; font-size: 28px; }
.g-pm-c.up { background: #f7f1e3; }
.g-ws-grid { display: grid; grid-template-columns: repeat(5, 26px); gap: 2px; background: #f7f1e3; padding: 6px; border-radius: 8px; }
.g-ws-grid i { width: 26px; height: 26px; display: grid; place-items: center; font: 800 14px/1 system-ui, sans-serif; font-style: normal; color: #14213a; border-radius: 50%; }
.g-ws-grid i.f { background: rgba(245,165,36,.6); }
.game-art.g-pf { background: #0e1a2b; }
.g-pf-grid { display: grid; grid-template-columns: repeat(6, 30px); gap: 4px; padding: 6px; background: #f7f1e3; border-radius: 8px; }
.g-pf-grid i { width: 30px; height: 30px; border-radius: 6px; background: #fffdf6; position: relative; }
.g-pf-grid i.b::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6fa0ff, #14307a 70%); }
.g-pf-grid i.p::after { content: ""; position: absolute; left: 10px; right: 10px; top: 3px; bottom: 3px; border-radius: 45% 45% 35% 35% / 30% 30% 60% 60%; background: #fff; box-shadow: 0 0 0 1.5px #14213a, inset 0 6px 0 -3px #fff, inset 0 7px 0 -2px #c62a20; }
.game-art.g-kp { background: #0e1a2b; }
.g-kp-grid { display: grid; grid-template-columns: repeat(5, 26px); border: 3px solid #14213a; border-radius: 6px; overflow: hidden; }
.g-kp-grid i { width: 26px; height: 26px; position: relative; box-shadow: inset 0 0 0 .5px rgba(20,33,58,.3); }
.g-kp-grid i.p::after { content: ""; position: absolute; left: 8px; right: 8px; top: 3px; bottom: 3px; border-radius: 45% 45% 35% 35% / 30% 30% 60% 60%; background: #fff; box-shadow: 0 0 0 1.5px #14213a, inset 0 6px 0 -3px #fff, inset 0 7px 0 -2px #c62a20; }
