/* Light is the default — :root carries it so the page paints correctly
   even if theme.js fails to load. Dark applies only on explicit
   data-theme="dark" (set by theme.js based on the saved pref). */
:root,
html[data-theme="light"] {
    --bg: #f8f9fa;
    --bg-elev: #ffffff;
    --bg-soft: #eef0f4;
    --fg: #1a1f24;
    --fg-muted: #555e6c;
    --fg-dim: #98a1ad;
    --accent: #0070a3;
    --accent-fg: #ffffff;
    --accent-soft: rgba(0, 112, 163, 0.10);
    --border: #e3e7ed;
    --border-strong: #cbd2db;
    --danger: #c0282d;
    --danger-soft: rgba(192, 40, 45, 0.08);
    --warn: #c87a00;
    --ok: #1a9450;
    --shadow-strong: 0 6px 18px rgba(15, 24, 38, 0.08);
    --img-invert: 1;
}

html[data-theme="dark"] {
    --bg: #0b0d10;
    --bg-elev: #14181d;
    --bg-soft: #1a1f26;
    --fg: #f2f4f7;
    --fg-muted: #98a1ad;
    --fg-dim: #6b7480;
    --accent: #00b8d9;
    --accent-fg: #001216;
    --accent-soft: rgba(0, 184, 217, 0.15);
    --border: #1e242c;
    --border-strong: #2a323c;
    --danger: #e5484d;
    --danger-soft: rgba(229, 72, 77, 0.12);
    --warn: #f5a524;
    --ok: #22c55e;
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.35);
    --img-invert: 0;
}

:root {
    --nav-h: calc(64px + env(safe-area-inset-bottom));
    --top-safe: env(safe-area-inset-top);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* A11y: skip-to-main link — visible only when focused */
.skip-link {
    position: absolute;
    left: 8px;
    top: -40px;
    background: var(--accent);
    color: var(--accent-fg);
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    z-index: 500;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 8px;
    outline: 2px solid var(--accent-fg);
    outline-offset: 2px;
}

/* Focus rings — visible on keyboard nav, hidden on touch (matches platform) */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* The screen container gets focus on route change but shouldn't show a ring */
#screen:focus { outline: none; }
#screen:focus-visible { outline: none; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; min-height: 100dvh; }

#app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

.screen {
    flex: 1;
    padding: calc(var(--top-safe) + 16px) 16px calc(var(--nav-h) + 16px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

a { color: var(--accent); text-decoration: none; }
a:active { opacity: 0.6; }

.loading,
.placeholder {
    padding: 32px 0;
    text-align: center;
    color: var(--fg-muted);
}
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
}

/* ---------- Pull-to-refresh ---------- */
.ptr-indicator {
    position: fixed;
    top: 8px;
    left: 50%;
    margin-left: -22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-60px);
    opacity: 0;
    z-index: 300;
    pointer-events: none;
}
.ptr-arrow {
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
    transition: transform 0.18s ease;
    line-height: 1;
}
.ptr-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ptr-spin 0.9s linear infinite;
}
.ptr-indicator.refreshing .ptr-arrow { display: none; }
.ptr-indicator.refreshing .ptr-spinner { display: block; }
@keyframes ptr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- Skeleton (loading shimmer) ---------- */
@keyframes skel-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.skel-block { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.skel {
    background: linear-gradient(90deg,
        var(--bg-elev) 0%,
        var(--bg-soft) 50%,
        var(--bg-elev) 100%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s ease-in-out infinite;
    border-radius: 10px;
}
.skel-line { height: 18px; }
.skel-line.w-60 { width: 60%; }
.skel-card  { height: 76px; border-radius: 12px; }

/* ---------- Next-up card ---------- */
.next-up-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    border: 1px solid rgba(0,184,217,0.5);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    margin-bottom: 16px;
}
.next-up-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.next-up-title { font-weight: 700; font-size: 16px; }
.next-up-when  { color: var(--fg-muted); font-size: 13px; margin-top: 2px; }
.next-up-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.next-up-arrow { color: var(--accent); font-size: 22px; line-height: 1; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 100;
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    position: relative;
    transition: color 0.15s ease;
}
.nav-item.active { color: var(--accent); }
.nav-item:active { background: rgba(255,255,255,0.04); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label { letter-spacing: 0.2px; }
.nav-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 22px);
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Headings ---------- */
h1, h2, h3 { margin: 0 0 12px; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
.screen-sub { color: var(--fg-muted); margin: -6px 0 16px; }
.section { margin-top: 24px; }

/* ---------- Buttons ---------- */
button, .btn {
    appearance: none;
    background: var(--accent);
    color: var(--accent-fg);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    min-height: 48px;
    width: 100%;
    cursor: pointer;
    transition: transform 0.08s ease, opacity 0.15s ease;
    font-family: inherit;
}
button:active, .btn:active { transform: scale(0.98); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-secondary { background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border-strong); }
.btn-ghost { background: transparent; color: var(--fg-muted); border: 1px solid var(--border); margin-top: 8px; }
.btn.inline { display: inline-block; width: auto; padding: 10px 18px; min-height: auto; }

.link-btn {
    background: transparent;
    color: var(--accent);
    padding: 6px 8px;
    min-height: auto;
    width: auto;
    font-size: 14px;
    font-weight: 500;
}
.link-btn.danger { color: var(--danger); }

.back {
    display: inline-block;
    background: transparent;
    color: var(--fg-muted);
    padding: 4px 0;
    margin-bottom: 8px;
    width: auto;
    min-height: auto;
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Header / tabs ---------- */
.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
}
.screen-header h1 { margin: 0; }
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-elev);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid var(--border);
}
.tab {
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.tab.active { background: var(--accent-soft); color: var(--accent); }

/* ---------- Filters ---------- */
.filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.month-input,
input[type="date"],
input[type="month"] {
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 15px;
    width: 100%;
    font-family: inherit;
}
.chip-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto;
    background: var(--bg-elev);
    color: var(--fg-muted);
    border: 1px solid var(--border-strong);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    min-height: auto;
    width: auto;
}
.chip.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}
.chip.seats { padding: 3px 8px; font-size: 11px; }
.chip.seats.low { background: rgba(245,165,36,0.15); color: var(--warn); border-color: rgba(245,165,36,0.4); }
.chip.seats.soldout { background: var(--danger-soft); color: var(--danger); border-color: rgba(229,72,77,0.4); }
.chip.side { padding: 3px 8px; font-size: 11px; background: rgba(0,184,217,0.08); color: var(--accent); border-color: rgba(0,184,217,0.3); }
.chip.span { padding: 3px 8px; font-size: 11px; background: rgba(34,197,94,0.1); color: var(--ok); border-color: rgba(34,197,94,0.3); }

/* ---------- View segmented control ---------- */
.view-seg {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.view-seg .seg {
    flex: 1;
    background: transparent;
    color: var(--fg-muted);
    border: none;
    padding: 8px 0;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    width: auto;
    min-height: 36px;
}
.view-seg .seg.active {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---------- Week strip ---------- */
.week-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 16px;
}
.week-day {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 4px;
    text-align: center;
    color: var(--fg);
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 11px;
}
.week-day.empty { opacity: 0.5; }
.week-day.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.week-day .wd-dow { color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.week-day.active .wd-dow { color: var(--accent); }
.week-day .wd-num { font-size: 20px; font-weight: 700; line-height: 1.1; }
.week-day .wd-count { color: var(--fg-muted); font-size: 10px; line-height: 1.1; }
.week-day.active .wd-count { color: var(--accent); }
.week-day-header {
    color: var(--fg-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ---------- Month grid ---------- */
.month-grid {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 16px;
}
.month-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.month-row.month-head {
    margin-bottom: 4px;
}
.month-head .dow {
    text-align: center;
    font-size: 10px;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 0;
    font-weight: 600;
}
.month-cell {
    aspect-ratio: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--fg);
    min-height: 0;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 13px;
    position: relative;
}
.month-cell.blank { visibility: hidden; }
.month-cell.empty { color: var(--fg-dim); }
.month-cell:not(.empty):not(.blank):active { background: var(--bg-soft); }
.month-cell.today { border-color: var(--border-strong); }
.month-cell.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.mc-num { font-size: 14px; font-weight: 600; line-height: 1; }
.month-cell.empty .mc-num { font-weight: 400; }
.mc-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}
.month-cell.active .mc-dot { background: var(--fg); }
.month-hint { font-size: 13px; color: var(--fg-muted); }
.month-detail { margin-top: 4px; }
.month-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--fg-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 600;
}
.day-chip { align-self: flex-start; }

/* ---------- Day prev/next nav (list view) ---------- */
.day-nav {
    display: grid;
    grid-template-columns: 44px 1fr 44px auto;
    gap: 8px;
    align-items: center;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 16px;
}
.day-nav-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border-strong);
    font-size: 22px;
    line-height: 1;
}
.day-nav-btn.disabled, .day-nav-btn:disabled { opacity: 0.3; }
.day-nav-label { text-align: center; }
.day-nav-date { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.day-nav-count { color: var(--fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.day-all-btn { padding: 6px 8px; font-size: 12px; white-space: nowrap; }

/* ---------- Event banner ---------- */
.event-banner {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ---------- Day groups + session rows ---------- */
.day-group { margin-bottom: 24px; }
.day-header {
    position: sticky;
    top: 0;
    background: var(--bg);
    color: var(--fg);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    padding: 10px 0 8px;
    border-bottom: 1px solid var(--border-strong);
    z-index: 5;
}
.day-header .day-count {
    display: inline-block;
    margin-left: 8px;
    color: var(--fg-muted);
    font-size: 12px;
    font-weight: 500;
}
.day-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.session-row {
    display: grid;
    grid-template-columns: 56px 64px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}
.session-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--border-strong);
    background: var(--bg);
    box-sizing: border-box;
}
.session-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.session-thumb-fallback { display: flex; align-items: center; justify-content: center; }
.session-icon { display: flex; align-items: center; justify-content: center; }
.wave-badge {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.wave-badge img { display: block; filter: brightness(0) invert(1); }
/* Toast shadow uses the themed strong-shadow variable so the elevation
   reads correctly in both palettes. */
.toast { box-shadow: var(--shadow-strong); }
.session-row:active { background: var(--bg-soft); }
.session-time { color: var(--fg); font-size: 13px; }
.session-time .t-start { font-weight: 600; font-size: 15px; }
.session-time .t-end { color: var(--fg-dim); font-size: 12px; }
.session-label { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.session-sub { display: flex; gap: 4px; flex-wrap: wrap; }
.session-price { text-align: right; font-weight: 600; font-size: 15px; }

.price-was { color: var(--fg-dim); text-decoration: line-through; font-size: 12px; margin-right: 4px; }
.price-now { color: var(--fg); }

/* ---------- Detail page ---------- */
.detail-meta {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    margin: 12px 0 20px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k { color: var(--fg-muted); font-size: 13px; }
.detail-row .v { font-weight: 500; text-align: right; }

/* ---------- Forms ---------- */
.form,
.add-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}
/* MobileCoachUX-001: prominent coach affordance under add-to-cart (desktop parity) */
.coach-cta {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--accent);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
}
.coach-cta__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.coach-cta__icon { font-size: 24px; line-height: 1; }
.coach-cta__title { font-weight: 700; color: var(--fg); font-size: 15px; }
.coach-cta__sub { color: var(--fg-muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.coach-cta__btn { width: 100%; }
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field.inline {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
.field > span {
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 500;
}
.field input,
.field select {
    background: var(--bg-elev);
    color: var(--fg);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    width: 100%;
}
.field select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%), linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.checkbox { display: flex; gap: 8px; align-items: center; color: var(--fg-muted); font-size: 14px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

.form-msg {
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
}
.form-links {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

/* ---------- Card lists ---------- */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.card {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    color: var(--fg);
    min-height: auto;
    font-weight: 500;
}
.card:active { background: var(--bg-soft); }
.card-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.card-sub { color: var(--fg-muted); font-size: 13px; margin-bottom: 4px; }
.card-desc { color: var(--fg-muted); font-size: 13px; margin-top: 6px; line-height: 1.45; }
.link-card { text-decoration: none; }

.rental-list { display: flex; flex-direction: column; gap: 10px; }
.rental-card {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.rental-card:not(:has(.rental-thumb)) { grid-template-columns: 1fr auto; }
.rental-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
}
.rental-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rental-name { font-weight: 600; font-size: 15px; }
.rental-specs { color: var(--fg-muted); font-size: 12px; margin-top: 2px; text-transform: capitalize; }
.rental-brand { color: var(--fg-muted); font-size: 12px; margin-top: 2px; }
.rental-price { color: var(--fg); font-size: 13px; margin-top: 6px; font-weight: 500; }
.rental-filters { margin-bottom: 12px; }
.card-action {
    width: auto;
    min-width: 56px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    min-height: 40px;
}

/* ---------- Spa slots ---------- */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.slot-tile {
    display: flex;
    flex-direction: column;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    color: var(--fg);
    min-height: 64px;
}
.slot-tile.disabled { opacity: 0.4; }
.slot-time { font-weight: 600; font-size: 15px; }
.slot-meta { color: var(--fg-muted); font-size: 11px; margin-top: 2px; }

/* ---------- Cart ---------- */
.cart-timer {
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: center;
    color: var(--fg-muted);
    font-size: 13px;
    margin-bottom: 12px;
}
.cart-timer.warn { background: rgba(245,165,36,0.1); color: var(--warn); border-color: rgba(245,165,36,0.4); }
.cart-timer.expired { background: var(--danger-soft); color: var(--danger); border-color: rgba(229,72,77,0.4); }

.notif-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.notif {
    background: rgba(245,165,36,0.1);
    border: 1px solid rgba(245,165,36,0.35);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--warn);
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cart-item-title { font-weight: 600; font-size: 15px; }
.cart-item-sub { color: var(--fg-muted); font-size: 13px; }
.cart-item-price { color: var(--fg-muted); font-size: 13px; }
.cart-item-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.qty-btn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    background: var(--bg-soft);
    color: var(--fg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
}
.qty { min-width: 24px; text-align: center; font-weight: 600; }
.cart-totals { margin: 20px 0 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.cart-line { display: flex; justify-content: space-between; font-size: 16px; font-weight: 500; padding: 4px 0; }

/* ---------- Cart add-ons ---------- */
.addons-section { margin-top: 24px; }
.addon-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 12px;
}
.addon-tabs::-webkit-scrollbar { display: none; }
.addon-tab {
    flex: 0 0 auto;
    background: var(--bg-elev);
    color: var(--fg-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    width: auto;
    min-height: auto;
}
.addon-tab.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}
.addon-list { display: flex; flex-direction: column; gap: 8px; }
.addon-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.addon-name { font-weight: 600; font-size: 15px; }
.addon-desc { color: var(--fg-muted); font-size: 13px; margin-top: 2px; }
.addon-price { color: var(--fg-muted); font-size: 13px; margin-top: 4px; }
.addon-add {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-fg);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.addon-empty { padding: 18px 0; }

/* ---------- Profile / orders ---------- */
.profile-summary {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 12px;
}
.profile-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-sub { color: var(--fg-muted); font-size: 14px; }
.profile-credit { margin-top: 10px; color: var(--ok); font-weight: 600; }

.profile-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-bottom: 16px;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
    flex: 0 0 auto;
    background: var(--bg-elev);
    color: var(--fg-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    width: auto;
    min-height: auto;
}
.profile-tab.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

/* Itinerary */
.itin-list { display: flex; flex-direction: column; gap: 10px; }
.itinerary-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 14px;
    padding: 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}
.itin-when { border-right: 1px solid var(--border); padding-right: 12px; }
.itin-day { font-weight: 700; font-size: 14px; }
.itin-time { color: var(--accent); font-size: 13px; margin-top: 2px; }
.itin-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.itin-sub { color: var(--fg-muted); font-size: 13px; }

/* Order history (unchanged) */
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
}
.order-when { font-size: 13px; color: var(--fg-muted); }
.order-id { font-weight: 600; font-size: 14px; }
.order-status { color: var(--fg-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.order-total { font-weight: 600; }

/* Favorites */
.fav-list { display: flex; flex-direction: column; gap: 8px; }
.fav-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.fav-body { color: inherit; text-decoration: none; }
.fav-kind { color: var(--fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.fav-label { font-weight: 600; font-size: 15px; margin-top: 2px; }

/* Documents */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-row {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}
.doc-row.needs-sign { border-color: var(--warn); background: rgba(245,165,36,0.08); }
.doc-row.needs-sign .btn { margin-top: 6px; align-self: flex-start; }
.doc-row.signed .doc-check { color: var(--ok); margin-left: 6px; }
.doc-row.video-row { cursor: pointer; }
.doc-row.video-row .doc-check { color: var(--ok); margin-left: 6px; }
.doc-title { font-weight: 600; font-size: 15px; }
.doc-sub { color: var(--fg-muted); font-size: 13px; }
.video-disclaimer { font-size: 12px; margin-top: 8px; }

/* Payment reassurance */
.card-info-note {
    background: rgba(0,184,217,0.08);
    border: 1px solid rgba(0,184,217,0.3);
    color: var(--fg);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Saved card management */
.card-list { display: flex; flex-direction: column; gap: 8px; }
.card-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ---------- Legal / consent ---------- */
.legal-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.legal-footer {
    margin: 24px 0 8px;
    text-align: center;
    color: var(--fg-muted);
    font-size: 13px;
}
.legal-footer a { color: var(--fg-muted); text-decoration: underline; }
.legal-sep { margin: 0 6px; }
.consent-checkbox {
    align-items: flex-start;
    gap: 10px;
}
.consent-checkbox input { margin-top: 2px; }
.consent-checkbox span { font-size: 13px; line-height: 1.5; color: var(--fg-muted); }
.consent-checkbox a { color: var(--accent); text-decoration: underline; }

/* First-visit consent banner — bottom sheet above the nav */
.consent-banner {
    position: fixed;
    bottom: var(--nav-h);
    left: 8px;
    right: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-strong);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    z-index: 240;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    margin-bottom: 8px;
}
.consent-banner.show { transform: translateY(0); opacity: 1; }
.consent-banner.hide { transform: translateY(40px); opacity: 0; }
.consent-text { font-size: 13px; line-height: 1.45; color: var(--fg-muted); }
.consent-more { color: var(--accent); text-decoration: underline; }
.consent-actions .btn { width: auto; padding: 10px 16px; min-height: 40px; font-size: 14px; }

/* Theme switcher */
.theme-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
}
.theme-opt {
    background: transparent;
    color: var(--fg-muted);
    border: none;
    padding: 10px 8px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    min-height: 40px;
    width: 100%;
}
.theme-opt.active {
    background: var(--accent-soft);
    color: var(--accent);
}

/* Form ok-state */
.form-msg.ok { background: rgba(34,197,94,0.12); color: var(--ok); }
.form-subheading {
    margin: 8px 0 0;
    color: var(--fg-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
input[readonly] { opacity: 0.7; }

/* ---------- Notification prefs ---------- */
.pref-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pref-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
}
.pref-info { display: flex; flex-direction: column; gap: 2px; }
.pref-title { font-weight: 600; font-size: 15px; }
.pref-sub { color: var(--fg-muted); font-size: 13px; }
.pref-row input[type="checkbox"] {
    appearance: none;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    position: relative;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pref-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--fg-muted);
    top: 2px;
    left: 2px;
    transition: transform 0.15s ease, background 0.15s ease;
}
.pref-row input[type="checkbox"]:checked {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.pref-row input[type="checkbox"]:checked::after {
    transform: translateX(18px);
    background: var(--accent);
}
.pref-explainer {
    color: var(--fg-muted);
    font-size: 13px;
    line-height: 1.5;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 12px 0;
}
.pref-explainer.warn {
    background: rgba(245,165,36,0.08);
    border-color: rgba(245,165,36,0.4);
    color: var(--fg);
}
.pref-explainer strong { color: var(--fg); }
.pref-explainer em { font-style: normal; font-weight: 600; color: var(--fg); }
.ios-share-glyph {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    line-height: 16px;
    text-align: center;
    font-weight: 700;
    margin: 0 2px;
}

/* Session detail hero + gallery */
.session-hero {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    margin: 8px 0 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
}
.session-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.session-gallery {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 14px;
    padding-bottom: 4px;
}
.session-gallery::-webkit-scrollbar { display: none; }
.session-gallery .thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--bg-elev);
    min-height: 64px;
}
.session-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.session-gallery .thumb.active { border-color: var(--accent); }

/* Onboarding wizard */
.onb-shell { max-width: 520px; margin: 0 auto; }
.onb-progress {
    display: flex;
    gap: 6px;
    margin: 4px 0 6px;
}
.onb-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-strong);
    transition: background 0.2s ease;
}
.onb-dot.active { background: var(--accent); }
.onb-dot.done { background: var(--accent-soft); }
.onb-step-label {
    color: var(--fg-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 18px;
}
.onb-illust { font-size: 64px; line-height: 1; margin: 12px 0 8px; text-align: center; }
.onb-list { padding-left: 22px; color: var(--fg-muted); line-height: 1.7; margin: 8px 0 18px; }
.onb-video-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    margin-bottom: 16px;
}
.onb-video-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
}
.onb-video-title { font-weight: 600; }
.onb-video-sub { color: var(--fg-muted); font-size: 13px; margin-top: 2px; }

/* Coach picker (request-a-coach modal) */
.coach-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 14px;
    max-height: 40vh;
    overflow-y: auto;
}
.coach-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;
    text-align: left;
    padding: 12px;
    background: var(--bg-elev);
    border: 2px solid var(--border);
    border-radius: 12px;
    width: 100%;
    min-height: 0;
    color: var(--fg);
}
.coach-card.any-coach { grid-template-columns: 1fr; }
.coach-card.no-photo { grid-template-columns: 1fr; }
.coach-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.coach-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg);
}
.coach-name { font-weight: 600; font-size: 15px; }
.coach-bio  { color: var(--fg-muted); font-size: 13px; margin-top: 2px; line-height: 1.4; }
.coach-meta { color: var(--fg-muted); font-size: 12px; margin-top: 4px; }

/* Recommended boards on session detail */
.board-recs { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.recs-head { margin: 0 0 4px; font-size: 17px; font-weight: 600; }

/* Session detail favorite */
.detail-header { display: flex; align-items: center; gap: 12px; }
.detail-header h1 { flex: 1; margin: 0; }
.fav-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    color: var(--fg-muted);
    font-size: 22px;
    line-height: 1;
}
.fav-btn[aria-pressed="true"] { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

/* ---------- Events ---------- */
.event-list { display: flex; flex-direction: column; gap: 10px; }
.event-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}
.event-when { color: var(--accent); font-weight: 600; margin-bottom: 8px; font-size: 13px; }
.event-when .event-time { color: var(--fg-muted); font-weight: 500; font-size: 12px; margin-top: 2px; }
.event-title { margin: 0 0 4px; font-size: 17px; }
.event-loc { color: var(--fg-muted); font-size: 13px; margin-bottom: 6px; }
.event-desc { margin: 6px 0 0; color: var(--fg-muted); font-size: 14px; line-height: 1.45; }

.muted { color: var(--fg-dim); }

/* ---------- Toast ---------- */
.toast-stack {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--nav-h) + 12px);
    z-index: 9600;  /* above modals so toasts stay visible */
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 22px 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elev);
    color: var(--fg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    font-size: 14px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.hide { transform: translateY(20px); opacity: 0; }
.toast-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.toast-success { border-color: rgba(34,197,94,0.4); }
.toast-success .toast-icon { background: rgba(34,197,94,0.16); color: var(--ok); }
.toast-error   { border-color: rgba(229,72,77,0.45); }
.toast-error .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast-warn    { border-color: rgba(245,165,36,0.45); }
.toast-warn .toast-icon { background: rgba(245,165,36,0.15); color: var(--warn); }
.toast-msg { line-height: 1.35; }
.toast-action {
    background: transparent;
    color: var(--accent);
    border: none;
    padding: 4px 8px;
    font-weight: 700;
    font-size: 13px;
    width: auto;
    min-height: auto;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.toast-close {
    background: transparent;
    color: var(--fg-muted);
    border: none;
    padding: 0 4px;
    font-size: 20px;
    line-height: 1;
    width: auto;
    min-height: auto;
}

/* ---------- Checkout ---------- */
.form-row {
    display: grid;
    gap: 10px;
    align-items: end;
}
.form-row.two { grid-template-columns: 1fr 1fr; }
.form-row.three { grid-template-columns: 2fr 1fr 1fr; }
.form-row.three .field input[id="cu-state"] { text-transform: uppercase; }
.form .form-row:not(.two):not(.three) {
    grid-template-columns: 1fr auto;
}
.form .form-row input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--fg); font-size: 15px; }
.btn.apply { width: auto; min-height: 48px; padding: 10px 20px; }

.mini-cart {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mini-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 12px; }
.mini-row.discount { color: var(--ok); }
.mini-row.total { font-weight: 700; font-size: 17px; padding-top: 4px; }
.mini-row.muted { color: var(--fg-muted); font-size: 12px; }
.mini-name { color: var(--fg); }
.mini-price { color: var(--fg-muted); }
.mini-row.total .mini-price, .mini-row.total span:last-child { color: var(--fg); }
.mini-divider { height: 1px; background: var(--border); margin: 4px 0; }

.code-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.code-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
}
.code-type { color: var(--fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 6px; }
.code-val { font-family: ui-monospace, "SF Mono", monospace; font-size: 13px; }
.code-meta { color: var(--ok); font-weight: 600; }

.saved-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.saved-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
}
.saved-card input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.card-info { flex: 1; }
.card-brand { font-weight: 600; }
.card-exp { color: var(--fg-muted); font-size: 13px; }

.card-form { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Digital wallets ---------- */
.wallet-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}
.wallet-btn {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    min-height: 48px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.wallet-btn.disabled, .wallet-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.wallet-apple {
    -webkit-appearance: -apple-pay-button;
    -apple-pay-button-type: buy;
    -apple-pay-button-style: black;
}
.wallet-msgs { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.wallet-msg { color: var(--fg-muted); font-size: 12px; }
.wallet-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
    color: var(--fg-muted);
    font-size: 12px;
}
.wallet-divider::before, .wallet-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    /* above the chat FAB (9000), consent banner (240) + bottom nav so an open
       modal covers all chrome instead of being eaten by it (TODO item 10). */
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overscroll-behavior: contain;
}
.modal-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modal-card h2 { margin: 0; }
.waiver-body {
    overflow-y: auto;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--bg-elev);
    font-size: 14px;
    line-height: 1.55;
    max-height: 50vh;
}
.sig-input {
    font-family: "Snell Roundhand", "Brush Script MT", cursive !important;
    font-size: 22px !important;
}
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; margin: 0; }

/* ---------- Receipt ---------- */
.receipt-summary { display: flex; flex-direction: column; gap: 8px; }
.receipt-statuses { display: flex; gap: 6px; margin-top: 6px; }
.receipt-list { display: flex; flex-direction: column; gap: 8px; }
.receipt-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.receipt-item-title { font-weight: 600; }
.receipt-item-sub { color: var(--fg-muted); font-size: 13px; }
.receipt-item-qty { color: var(--fg-muted); font-size: 14px; }
.receipt-item-price { font-weight: 600; }
.receipt-totals {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}
.receipt-totals .cart-line.discount { color: var(--ok); }
.receipt-totals .cart-line.total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.receipt-card { margin-top: 10px; color: var(--fg-muted); font-size: 14px; text-align: right; }

/* Group-booking banner — surfaces the assign-emails flow on receipt */
.group-booking-banner {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 12px;
    margin-bottom: 14px;
}
.group-booking-icon { font-size: 24px; line-height: 1; text-align: center; }
.group-booking-title { font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.group-booking-sub { color: var(--fg-muted); font-size: 13px; line-height: 1.4; }

/* Guest email assignment rows on receipt */
.receipt-assign {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin: -4px 0 10px;
}
.receipt-assign-head {
    color: var(--fg-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    font-weight: 700;
}
.assign-row {
    display: grid;
    grid-template-columns: 60px 1fr 1.4fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.assign-row:last-child { margin-bottom: 0; }
.assign-label { color: var(--fg-muted); font-size: 12px; }
.assign-row input {
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    width: 100%;
}

/* Sold-out / waitlist block on session detail */
.sold-out-block {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    margin-top: 8px;
}
.sold-out-block .placeholder { padding: 8px 0; }
.sold-out-block .btn { margin-top: 8px; }
