:root {
  --paper: #ffffff;
  --paper-2: #ffffff;
  --ink: #143833;
  --muted: #5c7572;
  --line: #d5ebe8;
  --sage: #128f8a;
  --deep: #0e7c78;
  --clay: #149e98;
  --danger: #9b3d42;
  --ok: #0f766e;
  --wait: #9a6b2f;
  --shadow: 0 16px 40px rgba(14, 124, 120, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
body.is-admin { background: #f4fbfa; }
body.is-public {
  background-color: #fff;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220' fill='none'%3E%3Cpath d='M128 186c4-54 26-92 78-116-46 10-76 40-86 86-6-32-22-58-52-74 18 38 38 64 60 104z' stroke='%23149e98' stroke-width='1.6' opacity='.45'/%3E%3Cpath d='M118 182c6-40 18-72 38-98' stroke='%23149e98' stroke-width='1.1' opacity='.4'/%3E%3Cpath d='M52 58c22 6 36 22 42 46' stroke='%23149e98' stroke-width='1.3' opacity='.35'/%3E%3Cpath d='M58 48c8 18 8 32-2 48' stroke='%23149e98' stroke-width='1.1' opacity='.35'/%3E%3C/svg%3E"),
    radial-gradient(820px 380px at 100% -8%, rgba(26, 167, 161, 0.16), transparent 62%);
  background-repeat: no-repeat;
  background-position: right -12px top 92px, center top;
  background-size: 230px 230px, auto;
}
h1, h2, h3 {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.8rem; margin: 0 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 0; }
p { margin: 0 0 0.8rem; }
a { color: var(--sage); }
img { max-width: 100%; }

.wrap { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(680px, calc(100% - 2rem)); padding-top: 4rem; }
main.wrap { padding-bottom: 4rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row, .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 0;
}
.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand strong { display: block; font-family: Palatino, Georgia, serif; font-size: 1.15rem; font-weight: 500; }
.brand small { display: block; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.68rem; }
.mark {
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Palatino, Georgia, serif;
  flex: 0 0 auto;
  color: var(--deep);
}
.mark svg { width: 22px; height: 22px; display: block; }
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.qty-field { margin: 0; }
.line-qty { width: 5.5rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a.is-on { border-bottom: 1px solid var(--ink); }

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
  padding: 1.5rem 0 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.75vw, 3.5rem);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) 1.15fr;
  gap: 2.2rem;
  align-items: start;
  padding-top: 2.6rem;
}
.about-grid.is-text { grid-template-columns: minmax(0, 42rem); }
.about-photo, .about-preview {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  display: block;
  box-shadow: var(--shadow);
}
.about-preview { margin-bottom: 0.8rem; }
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--clay);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.lede { font-size: 1.15rem; max-width: 38rem; }
.studio-card, .panel, .gate-card, .receipt {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 1.25rem 1.3rem 1.4rem;
}
.studio-card h2, .panel h2 { font-size: 1.45rem; }
.hours { list-style: none; padding: 0; margin: 0; }
.hours li, .treatment, .choice {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}
.hours li:first-child, .treatment:first-child, .choice:first-child { border-top: 0; }
.address { white-space: pre-line; color: var(--muted); }

.section { margin-top: 3rem; }
.section-head, .cal-toolbar, .button-row, .filters, .date-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.section-head { justify-content: space-between; }
.cal-toolbar strong { margin-right: auto; }
.treatment-list.detailed .treatment { align-items: start; padding: 1.2rem 0; }
.meta, .treatment .meta { color: var(--muted); }
.steps ol { padding-left: 1.2rem; }
.steps li { margin: 0.45rem 0; }

.btn, button.btn {
  display: inline-block;
  background: var(--deep);
  color: #fff;
  border: 1px solid var(--deep);
  padding: 0.72rem 1.05rem;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
}
.btn-ghost { background: #fff; color: var(--deep); border-color: #b7ddd9; }
.btn-danger { background: #fff; color: var(--danger); border-color: #e7c8cb; }
.btn + .btn, .button-row .btn { margin-right: 0.35rem; }

.notice {
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  margin: 0 0 1rem;
}
.notice-error { background: #fdf6f6; border-color: #e7c8cb; }
.notice-ok { background: #f3fbfa; border-color: #bfe3df; }
.hint { color: var(--muted); font-size: 0.92rem; }

.progress { display: flex; gap: 1rem; padding: 0; list-style: none; color: var(--muted); }
.progress .is-on, .progress .is-done { color: var(--ink); }
.progress .is-on { border-bottom: 1px solid var(--ink); }
.choice-list { margin-top: 1rem; }
.choice {
  color: inherit;
  text-decoration: none;
  padding: 0.9rem 0;
}
.choice small { display: block; color: var(--muted); }
.choice:hover strong { text-decoration: underline; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 0.5rem; margin: 0.5rem 0 1rem; }
.slots a {
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.7rem 0.3rem;
}
.slots a:hover, .slots a.is-on { background: var(--deep); color: #fff; border-color: var(--deep); }
.details, .stack { margin-top: 1.4rem; }
.field { display: block; margin: 0 0 0.85rem; }
.field span, .check { color: var(--muted); }
.field span { display: block; margin-bottom: 0.28rem; }
.check { display: flex; gap: 0.5rem; align-items: center; margin: 0.4rem 0 1rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid #c5e0dc;
  background: #fff;
  color: var(--ink);
  padding: 0.65rem 0.7rem;
  font: inherit;
  border-radius: 4px;
}
textarea { min-height: 110px; resize: vertical; }
input[type="checkbox"] { width: auto; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.price { font-family: Palatino, Georgia, serif; font-size: 1.8rem; }

.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; }
.staff-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.gate-card { max-width: 420px; margin: 2rem auto; }
.receipt { max-width: 680px; }
.receipt dl { margin: 1rem 0; }
.receipt dl div, .facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; padding: 0.35rem 0; border-top: 1px solid var(--line); }
.receipt dt, .facts dt { color: var(--muted); }

.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--deep); color: #fff; padding: 1.3rem 1rem 2rem; }
.side a, .side .linkish { color: #fff; }
.side .mark { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.brand-light small { color: rgba(255, 255, 255, 0.78); }
.side-nav { display: grid; margin: 1.4rem 0; }
.side-nav a, .side .linkish {
  display: block;
  text-decoration: none;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.side-nav a.is-on, .side-nav a:hover, .side .linkish:hover { background: rgba(255, 255, 255, 0.08); }
.admin-main { min-width: 0; padding: 1.6rem 1.5rem 3rem; }
.admin-main h1 { font-size: clamp(2rem, 4vw, 3rem); }
.panel { margin: 0 0 1.2rem; }
.inline-delete { margin: -0.6rem 0 1.2rem; }

.cal-wrap { overflow-x: auto; margin: 1rem 0; }
.cal { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; background: var(--paper-2); }
.cal th { text-align: left; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.4rem; }
.cal td { height: 118px; vertical-align: top; border: 1px solid var(--line); padding: 0.35rem; }
.cal td.is-out { color: #9eb0ad; background: rgba(255,255,255,0.35); }
.cal td.is-closed { background: rgba(14, 124, 120, 0.05); }
.cal td.is-blocked { background: rgba(20, 158, 152, 0.12); }
.cal td.is-today .day-num { border-color: var(--deep); }
.cal td.is-selected { outline: 2px solid var(--deep); outline-offset: -2px; }
.day-num { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid transparent; text-decoration: none; color: inherit; }
.pill, .away, .more { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; margin-top: 0.2rem; text-decoration: none; }
.pill { padding: 0.12rem 0.28rem; color: #fff; }
.away { color: var(--clay); }
.badge, .pill.badge-ok, .pill.badge-wait, .pill.badge-muted, .pill.badge-warn { border-radius: 2px; }
.badge { display: inline-block; padding: 0.1rem 0.4rem; font-size: 0.78rem; }
.badge-ok, .pill.badge-ok { background: var(--ok); color: #fff; }
.badge-wait, .pill.badge-wait { background: var(--wait); color: #fff; }
.badge-muted, .pill.badge-muted { background: #8d9390; color: #fff; }
.badge-warn, .pill.badge-warn { background: var(--danger); color: #fff; }
.badge.badge-ok, .badge.badge-wait, .badge.badge-muted, .badge.badge-warn { color: #fff; }

.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; }
.data th { text-align: left; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.data td, .data th { padding: 0.65rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.filters .field { margin: 0; min-width: 180px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1rem 0 1.5rem; }
.stat { background: #fff; border: 1px solid var(--line); padding: 0.9rem 1rem; }
.stat span { color: var(--muted); font-size: 0.9rem; }
.stat b { display: block; font-family: Palatino, Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.day-panel { margin-top: 1.2rem; }
code { font-family: Consolas, monospace; font-size: 0.92em; }
.email-preview { background: #f4fbfa; border: 1px solid var(--line); padding: 0.4rem 0 0.2rem; overflow: auto; }
.timely-frame { width: 100%; height: 80vh; min-height: 720px; border: 0; background: #fff; border-radius: 14px; }
.email-preview table { margin: 0 auto; }

:focus-visible { outline: 2px solid #149e98; outline-offset: 2px; }

@media (max-width: 860px) {
  .hero, .about-grid, .admin-shell, .stats, .receipt dl div, .facts div { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 4; }
  .side-nav { grid-template-columns: repeat(2, 1fr); }
  .admin-main { padding: 1rem; }
}

@media print {
  .site-header, .site-footer, .no-print, .side { display: none !important; }
  body, body.is-public, .receipt, .studio-card { background: #fff; box-shadow: none; }
  .admin-shell { display: block; }
}
