/* MJB party site: the one design kit. Brand: docs/BRAND.md (AB3 "Scoreboard").
   Navy field, white sheets for reading and forms, red the only hot color, blue links,
   softball yellow on navy only. Every component is shown in every state in web/kit.html (a builder's page: it is NOT uploaded with web/party). */

@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;600;700&family=Roboto+Slab:wght@800;900&display=swap");

/* ---------- 1. Tokens ---------- */
:root {
  --navy: #14315A;     /* main field */
  --navy2: #0F2647;    /* deeper panels */
  --navy3: #1D4479;    /* raised cards on navy */
  --red: #BA1B2B;      /* the only hot color */
  --red-ink: #A3141F;  /* red text on white (AA) */
  --red-tint: #FBE6E8;
  --red-on-navy: #FF9BA4; /* red text on navy, readable */
  --blue: #2272BA;     /* links, the stripe */
  --blue-ink: #1B5E9C;
  --blue-tint: #E4EEF8;
  --ball: #D7E83A;     /* softball yellow: ON NAVY ONLY */
  --white: #FFFFFF;
  --mist: #C7D6E8;     /* secondary text on navy */
  --ok: #1E7B4F;       /* status only: signed, paid */
  --ok-tint: #E2F2E9;

  --ink: #14315A;      /* text on white */
  --ink-soft: #4A5F80; /* secondary text on white */
  --line: #D3DDEA;
  --line-strong: #A9BBD2;
  --fill: #F3F6FA;     /* quiet fill inside sheets */

  --display: "Roboto Slab", Rockwell, Georgia, serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-xs: 14px; --t-sm: 15px; --t-md: 17px; --t-lg: 20px; --t-xl: 25px;
  --t-2xl: clamp(28px, 7vw, 36px);
  --t-3xl: clamp(34px, 9.5vw, 56px);

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --gap: 16px;
  --tap: 48px;
  --focus: var(--ball);
  color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--navy); color: var(--white);
  font-family: var(--body); font-size: var(--t-md); line-height: 1.55;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-3xl); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: var(--t-2xl); font-weight: 900; }
h3 { font-size: var(--t-lg); font-weight: 800; }
h4 { font-size: var(--t-md); font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.25em; }
a { color: var(--mist); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--white); }
.sheet a:not(.btn), .notice a:not(.btn), .table-wrap a:not(.btn) { color: var(--blue-ink); }
.sheet a:not(.btn):hover, .notice a:not(.btn):hover, .table-wrap a:not(.btn):hover { color: var(--blue); }
strong, b { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lede { font-size: var(--t-lg); color: var(--mist); max-width: 34em; }
.fine { font-size: var(--t-sm); color: var(--mist); }
.sheet .lede, .sheet .fine, .ticket .fine, .todo .fine { color: var(--ink-soft); }
.hi { color: var(--ball); } /* one key phrase or number on navy, never inside a sheet */

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sheet, .notice, .table-wrap, .toast-wrap { --focus: var(--blue); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--white); color: var(--ink); padding: 12px 16px; border-radius: var(--r-sm); z-index: 50; font-weight: 700; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1120px; }
main { flex: 1 0 auto; padding: 24px 0 48px; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.actions { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 560px) { .actions { flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* ---------- 4. Header, footer, the stripe ---------- */
.site-head { background: var(--navy2); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; min-height: var(--tap); }
.brand:hover { color: var(--white); }
.logo-chip { background: var(--white); border-radius: var(--r-md); padding: 5px 8px; display: inline-flex; flex: none; }
.logo-chip img { height: 40px; width: auto; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--body); font-weight: 600; font-size: 12px; color: var(--mist); }
.site-head .btn { white-space: nowrap; flex: none; }
.head-link { color: var(--white); font-weight: 700; font-size: var(--t-sm); min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 4px; white-space: nowrap; }
@media (max-width: 380px) { .brand-name small { display: none; } }

.site-foot { background: var(--navy2); color: var(--mist); font-size: var(--t-sm); }
.site-foot .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 6px; }
.site-foot a { color: var(--white); display: inline-flex; align-items: center; min-height: var(--tap); }
.site-foot a > span { margin-left: .28em; } /* inline-flex drops the space before a bound number */

/* The one flourish: red 34, white 6, blue 34, white 6. Once per page. */
.stripe {
  height: 14px; flex: none;
  background: repeating-linear-gradient(90deg,
    var(--red) 0 34px, var(--white) 34px 40px, var(--blue) 40px 74px, var(--white) 74px 80px);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* ---------- 5. Sheets and cards ---------- */
.sheet { background: var(--white); color: var(--ink); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.sheet h2 { font-size: var(--t-xl); }
.sheet-quiet { background: var(--fill); }
.card { background: var(--navy3); color: var(--white); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card .fine { color: var(--mist); }
.section-head { display: flex; flex-direction: column; gap: 6px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

/* ---------- 6. Buttons ---------- */
.btn {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: var(--r-md);
  font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.2;
  text-decoration: none; text-align: center; border: 2px solid transparent;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: var(--white); box-shadow: inset 0 -3px 0 rgba(0,0,0,.22); }
.btn-primary:hover { background: #A3141F; color: var(--white); }
.btn-secondary { background: transparent; color: var(--white); border-color: var(--white); }
.btn-secondary:hover { background: rgba(255,255,255,.1); color: var(--white); }
.sheet .btn-secondary, .notice .btn-secondary, .table-wrap .btn-secondary, .ticket .btn-secondary { color: var(--ink); border-color: var(--ink); }
.sheet .btn-secondary:hover, .notice .btn-secondary:hover, .table-wrap .btn-secondary:hover, .ticket .btn-secondary:hover { background: var(--fill); color: var(--ink); }
.btn-text { background: none; border: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; font-family: var(--body); font-weight: 700; font-size: var(--t-md); padding: 8px 4px; min-height: var(--tap); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: var(--tap); padding: 8px 14px; font-size: 15px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 7. Step bar (3 booking steps), drawn like a line score ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.steps .cell {
  display: flex; align-items: center; justify-content: center; height: 44px; border-radius: var(--r-sm);
  background: var(--navy2); color: var(--mist); font-family: var(--display); font-weight: 900; font-size: 20px;
  border: 2px solid var(--navy3); text-decoration: none;
}
.steps .cell::before { content: counter(step); }
.steps .label { font-size: 13px; font-weight: 600; color: var(--mist); text-align: center; line-height: 1.2; }
.steps .is-done .cell { background: var(--navy3); color: var(--white); }
.steps .is-done .cell::before { content: "\2713"; }
.steps a.cell:hover { border-color: var(--mist); }
.steps .is-current .cell { background: var(--navy2); color: var(--ball); border-color: var(--ball); }
.steps .is-current .label { color: var(--white); font-weight: 700; }

/* ---------- 8. Package tier cards ---------- */
.tiers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.tier { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 16px 16px; border-radius: var(--r-md);
  background: var(--navy3); color: var(--white); border: 3px solid transparent; cursor: pointer; min-width: 0; }
.tier input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tier-name { font-family: var(--display); font-weight: 800; font-size: 22px; }
.tier-price { font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1; color: var(--ball); font-variant-numeric: tabular-nums; }
.tier-price small { font-family: var(--body); font-size: var(--t-sm); font-weight: 600; color: var(--mist); }
.tier-soft { font-size: var(--t-sm); color: var(--mist); }
.tier ul { font-size: 15px; display: flex; flex-direction: column; gap: 4px; padding-left: 1.1em; }
.tier ul li::marker { color: var(--red-on-navy); }
.tier-plus { font-size: var(--t-sm); font-weight: 700; color: var(--mist); }
.tier-pick { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: var(--t-sm); color: var(--mist); }
.tier-pick::before { content: "Pick "; }
.tier:hover { border-color: var(--mist); }
.tier:focus-within { outline: 3px solid var(--ball); outline-offset: 2px; }
.tier.is-selected, .tier:has(input:checked) { border-color: var(--red); background: var(--navy2); }
.tier.is-selected .tier-pick, .tier:has(input:checked) .tier-pick { color: var(--white); }
.tier.is-selected .tier-pick::before, .tier:has(input:checked) .tier-pick::before { content: "\2713  Picked: "; }
.tier.is-selected::after, .tier:has(input:checked)::after { content: ""; position: absolute; inset: -3px -3px auto auto; width: 0; height: 0;
  border-top: 28px solid var(--red); border-left: 28px solid transparent; border-top-right-radius: var(--r-md); }
.tier.is-off { opacity: .5; cursor: not-allowed; }

/* ---------- 9. Choice rows: slots and extras (inside a .sheet) ---------- */
.choices { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choices legend { font-family: var(--display); font-weight: 800; font-size: var(--t-lg); padding: 0; margin-bottom: 8px; }
.day-head { font-family: var(--display); font-weight: 800; font-size: var(--t-md); margin-top: 8px; }

.slot, .check {
  position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--white); color: var(--ink); border: 2px solid var(--line); cursor: pointer;
}
.slot input, .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot .mark, .check .mark { width: 24px; height: 24px; border: 2px solid var(--line-strong); background: var(--white); display: grid; place-items: center; }
.slot .mark { border-radius: 50%; }
.check .mark { border-radius: 5px; }
.slot-time, .check-name { font-weight: 700; }
.slot-sub, .check-note { display: block; font-size: var(--t-sm); color: var(--ink-soft); font-weight: 400; }
.slot-price, .check-price { font-family: var(--display); font-weight: 800; font-size: var(--t-lg); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.slot-price s { font-family: var(--body); font-weight: 400; font-size: var(--t-sm); color: var(--ink-soft); margin-right: 4px; }
.slot:hover, .check:hover { border-color: var(--line-strong); }
.slot:focus-within, .check:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }

.slot.is-selected, .slot:has(input:checked),
.check.is-selected, .check:has(input:checked) { border-color: var(--red); box-shadow: inset 6px 0 0 var(--red); }
.slot.is-selected .mark, .slot:has(input:checked) .mark { border-color: var(--red); }
.slot.is-selected .mark::after, .slot:has(input:checked) .mark::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.check.is-selected .mark, .check:has(input:checked) .mark { background: var(--red); border-color: var(--red); }
.check.is-selected .mark::after, .check:has(input:checked) .mark::after { content: ""; width: 7px; height: 12px; border: solid var(--white); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }

.slot.is-soft .slot-price { color: var(--blue-ink); }
.slot.is-taken, .slot:has(input:disabled), .check.is-off, .check:has(input:disabled) {
  background: var(--fill); border-style: dashed; cursor: not-allowed; color: var(--ink-soft);
}
.slot.is-taken .slot-price, .check.is-off .check-price { font-family: var(--body); font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); }
.slot.is-taken .mark, .check.is-off .mark { background: transparent; border-style: dashed; }
.check-reason { display: block; font-size: var(--t-sm); color: var(--ink); font-weight: 600; }

/* ---------- 10. Kid stepper ---------- */
.stepper { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r-md); }
.stepper-label { font-weight: 700; }
.stepper-label small { display: block; font-weight: 400; color: var(--ink-soft); font-size: var(--t-sm); }
.stepper-ctrl { display: flex; align-items: center; gap: 4px; }
.stepper-ctrl button {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  font-family: var(--display); font-weight: 900; font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.stepper-ctrl button:hover { background: var(--fill); }
.stepper-ctrl button:disabled { opacity: .35; cursor: not-allowed; }
.stepper-ctrl output { min-width: 2.4ch; text-align: center; font-family: var(--display); font-weight: 900; font-size: 30px; font-variant-numeric: tabular-nums; }
.stepper-note { grid-column: 1 / -1; font-size: var(--t-sm); color: var(--ink-soft); }

/* ---------- 11. Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 700; font-size: 15px; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  -webkit-appearance: none; appearance: none; width: 100%; min-height: var(--tap);
  font: inherit; font-size: 16px; /* 16px stops phone zoom */ color: var(--ink); background: var(--white);
  border: 2px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 18px center, right 12px center; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--blue); outline: 3px solid rgba(34,114,186,.35); outline-offset: 0; }
.field .hint { font-size: var(--t-sm); color: var(--ink-soft); }
.field-error { display: none; font-size: var(--t-sm); font-weight: 700; color: var(--red-ink); }
.field-error::before { content: "! "; }
.field.has-error .field-error, .field-error.is-shown { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea, [aria-invalid="true"] { border-color: var(--red) !important; background: var(--red-tint); }
.field-pair { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.agree { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 12px; align-items: start; padding: 12px 0; cursor: pointer; min-height: var(--tap); }
.agree input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--red); }
.agree.has-error span { color: var(--red-ink); }
.form-error { border-radius: var(--r-md); background: var(--red-tint); color: var(--red-ink); padding: 12px 14px; font-weight: 700; font-size: 15px; }

/* ---------- 12. Running summary: the scoreboard ---------- */
.summary { background: var(--navy2); color: var(--white); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--navy3); }
.summary h3 { font-size: var(--t-md); color: var(--mist); font-weight: 800; }
.sum-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--mist); }
.sum-line .num { color: var(--white); font-weight: 600; }
.sum-line.is-minus .num { color: var(--mist); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 2px solid var(--navy3); margin-top: 6px; padding-top: 10px; }
.sum-total span:first-child { font-family: var(--display); font-weight: 800; font-size: var(--t-lg); }
.sum-total .num { font-family: var(--display); font-weight: 900; font-size: 30px; }
.sum-board { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.sum-cell { background: var(--navy); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sum-cell span { font-size: var(--t-xs); color: var(--mist); font-weight: 600; }
.sum-cell .num { font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1.1; white-space: nowrap; }
.sum-cell.is-due .num { color: var(--ball); }
.sum-foot { font-size: var(--t-sm); color: var(--mist); margin-top: 6px; }

/* ---------- 13. Status chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; line-height: 1.5; white-space: nowrap; border: 1.5px solid transparent; vertical-align: middle; }
.chip-paid { background: var(--ok); color: var(--white); }
.chip-paid::before, .chip-signed::before { content: "\2713"; }
.chip-signed { background: var(--ok-tint); color: var(--ok); border-color: #A9D6BD; }
.chip-owed { background: var(--red-tint); color: var(--red-ink); border-color: #EDB3B9; }
.chip-missing { background: var(--red); color: var(--white); }
.chip-missing::before { content: "!"; }
.chip-locked { background: var(--navy2); color: var(--white); border-color: var(--mist); }
.chip-soft { background: var(--blue-tint); color: var(--blue-ink); }
.chip-plain { background: var(--fill); color: var(--ink); border-color: var(--line); }

/* ---------- 14. Progress meter (waivers) ---------- */
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; }
.meter-head .num { font-family: var(--display); font-weight: 900; font-size: var(--t-lg); }
.meter-track { height: 14px; border-radius: 999px; background: var(--fill); border: 1px solid var(--line); overflow: hidden; }
.meter-fill { height: 100%; width: var(--pct, 0%); background: var(--blue); border-radius: inherit; transition: width .4s ease; }
.meter.is-full .meter-fill { background: var(--ok); }
.meter-note { font-size: var(--t-sm); color: var(--ink-soft); }
.card .meter-track, .summary .meter-track { background: var(--navy2); border-color: var(--navy); }
.card .meter-fill, .summary .meter-fill { background: var(--ball); }
.card .meter-note { color: var(--mist); }

/* ---------- 15. Notice (policy text) ---------- */
.notice { background: var(--white); color: var(--ink); border-radius: var(--r-md); border-left: 6px solid var(--red); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.notice h3 { font-size: var(--t-md); }
.notice ol, .notice ul { display: flex; flex-direction: column; gap: 6px; }
.notice ol li::marker { font-family: var(--display); font-weight: 800; color: var(--red-ink); }
.notice-quiet { background: var(--fill); }
.notice-info { border-left-color: var(--blue); }

/* ---------- 16. Toast ---------- */
.toast-wrap { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; width: 100%; max-width: 480px; background: var(--navy2); color: var(--white); border-radius: var(--r-md); padding: 14px 16px;
  border-left: 6px solid var(--blue); box-shadow: 0 8px 24px rgba(5,15,35,.45); font-weight: 600; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  animation: toast-in .2s ease-out; }
.toast.is-error { border-left-color: var(--red); }
.toast.is-ok { border-left-color: var(--ball); }
.toast button { background: none; border: 0; color: var(--mist); font: inherit; font-weight: 700; min-height: 40px; min-width: 40px; cursor: pointer; }
.toast.is-leaving { opacity: 0; transition: opacity .2s; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 17. Full-page message state ---------- */
.state { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 32px 0; }
.state-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; background: var(--navy3); color: var(--white); border: 3px solid var(--mist); }
.state-error .state-mark { background: var(--red); border-color: var(--red); }
.state-taken .state-mark { color: var(--ball); border-color: var(--ball); background: var(--navy2); }
.state-expired .state-mark { color: var(--mist); }
.state-ok .state-mark { color: var(--navy); background: var(--ball); border-color: var(--ball); }
.state p { color: var(--mist); font-size: var(--t-lg); max-width: 32em; }
.state .sheet p { color: var(--ink-soft); font-size: var(--t-md); }

/* ---------- 18. Table (the desk) ---------- */
.table-wrap { background: var(--white); color: var(--ink); border-radius: var(--r-md); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table thead th { border-top: 0; background: var(--fill); font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.table td.num, .table th.num { text-align: right; }
.table tbody tr:hover { background: #F8FAFD; }
.table tr.is-flagged td:first-child { box-shadow: inset 5px 0 0 var(--red); }
.table a { font-weight: 700; }
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border-top: 1px solid var(--line); padding: 8px 0; }
  .table-stack tr:first-child { border-top: 0; }
  .table-stack td { border: 0; padding: 4px 14px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-stack td::before { content: attr(data-label); font-weight: 700; color: var(--ink-soft); text-align: left; white-space: nowrap; flex: none; }
  .table-stack td > b { flex: none; text-align: left; }
  .table-stack td.num { text-align: right; }
  .table-stack tr.is-flagged { box-shadow: inset 5px 0 0 var(--red); }
  .table-stack tr.is-flagged td:first-child { box-shadow: none; }
}

/* ---------- 21. Pay bar: price and "$50 today" pinned to the bottom of the booking screens ---------- */
.paybar { position: sticky; bottom: 0; z-index: 20; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--navy2); border-top: 3px solid var(--red); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  box-shadow: 0 -10px 24px rgba(5, 15, 35, .35); }
.paybar-what { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.paybar-what b { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--ball); font-variant-numeric: tabular-nums; white-space: nowrap; }
.paybar-what span { font-size: var(--t-sm); color: var(--mist); }
.paybar .btn { min-width: 132px; }
@media (min-width: 640px) { .paybar { margin: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; } }

/* ---------- 22. Package picker rows (booking screen 1) ---------- */
.pkgs { display: flex; flex-direction: column; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.pkg { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline;
  padding: 16px 18px; border-radius: var(--r-md); background: var(--navy3); border: 3px solid transparent; cursor: pointer; }
.pkg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pkg-name { font-family: var(--display); font-weight: 900; font-size: 23px; }
.pkg-price { font-family: var(--display); font-weight: 900; font-size: 28px; color: var(--ball); font-variant-numeric: tabular-nums; }
.pkg-line { grid-column: 1 / -1; color: var(--mist); font-size: var(--t-md); }
.pkg:focus-within { outline: 3px solid var(--ball); outline-offset: 2px; }
.pkg:has(input:checked), .pkg.is-selected { border-color: var(--red); background: var(--navy2); }
.pkg:has(input:checked) .pkg-name::before, .pkg.is-selected .pkg-name::before { content: "\2713\00a0"; color: var(--red-on-navy); }

/* ---------- 23. My Party home: the ticket and the do-it-later cards ---------- */
.ticket { background: var(--white); color: var(--ink); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.ticket-top { background: var(--red); color: var(--white); padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.ticket-top h1 { font-size: clamp(34px, 10vw, 52px); }
.ticket-top p { font-size: var(--t-lg); font-weight: 600; }
.ticket-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; border-top: 3px dashed var(--line-strong); }
.ticket-when { font-family: var(--display); font-weight: 900; font-size: var(--t-xl); line-height: 1.15; }
.ticket-where a { color: var(--blue-ink); }
.ticket-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ticket-money div { background: var(--fill); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; }
.ticket-money span { font-size: var(--t-sm); color: var(--ink-soft); font-weight: 600; }
.ticket-money b { font-family: var(--display); font-weight: 900; font-size: 26px; font-variant-numeric: tabular-nums; }

.todo { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.todo > li { background: var(--white); color: var(--ink); border-radius: var(--r-md); }
.todo-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; width: 100%;
  padding: 16px 18px; min-height: 64px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-md); }
.todo-head b { font-family: var(--display); font-weight: 800; font-size: var(--t-lg); }
.todo-head span { color: var(--ink-soft); grid-column: 1; }
.todo-head i { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-weight: 700; color: var(--blue-ink); }
.todo-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }

.invite { border: 2px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.invite h3 { font-size: var(--t-lg); }
.invite-for { color: var(--ink-soft); font-size: var(--t-sm); }
.invite-text { white-space: pre-wrap; background: var(--fill); border-radius: var(--r-sm); padding: 12px; font-size: var(--t-md); line-height: 1.6; overflow-wrap: anywhere; }
.btn-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.btn-row .btn { padding: 10px 8px; min-height: var(--tap); font-size: 16px; }

.picks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.picks h3 { margin-bottom: 6px; }
.picks ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.picks li a { display: inline-flex; min-height: 40px; align-items: center; font-weight: 700; }
.picks li span { color: var(--ink-soft); }
.tick-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tick-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
.tick-list li::before { content: ""; width: 20px; height: 20px; margin-top: 3px; border: 2px solid var(--line-strong); border-radius: 4px; }

/* ---------- 24. Media: muted looping clips with a poster fallback ---------- */
.media-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--navy3); aspect-ratio: 4 / 5; }
.media-hero video, .media-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-row { display: grid; grid-auto-flow: column; grid-auto-columns: min(72%, 320px); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.media-row > * { scroll-snap-align: start; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 5; background: var(--navy3); }
.media-row video, .media-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) { .media-hero { aspect-ratio: 4 / 3; } }

/* ---------- 19. Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 20. Print (day sheets, receipts) ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #14315A; font-size: 12pt; display: block; }
  .site-head { background: #fff; border-bottom: 2px solid #14315A; }
  .site-head .head-link, .no-print, .btn, .toast-wrap, .skip, .steps, .paybar, nav { display: none !important; }
  .brand, .brand-name small { color: #14315A; }
  .logo-chip { padding: 0; }
  main { padding: 12px 0; }
  .wrap { max-width: none; padding: 0; }
  .sheet, .card, .summary, .notice, .table-wrap { background: #fff !important; color: #14315A !important; border: 1px solid #A9BBD2; box-shadow: none; break-inside: avoid; }
  .card .fine, .summary .sum-line, .summary .sum-line .num, .summary h3, .sum-cell span, .lede, .fine, .hi, .tier-price, .sum-cell.is-due .num { color: #14315A !important; }
  .sum-cell { background: #fff; border: 1px solid #A9BBD2; }
  .table { font-size: 11pt; } .table thead th { background: #EEF2F7; }
  .table-stack thead { display: table-header-group; }
  .chip { border: 1px solid currentColor; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-foot { background: #fff; color: #14315A; }
  .print-page { break-after: page; }
  .print-page:last-child { break-after: auto; }
  a { color: #14315A; text-decoration: none; }
}

/* headings focused by script after a screen change: no ring (keyboard focus on controls keeps its ring) */
[tabindex="-1"]:focus { outline: none; }
