:root {
  color-scheme: light;
  --cream: #f8f4ef;
  --paper: #fffdfa;
  --paper-2: #f8f4ef;
  --ink: #302923;
  --muted: #756b63;
  --rose: #bd817c;
  --rose-dark: #925b57;
  --rose-soft: #e9cfc9;
  --peach: #e8d8d0;
  --peach-soft: #f3e5dc;
  --stone: #e8ddd4;
  --line: #e8ddd4;
  --sage: #e8ebe3;
  --danger: #8a2727;
  --mauve: var(--rose-dark);
  --mauve-soft: var(--rose-soft);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --radius: 4px;
  --shadow: 0 8px 24px rgba(48, 41, 35, 0.06);
  --shadow-lift: 0 14px 32px rgba(48, 41, 35, 0.1);
  --shadow-modal: 0 24px 80px rgba(48, 41, 35, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p, ul { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--serif); font-weight: 400; line-height: 1.13; letter-spacing: -0.03em;
}
h1 em, h2 em, .display em { color: var(--rose-dark); font-weight: 400; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--rose-dark); outline-offset: 4px; }

.app-root { min-height: 100vh; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 28px; } .mt-5 { margin-top: 40px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.74rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.right { text-align: right; }

.eyebrow {
  font-size: 0.71rem; font-weight: 700; letter-spacing: 0.17em;
  text-transform: uppercase; color: var(--rose-dark);
}
.display {
  font-family: var(--serif); font-weight: 400; line-height: 1.06;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem); letter-spacing: -0.045em;
}
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; }
.rule { border-top: 1px solid var(--line); }

.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(248, 244, 239, 0.96);
  border-bottom: 1px solid rgba(48, 41, 35, 0.08); backdrop-filter: blur(12px);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 74px; padding: 12px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav a { text-decoration: none; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.card-flat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 21px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; border-radius: 0;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--rose-dark); border-color: var(--rose-dark); transform: translateY(-2px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: transparent; color: var(--rose-dark); border-color: var(--rose-dark); }
.btn-quiet {
  background: transparent; border: 0; padding: 0; color: var(--rose-dark); cursor: pointer;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 4px;
}
.btn-quiet:hover { color: var(--ink); transform: none; }
.btn-sm { min-height: 38px; padding: 9px 14px; font-size: 0.7rem; }
.btn-danger { border-color: var(--rose); background: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--rose); border-color: var(--rose); color: #fff; }

.field { display: grid; gap: 7px; }
.label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; border: 1px solid #cfc3ba; border-radius: 0;
  background: #fff; color: var(--ink); padding: 12px 14px; outline: none;
  transition: border-color 0.2s ease;
}
.input:focus { border-color: var(--rose-dark); outline: 2px solid var(--rose-dark); outline-offset: 2px; }
textarea.input { min-height: 96px; resize: vertical; }
.hint { font-size: 0.78rem; color: var(--muted); }
.error-text { color: var(--danger); font-size: 0.84rem; }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { margin-top: 4px; accent-color: var(--rose-dark); width: 17px; height: 17px; }
.switch span { display: block; }

.tag {
  display: inline-block; border: 1px solid var(--peach); background: var(--peach-soft);
  padding: 4px 9px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rose-dark);
}
.badge {
  display: inline-block; padding: 3px 8px; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--line);
  color: var(--muted); background: var(--cream);
}
.badge-warn { border-color: #e2c9bd; background: #f7e9e1; color: var(--rose-dark); }
.badge-ok { border-color: #cfd8c7; background: var(--sage); color: var(--ink); }
.badge-bad { border-color: var(--rose-soft); background: #f7e3df; color: var(--danger); }

.banner-note {
  border: 1px solid #cfd8c7; background: var(--sage); color: var(--ink);
  padding: 14px 16px; font-size: 0.9rem; display: flex; gap: 12px; justify-content: space-between;
}
.banner-error {
  border: 1px solid var(--rose-soft); background: #f7e3df; color: var(--danger);
  padding: 14px 16px; font-size: 0.9rem;
}

.pill-tabs { display: flex; gap: 22px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.pill-tabs button {
  border: 0; border-bottom: 2px solid transparent; background: transparent;
  padding: 10px 0 11px; font-size: 0.82rem; letter-spacing: 0.02em;
  cursor: pointer; color: var(--muted); margin-bottom: -1px;
}
.pill-tabs button:hover { color: var(--rose-dark); }
.pill-tabs button[aria-selected="true"] { border-bottom-color: var(--rose-dark); color: var(--ink); }

.choice {
  display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line);
  background: var(--paper); padding: 14px 16px; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.choice[aria-checked="true"], .choice:has(input:checked) { border-color: var(--rose-dark); background: #fbf5f1; }
.choice input { margin-top: 4px; accent-color: var(--rose-dark); }

.list-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 18px 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.list-row:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.list-row + .list-row { margin-top: 12px; }

.banner {
  height: 170px; border: 1px solid var(--peach); border-radius: var(--radius);
  background: linear-gradient(150deg, #e8d7cd, #f1e8e0);
  overflow: hidden; position: relative;
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-empty {
  display: flex; align-items: center; justify-content: center; height: 100%;
  font-family: var(--serif); font-style: italic; color: var(--rose-dark); font-size: 22px;
  text-align: center; padding: 0 24px;
}
.avatar {
  width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--paper);
  object-fit: cover; position: absolute; left: 28px; bottom: -44px;
  background: var(--paper); box-shadow: 0 8px 24px rgba(48, 41, 35, 0.12);
}

.day-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.day-btn {
  flex: 0 0 auto; min-width: 64px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 10px 12px; text-align: center; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.day-btn span {
  display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.day-btn strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.day-btn:hover { border-color: var(--rose); }
.day-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.day-btn[aria-pressed="true"] span { color: rgba(255, 253, 250, 0.72); }

.slot-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.slot {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  padding: 10px; font-size: 0.86rem; cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.slot:hover { border-color: var(--rose-dark); color: var(--rose-dark); }
.slot[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.svc {
  display: block; width: 100%; text-align: left; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); padding: 22px; cursor: pointer;
  box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.svc[aria-pressed="true"] { border-color: var(--rose-dark); }
.svc-photo {
  width: 100%; height: 170px; object-fit: cover; margin-top: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
}

.avail-row { display: grid; grid-template-columns: 58px 1fr 1fr auto; gap: 8px; align-items: center; }
.avail-row + .avail-row { margin-top: 8px; }

.table-scroll { overflow-x: auto; }
.stars { color: var(--rose-dark); letter-spacing: 2px; font-size: 0.8rem; }

.toast-root {
  position: fixed; inset: auto 16px 16px auto; display: grid; gap: 10px;
  z-index: 80; max-width: min(380px, calc(100vw - 32px));
}
.toast {
  background: var(--ink); color: #fff; padding: 14px 16px; font-size: 0.88rem;
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(48, 41, 35, 0.24);
}
.toast-error { background: var(--danger); }
.toast-ok { background: var(--rose-dark); }

.overlay {
  position: fixed; inset: 0; background: rgba(48, 41, 35, 0.55); z-index: 60;
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px;
  overflow-y: auto;
}
.modal {
  width: 100%; max-width: 580px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-modal);
  padding: 28px; margin: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.modal-close {
  border: 0; background: transparent; cursor: pointer; font-size: 1.7rem; line-height: 1;
  color: var(--ink); padding: 0 2px;
}
.modal-close:hover { color: var(--rose-dark); }

.skeleton {
  background: linear-gradient(90deg, #f0e6de, #faf3ec, #f0e6de);
  background-size: 200% 100%; animation: sk 1.2s infinite; height: 14px;
}
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.footer {
  margin-top: 64px; padding: 32px 0; background: var(--ink); color: var(--cream);
}
.footer .h3, .footer .small, .footer a { color: var(--cream); }
.footer .muted { color: #d8cbc2; }
.footer a { text-underline-offset: 4px; }
.footer a:hover { color: var(--rose); }

@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .card { padding: 20px; }
  .avail-row { grid-template-columns: 52px 1fr 1fr; }
  .avail-row .avail-open { grid-column: 1 / -1; }
  .modal { padding: 20px; }
  .footer { padding: 26px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
