:root {
  --bg: #f3f6fa;
  --card: #fff;
  --ink: #12202f;
  --muted: #5b6b7c;
  --line: #dde4ec;
  --brand: #1d3a8a;
  --brand-ink: #fff;
  --brand-soft: #e8edf8;
  --ok: #18794e;
  --ok-soft: #e3f5ec;
  --warn: #a35200;
  --warn-soft: #fff1e0;
  --bad: #c62828;
  --bad-soft: #fdeaea;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 32 48 / 6%), 0 4px 16px rgb(16 32 48 / 6%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1100px; }

header.hero {
  background: linear-gradient(135deg, #0f1f4d, #1d3a8a 60%, #2a4fae);
  border-bottom: 3px solid #d4a72c;
  color: #fff; padding: 28px 0 56px;
}
.hero h1 { margin: 0 0 4px; font-size: 1.7rem; letter-spacing: -0.01em; }
.hero h1::before { content: '👑 '; }
.hero p { margin: 0; opacity: 0.92; }
.hero .contact { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.95rem; }
.hero .contact a { color: #fff; }
main.wrap { margin-top: -36px; padding-bottom: 120px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-size: 0.85rem; font-weight: 700;
}
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }

.options { display: grid; gap: 10px; }
.option {
  text-align: left; width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.option:hover { border-color: #b9c7d6; }
.option[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.option .name { font-weight: 600; }
.option .desc { color: var(--muted); font-size: 0.88rem; }
.option .price { font-weight: 700; white-space: nowrap; text-align: right; }
.option .price small { display: block; font-weight: 400; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.chip small { opacity: 0.8; }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.day {
  flex: 0 0 64px; scroll-snap-align: start; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 4px; text-align: center; cursor: pointer;
}
.day .dow { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; }
.day .num { font-size: 1.3rem; font-weight: 700; }
.day .mon { font-size: 0.75rem; color: var(--muted); }
.day:disabled { opacity: 0.4; cursor: not-allowed; background: #f6f8fa; }
.day[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.day[aria-pressed="true"] .dow, .day[aria-pressed="true"] .mon { color: #e8f2fc; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 0; cursor: pointer; font-weight: 600;
}
.slot[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin: 10px 0 4px; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #9cc6f0; outline-offset: 1px; }
textarea { min-height: 70px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px;
  padding: 12px 18px; background: var(--brand); color: var(--brand-ink); font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: var(--brand-soft); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.small { padding: 7px 12px; font-size: 0.88rem; border-radius: 9px; }
.btn.block { width: 100%; }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: rgb(255 255 255 / 96%); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar .sum { font-size: 0.9rem; line-height: 1.3; min-width: 0; }
.bar .sum b { font-size: 1.1rem; }
.bar .sum span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.error { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.ok-box { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 12px; }
.code { font: 700 1.6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 12px 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.empty { color: var(--muted); padding: 8px 0; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 0.78rem; font-weight: 700; }
.b-confirmed { background: var(--brand-soft); color: var(--brand); }
.b-arrived { background: var(--warn-soft); color: var(--warn); }
.b-done { background: var(--ok-soft); color: var(--ok); }
.b-no_show, .b-cancelled { background: var(--bad-soft); color: var(--bad); }
footer.foot { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 10px 0 30px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }
