/* RSPV: Midnight Navy / Warm White / Electric Blue. Fonts are bundled for offline demo. */
@font-face { font-family: Manrope; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/manrope-400.ttf") format("truetype"); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/manrope-500.ttf") format("truetype"); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/manrope-600.ttf") format("truetype"); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/manrope-700.ttf") format("truetype"); }
@font-face { font-family: Manrope; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/manrope-800.ttf") format("truetype"); }
@font-face { font-family: Oxanium; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/oxanium-500.ttf") format("truetype"); }
@font-face { font-family: Oxanium; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/oxanium-600.ttf") format("truetype"); }
@font-face { font-family: Oxanium; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/oxanium-700.ttf") format("truetype"); }

:root {
  color-scheme: light;
  --page: #f3efe6; --panel: #fffdf9; --ink: #0e2038; --muted: #626d7c;
  --line: #deded8; --brand: #1155ff; --on-brand: #fff; --soft: #eaf0ff;
  --danger: #b32c35; --danger-soft: #fff0f0; --warning: #8d591d; --warning-soft: #fff4e3;
  --navy: #0e2038; --cream: #f3efe6; --silver: #a7b0bc; --nav-panel: #fffdf9f0;
  --shadow: 0 8px 30px #0e203808; --radius: 20px;
  --bottom-inset: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #10151d; --panel: #182337; --ink: #f3efe6; --muted: #b3bdcc;
    --line: #344258; --brand: #99b4ff; --on-brand: #0e2038; --soft: #233b64;
    --danger: #ffadb2; --danger-soft: #422731; --warning: #f3ca8c; --warning-soft: #403422;
    --nav-panel: #182337f2; --shadow: 0 8px 30px #00000014;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #10151d; --panel: #182337; --ink: #f3efe6; --muted: #b3bdcc;
  --line: #344258; --brand: #99b4ff; --on-brand: #0e2038; --soft: #233b64;
  --danger: #ffadb2; --danger-soft: #422731; --warning: #f3ca8c; --warning-soft: #403422;
  --nav-panel: #182337f2; --shadow: 0 8px 30px #00000014;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
button { transition: background .16s ease, border-color .16s ease, transform .16s ease; }
button:active:not(:disabled) { transform: translateY(1px); }
a { color: var(--brand); }
.icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.app-shell { max-width: 900px; margin: 0 auto; padding: calc(12px + var(--tg-content-safe-area-inset-top, 0px)) 24px calc(125px + var(--bottom-inset)); }
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0 23px; }
.brand-lockup { flex: 0 0 auto; }
.brand { display: inline-flex; align-items: center; color: var(--navy); background: var(--cream); text-decoration: none; border-radius: 4px; }
.brand img { width: 116px; height: 38px; display: block; }
.brand-caption { font-family: Oxanium, sans-serif; font-size: 9px; font-weight: 600; color: var(--muted); letter-spacing: .18em; margin: 5px 0 0; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.header-actions .button { min-height: 42px; padding: 8px 11px; font-size: 12px; border-radius: 12px; }
.header-actions .icon-button { width: 42px; padding: 10px; }
.header-actions .icon-button .button-label { display: none; }
.header-actions .button .icon { width: 17px; height: 17px; }
h1 { margin: 0; font-size: 27px; font-weight: 800; line-height: 1.25; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 18px; font-weight: 750; line-height: 1.35; letter-spacing: -.03em; overflow-wrap: anywhere; }
h3 { margin: 0; font-size: 16px; font-weight: 700; }
p { margin: 0; }
.subtitle, .muted { color: var(--muted); }
.subtitle { margin-top: 7px; font-size: 14px; line-height: 1.55; }
.small { font-size: 13px; }
.page-heading { margin: 7px 0 21px; }
.page-heading .row { align-items: center; }
.row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.row > div { min-width: 0; }
.stack, .grid { display: grid; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card p + p { margin-top: 7px; }
.card .row + .row { margin-top: 12px; }
.section { margin-top: 20px; }
.section > h2 { margin-bottom: 13px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 100px; color: var(--brand); background: var(--soft); font-size: 12px; font-weight: 700; max-width: 100%; }
.pill .icon { width: 15px; height: 15px; }
.pill.neutral { color: var(--muted); background: var(--page); }
.pill.warning { color: var(--warning); background: var(--warning-soft); }
.pill.confirmed { color: var(--on-brand); background: var(--brand); }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 650; margin-bottom: 8px; }
.time, .value, .metric-value { font-family: Oxanium, Manrope, sans-serif; font-variant-numeric: tabular-nums; }
.time { font-size: 31px; font-weight: 600; letter-spacing: -.055em; line-height: 1; }
.value { font-size: 36px; font-weight: 600; letter-spacing: -.04em; margin-top: 5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 17px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid var(--line); border-radius: 13px; padding: 11px 15px; color: var(--ink); background: var(--panel); font-size: 13px; font-weight: 750; line-height: 1.35; }
.button.primary { color: var(--on-brand); border-color: var(--brand); background: var(--brand); }
.button.soft { color: var(--brand); background: var(--soft); border-color: transparent; }
.button.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.button.full { width: 100%; }
.actions .button { flex: 1 1 auto; }
.today-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.today-metrics > div { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 12px 9px; min-width: 0; }
.today-metrics span { color: var(--muted); font-size: 11px; display: block; overflow-wrap: anywhere; }
.today-metrics strong { display: block; font-family: Oxanium,Manrope,sans-serif; font-size: 25px; margin-top: 4px; }
.today-task { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; text-align: left; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.today-task span { font-size: 13px; font-weight: 650; }
.today-task strong { font-family: Oxanium,Manrope,sans-serif; font-size: 22px; color: var(--brand); }
.today-event-note { padding: 10px 4px 0; overflow-wrap: anywhere; }
.schedule-actions { margin-top: 0; margin-bottom: 16px; }
.template-time { font-family: Oxanium,Manrope,sans-serif; font-size: 21px; margin-top: 10px; }
.return-filters { flex-wrap: wrap; }
.return-filters .field { flex: 1 1 170px; min-width: 0; }
.return-days { font-family: Oxanium,Manrope,sans-serif; color: var(--brand); font-size: 22px; margin-top: 14px; }
.field textarea.return-message { min-height: 210px; }
.return-filters label.field + label.field { margin-top: 0; }
.referral-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.referral-metrics > div { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 13px 10px; min-width: 0; }
.referral-metrics span { display: block; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.referral-metrics strong { display: block; font-family: Oxanium,Manrope,sans-serif; color: var(--brand); font-size: 25px; margin-top: 5px; }
.invite-card .icon { color: var(--brand); width: 30px; height: 30px; }
.invited-note { background: var(--soft); border-radius: 14px; padding: 15px; margin-bottom: 17px; font-size: 13px; }
.weekday-field, .template-picker { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.weekday-field legend, .template-picker legend { font-size: 12px; font-weight: 750; margin-bottom: 10px; }
.weekdays { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.weekdays label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 10px 8px; border-radius: 10px; font-size: 12px; }
.weekdays input { margin: 0; accent-color: var(--brand); width: 15px; height: 15px; }
.template-picker .check-line { align-items: flex-start; padding: 10px 0; }
.template-picker small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.schedule-preview-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.schedule-preview-row > div { min-width: 0; }
.schedule-preview-row p { font-size: 12px; overflow-wrap: anywhere; }
.schedule-preview-row strong { font-size: 13px; }
.button.compact { padding: 9px 12px; min-height: 44px; font-size: 12px; }
.button-label { min-width: 0; }
.link-button { border: 0; background: transparent; color: var(--brand); font-size: 13px; padding: 8px 0; min-height: 44px; text-align: left; }
.club-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: var(--cream); border: 1px solid #344665; border-radius: 23px; padding: 25px; margin-bottom: 19px; }
.club-hero .eyebrow { position: relative; z-index: 2; color: #b8c6dd; font-family: Oxanium, sans-serif; font-size: 10px; font-weight: 500; letter-spacing: .12em; margin-bottom: 12px; }
.club-hero h1 { position: relative; z-index: 2; max-width: 75%; font-size: 29px; }
.club-hero .subtitle { position: relative; z-index: 2; color: #c1cada; max-width: 76%; font-size: 12px; }
.club-hero::after { content: ""; position: absolute; z-index: -1; width: 78px; height: 310px; right: 14%; top: -70px; background: #1155ff; transform: rotate(32deg); }
.hero-ball { position: absolute; right: 23px; top: 28px; width: 105px; height: 105px; color: #f3efe633; transform: rotate(-15deg); z-index: 1; }
.hero-ball .icon { width: 100%; height: 100%; stroke-width: .7; }
.club-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.club-note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--brand); }
.event-card { position: relative; overflow: hidden; }
.event-date { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.event-date .icon { width: 16px; height: 16px; color: var(--brand); }
.event-main { gap: 12px; align-items: center; margin-top: 21px; }
.event-time-label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.event-card .event-main .pill { max-width: 65%; }
.event-meta { font-size: 13px; color: var(--muted); margin-top: 12px; }
.availability-track { height: 3px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 12px; }
.availability-track span { display: block; height: 100%; background: var(--brand); }
.account-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.account-card { position: relative; overflow: hidden; padding: 18px; }
.card-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.card-label .icon { width: 19px; height: 19px; }
.balance-card { background: var(--navy); border-color: #344665; color: var(--cream); }
.balance-card .muted { color: #c4cfdf; }
.balance-card .card-label { color: #c8d4e5; }
.balance-card::after { content: ""; pointer-events: none; position: absolute; width: 38px; height: 170px; right: -6px; top: -45px; transform: rotate(34deg); background: #1155ff; opacity: .9; }
.metric-value { font-size: 49px; font-weight: 600; letter-spacing: -.055em; line-height: 1.15; margin-top: 23px; overflow-wrap: anywhere; }
.card .metric-unit { margin-top: 0; font-size: 14px; }
.card .metric-footer { border-top: 1px solid #ffffff24; padding-top: 12px; margin-top: 24px; font-size: 11px; position: relative; z-index: 1; }
.metric-footer strong { display: block; margin-top: 2px; font-family: Oxanium, sans-serif; font-size: 22px; font-weight: 500; color: var(--cream); }
.subscription-card .metric-value { color: var(--brand); }
.subscription-card .track { margin: 17px 0 10px; }
.card .subscription-expiry { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.loyalty-card h2, .profile-history h2 { margin-bottom: 5px; }
.loyalty-card .history-row strong { color: var(--brand); font-family: Oxanium, sans-serif; font-size: 23px; }
.loyalty-card .history-row span { font-size: 12px; max-width: 78%; }
.navigation { position: fixed; bottom: calc(12px + var(--bottom-inset)); left: 50%; transform: translateX(-50%); display: flex; width: min(calc(100% - 28px), 872px); padding: 7px; background: var(--nav-panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 22px; gap: 4px; z-index: 10; box-shadow: 0 6px 34px #0e203818; }
.navigation:empty { display: none; }
.navigation button { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); flex: 1; min-width: 0; min-height: 58px; padding: 7px 3px; font-size: 12px; font-weight: 700; border-radius: 15px; line-height: 1.35; }
.navigation[data-mode="coach"] button { font-size: 11px; letter-spacing: -.02em; }
.navigation button > span { white-space: nowrap; }
.nav-notice { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); top: 7px; right: calc(50% - 17px); }
.navigation button[aria-current="page"] .nav-notice { background: var(--on-brand); }
.navigation .icon { width: 20px; height: 20px; }
.navigation button[aria-current="page"] { color: var(--on-brand); background: var(--brand); }
.demo-banner { padding: 12px 14px; border: 1px dashed #a8b7d1; border-radius: 16px; background: transparent; color: var(--muted); font-size: 10px; margin-bottom: 23px; }
.demo-meta { display: flex; align-items: flex-start; gap: 9px; }
.demo-chip { font-family: Oxanium, sans-serif; font-size: 9px; font-weight: 600; letter-spacing: .06em; color: var(--brand); background: var(--soft); padding: 3px 7px; border-radius: 5px; flex: 0 0 auto; }
.demo-banner label { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 10px; }
.demo-banner label > span { flex: 0 0 auto; }
.demo-banner select { width: 100%; min-width: 0; min-height: 38px; font-size: 12px; border: 1px solid var(--line); color: var(--ink); background: var(--panel); border-radius: 9px; padding: 7px 9px; }
.empty { text-align: center; padding: 38px 20px; color: var(--muted); font-size: 13px; }
.empty h1, .empty h2 { color: var(--ink); margin-bottom: 9px; }
.empty .button { margin-top: 17px; }
.list-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-row:first-child { padding-top: 0; }
.list-row:last-child { border: 0; padding-bottom: 0; }
.person-name { font-weight: 750; overflow-wrap: anywhere; font-size: 15px; }
.person-label { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.person-label input { flex: 0 0 auto; width: 22px; height: 22px; accent-color: var(--brand); margin: 0; }
.person-details { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.55; }
.payment-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 34px; }
.payment-buttons button { flex: 1; }
.payment-card h2 { font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.payment-card .small { overflow-wrap: anywhere; }
.payment-amount { font-family: Oxanium, Manrope, sans-serif; font-size: 30px; font-weight: 700; margin: 14px 0 7px; }
.payment-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.payment-totals span { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; font-size: 11px; color: var(--muted); }
.payment-totals strong { display: block; margin-top: 6px; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.payment-audit, .reminder-setting { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.reminder-setting .button { margin-top: 10px; }
.payment-buttons button[aria-pressed="true"] { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.search-bar { display: flex; align-items: end; gap: 8px; margin: 16px 0 14px; }
.search-bar label { flex: 1; min-width: 0; }
.search-bar button { margin-bottom: 0; flex: 0 0 auto; }
label.field { display: block; font-size: 12px; font-weight: 650; color: var(--ink); }
label.field + label.field, .form-grid + .field { margin-top: 15px; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font-size: 16px; font-weight: 400; }
.field textarea { min-height: 85px; resize: vertical; }
.field .help { color: var(--muted); font-size: 13px; font-weight: 400; display: block; margin-top: 7px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 15px 0; }
.check-line { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 12px; margin-top: 10px; }
.check-line input { width: 20px; height: 20px; accent-color: var(--brand); }
.track { height: 5px; background: var(--line); border-radius: 5px; margin: 15px 0; overflow: hidden; }
.track span { height: 100%; display: block; background: var(--brand); }
.history-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.history-row:last-child { border: 0; padding-bottom: 0; }
.history-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 750; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 12px; font-size: 14px; line-height: 1.6; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(98px + var(--bottom-inset)); width: min(92%, 650px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); background: var(--panel); color: var(--ink); padding: 14px 16px; z-index: 30; font-size: 13px; }
.toast.error { color: var(--danger); border-color: var(--danger); }
.modal { padding: 0; max-width: 480px; width: calc(100% - 28px); max-height: 86dvh; overflow: auto; border: 1px solid var(--line); border-radius: 23px; color: var(--ink); background: var(--panel); box-shadow: 0 20px 70px #0e20382b; }
.modal::backdrop { background: #0e2038ad; backdrop-filter: blur(4px); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 21px 20px 16px; }
.modal-header h2 { font-size: 20px; }
.modal-close { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 13px; color: var(--muted); background: var(--page); font-size: 23px; }
.modal-form { padding: 0 20px 21px; }
.modal-footer { display: flex; gap: 8px; margin-top: 21px; }
.modal-footer .button { flex: 1; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 12px; }
.back { margin-bottom: 13px; }
details > summary { color: var(--brand); min-height: 48px; display: flex; align-items: center; font-size: 12px; font-weight: 650; margin-top: 5px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.pagination span { font-size: 11px; color: var(--muted); }
.loading-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); margin-bottom: 16px; }
.loading-skeleton { display: grid; gap: 12px; margin: 25px auto 0; max-width: 420px; }
.loading-skeleton span { display: block; min-height: 62px; background: var(--line); border-radius: 15px; animation: skeleton-pulse 1.4s ease-in-out infinite alternate; }
.loading-skeleton span:first-child { min-height: 95px; }
.busy-spinner, .button.is-loading::before { width: 17px; height: 17px; flex: 0 0 auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busy-spin .8s linear infinite; }
.button.is-loading::before { content: ''; }
.button.is-loading > .icon { display: none; }
.loading-status { position: fixed; top: calc(10px + var(--tg-content-safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; max-width: calc(100% - 24px); padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--ink); font-size: 13px; box-shadow: var(--shadow); z-index: 100; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@keyframes skeleton-pulse { to { opacity: .4; } }
.profile-links { display: grid; gap: 9px; }
.profile-link { display: flex; align-items: center; gap: 13px; text-align: left; min-height: 68px; width: 100%; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); padding: 13px 16px; }
.profile-link > .icon { color: var(--brand); width: 21px; height: 21px; }
.profile-link > .icon:last-child { margin-left: auto; width: 17px; height: 17px; }
.profile-link-copy { display: grid; gap: 3px; min-width: 0; }
.profile-link-copy strong { font-size: 14px; }
.profile-link-copy > span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
#app[data-view="profile"] .page-heading { margin-bottom: 16px; }
#app[data-view="profile"] .account-card { padding: 16px; }
#app[data-view="profile"] .balance-content { min-height: 56px; }
#app[data-view="profile"] .monthly-progress { padding: 16px; }
#app[data-view="profile"] .monthly-progress > .small:last-child { display: none; }
#app[data-view="profile"] .bonus-summary { margin: 10px 0; }
.booking-result { padding: 0 20px 22px; }
.result-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; color: var(--brand); background: var(--soft); margin-bottom: 16px; }
.result-icon .icon { width: 28px; height: 28px; }
.booking-result.warning .result-icon { color: var(--warning); background: var(--warning-soft); }
.booking-result.error .result-icon { color: var(--danger); background: var(--danger-soft); }
.receipt-details { padding: 16px; background: var(--page); border-radius: 15px; margin-top: 19px; }
.receipt-date { font-family: Oxanium,Manrope,sans-serif; font-size: 20px; font-weight: 600; line-height: 1.4; }
.receipt-details .person-name { margin-top: 13px; }
.booking-result .actions { margin-top: 21px; }
.booking-uncertain { border-color: var(--warning); margin-bottom: 18px; font-size: 13px; }
.coach-toolbar { position: fixed; bottom: calc(98px + var(--bottom-inset)); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 7px 12px; width: min(calc(100% - 28px),872px); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink); padding: 12px 14px; box-shadow: var(--shadow); z-index: 11; }
.coach-toolbar-summary { align-self: center; }
.coach-toolbar-summary > p { font-size: 13px; }
.coach-toolbar-summary strong { font-family: Oxanium,Manrope,sans-serif; font-size: 23px; color: var(--brand); margin-left: 4px; }
.coach-toolbar-summary .small { margin-top: 2px; font-size: 12px; }
.coach-toolbar .button { min-height: 48px; font-size: 13px; padding: 9px 10px; align-self: center; }
.coach-toolbar-hint { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.45; }
.with-coach-toolbar .app-shell { padding-bottom: calc(260px + var(--bottom-inset)); }
.with-coach-toolbar .toast { bottom: calc(250px + var(--bottom-inset)); }
[hidden] { display: none !important; }
@media (min-width: 650px) {
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: minmax(0,.85fr) minmax(0,1.4fr); align-items: stretch; }
  .account-card { padding: 22px; }
  .metric-value { font-size: 62px; }
  .navigation button { flex-direction: row; gap: 9px; font-size: 12px; }
  .club-hero { padding: 30px; }
  .club-hero h1 { font-size: 34px; }
  .hero-ball { width: 130px; height: 130px; top: 19px; right: 35px; }
  .club-hero::after { right: 11%; width: 100px; }
}
@media (max-width: 480px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .app-header { gap: 10px; padding-top: 10px; padding-bottom: 20px; }
  .brand img { width: 101px; height: 33px; }
  .brand-caption { font-size: 8px; }
  .header-actions .button { gap: 6px; font-size: 11px; padding: 8px 10px; }
  .header-actions .icon-button { width: 42px; padding: 10px; }
  h1 { font-size: 25px; }
  .club-hero { padding: 23px 20px; }
  .club-hero h1 { font-size: 27px; max-width: 79%; }
  .hero-ball { width: 85px; height: 85px; top: 27px; right: 13px; }
  .club-hero::after { right: 13px; width: 52px; }
}
@media (max-width: 359px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .card { padding: 17px; }
  .brand img { width: 92px; height: 30px; }
  h1 { font-size: 23px; }
  .account-grid { grid-template-columns: 1fr; }
  .metric-value { margin-top: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .navigation { width: calc(100% - 18px); padding: 5px; gap: 2px; }
  .navigation[data-mode="coach"] button { font-size: 10.5px; padding-inline: 2px; }
  .club-hero h1 { font-size: 24px; }
}
/* Compact club screens; accounting is presented separately from monthly rewards. */
.schedule-hero { padding: 17px 18px; margin-bottom: 14px; border-radius: 18px; }
.schedule-hero .eyebrow { margin-bottom: 6px; font-size: 10px; letter-spacing: .04em; }
.schedule-hero h1 { max-width: calc(100% - 50px); font-size: 23px; line-height: 1.22; }
.schedule-hero .hero-ball { width: 56px; height: 56px; top: 50%; right: 13px; transform: translateY(-50%) rotate(-15deg); }
.schedule-hero::after { right: 13px; width: 37px; }
.schedule-tools { margin-bottom: 13px; }
.venue-filters { display: grid; grid-template-columns: .6fr 1fr 1fr; gap: 8px; }
.venue-filter { border: 1px solid var(--line); border-radius: 999px; min-height: 44px; padding: 9px 10px; color: var(--ink); background: var(--panel); font-size: 13px; font-weight: 700; }
.venue-filter[aria-pressed="true"] { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.schedule-count { margin-top: 7px; font-size: 12px; }
.next-booking { margin-bottom: 16px; padding: 16px; border-color: var(--brand); }
.next-booking.waiting { border-color: var(--warning); }
.next-booking-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.next-booking-heading h2 { font-size: 16px; }
.next-booking-heading > .icon { width: 19px; height: 19px; color: var(--brand); }
.next-booking-main { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.next-booking-details { min-width: 0; }
.next-booking-when { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 9px; }
.next-booking-when strong { font-family: Oxanium,Manrope,sans-serif; font-size: 24px; line-height: 1.2; }
.next-booking-when span { color: var(--muted); font-size: 12px; }
.next-booking-session { font-size: 14px; font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.next-booking-state { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin-top: 12px; }
.next-booking-state .small { font-size: 12px; }
.next-booking .actions { margin-top: 12px; }
.next-booking .button { min-height: 44px; padding: 9px 12px; font-size: 13px; }
.next-booking.waiting .date-tile { background: var(--warning-soft); color: var(--warning); }
.player-event { padding: 17px 18px; }
.player-event .event-header { gap: 7px; }
.player-event .event-date { margin: 0; font-size: 12px; }
.venue-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; color: var(--ink); }
.venue-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.venue-tag.tushino::before { border-radius: 2px; }
.player-event .event-main { margin-top: 16px; align-items: center; }
.player-event .time { font-size: 32px; }
.player-event .event-time-label { margin-top: 4px; margin-bottom: 0; font-size: 12px; }
.player-event h2 { margin-top: 11px; font-size: 18px; }
.player-event .availability-track { margin-top: 11px; }
.player-event .event-meta { margin-top: 10px; line-height: 1.4; }
.player-event .actions { margin-top: 13px; }
.coach-event { padding: 16px; }
.coach-event-top { display: flex; align-items: center; gap: 12px; }
.date-tile { display: flex; flex: 0 0 51px; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; border-radius: 12px; background: var(--soft); color: var(--brand); }
.date-tile strong { font-family: Oxanium,Manrope,sans-serif; font-size: 26px; line-height: 1; font-weight: 600; }
.date-tile span { font-size: 11px; margin-top: 3px; }
.coach-event-info { min-width: 0; }
.coach-event .event-date { margin: 0 0 5px; font-size: 12px; line-height: 1.5; }
.coach-event h2 { font-size: 16px; line-height: 1.4; letter-spacing: -.02em; }
.coach-event-summary { margin-top: 12px; gap: 8px; }
.coach-event-summary .small { font-size: 12px; }
.coach-event .actions { margin-top: 12px; }
.coach-event .button { min-height: 44px; padding: 9px 12px; }
.balance-content { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 76px; }
.balance-content > div { min-width: 0; }
.balance-content .small { margin-top: 6px; }
.balance-number { text-align: right; }
.balance-card .metric-value { font-size: 43px; margin: 0; }
.balance-card .metric-unit { margin-top: 1px; color: #c8d4e5; }
.balance-card::after { right: 57px; top: -60px; width: 29px; opacity: .28; }
.subscription-card .metric-value { margin: 0; font-size: 43px; line-height: 1.05; }
.account-month { color: var(--muted); font-size: 12px; }
.subscription-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0; }
.remaining-count { min-width: 0; }
.subscription-summary > .small { text-align: right; flex: 0 0 auto; }
.subscription-summary .small strong { display: block; font-family: Oxanium,Manrope,sans-serif; color: var(--ink); font-size: 23px; font-weight: 600; margin-top: 2px; }
.pass-slots { display: grid; grid-template-columns: repeat(var(--slots),minmax(0,1fr)); gap: 6px; }
.pass-slot { display: flex; align-items: center; justify-content: center; min-height: 38px; border-radius: 10px; font-family: Oxanium,Manrope,sans-serif; font-size: 16px; border: 1px solid var(--brand); color: var(--brand); background: var(--soft); }
.pass-slot.used { color: var(--muted); border-color: var(--line); background: var(--page); }
.pass-slot .icon { width: 18px; height: 18px; }
.monthly-progress h2 { font-size: 17px; }
.monthly-progress .pill { white-space: nowrap; }
.bonus-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.bonus-summary strong { font-family: Oxanium,Manrope,sans-serif; font-size: 17px; font-weight: 500; }
.bonus-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; margin: 12px 0; }
.bonus-steps span { height: 6px; border-radius: 6px; background: var(--line); }
.bonus-steps span.complete { background: var(--brand); }
.bonus-status { color: var(--ink); font-size: 15px; font-weight: 750; }
.bonus-status.earned { color: var(--brand); }
.monthly-progress .bonus-status + .small { font-size: 12px; margin-top: 6px; }
#app[data-mode="coach"] .search-bar { position: sticky; top: var(--tg-content-safe-area-inset-top,0px); z-index: 4; background: var(--page); padding: 10px 0; margin: 9px 0; }
.attendance-row.is-selected .person-name { color: var(--brand); }
.attendance-badge { display: inline-flex; font-size: 11px; line-height: 1.3; font-weight: 700; padding: 4px 7px; margin-left: 7px; border-radius: 7px; color: var(--brand); background: var(--soft); vertical-align: middle; }
.attendance-row .person-label { align-items: flex-start; }
.attendance-row .person-label input { margin-top: 2px; }
.attendance-row .person-label > span { min-width: 0; }
.attendance-row .person-details { font-size: 12px; }
.attendance-row .payment-buttons { margin-top: 9px; }
.attendance-row .payment-buttons .button { font-size: 12px; min-height: 44px; }
@media (min-width: 650px) {
  .schedule-hero h1 { max-width: calc(100% - 70px); font-size: 26px; }
  .schedule-hero .hero-ball { width: 65px; height: 65px; right: 22px; }
  .balance-content { align-items: flex-start; height: 100%; flex-direction: column; }
  .balance-number { text-align: left; }
  .balance-card .metric-value { font-size: 62px; }
}
@media (max-width: 359px) {
  .schedule-hero { padding: 16px; }
  .schedule-hero h1 { font-size: 21px; }
  .player-event { padding: 15px; }
  .player-event .event-main .pill { font-size: 11px; }
  .player-event .event-date { font-size: 11px; }
  .player-event .venue-tag { font-size: 11px; }
  .subscription-summary .metric-unit { font-size: 13px; }
  .subscription-summary .small { font-size: 12px; }
  .pass-slots { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  .loading-skeleton span, .busy-spinner, .button.is-loading::before { animation: none; }
}
