/* Booked: the booker page. Layout and art per the approved clickable demo ("What they see"). */
:root {
  /* Reaching Millions brand tokens (references/brand/tokens.css, "Midnight blend", 2026-11-06). */
  --rm-midnight: #070D1A; --rm-blue: #0070E5; --rm-blue-hover: #005BC0; --rm-crimson: #C8102E;
  --rm-mint-text: #0A7A5F; --rm-mint-wash: #DDF6EE; --rm-silver: #A6ACB2; --rm-ivory: #F7F4EC; --rm-white: #FFFFFF;
  --rm-ink: #0B1220; --rm-muted: #5D6577; --rm-line: #E3E0D8; --rm-blue-wash: #E7F0FC;
  /* The app's own tokens, mapped onto the brand. --navy is the bar (Settings → Header colour overrides it). */
  --navy: var(--rm-midnight); --brand: var(--brand-custom, var(--rm-blue)); --brand-deep: var(--rm-blue-hover); --wash: var(--rm-blue-wash);
  --ink: var(--rm-ink); --muted: var(--rm-muted); --line: var(--rm-line); --bg: var(--rm-ivory); --mint-deep: var(--rm-mint-text);
  --mint-wash: var(--rm-mint-wash); --danger: var(--rm-crimson); --crimson: var(--rm-crimson);
  --card: var(--rm-white); --on-brand: var(--rm-white); --field-line: var(--rm-silver);
  /* Closed days stay at the muted ink: the 4.5:1 rule covers every day button (verify: manage-checks). */
  --day-text: var(--rm-muted); --wash-hover: color-mix(in srgb, var(--rm-blue) 16%, var(--rm-white)); --neutral: var(--rm-muted);
  --disabled: color-mix(in srgb, var(--brand) 45%, var(--rm-white)); --on-disabled: var(--rm-white);
  --alert-bg: #FFF6E5; --alert-line: #F2D49B; --alert-ink: #5C3D00; --av-bg: var(--rm-line);
  --focus-soft: rgba(0, 112, 229, .25); --shadow: rgba(11, 18, 32, .07);
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
/* Always the light version, whatever the visitor's device (spec §43): there is no client dark mode. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--ui); overflow-x: hidden; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.link { border: 0; background: none; padding: 0; color: var(--brand-deep); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }

/* ---------- header: midnight bar, logo, the overhanging red wax seal 24px left of it ---------- */
.bar { position: relative; z-index: 10; background: var(--navy); height: 84px; padding: 0 20%; display: flex; align-items: center; box-shadow: 0 8px 24px rgba(7, 13, 26, .18); }
.bar .logo { height: 46px; width: auto; display: block; }
.barseal { position: absolute; z-index: 11; top: 12px; left: calc(20% - 24px - 100px); width: 100px; height: 100px;
  background: url(/book/art/wax-seal-r-512.webp) center/contain no-repeat;
  filter: drop-shadow(0 6px 8px rgba(40, 8, 6, .40)) drop-shadow(0 1px 2px rgba(40, 8, 6, .3)); transform: rotate(-8deg); }

/* ---------- the card: pulled in 20% + 48px, three columns ----------
   The inset gives way (never below 24px) before a day square would shrink under 44px. */
.wrap { padding: 60px max(24px, min(calc(20% + 48px), calc((100% - 840px) / 2))) 90px; }
.loading { text-align: center; color: var(--muted); padding: 80px 16px; }
.card { background: var(--card); border-radius: 16px; box-shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 6px 20px var(--shadow);
  display: grid; grid-template-columns: minmax(210px, 1fr) minmax(410px, 1.3fr) minmax(190px, .85fr); overflow: hidden; }
.card.single { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.col { padding: 52px 22px; min-width: 0; }
.col + .col { border-left: 1px solid var(--line); }
.card.single .col { padding: 40px 32px; }

/* left: title, avatar + name, the 3:2 offer picture, length, description */
h1.title { margin: 0 0 12px; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.who b { color: var(--crimson); }
.who small { display: block; color: var(--muted); font-size: 12.5px; }
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center 12%; background: var(--av-bg); flex: none; }
.offer { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; margin: 12px 0 10px; background: var(--wash); }
.len-line, .details-toggle { display: none; }
.desc { margin: 8px 0 0; white-space: pre-line; }

/* middle: the time zone picker, then the month inside ONE blue-outlined box */
.tzrow label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 6px; }
.tz-box { position: relative; }
.tz-box input { width: 100%; min-height: 44px; border: 1.5px solid var(--brand); border-radius: 10px; padding: 10px 12px; font: 600 16px/1.3 var(--ui); color: var(--brand-deep); background: var(--wash); text-overflow: ellipsis; }
.tz-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(11, 18, 32, .16); }
.tz-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; min-height: 44px; align-items: center; }
.tz-list li small { color: var(--muted); white-space: nowrap; }
.tz-list li[aria-selected="true"], .tz-list li:hover { background: var(--wash); }
.tz-list li.cur span { font-weight: 650; }
.tz-list li.none { cursor: default; color: var(--muted); }
.tznow { font-size: 12.5px; margin: 5px 0 14px; }
.tznote { font-size: 12.5px; color: var(--brand-deep); background: var(--wash); border-radius: 8px; padding: 6px 10px; margin: -6px 0 14px; }
.calbox { border: 1.5px solid var(--brand); border-radius: 14px; padding: 14px 10px; }
.mh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.mh h2 { margin: 0; font-size: 20px; font-weight: 650; white-space: nowrap; }
.navs { display: flex; gap: 4px; }
.navbtn { border: 0; background: var(--wash); color: var(--brand-deep); width: 44px; height: 44px; border-radius: 10px; font-size: 20px; line-height: 1; }
.navbtn:disabled { opacity: .35; }
.cal { display: flex; flex-direction: column; gap: 4px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; padding: 2px 0; }
.day { position: relative; border: 0; background: none; padding: 0; min-height: 44px; aspect-ratio: 1; border-radius: 10px; font-size: 15px; color: var(--day-text); display: flex; align-items: center; justify-content: center; }
.day[aria-disabled="true"] { cursor: default; }
.day.ok { color: var(--brand-deep); background: var(--wash); font-weight: 650; }
.day.ok::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.day.ok:hover { background: var(--wash-hover); }
.day.sel { background: var(--brand) !important; color: var(--on-brand) !important; font-weight: 700; }
.day.cur { box-shadow: inset 0 0 0 2px var(--muted); }

/* right: the day heading and the 12-hour time buttons */
.daylabel { font-size: 20px; font-weight: 650; margin: 0 0 14px; line-height: 1.3; }
.daylabel .zone { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot { display: block; width: 100%; min-height: 48px; border: 1.5px solid var(--brand); color: var(--brand-deep); background: var(--card); border-radius: 10px; padding: 11px; text-align: center; font-weight: 600; font-size: 16px; white-space: nowrap; }
.slot:hover { background: var(--wash); }
.pick { display: flex; gap: 6px; }
.pick button { flex: 1; min-height: 48px; white-space: nowrap; padding: 11px 6px; border: 0; border-radius: 10px; font-weight: 600; font-size: 16px; color: var(--on-brand); }
.pick .t { background: var(--neutral); }
.pick .n { background: var(--brand); color: var(--on-brand); }
.slot.current { border-style: dashed; border-color: var(--muted); color: var(--muted); background: none; cursor: default; }
.slot.current small { font-weight: 600; font-size: 12.5px; }
.empty-month { font-weight: 600; margin: 0 0 6px; }
.pickday { margin: 0; }

/* ---------- the form ---------- */
.back { border: 0; background: none; color: var(--brand-deep); font-weight: 650; padding: 0; min-height: 44px; margin-bottom: 6px; }
.summary { background: var(--wash); border-radius: 12px; padding: 12px 14px; color: var(--brand-deep); font-weight: 600; }
.summary .sum-title { font-size: 17px; color: var(--ink); }
.summary .sum-method { font-weight: 500; color: var(--muted); }
.summary .link, .typo .link, .guests .remove { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.summary .link { margin-left: 4px; }
.form { max-width: 520px; }
.field { margin-top: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .opt { font-weight: 500; color: var(--muted); }
.form input, .form textarea, .form select { width: 100%; min-height: 44px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 10px 12px; font: 16px/1.4 var(--ui); background: var(--card); color: var(--ink); }
.form input:focus, .form textarea:focus, .form select:focus { outline: 3px solid var(--focus-soft); outline-offset: 0; border-color: var(--brand); }
.form [aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13.5px; margin: 5px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.typo { margin: 6px 0 0; font-size: 14px; }
.guests .field { position: relative; }
.guests .remove { font-size: 13.5px; }
.add-guest { margin-top: 10px; text-decoration: none; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.primary { background: var(--brand); color: var(--on-brand); border: 0; border-radius: 10px; padding: 13px 18px; min-height: 48px; font-weight: 650; font-size: 16px; }
.primary:disabled { background: var(--disabled); color: var(--on-disabled); }
.primary.small { padding: 10px 14px; font-size: 15px; min-height: 44px; }
.actions .primary { flex: 1 1 260px; }
.instant { color: var(--mint-deep); font-weight: 650; font-size: 14px; }
.privacy { font-size: 13px; margin: 14px 0 0; }
.alert { margin: 14px 0 0; background: var(--alert-bg); border: 1px solid var(--alert-line); color: var(--alert-ink); border-radius: 12px; padding: 12px 14px; }
.alert p { margin: 0 0 10px; }
.nearest-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.nearest { border: 1.5px solid var(--brand); background: var(--card); color: var(--brand-deep); border-radius: 10px; padding: 10px 14px; min-height: 44px; font-weight: 650; }
.ts-box:empty { display: none; }
.ts-box { margin-top: 12px; }

/* ---------- clear state pages ---------- */
.state-title { font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; }
.state .lead { margin-top: 8px; }
.others { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.others a { display: block; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.others a:hover { border-color: var(--brand); }
.done-note { font-weight: 650; color: var(--mint-deep); background: var(--mint-wash); border-radius: 10px; padding: 10px 14px; margin-top: 16px; }

/* ---------- manage pages: reschedule header, the cancel "are you sure" page, links under a booking ---------- */
.current { background: var(--wash); color: var(--ink); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
#view-pick > .current { max-width: none; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(11, 18, 32, .04); }
.current-line { margin: 0; font-size: 16px; }
.current-line .k { color: var(--muted); font-weight: 600; }
.current-type { font-weight: 650; margin-bottom: 2px; }
.primary.block { display: flex; align-items: center; justify-content: center; text-decoration: none; margin: 10px 0 4px; }
.danger { background: none; border: 1.5px solid var(--danger); color: var(--danger); border-radius: 10px; padding: 12px 16px; min-height: 48px; font-weight: 650; font-size: 16px; }
.danger:disabled { opacity: .6; }
.cancel-actions .link { display: inline-flex; align-items: center; }
.reasons { border: 0; padding: 0; margin: 22px 0 0; }
.reasons legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.reasons .opt { font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; min-height: 44px; font-weight: 600; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--wash); border-color: var(--brand); color: var(--brand-deep); }
.sum-from { font-weight: 500; color: var(--muted); }
.manage-box { margin-top: 18px; }
.manage-box p { margin: 6px 0 0; }
.manage a { color: var(--brand-deep); font-weight: 650; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

/* ---------- home: Steve's sections, cards in rows ---------- */
.home { max-width: 1120px; margin: 0 auto; }
.home-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.home-av { width: 64px; height: 64px; }
.home-head .state-title { margin: 0; }
.home-intro { margin: 4px 0 0; font-size: 16px; }
.home-sec { margin-top: 30px; }
.sec-name { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.tcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tcard { display: flex; flex-direction: column; height: 100%; background: var(--card); color: var(--ink); text-decoration: none; border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 6px 20px var(--shadow); }
.tcard:hover { border-color: var(--brand); }
.tcard-img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--wash); }
.tcard-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.tcard-name { font-size: 18px; letter-spacing: -.01em; }
.tcard-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcard-next { margin-top: auto; padding-top: 10px; color: var(--brand-deep); font-weight: 650; }

/* ---------- the "Booked" moment: warm-paper envelope + red wax seal (v3) ---------- */
.sealstage { display: flex; flex-direction: column; align-items: center; padding: 150px 16px 80px; }
.env { position: relative; width: 360px; max-width: 100%; height: 230px; perspective: 900px; }
.env::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: -22px; height: 46px; border-radius: 50%; background: rgba(30, 25, 15, .42); filter: blur(18px); }
.env::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -6px; height: 16px; border-radius: 50%; background: rgba(30, 25, 15, .38); filter: blur(6px); }
.paper { position: absolute; inset: 0; background: transparent no-repeat center / 100% 100%; }
.eback { z-index: 1; background-image: url(/book/art/env-back.webp); filter: drop-shadow(0 1px 1.5px rgba(60, 45, 25, .22)); }
.letter { position: absolute; left: 24px; right: 24px; top: 18px; height: 172px; z-index: 2; border-radius: 4px; background: #FBF6EA; box-shadow: 0 2px 8px rgba(80, 60, 20, .15); padding: 22px; font-family: Newsreader, Georgia, serif; color: #2B2215; transform: translateY(-170px); overflow: hidden; }
.letter .k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8A7550; }
.letter h3 { margin: 6px 0 4px; font-size: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.letter p { margin: 2px 0; color: #5A4B30; font-size: 15px; }
.efront { z-index: 3; background-image: url(/book/art/env-front.webp); }
.eflap { z-index: 1; transform-origin: top center; transform: rotateX(180deg); background-image: url(/book/art/env-flap.webp); }
.seal { position: absolute; left: 50%; top: 62%; width: 84px; height: 84px; margin: -42px 0 0 -42px; z-index: 6; opacity: 0; transform: scale(2.2) rotate(-12deg); background: url(/book/art/wax-seal-r-512.webp) center / contain no-repeat; filter: drop-shadow(0 4px 5px rgba(55, 10, 8, .38)); }
.done { margin-top: 46px; text-align: center; opacity: 0; transform: translateY(10px); max-width: 520px; }
.done .word { font-family: "Great Vibes", cursive; font-weight: 400; font-size: 76px; line-height: 1; margin: 0; outline: none; color: var(--mint-deep); }
.done .when { font-size: 17px; font-weight: 600; margin: 12px 0 4px; }
.done .sub { color: var(--muted); margin: 0 0 20px; }
.btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btns a { display: inline-flex; align-items: center; min-height: 44px; border: 1.5px solid var(--brand); color: var(--brand-deep); border-radius: 10px; padding: 10px 16px; font-weight: 600; background: var(--card); text-decoration: none; }
.btns a:hover { background: var(--wash); }
.go .letter { animation: slideIn .9s cubic-bezier(.6, 0, .3, 1) .5s forwards; }
.go .eflap { animation: flapClose .75s cubic-bezier(.5, 0, .25, 1) 1.45s forwards; }
.go .seal { animation: stamp .45s cubic-bezier(.3, 1.5, .5, 1) 2.35s forwards; }
.go .env { animation: thud .3s ease-out 2.55s; }
.go .done { animation: rise .7s ease-out 3s forwards; }
@keyframes slideIn { to { transform: translateY(22px); } }
@keyframes flapClose { 0% { transform: rotateX(180deg); z-index: 1; } 49% { z-index: 1; } 50% { z-index: 5; } 100% { transform: rotateX(0); z-index: 5; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.2) rotate(-12deg); } 60% { opacity: 1; transform: scale(.92) rotate(-4deg); } 100% { opacity: 1; transform: scale(1) rotate(-6deg); } }
@keyframes thud { 50% { transform: translateY(3px); } }
@keyframes rise { to { opacity: 1; transform: none; } }
/* The sealed end state: a skipped animation, a refreshed /b/ page, or reduced motion. */
.sealed .letter { transform: translateY(22px); }
.sealed .eflap { transform: rotateX(0); z-index: 5; }
.sealed .seal { opacity: 1; transform: scale(1) rotate(-6deg); }
.sealed .done { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .go .letter, .go .eflap, .go .seal, .go .env, .go .done { animation: none; }
  .go .letter { transform: translateY(22px); }
  .go .eflap { transform: rotateX(0); z-index: 5; }
  .go .seal { opacity: 1; transform: scale(1) rotate(-6deg); }
  .go .done { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- phone: columns stack; the left column becomes a compact header row ---------- */
@media (max-width: 900px) {
  .bar { padding: 0 16px 0 120px; } /* seal 12px + 84px, then the 24px gap */
  .barseal { left: 12px; top: 10px; width: 84px; height: 84px; }
  .bar .logo { height: 38px; }
  .wrap { padding: 28px 16px 64px; }
  .card { grid-template-columns: 1fr; }
  .col { padding: 20px 12px; }
  .col + .col { border-left: 0; border-top: 1px solid var(--line); }
  .card.single .col { padding: 24px 16px; }
  .info { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "av title btn" "av len btn" "det det det"; column-gap: 10px; align-items: center; padding: 14px 12px; }
  .info .who { display: contents; }
  .info .who > div { display: none; }
  .info .av { grid-area: av; }
  .info h1.title { grid-area: title; font-size: 17px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .len-line { display: block; grid-area: len; margin: 0; font-size: 13px; }
  .details-toggle { display: block; grid-area: btn; border: 0; background: var(--wash); color: var(--brand-deep); border-radius: 10px; padding: 0 12px; min-height: 44px; font-weight: 650; font-size: 14px; }
  #details { grid-area: det; display: none; }
  #details.open { display: block; }
  .calbox { padding: 6px 5px; }
  .cal, .cal-row { gap: 2px; }
  .times { scroll-margin-top: 8px; }
  .sealstage { padding: 160px 16px 48px; }
  .done { margin-top: 36px; }
  .done .word { font-size: 64px; }
  .done .sub { margin-bottom: 14px; }
}

/* "Preview as client" from the admin (?preview=1). */
.preview-banner { margin: 0; padding: 10px 16px; text-align: center; font-weight: 650; background: #FFF4D6; color: #6B4700; }
