:root {
  color-scheme: light;
  --paper: #f5f5f7;
  --surface: #fff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #dedee3;
  --blue: #0071e3;
  --ease: cubic-bezier(.23, 1, .32, 1);
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; overscroll-behavior: none }
body { margin: 0 }
body:has(dialog[open]) { overflow: hidden }
button, input, select { font: inherit }
button, a, summary { touch-action: manipulation }
button, summary { user-select: none; -webkit-user-select: none }
button { cursor: pointer; transition: transform 140ms var(--ease), background 180ms ease, color 180ms ease }
button:active:not(:disabled) { transform: scale(.97) }
button:disabled { cursor: default; opacity: .45 }
a { color: var(--blue); text-underline-offset: 3px }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #0071e370; outline-offset: 4px }
[hidden] { display: none !important }
.shell { width: min(100%, 560px); margin: auto; padding: max(64px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); min-height: 100svh; min-height: 100dvh; display: flex; flex-direction: column }
main { width: 100% }
section { margin-bottom: 24px }
h1, h2, h3, p { margin: 0 }
h2 { font-size: 1.625rem; line-height: 1.2; font-weight: 650; letter-spacing: -.7px }
p { font-size: 0.9375rem; line-height: 1.55 }
.small { font-size: 0.8125rem; color: var(--muted); line-height: 1.55 }
.quiet { display: inline-flex; align-items: center; justify-content: center; padding: 10px 12px; min-height: 44px; border: 0; background: none; color: var(--muted); font-size: 0.875rem; border-radius: 10px }
.date-heading { margin: 0 4px 40px }
.date-control { position: relative; width: fit-content; max-width: 100%; border-radius: 8px }
.date-control h1 { display: flex; align-items: center; gap: 14px; font-size: clamp(2.25rem, 9vw, 2.75rem); line-height: 1.15; font-weight: 650; letter-spacing: -1.6px }
.date-control h1 span { min-width: 0; overflow-wrap: anywhere }
.date-control h1 svg { color: #85858b; flex-shrink: 0; margin-top: 8px }
#day-select { position: absolute; inset: 0; opacity: 0; width: 100%; min-height: 48px; cursor: pointer; font-size: 1rem }
.date-control:focus-within { outline: 3px solid #0071e370; outline-offset: 6px }
#selected-calendar-date { font-size: 1.0625rem; color: var(--muted); letter-spacing: -.25px; margin-top: 8px }
.command-panel { background: var(--surface); border: 1px solid #e7e7eb; border-radius: 24px; padding: 24px; box-shadow: 0 4px 20px #1d1d1f03 }
label.command-label { display: block; font-size: 0.9375rem; font-weight: 600; letter-spacing: -.15px; margin: 0 0 14px }
.quick-form { display: flex; align-items: center; gap: 8px; border: 1px solid #99999f; background: #fff; border-radius: 14px; padding: 6px; transition: border-color 180ms ease, box-shadow 180ms ease }
.quick-form:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #0071e31a }
input:not([type=checkbox]) { display: block; width: 100%; min-width: 0; font-size: 1.0625rem; padding: 14px; min-height: 54px; border: 1px solid #c6c6cc; border-radius: 12px; background: var(--surface); color: var(--ink) }
.quick-form input { border: 0; background: none; font-size: 1.25rem; letter-spacing: -.4px; font-weight: 400; padding: 10px 8px; min-height: 48px; outline: none }
.quick-form input::placeholder { color: #6e6e73; opacity: 1 }
.quick-form button { display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--blue); color: #fff; width: 44px; height: 44px; flex-shrink: 0 }
.command-hint { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; margin-top: 14px; max-width: 32ch }
.command-hint span { white-space: nowrap }
#current { position: relative; padding: 24px; background: var(--surface); border: 1px solid #e7e7eb; border-radius: 24px; margin-top: 16px }
.eyebrow { display: flex; align-items: center; gap: 7px; color: #24713e; font-size: 0.8125rem; font-weight: 500 }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
#current h3 { font-size: 1.375rem; line-height: 1.25; font-weight: 600; letter-spacing: -.55px; margin: 10px 0 8px; overflow-wrap: anywhere }
#current p { font-size: 0.875rem; color: var(--muted); line-height: 1.5 }
.cancel-session { color: var(--blue); padding: 10px 0; margin: 8px 0 -8px; font-size: 0.875rem }
.unbooked { color: var(--muted); font-size: 0.875rem; margin: 24px 4px }
.empty { padding: 24px 4px 8px }
.empty h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.2px }
.empty p { color: var(--muted); font-size: 0.875rem; margin-top: 6px }
.remove-confirm { width: min(calc(100% - 48px), 400px); max-height: 85dvh; overflow-y: auto; color: var(--ink); padding: 24px; background: var(--surface); border: 1px solid #c7d9ee; border-radius: 24px; margin: auto; box-shadow: 0 20px 70px #0002 }
.remove-confirm p { font-size: 1rem; line-height: 1.45; font-weight: 500; letter-spacing: -.2px; margin-bottom: 12px }
.remove-confirm p.small { font-size: 0.8125rem; font-weight: 400; letter-spacing: 0 }
.remove-confirm > div { display: flex; flex-direction: row-reverse; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px }
.danger { padding: 12px 16px; min-height: 44px; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font-size: 0.875rem; font-weight: 500 }
#remove-confirm .danger { background: #c93632 }
#choices { margin: 24px 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line) }
summary { cursor: pointer; min-height: 48px; padding: 14px 0; font-size: 0.875rem; color: var(--ink) }
#choices > summary { display: flex; align-items: center; justify-content: space-between; list-style: none }
#choices > summary::-webkit-details-marker { display: none }
#choices > summary svg { color: var(--muted); transition: transform 180ms var(--ease) }
#choices[open] > summary svg { transform: rotate(90deg) }
.session-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line) }
.session { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); text-align: left; padding: 18px 0; min-height: 88px }
.session-text { display: block; min-width: 0 }
.session strong { display: block; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; letter-spacing: -.2px; overflow-wrap: anywhere }
.session small { display: block; font-size: 0.8125rem; color: var(--muted); line-height: 1.45; margin-top: 5px; overflow-wrap: anywhere }
.seats { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 5px }
.session:disabled { opacity: 1; color: var(--muted) }
.pin { font-size: 0.75rem; min-width: 44px; padding: 10px 0; color: var(--muted) }
.pin[aria-pressed=true] { color: var(--blue) }
.schedule-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 4px 0 }
#checked { font-size: 0.75rem; color: var(--muted) }
#refresh { font-size: 0.8125rem; padding-right: 0; flex-shrink: 0 }
#notice { font-size: 0.875rem; line-height: 1.5; color: #205b39; background: #eaf4ed; border-radius: 16px; padding: 16px 18px; margin: 16px 0; overflow-wrap: anywhere }
#notice.pending { color: #334965; background: #eaf0f8 }
#notice.error { color: #92392f; background: #f9eeeb }
#notice.pending::before { content: ''; display: inline-block; width: 11px; height: 11px; border: 1.5px solid #a2b2c8; border-top-color: #334965; border-radius: 50%; margin-right: 9px; animation: spin .8s linear infinite }
.quota-link { display: block; width: fit-content; min-height: 44px; padding-top: 12px; color: inherit }
footer { margin-top: auto; padding: 40px 4px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px }
footer .quiet { padding-left: 0 }
footer a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; text-decoration: none; color: var(--muted); font-size: 0.8125rem }
label:not(.checkbox):not(.command-label) { display: block; font-size: 0.875rem; font-weight: 500; margin: 20px 0 8px }
#unlock, #connect { padding-top: 16px }
#unlock > p, #connect > p { color: var(--muted); margin-top: 12px }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font-size: 0.9375rem; font-weight: 500; padding: 14px 20px; margin-top: 24px }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; margin-top: 22px }
.checkbox input { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0 }
.checkbox small { display: block; color: var(--muted); font-size: 0.8125rem; line-height: 1.45; margin-top: 5px }
#settings { width: min(calc(100% - 32px), 480px); max-height: min(85dvh, 760px); padding: 24px; border: 1px solid #fff; border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px #0002; overflow-y: auto; overscroll-behavior: contain }
#settings::backdrop, .remove-confirm::backdrop { background: #1d1d1f45; backdrop-filter: blur(4px) }
.settings-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px }
#settings-close { background: #f0f0f3; width: 44px; min-height: 44px; padding: 8px; border-radius: 50%; color: #65656b }
#settings p { color: var(--muted); font-size: 0.875rem; margin: 14px 0 }
#settings details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px 0 }
#shortcuts p { margin: 10px 0; font-size: 0.8125rem }
.settings-actions { display: flex; flex-direction: column; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px }
.settings-actions .quiet, #update-app { padding-left: 0; color: var(--blue) }
#disconnect { color: #b5312b }
.text-link { display: inline-block; min-height: 44px; padding: 12px 0; font-size: 0.875rem }
#update-app { margin-top: 12px }
.demo-banner { padding: 12px 14px; background: #e9edf3; color: #49596d; font-size: 0.8125rem; border-radius: 12px; margin-bottom: 24px }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0 }
@starting-style { #settings[open], .remove-confirm[open] { opacity: 0; transform: translateY(12px) scale(.98) } }
#settings, .remove-confirm { transition: opacity 220ms var(--ease), transform 220ms var(--ease), display 220ms allow-discrete, overlay 220ms allow-discrete }
#settings:not([open]), .remove-confirm:not([open]) { opacity: 0; transform: translateY(12px) scale(.98) }
@keyframes spin { to { transform: rotate(360deg) } }
@media(hover:hover) and (pointer:fine) { .quiet:hover, footer a:hover { color: var(--blue) } .primary:hover, .quick-form button:hover, #confirm-switch:hover { background: #0077ed } .session:hover:not(:disabled) { color: var(--blue) } summary:hover { color: var(--blue) } }
@media(min-width:700px) { .shell { padding-top: 96px; padding-bottom: 32px }.date-heading { margin-bottom: 40px }.date-control h1 { font-size: 3rem }.command-panel { padding: 28px }.command-hint { max-width: none } }
@media(max-width:350px) { .shell { padding-left: 18px; padding-right: 18px; padding-top: 44px }.command-panel, #current, .remove-confirm { padding: 20px }.quick-form input { font-size: 1.125rem }.date-control h1 { font-size: 2.125rem } }
@media(max-width:600px) { #settings { width: 100%; max-width: none; max-height: 88dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; padding-bottom: max(24px,env(safe-area-inset-bottom)) } }
@media(max-height:520px) { .shell { padding-top: max(24px,env(safe-area-inset-top)) }.date-heading { margin-bottom: 24px }footer { padding-top: 24px } }
@media(prefers-reduced-motion:reduce) { *,*::before { animation: none !important; transition: none !important }button:active:not(:disabled) { transform: none }#settings:not([open]) { transform: none } }
@media(prefers-reduced-transparency:reduce) { #settings::backdrop, .remove-confirm::backdrop { backdrop-filter: none; background: #4449 } }
@media(prefers-contrast:more) { :root { --muted: #45454b; --line: #888890 }.command-panel, #current, .quick-form, .remove-confirm { border-color: #888890 } }

#invite-result { margin-top:20px }
#invite-link { font-size:1rem }
.invite-actions { display:flex; gap:12px; margin-top:4px }
.invite-actions .quiet { padding-left:0; color:var(--blue) }
.friend-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 0; border-top:1px solid var(--line) }
.friend-row > div { min-width:0 }
.friend-row strong { display:block; font-size:.875rem; font-weight:550; overflow-wrap:anywhere }
.friend-row small { display:block; color:var(--muted); font-size:.75rem; margin-top:4px }
.friend-row button { color:#b5312b; flex-shrink:0 }
#confirm-revoke-friend { background:#c93632 }
#friends-panel .primary { margin-top:16px }
