:root {
  color-scheme: light;
  --ink: var(--brand-ink);
  --muted: var(--brand-ink-soft);
  --forest: var(--brand-forest);
  --forest-2: var(--brand-court);
  --court: #d75f3d;
  --ball: var(--brand-ball);
  --paper: var(--brand-paper);
  --white: var(--brand-white);
  --line: var(--brand-line);
  --soft: #edf1e9;
  --danger: #ad342d;
  --shadow: var(--brand-shadow);
  font-family: var(--brand-sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  padding: 12px max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 250, 245, .9);
  border-bottom: 1px solid rgba(18, 60, 50, .08);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--forest); background: var(--ball); font-family: var(--brand-serif); font-style: italic; }
nav { display: flex; align-items: center; gap: 10px; }
nav a { font-size: 14px; font-weight: 700; text-decoration: none; }

main { min-height: calc(100vh - 68px); }
.shell { width: min(100% - 32px, 980px); margin: 0 auto; padding: 40px 0 96px; }
.narrow { width: min(100% - 32px, 620px); margin: 0 auto; padding: 40px 0 96px; }
.hero { position: relative; overflow: hidden; background: var(--forest); color: var(--white); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.pilot-page .site-header { position: static; width: min(100% - 48px, 1040px); min-height: 96px; margin: auto; padding: 20px 0; border: 0; background: transparent; backdrop-filter: none; }
.pilot-page .brand { font-size: 16px; font-weight: 650; letter-spacing: -.04em; }
.pilot-page .brand span:last-child { display: inline; }
.pilot-page .brand-mark { width: 30px; height: 30px; font-size: 17px; background: var(--forest); color: var(--ball); }
.pilot-layout { width: min(100% - 48px, 1040px); margin: auto; padding: 72px 0 80px; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(48px, 8vw, 120px); align-items: start; }
.pilot-location { margin: 0 0 24px; color: var(--forest-2); font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.pilot-intro h1 { font-size: clamp(48px, 5.5vw, 72px); letter-spacing: -.05em; line-height: 1.03; }
.pilot-intro h1 em { font-weight: inherit; color: var(--forest-2); }
.pilot-description { max-width: 340px; margin: 28px 0 0; color: var(--ink); font-size: 19px; line-height: 1.55; }
.pilot-note { max-width: 330px; margin: 20px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.pilot-signup form { margin-top: 0; gap: 24px; }
.pilot-signup label, .pilot-signup legend { font-weight: 600; }
.pilot-signup input, .pilot-signup select { border-radius: 8px; background: transparent; }
.pilot-signup .consent-stack { gap: 20px; }
.pilot-signup .pilot-choice { border: 0; background: transparent; padding: 0; border-radius: 0; }
.pilot-signup .pilot-choice strong { font-weight: 600; line-height: 1.5; }
.pilot-signup .pilot-choice small { font-size: 12px; }
.pilot-signup .choice input { accent-color: var(--forest); }
.pilot-signup .button { border-radius: 8px; min-height: 50px; font-size: 14px; font-weight: 650; justify-content: space-between; }
.pilot-signup .fine-print { margin: -12px 0 0; text-align: center; }
.pilot-signup [data-pilot-fields] .fine-print { margin: 0; text-align: left; }
.pilot-signup [data-pilot-fields] .choice { background: transparent; padding: 9px; border-radius: 8px; }
.pilot-signup [data-pilot-fields] .choice:has(input:checked) { background: var(--soft); }
.pilot-signup .field-hint { font-size: 11px; }
.pilot-app-card { padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.pilot-app-card h2 { margin-bottom: 20px; }
.pilot-app-card > .button { width: 100%; margin-top: 10px; border-radius: 8px; }
.pilot-app-card .fine-print { margin: 14px 0 0; text-align: center; }
.pilot-app-steps { display: grid; gap: 16px; margin: 0 0 24px; padding: 0; list-style: none; }
.pilot-app-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.pilot-app-steps li > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--forest); background: var(--ball); font-weight: 900; }
.pilot-app-steps strong, .pilot-app-steps small { display: block; }
.pilot-app-steps strong { line-height: 1.4; }
.pilot-app-steps small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.pilot-updates { margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.45); }
.pilot-updates form { gap: 16px; margin-top: 18px; }
.hero::after { content: ""; position: absolute; width: 440px; height: 440px; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; right: -190px; bottom: -250px; box-shadow: 0 0 0 70px rgba(255,255,255,.04); }
.hero-inner { width: min(100% - 40px, 980px); margin: auto; min-height: 560px; padding: 76px 0 92px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.eyebrow { color: var(--court); text-transform: uppercase; letter-spacing: .14em; font-weight: 900; font-size: 12px; margin: 0 0 14px; }
.hero .eyebrow { color: var(--ball); }
h1, h2, h3 { margin: 0; letter-spacing: -.04em; line-height: 1.02; }
h1 { font-family: var(--brand-serif); font-size: clamp(48px, 8vw, 86px); font-weight: 500; }
h2 { font-family: var(--brand-serif); font-size: clamp(36px, 5vw, 54px); font-weight: 500; }
h3 { font-size: 19px; }
.lead { max-width: 580px; font-size: clamp(18px, 2.2vw, 23px); line-height: 1.5; color: rgba(255,255,255,.78); margin: 24px 0 34px; }
.subtle { color: var(--muted); line-height: 1.55; }
.hero-card { background: var(--paper); color: var(--ink); padding: 26px; border-radius: 28px; box-shadow: var(--shadow); transform: rotate(2deg); }
.hero-card .score { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); }
.hero-card .status-pill { margin-top: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 8px 32px rgba(16, 41, 35, .05); }
.card + .card { margin-top: 16px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.feature-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--soft); color: var(--forest-2); font-weight: 900; margin-bottom: 24px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button { appearance: none; border: 0; border-radius: 999px; padding: 13px 20px; background: var(--forest); color: white; text-decoration: none; font-weight: 800; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; }
.button:hover { background: var(--forest-2); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.secondary { color: var(--forest); background: var(--soft); }
.button.ghost { color: var(--forest); background: transparent; border: 1px solid var(--line); }
.button.danger { background: var(--danger); }
.button.light { color: var(--forest); background: var(--ball); }
.button.on-dark { color: white; border-color: rgba(255,255,255,.28); }
.text-button { border: 0; padding: 8px; color: var(--forest-2); background: transparent; font-weight: 800; cursor: pointer; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 26px; padding: clamp(22px, 5vw, 38px); box-shadow: var(--shadow); }
.form-card h2 { margin-bottom: 10px; }
form { display: grid; gap: 18px; margin-top: 28px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 9px; color: var(--ink); font-size: 14px; font-weight: 800; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 800; }
input, select, textarea { width: 100%; padding: 13px 14px; border: 1px solid #c9d0c8; border-radius: 12px; color: var(--ink); background: #fff; min-height: 48px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(216, 241, 90, .65); border-color: var(--forest); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 500; }
.court-picker { position: relative; }
.court-picker > .field-hint { display: block; margin: 7px 2px 0; line-height: 1.45; }
.court-results { position: absolute; z-index: 20; top: calc(100% - 23px); left: 0; right: 0; overflow: hidden; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.court-option { width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--white); color: var(--ink); text-align: left; cursor: pointer; }
.court-option:last-child { border-bottom: 0; }
.court-option:hover, .court-option:focus { outline: 0; background: var(--soft); }
.court-option strong, .court-option span { display: block; }
.court-option span { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.court-result-status { padding: 14px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.error { color: var(--danger); background: #fff0ee; padding: 12px 14px; border-radius: 12px; margin: 14px 0; }
.success { color: var(--forest); background: #eff7d3; padding: 14px; border-radius: 12px; margin: 14px 0; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 10px; background: var(--soft); color: var(--forest); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--forest-2); }
.status-pill.confirmed::before { background: #3d9b55; }
.status-pill.cancelled::before, .status-pill.expired::before { background: var(--danger); }
.match-list { display: grid; gap: 12px; }
.match-card { display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; align-items: center; padding: 18px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); text-decoration: none; }
.date-tile { text-align: center; padding: 12px 8px; border-radius: 14px; background: var(--soft); }
.date-tile strong { display: block; font-family: Georgia, serif; font-size: 28px; line-height: 1; }
.date-tile span { font-size: 11px; text-transform: uppercase; font-weight: 900; letter-spacing: .1em; }
.match-card p { margin: 5px 0 0; color: var(--muted); }
.dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 32px; }
.circle-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 30px; }
.circle-strip.compact { margin: 16px 0 0; }
.circle-chip { white-space: nowrap; padding: 10px 14px; border-radius: 14px; background: var(--soft); font-size: 13px; font-weight: 800; }
.circle-tools { margin: -16px 0 32px; }
.channel-grid, .settings-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0; }
.channel-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.channel-card.recommended { border: 2px solid var(--forest-2); }
.channel-card.selected { border: 2px solid var(--forest); background: #f3f7e6; }
.channel-card p { margin: 0; line-height: 1.5; }
.channel-card .button { margin-top: auto; }
.setup-focus .install-callout { margin: 24px 0; }
.setup-choice-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 26px 0 16px; padding: 24px; border: 2px solid var(--forest-2); border-radius: 20px; background: var(--paper); }
.setup-choice-card p { margin: 0; line-height: 1.5; }
.setup-choice-card .button { margin-top: 4px; }
.setup-alternative { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.setup-alternative summary { color: var(--forest-2); cursor: pointer; font-weight: 800; }
.setup-alternative p { color: var(--muted); line-height: 1.5; }
.setup-alternative .button { margin-top: 8px; }
.recommendation, .primary-label { display: inline-flex; border-radius: 999px; padding: 5px 8px; background: var(--ball); color: var(--forest); font: 900 10px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.primary-label { margin-left: 6px; vertical-align: 3px; }
.setup-note { padding: 12px 14px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 13px; line-height: 1.5; }
.completion-card { text-align: center; }
.completion-card .button-row { justify-content: center; margin-top: 26px; }
.completion-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 50%; background: var(--ball); color: var(--forest); font-size: 28px; font-weight: 900; }
.qr-panel { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 24px; align-items: center; margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.qr-panel img { display: block; width: 100%; height: auto; border-radius: 14px; background: white; }
.link-preview { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; line-height: 1.5; }
.invite-list .text-button { flex: 0 0 auto; }
.mailbox-list { list-style: none; margin: 22px 0 0; padding: 0; }
.mailbox-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mailbox-list span { color: var(--muted); font-size: 12px; }
.player-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.player-entry:last-child { border-bottom: 0; }
.player-actions { display: flex; gap: 4px; }
.player-actions .text-button { font-size: 12px; }
.detail-hero { padding: 34px; color: white; background: var(--forest); border-radius: 28px; margin-bottom: 18px; }
.spread { justify-content: space-between; }
.detail-hero h1 { font-size: clamp(42px, 8vw, 64px); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.detail-grid .card .eyebrow { display: block; margin-bottom: 9px; }
.detail-item { padding: 15px; border-radius: 14px; background: rgba(255,255,255,.1); }
.detail-item span { display: block; color: rgba(255,255,255,.62); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.event-list time { color: var(--muted); white-space: nowrap; }
.empty { text-align: center; padding: 48px 24px; border: 1px dashed #bbc5bc; border-radius: 22px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 7px; }
.response-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin-top: 26px; }
.install-button-icon { font-size: 19px; line-height: 1; }
.install-callout { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid rgba(18, 60, 50, .14); border-radius: 16px; background: var(--white); }
.install-callout strong { display: block; line-height: 1.3; }
.install-callout p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.install-callout .button { margin-top: 0; white-space: nowrap; }
.install-dialog { width: min(calc(100% - 32px), 520px); max-height: min(760px, calc(100dvh - 32px)); margin: auto; padding: 0; overflow: auto; color: var(--ink); background: var(--white); border: 0; border-radius: 28px; box-shadow: 0 26px 90px rgba(16, 41, 35, .28); }
.install-dialog::backdrop { background: rgba(7, 25, 21, .62); backdrop-filter: blur(5px); }
.install-sheet { position: relative; padding: 34px; }
.install-sheet-handle { display: none; }
.install-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: var(--soft); font-size: 26px; line-height: 1; cursor: pointer; }
.install-close:focus-visible { outline: 3px solid rgba(216, 241, 90, .75); outline-offset: 2px; }
.install-app-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 22px; border-radius: 17px; color: var(--forest); background: var(--ball); font: italic 700 34px/1 var(--brand-serif); box-shadow: 0 8px 22px rgba(16, 41, 35, .14); }
.install-dialog h2 { font-size: clamp(34px, 8vw, 46px); }
.install-dialog .subtle { margin: 14px 0 0; }
.install-steps { list-style: none; padding: 0; }
.install-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin: 18px 0; align-items: start; }
.install-step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ball); font-weight: 900; }
.install-steps li > span:last-child { padding-top: 5px; line-height: 1.45; }
.install-done { width: 100%; margin-top: 20px; }
.loading { min-height: 60vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.ball { width: 42px; height: 42px; margin: auto; border-radius: 50%; background: var(--ball); box-shadow: inset -5px -4px 0 rgba(16, 41, 35, .12); animation: bounce .8s alternate infinite ease-in; }
@keyframes bounce { to { transform: translateY(-16px) rotate(20deg); } }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 120px); background: var(--ink); color: white; padding: 12px 18px; border-radius: 999px; font-weight: 700; transition: transform .25s; box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); }
.divider { height: 1px; background: var(--line); margin: 26px 0; }
.fine-print { font-size: 12px; color: var(--muted); line-height: 1.5; }
.consent-stack { display: grid; gap: 10px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.choice { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); cursor: pointer; }
.choice input { width: 18px; min-height: 18px; height: 18px; margin: 2px 0 0; }
.choice span, .choice strong, .choice small { display: block; }
.choice small { margin-top: 4px; color: var(--muted); font-weight: 500; line-height: 1.45; }
.choice-wide { padding: 15px; }
[data-pilot-fields] { display: grid; gap: 18px; }
[data-pilot-fields][hidden], [data-play-request-fields][hidden] { display: none; }
[data-play-request-fields] { display: grid; gap: 18px; padding: 18px; border-radius: 18px; background: var(--soft); }
.pilot-profile-intro { padding-top: 22px; border-top: 1px solid var(--line); }
.pilot-profile-intro p { margin: 8px 0 0; font-size: 14px; }
.pilot-details { margin-top: 28px; }
.pilot-details details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pilot-details summary { cursor: pointer; font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.pilot-details summary:focus-visible { outline: 3px solid var(--forest-2); outline-offset: 5px; border-radius: 3px; }
.pilot-details p { font-size: 14px; line-height: 1.65; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--forest-2); background: #f3f7e6; }
.pilot-access form { grid-template-columns: 1fr auto; align-items: end; margin-top: 16px; }
.danger-zone { margin-top: 18px; border-color: #e7c5c1; }
.danger-text { color: var(--danger); }

@media (max-width: 760px) {
  .brand span:last-child { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding: 58px 0 66px; min-height: auto; }
  .hero-card { display: none; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .dashboard-head, .section-head { align-items: start; flex-direction: column; }
  .match-card { grid-template-columns: 64px 1fr; }
  .match-card .status-pill { grid-column: 2; justify-self: start; }
  .field-row, .detail-grid, .channel-grid, .settings-channels, .qr-panel, .choice-grid, .pilot-access form { grid-template-columns: 1fr; }
  .pilot-page .site-header { min-height: 76px; }
  .pilot-layout { grid-template-columns: 1fr; gap: 36px; max-width: 480px; padding: 28px 0 56px; }
  .pilot-location { margin-bottom: 18px; font-size: 11px; }
  .pilot-description { margin-top: 20px; font-size: 17px; }
  .pilot-note { margin-top: 12px; font-size: 13px; }
  .pilot-signup .choice-grid { grid-template-columns: 1fr 1fr; }
  .pilot-signup .choice-grid .choice { font-size: 12px; }
  .qr-panel img { max-width: 280px; margin: auto; }
  .shell, .narrow { padding-top: 28px; }
  .response-actions { grid-template-columns: 1fr; }
  .install-callout { grid-template-columns: 1fr; }
  .install-callout .button { width: 100%; }
  .install-dialog { width: 100%; max-height: calc(100dvh - 20px); margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .install-sheet { padding: 18px max(24px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-bottom)); }
  .install-sheet-handle { display: block; width: 42px; height: 5px; margin: 0 auto 22px; border-radius: 999px; background: #cad1ca; }
  .install-close { top: 12px; right: max(14px, env(safe-area-inset-right)); }
  nav .nav-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ball { animation: none; }
  .toast { transition: none; }
}
