:root {
  --bg: #f7f3ee; --surface: #ffffff; --border: #e6ddd2; --text: #2b2620; --muted: #776d62;
  --accent: #8a5a1c; --accent-ink: #ffffff; --accent-soft: #f1e6d6; --ok: #2f6f8f; --warn: #a3541b;
  --radius: 12px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171410; --surface: #211d18; --border: #3a332b; --text: #f1ebe3; --muted: #b3a798;
          --accent: #d9a35c; --accent-ink: #1b1611; --accent-soft: #3a2d1c; --ok: #7fb6d3; --warn: #e0965a; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 56px; }
header.site { padding: 28px 0 18px; }
.brand { font-size: 13px; letter-spacing: .18em; color: var(--accent); text-transform: uppercase; }
h1 { font-size: 26px; margin: 4px 0 6px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
        font-size: 12px; margin-right: 8px; vertical-align: 2px; }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; white-space: pre-line; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 4px 12px; cursor: pointer; font: inherit; }
.cal-head button:disabled { opacity: .35; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal button { aspect-ratio: 1 / 1; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); font: inherit; cursor: pointer;
              display: grid; place-items: center; align-content: center; gap: 0; padding: 0; }
.cal button .tag { font-size: 10px; color: var(--muted); line-height: 1.1; }
.cal button.open { border-color: var(--border); background: var(--surface); }
.cal button.open:hover { border-color: var(--accent); }
.cal button.selected { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cal button.selected .tag { color: var(--accent-ink); }
.cal button:disabled { color: var(--muted); opacity: .45; cursor: default; }

/* hours */
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.hours button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px 0; font: inherit; cursor: pointer; }
.hours button.selected { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hours button:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

/* forms */
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 80px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
button.primary { width: 100%; margin-top: 18px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px; padding: 14px; font: inherit; font-size: 16px; cursor: pointer; }
button.primary:disabled { opacity: .5; cursor: progress; }
.errors { color: var(--warn); margin-top: 12px; white-space: pre-line; }

/* summary */
dl.sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
dl.sum dt { color: var(--muted); }
dl.sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.big { font-size: 20px; font-weight: 700; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.pill.confirmed { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.cancelled, .pill.expired { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.hidden { display: none !important; }
footer.site { margin-top: 28px; font-size: 13px; color: var(--muted); }
