/* Shared tokens and components for the website, booking page and admin portal. */
:root {
  --bg: #FFFBEC; --surface: #FFFFFF; --surface-2: #FFF3C4; --fg: #22184D; --muted: #5E5585;
  --line: #F1E3A6; --accent: #FFCB1F; --accent-fg: #22184D; --accent-deep: #E0A100;
  --ink: #22184D; --ink-fg: #FFE070; --ink-2: #2E2466;
  --ok: #1B7A4B; --ok-bg: #DDF5E7; --warn: #8A5A00; --warn-bg: #FFF0C9; --bad: #B3263F; --bad-bg: #FDE3E8; --info: #2B4FB3; --info-bg: #E3EAFF;
  --header: rgba(255, 251, 236, .93);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23F2C21B' fill-opacity='.34'%3E%3Cpath d='M18 40c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3Cpath transform='rotate(140 100 50)' d='M84 54c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3Cpath transform='rotate(-60 60 110)' d='M44 114c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3C/g%3E%3C/svg%3E");
  --shadow: 0 14px 34px -18px rgba(60, 40, 0, .38);
  --display: 'Young Serif', Georgia, serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  --r-lg: 22px; --r-md: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17112F; --surface: #221A45; --surface-2: #2D2457; --fg: #FFF6D6; --muted: #C9C0EA;
    --line: #3B3170; --accent: #FFCB1F; --accent-fg: #1A1336; --accent-deep: #FFD95A;
    --ink: #FFCB1F; --ink-fg: #1A1336; --ink-2: #FFD95A;
    --ok: #62D69D; --ok-bg: #173A2C; --warn: #FFD27A; --warn-bg: #3B2E12; --bad: #FF8DA0; --bad-bg: #44192A; --info: #A9BCFF; --info-bg: #222C57;
    --header: rgba(23, 17, 47, .93);
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23FFCB1F' fill-opacity='.09'%3E%3Cpath d='M18 40c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3Cpath transform='rotate(140 100 50)' d='M84 54c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3Cpath transform='rotate(-60 60 110)' d='M44 114c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3C/g%3E%3C/svg%3E");
    --shadow: 0 14px 34px -18px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #17112F; --surface: #221A45; --surface-2: #2D2457; --fg: #FFF6D6; --muted: #C9C0EA;
    --line: #3B3170; --accent: #FFCB1F; --accent-fg: #1A1336; --accent-deep: #FFD95A;
    --ink: #FFCB1F; --ink-fg: #1A1336; --ink-2: #FFD95A;
    --ok: #62D69D; --ok-bg: #173A2C; --warn: #FFD27A; --warn-bg: #3B2E12; --bad: #FF8DA0; --bad-bg: #44192A; --info: #A9BCFF; --info-bg: #222C57;
    --header: rgba(23, 17, 47, .93);
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23FFCB1F' fill-opacity='.09'%3E%3Cpath d='M18 40c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3Cpath transform='rotate(140 100 50)' d='M84 54c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3Cpath transform='rotate(-60 60 110)' d='M44 114c9 4 21-1 25-14 .5-1.6 2.6-1.5 2.7.1 1 13-11 23-25 18-1.6-.6-1.6-3-.2-4.1z'/%3E%3C/g%3E%3C/svg%3E");
    --shadow: 0 14px 34px -18px rgba(0, 0, 0, .75);
    color-scheme: dark;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100% }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } *, *::before, *::after { animation: none !important; transition: none !important } }
body {
  margin: 0; background: var(--bg) var(--pattern); color: var(--fg); font: 16px/1.55 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance }
p { margin: 0 }
a { color: inherit }
img { max-width: 100%; display: block }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
[hidden] { display: none !important }
:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-radius: 8px }
.wrap { max-width: 1120px; margin: 0 auto }
.eyebrow { font: 500 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.muted { color: var(--muted) }
.small { font-size: .88rem }
.num { font-variant-numeric: tabular-nums }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--ink-fg);
  font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow) }
.btn.yellow { background: var(--accent); border-color: var(--accent); color: var(--accent-fg) }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--fg) }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad) }
.btn.small { min-height: 38px; padding: 0 16px; font-size: .92rem }
.btn.tiny { min-height: 32px; padding: 0 12px; font-size: .84rem; border-width: 1.5px }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none }
.btn svg { width: 18px; height: 18px; flex: none }
.link-btn { background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px }

/* chips & pills */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--fg) }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85 }
.chip.ok { background: var(--ok-bg); color: var(--ok) }
.chip.warn { background: var(--warn-bg); color: var(--warn) }
.chip.bad { background: var(--bad-bg); color: var(--bad) }
.chip.info { background: var(--info-bg); color: var(--info) }
.chip.muted { background: var(--surface-2); color: var(--muted) }
.chip.plain::before { display: none }

/* panels & forms */
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 22px; min-width: 0 }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; min-width: 0 }
.field .hint { font-weight: 500 }
.input, .field input, .field select, .field textarea {
  border: 2px solid var(--line); background: var(--bg); border-radius: 12px; padding: 11px 12px; font-size: 1rem; width: 100%; min-width: 0; font-weight: 500;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent-deep); outline: none }
.row { display: grid; gap: 12px; grid-template-columns: 1fr }
@media (min-width: 560px) { .row.two { grid-template-columns: 1fr 1fr } .row.three { grid-template-columns: 1fr 1fr 1fr } }
.stack { display: grid; gap: 14px }
.hint { font-size: .82rem; color: var(--muted); font-weight: 500 }
.error { color: var(--bad); font-weight: 600; font-size: .9rem; background: var(--bad-bg); border-radius: 12px; padding: 10px 12px }
.success { color: var(--ok); font-weight: 600; font-size: .9rem; background: var(--ok-bg); border-radius: 12px; padding: 10px 12px }
.seg { display: flex; flex-wrap: wrap; gap: 8px }
.seg input { position: absolute; opacity: 0; pointer-events: none }
.seg label { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: .95rem }
.seg input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--ink-fg) }
.seg input:focus-visible + label { outline: 3px solid var(--accent-deep); outline-offset: 2px }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer }
.check input { width: 20px; height: 20px; accent-color: var(--ink) }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer }
.switch input { position: absolute; opacity: 0 }
.switch .track { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s }
.switch input:checked + .track { background: var(--ok) }
.switch input:checked + .track::after { transform: translateX(18px) }
.switch input:focus-visible + .track { outline: 3px solid var(--accent-deep); outline-offset: 2px }

/* stepper */
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--surface) }
.stepper button { width: 40px; height: 38px; border: 0; background: transparent; font-size: 1.2rem; font-weight: 700; color: var(--fg) }
.stepper button:hover { background: var(--surface-2) }
.stepper output { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums }

/* calendar */
.cal { display: grid; gap: 10px; max-width: 480px }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.cal-head h3 { font-size: 1.25rem }
.cal-nav { display: flex; gap: 6px }
.cal-nav button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-weight: 800 }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px }
.cal-dow { font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 6px 0 }
.cal-day {
  position: relative; aspect-ratio: 1 / 1; max-width: 100%; border-radius: 12px; border: 2px solid transparent; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 2px; min-width: 0;
}
.cal-day.empty { background: transparent }
.cal-day.open { border-color: var(--line); cursor: pointer }
.cal-day.open:hover { border-color: var(--accent-deep) }
.cal-day.full { background: var(--bad-bg); color: var(--bad) }
.cal-day.blackout, .cal-day.closed, .cal-day.past { color: var(--muted); opacity: .55; background: transparent }
.cal-day.selected { background: var(--ink); color: var(--ink-fg); border-color: var(--ink) }
.cal-day.today > span:first-child { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px }
.cal-day .dots { display: flex; gap: 3px; height: 6px }
.cal-day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-deep); display: block }
.cal-day.selected .dots i { background: var(--ink-fg) }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); font-weight: 600 }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 2px solid var(--line); background: var(--surface) }
.cal-legend i.full { background: var(--bad-bg); border-color: var(--bad-bg) }
.cal-legend i.off { opacity: .5; background: transparent }
.cal-legend i.ev { border-radius: 50%; background: var(--accent-deep); border-color: var(--accent-deep); width: 8px; height: 8px }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--ink-fg); padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); max-width: calc(100vw - 32px) }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em }
