/* Same design language as the other HSA apps (their src/Styles.html). */
:root {
  /* colours */
  --navy: #1a3a7a; --navy-dark: #122a5c; --orange: #d9772e; --green: #2e8540; --red: #9b1c1c;
  --bg-soft: #f4f6fb; --border: #dde3ef; --text: #2a2f3a; --text-soft: #5b6272; --muted: #7a8091;
  --tint-ok: #e9f6ec; --tint-warn: #fff8ee; --tint-bad: #fdecec; --tint-note: #fff3cd;
  /* layout */
  --page-width: 1000px; --tip-width: 260px; --gutter: 44px; --gutter-phone: 16px;
  /* shape */
  --radius-s: 6px; --radius: 10px; --radius-l: 14px; --pill: 999px;
  --shadow-card: 0 4px 24px rgba(20, 40, 90, .08); --shadow-soft: 0 1px 4px rgba(20, 40, 90, .05);
  --shadow-bar: 0 -4px 16px rgba(20, 40, 90, .10); --focus-ring: 0 0 0 2px #fde3cc;
  /* type: xs = fine print, s = tables and hints, m = body, l = emphasis; headings and the one big number */
  --text-2xs: 11px; --text-xs: 12.5px; --text-s: 13.5px; --text-m: 14.5px; --text-l: 16px; --h1: 24px; --h2: 19px; --h3: 16px; --kpi: 28px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #eef1f7; color: var(--text); font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1.55; }
a { color: var(--navy); }
.page { max-width: var(--page-width); margin: 32px auto 64px; background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-card); overflow: clip; }
/* overflow: clip (not hidden) keeps the rounded card AND lets the tab bar and the bottom bar stay sticky */
.page.wide { max-width: var(--page-width); }  /* one width for every page (2026-10-16) */
header.masthead { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; padding: 28px 40px 24px; display: flex; align-items: center; gap: 22px; }
header.masthead img.logo { width: 70px; height: 70px; border-radius: 50%; background: #fff; padding: 3px; flex-shrink: 0; }
.eyebrow { font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-bottom: 4px; }
header.masthead h1 { margin: 0; font-size: var(--h1); line-height: 1.3; }
header.masthead .subtitle { margin-top: 4px; font-size: var(--text-m); opacity: .9; }
header.masthead form { display: inline; }
.content { padding: 28px 44px 20px; }
footer { background: var(--bg-soft); padding: 20px 44px 24px; font-size: var(--text-xs); color: var(--muted); border-top: 1px solid var(--border); text-align: center; }
footer .org { color: var(--navy-dark); font-weight: 600; font-size: var(--text-s); margin-bottom: 4px; }

.callout { border-radius: var(--radius); padding: 14px 18px; font-size: var(--text-m); margin: 16px 0; border: 1px solid var(--border); }
.callout.note { background: var(--bg-soft); border-left: 4px solid var(--navy); }
.callout.tip { background: var(--tint-warn); border-left: 4px solid var(--orange); }
.callout.error { background: var(--tint-bad); border-left: 4px solid var(--red); }
.callout.ok { background: var(--tint-ok); border-left: 4px solid var(--green); }
.callout .label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; font-weight: 700; }
.muted { color: var(--muted); font-size: var(--text-s); }
.small { font-size: var(--text-s); }
h2 { color: var(--navy-dark); font-size: var(--h2); margin: 26px 0 6px; }
h3 { color: var(--navy-dark); font-size: var(--text-l); margin: 18px 0 6px; }

button, .button { font: inherit; border: 0; border-radius: var(--radius-s); padding: 10px 18px; cursor: pointer; display: inline-block; text-decoration: none; }
.primary { background: var(--navy); color: #fff; font-weight: 600; }
.primary.big { padding: 13px 26px; font-size: var(--text-l); }
.secondary { background: var(--bg-soft); color: var(--navy-dark); font-weight: 600; border: 1px solid var(--border); }
.danger { background: var(--red); color: #fff; font-weight: 600; }
.link-button { background: none; color: var(--navy); padding: 0; font-weight: 600; text-decoration: underline; }
.on-dark { color: #fff; }
button:disabled { opacity: .55; cursor: default; }
input[type=email], input[type=text], input[type=tel], input[type=number], input[type=url], textarea, select {
  font: inherit; font-size: var(--text-l); padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-s); width: 100%; background: #fff; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.row > input { flex: 1; min-width: 220px; width: auto; }
.row > .field.wide { flex: 1 1 100%; }
label.field { display: block; margin: 10px 0; font-weight: 600; font-size: var(--text-m); }
label.field span.hint { font-weight: 400; color: var(--muted); }
label.field input, label.field textarea { margin-top: 4px; font-weight: 400; }

/* children and clubs */
.child { border: 1px solid var(--border); border-radius: var(--radius-l); margin: 22px 0; overflow: hidden; }
.child > .head { background: var(--bg-soft); padding: 12px 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.child > .head h2 { margin: 0; font-size: var(--h2); }
.child > .body { padding: 6px 18px 14px; }
.badge { font-size: var(--text-xs); font-weight: 600; padding: 2px 9px; border-radius: var(--radius); background: var(--bg-soft); color: var(--text-soft); white-space: nowrap; }
.badge.grade { background: #e6ecf8; color: var(--navy-dark); }
.badge.ok { background: #dff3e4; color: var(--green); }
.badge.warn { background: #fdebd9; color: #9a4f12; }
.badge.bad { background: #fde2e1; color: var(--red); }
.badge.new { background: var(--orange); color: #fff; }
fieldset.day { border: 0; padding: 0; margin: 14px 0 6px; }
fieldset.day legend { font-weight: 700; color: var(--navy-dark); font-size: var(--text-l); padding: 0; margin-bottom: 6px; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 6px 0; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--orange); }
.choice input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--orange); }
.choice.selected { border-color: var(--orange); background: var(--tint-warn); box-shadow: var(--focus-ring); }
.choice.none { color: var(--muted); padding: 7px 12px; }
.choice .name { font-weight: 700; }
.choice .meta { font-size: var(--text-s); color: var(--text-soft); }
.choice .desc { font-size: var(--text-s); margin-top: 2px; }
.choice .right { margin-left: auto; text-align: right; white-space: nowrap; font-size: var(--text-s); }
.status-line { border-radius: var(--radius); padding: 10px 12px; margin: 6px 0; font-size: var(--text-m); }
.status-line.paid { background: var(--tint-ok); }
.status-line.waitlist { background: var(--bg-soft); }
.status-line.offered { background: var(--tint-note); }
.status-line.hold { background: var(--bg-soft); }
.status-line.gone { background: var(--tint-bad); }
.status-line form { display: inline; }

/* bottom bar */
.bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); box-shadow: var(--shadow-bar);
       padding: 12px 44px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; z-index: 3; }
.bar .what { flex: 1; min-width: 180px; font-size: var(--text-m); }

/* review */
table.lines { width: 100%; border-collapse: collapse; font-size: var(--text-m); }
table.lines td, table.lines th { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.lines td.money, table.lines th.money { text-align: right; white-space: nowrap; }
table.lines tr.total td { font-weight: 700; border-bottom: 0; }
tr.full td { background: var(--tint-bad); }
.waiver { white-space: pre-line; font-size: var(--text-s); background: var(--bg-soft); border-radius: var(--radius-s); padding: 10px 12px; max-height: 220px; overflow: auto; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { border: 1px solid var(--border); border-radius: var(--pill); padding: 6px 14px; cursor: pointer; }
.pills input { accent-color: var(--orange); }
.busy { opacity: .6; pointer-events: none; }

@media (max-width: 640px) {
  .page { margin: 0; border-radius: 0; }
  header.masthead { padding: 20px 18px 18px; gap: 14px; }
  header.masthead img.logo { width: 52px; height: 52px; }
  header.masthead h1 { font-size: var(--h1); }
  .content { padding: 18px 16px 10px; }
  .bar { padding: 10px 16px; }
  .choice { flex-wrap: wrap; }
  .choice .right { margin-left: 30px; text-align: left; }
  footer { padding: 16px 18px 20px; }
}
@media print {
  .bar, footer, .no-print, header.masthead form { display: none !important; }
  .page { box-shadow: none; margin: 0; max-width: none; }
}
.inline { display: inline; }

/* control center */
nav.tabs { display: flex; gap: 2px; flex-wrap: wrap; padding: 0 36px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
nav.tabs a { padding: 13px 9px; font-size: var(--text-m); color: var(--text-soft); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
nav.tabs a.active { color: var(--navy-dark); border-bottom-color: var(--orange); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.tile { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile .value { font-size: var(--kpi); font-weight: 700; }
.tile .label { font-size: var(--text-s); color: var(--text-soft); }
table.grid { width: 100%; border-collapse: collapse; font-size: var(--text-s); margin: 8px 0 16px; }
table.grid th { text-align: left; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--border); }
table.grid td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.grid .money { text-align: right; white-space: nowrap; }
table.grid tr.total td { font-weight: 700; }
table.grid td.keep { white-space: nowrap; }
.closed-row td { color: #a3a9b6; }
.failed-row td { background: var(--tint-bad); }
.ok-text { color: var(--green); }
.bad-text { color: var(--red); }
code { background: var(--bg-soft); padding: 1px 5px; border-radius: var(--radius-s); }
@media print { nav.tabs { display: none; } table.roster { font-size: var(--text-xs); } }

/* one tab per child (family page); without JavaScript every child shows one below the other */
.child-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 18px -4px 0; padding: 8px 4px 0; position: sticky; top: 0; z-index: 2;
              background: #fff; scrollbar-width: none; }
.child-tab { flex: 0 0 auto; text-align: left; background: var(--bg-soft); border: 1px solid var(--border); border-bottom: 0;
             border-radius: var(--radius) var(--radius) 0 0; padding: 10px 16px; color: var(--navy-dark);
             transition: background .2s ease, box-shadow .2s ease, border-color .2s ease, transform .15s ease; }
.child-tab:hover { transform: translateY(-1px); }
.child-tab:focus-visible { outline: 3px solid #fde3cc; outline-offset: 1px; }
.child-tab .tab-name { display: block; font-weight: 700; font-size: var(--text-l); }
.child-tab .tab-meta { display: block; font-size: var(--text-xs); color: var(--text-soft); }
.child-tab[aria-selected="true"] { background: #fff; border-color: var(--orange); box-shadow: inset 0 3px 0 var(--orange); }
.child-tab .tab-count.has { color: var(--green); font-weight: 600; }
form.tabbed section.child { display: none; margin-top: 0; border-top-left-radius: 0; }
form.tabbed section.child.active { display: block; animation: panel-in .22s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { form.tabbed section.child.active { animation: none; } .child-tab { transition: none; } }

/* weekdays fold open and closed (native <details>: works without JavaScript) */
details.day { border: 1px solid var(--border); border-left: 5px solid var(--day, var(--navy)); border-radius: var(--radius); margin: 16px 0;
               background: #fff; interpolate-size: allow-keywords; box-shadow: var(--shadow-soft); }
/* Mon -> Fri: the HSA navy, a step lighter each day (edge and arrow only; names stay navy for contrast) */
details.day.day-mon { --day: #122a5c; } details.day.day-tue { --day: #1f4488; } details.day.day-wed { --day: #2f62b3; }
details.day.day-thu { --day: #4a82d1; } details.day.day-fri { --day: #74a6e6; }
details.day[open] > summary { background: var(--bg-soft); border-bottom: 1px solid var(--border); border-radius: var(--radius-s) var(--radius) 0 0; }
details.day[open] .day-body { padding-top: 6px; }
details.day > summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; flex-wrap: wrap; align-items: baseline;
                        gap: 4px 12px; border-radius: var(--radius); }
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::before { content: "▸"; color: var(--day, var(--orange)); font-size: var(--text-s); transition: transform .2s ease; width: 10px; }
details.day[open] > summary::before { transform: rotate(90deg); }
details.day > summary:hover { background: var(--bg-soft); }
details.day .day-name { font-weight: 700; color: var(--navy-dark); font-size: var(--text-l); }
details.day .day-meta { color: var(--muted); font-size: var(--text-s); }
details.day .day-choice { margin-left: auto; font-size: var(--text-s); font-weight: 600; color: var(--text-soft); }
details.day .day-choice.picked { color: var(--orange); }
details.day .day-body { padding: 0 12px 10px; }
details.day::details-content { transition: height .22s ease, content-visibility .22s allow-discrete; height: 0; overflow: clip; }
details.day[open]::details-content { height: auto; }
.day-tools { text-align: right; margin: 8px 0 0; font-size: var(--text-s); }
.next-child { text-align: right; margin: 14px 0 4px; }

/* club descriptions: two lines, then More / Less (JavaScript adds .clamped; without it the full text shows) */
.choice .desc.clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { background: none; border: 0; padding: 2px 0 0; font: inherit; font-size: var(--text-s); font-weight: 600; color: var(--navy);
             text-decoration: underline; cursor: pointer; }

/* review page form rows: label on its own line, then the answer, then an optional hint */
.form-row { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.form-row:last-child { margin-bottom: 4px; }
.form-label { display: block; font-weight: 600; font-size: var(--text-m); color: var(--text); margin: 0 0 6px; padding: 0; }
.form-hint { font-size: var(--text-s); color: var(--muted); margin-top: 6px; line-height: 1.45; }
.form-hint-top { margin: -2px 0 10px; }
.readonly-value { padding: 9px 11px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-s); font-size: var(--text-l); }
.choice-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-pills label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius);
                      padding: 11px 14px; cursor: pointer; font-weight: 600; background: #fff; transition: border-color .15s ease, background .15s ease; }
.choice-pills label:hover { border-color: var(--orange); }
.choice-pills label:has(input:checked) { border-color: var(--orange); background: var(--tint-warn); box-shadow: var(--focus-ring); }
.choice-pills input { accent-color: var(--orange); width: 17px; height: 17px; margin: 0; }
section.child > .body { padding-top: 14px; }

/* the Books */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.toolbar .quick-search { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.toolbar .quick-search input { flex: 1; width: auto; }
.mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--pill); overflow: hidden; }
.mode-switch a { padding: 7px 16px; font-weight: 600; font-size: var(--text-s); color: var(--text-soft); text-decoration: none; }
.mode-switch a.on { background: var(--navy); color: #fff; }
.status-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 7px 14px; border-radius: var(--pill); font-size: var(--text-s); font-weight: 600; text-decoration: none; }
.chip small { font-weight: 400; opacity: .8; }
.chip.ok { background: var(--tint-ok); color: var(--green); }
.chip.warn { background: var(--tint-note); color: #7a5200; }
.chip.bad { background: var(--tint-bad); color: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0 0 22px; }
.kpi { background: linear-gradient(160deg, #122a5c, #1b3d82); color: #fff; border-radius: var(--radius-l); padding: 16px 18px; }
.kpi .label { font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.kpi .value { font-size: var(--kpi); font-weight: 700; margin: 4px 0 2px; }
.kpi .value.ok-text { color: #9fe3b0; } .kpi .value.bad-text { color: #ffb4b4; }
.kpi .hint { font-size: var(--text-xs); opacity: .8; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 8px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-l); padding: 6px 18px 16px; }
.panel h2 { font-size: var(--text-l); margin: 12px 0 6px; }
.panel h2 .muted { font-weight: 400; font-size: var(--text-s); }
table.grid.compact { margin: 6px 0 10px; }
table.grid.compact td { padding: 6px 6px; }
.in { color: var(--green); } .out { color: var(--red); }
table.register td a { color: var(--navy-dark); text-decoration: none; font-weight: 500; }
table.register td a:hover { text-decoration: underline; }
.filters-fold { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; margin: 0 0 14px; }
.filters-fold summary { font-weight: 600; color: var(--navy-dark); cursor: pointer; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; align-items: end; }
.filters-grid label { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs); color: var(--text-soft); font-weight: 600; }
.filters-grid select, .filters-grid input { width: 100%; min-width: 0; }
.filters-grid .actions { display: flex; gap: 8px; }
table.grid td.actions { white-space: nowrap; }
table.grid td.actions a { font-weight: 600; text-decoration: none; }
table.grid td.actions a:hover { text-decoration: underline; }

/* file inputs look like the other buttons */
input[type="file"] { font-size: var(--text-m); color: var(--muted); }
input[type="file"]::file-selector-button { background: var(--bg-soft); color: var(--navy-dark); font-weight: 600; border: 1px solid var(--border);
  border-radius: var(--radius-s); padding: 9px 16px; margin-right: 10px; font: inherit; font-weight: 600; cursor: pointer; }

/* receipt shown inside the site: the email's navy header card becomes a light heading (the masthead is already navy) */
.receipt-page .receipt { max-width: none; font-size: var(--text-m); }
.receipt-page .receipt table { font-size: var(--text-m); }
.receipt-page .receipt .r-head { background: none; color: var(--text); border-radius: 0; border-bottom: 2px solid var(--navy-dark); }
.receipt-page .receipt .r-head td { padding: 4px 0 12px; }
.receipt-page .receipt .r-org { color: var(--muted); opacity: 1; }
.receipt-page .receipt .r-title { color: var(--navy-dark); font-size: var(--h1); }
.receipt-page .receipt .r-meta { color: var(--text-soft); }
.receipt-page .receipt .r-head-logo img { background: none; padding: 0; border-radius: 0; width: 64px; }
.receipt-page .receipt .r-test { border-radius: 0 0 var(--radius-s) var(--radius-s); }

.callout .body { margin-top: 8px; }

.filters select, .filters input { width: auto; min-width: 160px; }  /* the Money pages' filter row */

/* page head: title + one-line lead on the left, mode switch and actions on the right (every Books page) */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin: 2px 0 14px; }
.page-head h2 { margin: 0; font-size: var(--h1); }
.page-head h2 .muted { font-weight: 400; font-size: var(--text-m); }
.page-head .lead { margin: 4px 0 0; max-width: 60ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.page-actions .quick-search { display: flex; gap: 6px; }
.page-actions .quick-search input { width: 260px; font-size: var(--text-m); padding: 7px 10px; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.subnav a { padding: 6px 13px; border-radius: var(--pill); font-size: var(--text-s); font-weight: 600; color: var(--text-soft); background: var(--bg-soft); text-decoration: none; }
.subnav a.on { background: var(--navy); color: #fff; }
.button.small, button.small { padding: 5px 11px; font-size: var(--text-s); }
.filters-grid { font-size: var(--text-s); }
.filters-grid label { font-size: var(--text-xs); }
.filters-grid select, .filters-grid input { font-size: var(--text-s); padding: 6px 9px; }
.filters-fold summary { font-size: var(--text-m); }
.back { font-size: var(--text-s); margin: 0 0 8px; }

/* tooltip: data-tip="..." on any element; shows at once on hover or keyboard focus (tabindex="0"), also on tap */
[data-tip] { position: relative; cursor: help; }
th[data-tip] { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: var(--tip-width);
  background: var(--navy-dark); color: #fff; font-size: var(--text-xs); font-weight: 400; line-height: 1.4; letter-spacing: normal;
  text-transform: none; text-align: left; white-space: normal; padding: 7px 10px; border-radius: var(--radius-s); box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transition: opacity .12s ease; pointer-events: none; }
[data-tip]:hover::after, [data-tip]:focus::after, [data-tip]:focus-within::after { opacity: 1; visibility: visible; }
.money[data-tip]::after, [data-tip].tip-left::after { left: auto; right: 0; }
.info { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: var(--pill);
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); font-size: var(--text-xs); font-weight: 700;
  vertical-align: middle; margin-left: 4px; }
.page-head h2 .info { font-size: var(--text-xs); }
/* filter panel: always visible, compact */
.filters-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0 0 14px; background: var(--bg-soft); }
.filters-panel .filters-grid { margin-top: 0; }
@media print { [data-tip]::after { display: none; } }
.kpi.tile-link { text-decoration: none; display: block; transition: transform .12s ease; }
.kpi.tile-link:hover { transform: translateY(-2px); }

/* yearbook photo page */
.yb-progress { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 14px; }
.bar-track { height: 8px; background: var(--bg-soft); border-radius: var(--pill); margin: 8px 0; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); width: 0; transition: width .3s ease; }
.yb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 8px; }
.yb-cat { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.yb-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.yb-photo { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.yb-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); background: var(--bg-soft); }
.yb-photo input { font-size: var(--text-s); padding: 5px 8px; }
.yb-photo input.saved { border-color: var(--green); }
.yb-nothumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px;
  background: var(--bg-soft); border-radius: var(--radius-s); color: var(--muted); font-size: var(--text-xs); }
.yb-add { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--border); border-radius: var(--radius-s);
  color: var(--navy); font-weight: 600; cursor: pointer; font-size: var(--text-s); }
.yb-add:hover { border-color: var(--orange); }
.yb-add input { display: none; }
.yb-status { min-height: 1.2em; margin-top: 6px; }
.yb-review { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.yb-card { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.yb-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-s); background: var(--bg-soft); }
.yb-review-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.yb-review-form input { flex: 1 1 100%; font-size: var(--text-s); padding: 5px 8px; }
.small-input, .row > input.small-input { flex: 0 0 140px; width: 140px; min-width: 0; font-size: var(--text-s); padding: 6px 9px; }
/* yearbook photo tiles: warnings wrap inside their own photo (they were one long line across the next photo) */
.yb-photo { min-width: 0; }
.yb-photo label { display: flex; flex-direction: column; gap: 3px; font-size: var(--text-xs); color: var(--text-soft); }
.yb-photo input { width: 100%; min-width: 0; }
.yb-photo .link-button { font-size: var(--text-xs); font-weight: 600; }
.yb-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yb-add { aspect-ratio: auto; min-height: 110px; }
.yb-photo img, .yb-nothumb { aspect-ratio: 4 / 3; }
/* a photo's warning: one short line; the full sentence is the tooltip (tap or hover) */
.yb-chip { display: block; font-size: var(--text-2xs); font-weight: 500; line-height: 1.4; padding: 1px 6px; border-radius: var(--radius-s);
  background: var(--tint-warn); color: #8a5a00; }
.yb-chip > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yb-chip.bad { background: var(--tint-bad); color: var(--red); }
.yb-chip[data-tip]::after { white-space: normal; }
.person-link { color: inherit; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.person-link:hover { color: var(--navy); }
