:root {
  color-scheme: light;
  --ink: #292824;
  --muted: #716d66;
  --paper: #f7f3ea;
  --paper-2: #efe8dc;
  --card: rgba(255, 253, 248, .94);
  --line: #d9d0c1;
  --sage: #6f8874;
  --sage-dark: #50685a;
  --lavender: #8b7d96;
  --rose: #b98686;
  --gold: #a88a56;
  --open: #dfeadf;
  --booked: #efd4cf;
  --blocked: #e1ded8;
  --shadow: 0 20px 55px rgba(69, 59, 47, .09);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); }
.public-page {
  --ink: #2c1934;
  --muted: #584963;
  --paper: #e7d9e7;
  --paper-2: #e9dfe8;
  --card: rgba(255, 250, 255, .94);
  --line: #c6aec9;
  --sage: #745684;
  --sage-dark: #52305f;
  --lavender: #8c6aa0;
  --gold: #387e80;
  --open: #d9eae9;
  background: linear-gradient(rgba(244, 233, 245, .78), rgba(244, 233, 245, .85)), url("prism-schedule.png") center / cover fixed, var(--paper);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.shell { position: relative; z-index: 1; width: min(940px, calc(100% - 32px)); margin: 0 auto; padding: 68px 0 54px; }
.site-nav { display: flex; justify-content: space-between; gap: 16px; margin: -36px 0 54px; padding-bottom: 13px; border-bottom: 1px solid rgba(82, 48, 95, .3); }
.site-nav a { color: var(--sage-dark); font-size: .77rem; font-weight: 800; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-header { max-width: 740px; margin-bottom: 38px; padding: 28px; border: 1px solid rgba(255, 250, 255, .54); border-radius: 20px; background: rgba(255, 250, 255, .74); backdrop-filter: blur(8px); }
.eyebrow { margin: 0 0 9px; color: var(--sage-dark); font-size: .73rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.65rem, 7vw, 5.3rem); font-weight: 400; letter-spacing: -.045em; line-height: .98; }
h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.intro { color: var(--muted); font-size: 1.06rem; line-height: 1.7; }
.booking-card { margin: 18px 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.step-label { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-label span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--sage-dark); font: 700 .8rem Georgia, serif; }
.step-label h2 { margin: 0; font-size: 1.05rem; }
.day-list, .slot-list { display: grid; grid-template-columns: repeat(10, minmax(85px, 1fr)); gap: 10px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: thin; }
.day-button, .slot-button { min-height: 62px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf9; color: var(--ink); transition: border-color .15s, transform .15s, background .15s; }
.day-button:hover, .slot-button:hover { border-color: var(--sage); transform: translateY(-1px); }
.day-button[aria-pressed="true"] { border-color: var(--sage-dark); background: var(--sage-dark); color: white; }
.day-button span, .day-button strong { display: block; }
.day-button span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.day-button strong { margin-top: 4px; }
.slot-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.slot-list > p { grid-column: 1 / -1; margin: 0; }
.slot-button { min-height: 48px; }
.privacy-band { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 18px; align-items: baseline; margin-top: 24px; padding: 17px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .84rem; line-height: 1.5; }
.privacy-band strong { color: var(--ink); font-family: Georgia, serif; font-size: 1rem; }
.privacy-band a, .text-link { color: var(--sage-dark); font-weight: 750; text-underline-offset: 3px; }
.modal { width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; border: 1px solid var(--line); border-radius: 20px; padding: 30px; color: var(--ink); background: #fffdf9; box-shadow: 0 30px 100px rgba(0, 0, 0, .25); }
.modal::backdrop { background: rgba(37, 34, 31, .58); backdrop-filter: blur(4px); }
.modal h2 { margin: 0 0 22px; font-size: 1.8rem; }
.modal-close-form { position: absolute; right: 14px; top: 12px; }
.icon-button { border: 0; background: transparent; font-size: 1.8rem; color: var(--muted); }
label:not(.choice):not(.compact-choice) { display: grid; gap: 7px; margin: 16px 0; font-weight: 700; }
input[type="text"], input[type="email"], input[type="tel"], input[type="time"], input[type="password"], textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 100px; }
input[type="file"] { width: 100%; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: #faf7f1; }
input:focus, textarea:focus { outline: 3px solid rgba(111, 136, 116, .18); border-color: var(--sage); }
input:focus-visible, textarea:focus-visible { outline-color: var(--sage-dark); outline-offset: 2px; }
fieldset { margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
legend { padding: 0 6px; font-weight: 700; }
.choice { margin-right: 18px; }
.field-help { display: block; }
.choice.disabled { color: #aaa; }
.field-help { color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.5; }
.primary-button, .secondary-button, .quiet-button, .danger-button { min-height: 44px; border-radius: 10px; padding: 9px 14px; font-weight: 800; }
.primary-button { width: 100%; border: 0; background: var(--sage-dark); color: white; }
.primary-button:hover { background: #3f584a; }
.public-page .primary-button:hover { background: #6e4180; }
.primary-button:disabled { opacity: .62; cursor: wait; }
.secondary-button { border: 1px solid var(--sage); background: #f3f7f2; color: var(--sage-dark); }
.quiet-button { border: 1px solid var(--line); background: #fffdfa; color: var(--ink); }
.danger-button { border: 1px solid #c89e98; background: #fbefed; color: #813e36; }
.fine-print, .muted { color: var(--muted); }
.fine-print { font-size: .76rem; line-height: 1.55; }
.form-error { min-height: 1.4em; color: #9f4137; font-weight: 700; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.status-card { width: min(650px, calc(100% - 32px)); margin: 9vh auto; padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.status-card h1 { font-size: clamp(2.2rem, 8vw, 4.4rem); }
.privacy-page { width: min(760px, calc(100% - 32px)); }
.privacy-copy { margin-top: 30px; }
.privacy-copy h2 { margin: 24px 0 6px; font-size: 1.25rem; }
.privacy-copy p { margin-top: 0; color: var(--muted); line-height: 1.7; }
.botanical { position: fixed; width: 230px; height: 340px; opacity: .16; pointer-events: none; transform: rotate(-12deg); }
.botanical::before, .botanical::after { content: ""; position: absolute; border: 1px solid var(--sage-dark); border-radius: 100% 0 100% 0; transform: rotate(28deg); }
.botanical::before { width: 130px; height: 220px; left: 24px; top: 35px; }
.botanical::after { width: 80px; height: 140px; left: 94px; top: 128px; transform: rotate(70deg); }
.botanical-left { left: -70px; bottom: -40px; }
.crystal-mark { position: fixed; right: 4vw; top: 8vh; width: 74px; height: 106px; opacity: .12; border: 1px solid var(--lavender); clip-path: polygon(50% 0, 95% 28%, 78% 100%, 22% 100%, 5% 28%); pointer-events: none; }
.announcement { margin: 0 0 22px; padding: 18px 22px; border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.announcement .eyebrow { margin-bottom: 6px; }
.announcement p:not(.eyebrow) { margin: 0 0 10px; font-size: 1.02rem; line-height: 1.6; overflow-wrap: anywhere; }
.announcement p:last-child { margin-bottom: 0; }
.slot-button strong, .slot-button span { display: block; }
.slot-button span { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.lookup-line { margin: 18px 0 0; font-size: .9rem; }
a.primary-button, a.secondary-button, a.quiet-button, a.danger-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.code-panel { margin: 22px 0; padding: 20px; border: 1px solid var(--gold); border-radius: 14px; background: #fffdf6; }
.code-panel h2 { margin: 0 0 8px; font-size: 1.1rem; }
.code-value { margin: 0 0 12px; font: 700 clamp(.8rem, 4.1vw, 1.5rem) ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; overflow-wrap: anywhere; user-select: all; }
.code-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cancel-form { margin: 22px 0 8px; }
#appointment-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; }

/* Admin */
.admin-shell { width: min(1320px, calc(100% - 24px)); margin: 0 auto; padding: 28px 0 60px; }
.admin-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-header h1 { font-size: 2.8rem; }
.notice { padding: 12px 14px; border: 1px solid #c8d9c8; border-radius: 10px; background: var(--open); }
.admin-topline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dashboard-alerts { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #b9c8be; }
.dashboard-alerts h2 { margin: 0 0 4px; }
.dashboard-alerts p { margin: 0; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: 18px; align-items: start; }
.admin-grid > * { min-width: 0; }
.quick-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 12px; }
.day-editor { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fffdfa; }
.day-editor h3 { margin: 0; font-size: 1.12rem; }
.day-editor .day-meta { margin: 4px 0 12px; color: var(--muted); font-size: .78rem; }
.day-editor .hours-line { min-height: 2.7em; margin: 5px 0 11px; color: var(--sage-dark); font-weight: 750; }
.day-editor form { margin: 8px 0; }
.day-editor .hours-form { display: grid; gap: 6px; }
.hours-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.day-editor .hours-row label { margin: 0; font-size: .74rem; }
.day-editor .hours-row input { min-height: 38px; padding: 6px; }
.day-editor .hours-form button { min-height: 38px; }
.day-editor .hours-form .field-help { margin: 0; }
.day-editor .session-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.session-label { flex: 1 0 100%; color: var(--muted); font-size: .74rem; font-weight: 700; }
.session-form button { flex: 1 1 70px; min-height: 36px; padding: 6px 8px; font-size: .75rem; }
.session-form .is-current { border-color: var(--sage-dark); background: var(--sage-dark); color: white; }
.remove-form { margin-top: 10px; }
.remove-form button { min-height: 36px; padding: 6px 10px; font-size: .78rem; }
.day-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.day-actions form { flex: 1 1 118px; }
.day-actions button { min-height: 36px; padding: 6px 9px; font-size: .75rem; }
.heatmap-wrap { width: 100%; max-width: 100%; overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 12px; }
.heatmap { width: 100%; min-width: 1060px; border-collapse: separate; border-spacing: 4px; padding: 4px; }
.heatmap thead th { position: sticky; top: 0; z-index: 2; background: #f7f3ea; }
.heatmap th { padding: 7px; font-size: .75rem; color: var(--muted); }
.heatmap td { min-width: 88px; height: 40px; text-align: center; border-radius: 8px; }
.heatmap .time { position: sticky; left: 0; z-index: 1; background: #f7f3ea; font-weight: 700; min-width: 76px; }
.cell-open { background: var(--open); }
.cell-booked { background: var(--booked); }
.cell-blocked { background: var(--blocked); }
.cell-form, .cell-form button { width: 100%; height: 100%; }
.cell-form button { border: 0; background: transparent; color: inherit; font-size: .75rem; }
.schedule-form { display: grid; gap: 12px; }
.weekday-list { display: flex; flex-wrap: wrap; gap: 8px; }
.weekday-list label { display: inline-flex; gap: 4px; align-items: center; margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .78rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-form .field-row label { margin: 0; font-size: .8rem; }
.schedule-form .field-help { margin: 0; }
.page-text { margin-top: 18px; }
.text-editors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 22px; align-items: start; }
.text-editor h3 { margin: 0 0 4px; font-size: 1.15rem; }
.text-editor p { margin: 4px 0; }
.text-editor textarea { font: .92rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-editor code { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.editor-actions .primary-button { width: auto; }
.booking-list { display: grid; gap: 12px; }
.booking-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fffdfa; }
.booking-item h3 { margin: 0 0 4px; font-size: 1.15rem; }
.booking-item .booking-time { margin: 0 0 10px; color: var(--sage-dark); font-weight: 750; }
.booking-item dl { display: grid; grid-template-columns: 74px 1fr; gap: 5px 10px; margin: 0; font-size: .86rem; }
.booking-item dt { color: var(--muted); }
.booking-item dd { margin: 0; overflow-wrap: anywhere; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.section-heading > * { min-width: 0; max-width: 100%; }
.section-heading p { overflow-wrap: anywhere; }
.section-heading h2 { margin-bottom: 4px; }

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
  .text-editors { grid-template-columns: 1fr; }
  .privacy-band { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { padding-top: 38px; }
  .site-nav { margin: 0 0 30px; }
  .page-header { padding: 22px 19px; }
  .day-list { grid-template-columns: repeat(10, 90px); }
  .booking-card { padding: 18px; }
  .modal { padding: 24px 18px; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-topline { width: 100%; }
  .admin-topline .secondary-button { flex: 1 1 230px; text-align: center; }
  .dashboard-alerts { align-items: flex-start; flex-direction: column; }
  .quick-days { grid-template-columns: 1fr; }
  .day-actions button { width: 100%; }
  .heatmap-wrap { max-height: 65vh; }
}

.order-page-link { display: inline-flex; text-decoration: none; }
