:root {
  --brand: #2f6f62;
  --paper: #fbf8f3; --card: #ffffff; --ink: #2c2a27; --mut: #6a645c; --line: rgba(44, 42, 39, .14); --soft: #f1ede6;
  --accent: var(--brand); --on-accent: #fff; --warn: #9a4b2f; --ok: #2e6b3f;
  --display: Georgia, "Times New Roman", serif; --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-meta: .78rem; --t-small: .875rem; --t-body: 1rem; --t-lead: 1.2rem; --t-h2: 1.25rem; --t-fig: 1.5rem;
  --r: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1b1a18; --card: #24221f; --ink: #ece7df; --mut: #a9a196; --line: rgba(236, 231, 223, .14); --soft: #2d2a26; --warn: #e09a7c; --ok: #8fc79c; color-scheme: dark; --shadow: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { max-width: 760px; margin: 0 auto; padding: 22px 16px 6px; display: flex; align-items: center; gap: 12px; }
.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: var(--t-h2); font-weight: 600; }
.top .brand img { height: 44px; width: auto; }
.top .tel { margin-left: auto; font-size: var(--t-body); color: var(--mut); white-space: nowrap; }
main { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 4.5vw, 2.2rem); line-height: 1.15; margin: 12px 0 18px; }
h2 { font-family: var(--display); font-weight: 600; font-size: var(--t-h2); margin: 0; line-height: 1.25; }
h3 { font-size: var(--t-body); margin: 0 0 6px; }
.mut { color: var(--mut); }
.small { font-size: var(--t-small); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin: 0 0 14px; overflow: clip; }
.step { padding: 18px 18px 20px; }
.step + .step { border-top: 1px solid var(--line); }
.step-h { display: flex; align-items: baseline; gap: 10px; }
.step-h .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--t-meta); font-weight: 700; background: var(--soft); color: var(--accent); transform: translateY(-2px); }
.step.done .step-h .n { background: var(--accent); color: var(--on-accent); }
.step-h h2 { flex: 1; }
.step .sum { margin: 4px 0 0 36px; color: var(--mut); }
.step .body { margin: 14px 0 0; }
.step.locked { opacity: .55; }
.step.locked .body { display: none; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: var(--t-body); }

.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); box-shadow: inset 0 0 0 1px var(--accent); }
.opt .t { font-weight: 600; display: block; }
.opt .s { font-size: var(--t-small); color: var(--mut); display: block; }
.opt .grow { flex: 1; min-width: 0; }

.face { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; background: var(--soft); }
.face.sm { width: 30px; height: 30px; }
.face.lg { width: 72px; height: 72px; }
.face.initials { display: inline-grid; place-items: center; font-weight: 700; font-size: var(--t-small); color: var(--accent); }

.faces { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.who { flex: none; display: grid; justify-items: center; gap: 4px; width: 84px; padding: 8px 4px; border: 1px solid transparent; border-radius: 12px; background: none; cursor: pointer; font-size: var(--t-small); line-height: 1.2; text-align: center; }
.who[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.who .any { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-weight: 700; }

.days { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 10px 0 4px; scrollbar-width: thin; }
.day { flex: none; width: 62px; padding: 7px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; justify-items: center; line-height: 1.15; }
.day .d { font-size: var(--t-meta); color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.day .n { font-size: var(--t-lead); font-weight: 700; }
.day .c { font-size: var(--t-meta); color: var(--accent); }
.day[disabled] { opacity: .4; cursor: default; }
.day[disabled] .c { color: var(--mut); }
.day[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.day[aria-pressed="true"] .d, .day[aria-pressed="true"] .c { color: inherit; opacity: .9; }
.more { flex: none; align-self: stretch; padding: 0 12px; border-radius: 12px; border: 1px dashed var(--line); background: none; cursor: pointer; color: var(--mut); font-size: var(--t-small); }

.times { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 8px; }
.time { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; text-align: left; }
.time b { font-size: var(--t-body); }
.time .s { font-size: var(--t-meta); color: var(--mut); display: block; line-height: 1.2; }
.time[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.band { font-size: var(--t-meta); letter-spacing: .05em; text-transform: uppercase; color: var(--mut); margin: 14px 0 0; }

.field { display: grid; gap: 4px; margin: 0 0 12px; }
.field label, .legend { font-weight: 600; font-size: var(--t-body); }
.field .hint { font-size: var(--t-small); color: var(--mut); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 10px; background: var(--card); min-height: 46px; }
textarea { min-height: 84px; resize: vertical; }
input[aria-invalid="true"] { border-color: var(--warn); }
.row2 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.seg button, .chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.seg button[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; min-height: 48px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.hold { display: inline-flex; gap: 6px; align-items: center; font-size: var(--t-small); color: var(--mut); margin: 0 0 12px; }
.msg { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, var(--card)); color: var(--warn); margin: 10px 0; }
.ok-msg { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ok); }
.empty { padding: 14px; border-radius: 12px; background: var(--soft); color: var(--mut); }
.skel { height: 46px; border-radius: 10px; background: linear-gradient(90deg, var(--soft), color-mix(in srgb, var(--soft) 60%, var(--card)), var(--soft)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.done-card { padding: 22px 18px; text-align: left; }
.done-card .big { font-family: var(--display); font-size: var(--t-fig); line-height: 1.25; margin: 6px 0 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0; }
.kv dt { color: var(--mut); }
.kv dd { margin: 0; font-weight: 600; }
.tick { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }

.elsewhere { margin-top: 26px; }
.elsewhere h2 { font-size: var(--t-body); margin-bottom: 10px; }
.elsewhere .opt { text-decoration: none; }

.foot { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; color: var(--mut); font-size: var(--t-small); border-top: 1px solid var(--line); }
.foot .notice { margin: 0 0 10px; color: var(--ink); }
.foot .contact { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.hp { position: absolute; left: -9999px; }
label.check { display: flex; gap: 10px; align-items: center; margin: 6px 0 12px; font-size: var(--t-body); }
label.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- motion and finish ---------- */
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
input, textarea { caret-color: var(--accent); }
:root { --ease: cubic-bezier(.16, 1, .3, 1); }
.opt, .who, .day, .time, .seg button, .chip, .btn { transition: background .2s, border-color .2s, color .2s, transform .25s var(--ease), box-shadow .25s; }
.time:hover, .day:not([disabled]):hover, .who:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.btn:active, .time:active, .day:active { transform: scale(.97); }
.step-h .n svg.drawn { width: 14px; height: 14px; }
/* drawn check */
svg.drawn { display: block; color: var(--ok); }
svg.drawn circle { fill: color-mix(in srgb, var(--ok) 14%, transparent); stroke: currentColor; stroke-width: 2; stroke-dasharray: 1.02; stroke-dashoffset: 1.02; animation: draw .7s var(--ease) .05s forwards; }
svg.drawn path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .45s var(--ease) .5s forwards; }
svg.drawn.still circle, svg.drawn.still path { animation: none; stroke-dashoffset: 0; }
.step-h .n svg.drawn { color: var(--on-accent); }
.step-h .n svg.drawn circle { fill: none; stroke: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* the confirmation settles in, one beat after the check */
.done-card.arrive > * { animation: rise .6s var(--ease) both; }
.done-card.arrive > :nth-child(2) { animation-delay: .35s; } .done-card.arrive > :nth-child(3) { animation-delay: .42s; }
.done-card.arrive > :nth-child(4) { animation-delay: .49s; } .done-card.arrive > :nth-child(n+5) { animation-delay: .56s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
/* hold: a ring that empties as the 10 minutes run out */
@property --left { syntax: "<number>"; inherits: false; initial-value: 1; }
.holdring { --left: var(--from, 1); width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) calc(var(--left) * 360deg), color-mix(in srgb, var(--accent) 16%, transparent) 0);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px); mask: radial-gradient(circle, transparent 5px, #000 5.5px);
  animation: drain linear forwards; }
@keyframes drain { from { --left: var(--from, 1); } to { --left: 0; } }
/* page content swaps softly; the chosen time travels into the step summary */
::view-transition-old(root) { animation: .16s ease-out both pt-out; }
::view-transition-new(root) { animation: .4s var(--ease) both pt-in; }
@keyframes pt-out { to { opacity: 0; } }
@keyframes pt-in { from { opacity: 0; transform: translateY(6px); } }
::view-transition-group(picked) { animation-duration: .5s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
