:root {
  color-scheme: light;
  --surface: #ffffff;
  --border: #e9e4d8;
  --text: #2b281f;
  --muted: #635d50;
  --accent: #f3dd82;
  --accent-light: #fff3cb;
  --accent-line: #c4a344;
  --accent-hover: #eccf67;
  --gold: #a77410;
  --tinted-surface: #fff9e8;
  --serif: "Noto Serif SC", "Songti SC", "STSong", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font: 15px/1.6 var(--sans);
  background: var(--surface);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 290px; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #7e5b09; outline-offset: 3px; }
.shell { width: min(1040px, calc(100% - 80px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid #eeeae1; }
.header-inner { display: flex; min-height: 63px; align-items: center; }
.wordmark { display: inline-flex; align-items: center; }
.wordmark-symbol {
  flex: none;
  width: 90px;
  aspect-ratio: 1855 / 915;
  background: var(--gold);
  -webkit-mask: url("/brand-mark.png") center / contain no-repeat;
  mask: url("/brand-mark.png") center / contain no-repeat;
}

.hero-inner { padding-block: 37px 26px; border-bottom: 1px solid var(--border); }
.hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4.1vw, 46px); font-weight: 650; line-height: 1.3; letter-spacing: .039em; }
.hero h1 span { display: inline-block; }
.hero h1 [lang="ja"] { font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", var(--serif); }
.event-details { margin-top: 14px; color: var(--muted); font-size: 13px; }
.event-details p { display: flex; align-items: center; gap: 8px; margin: 0; }
.calendar-icon { position: relative; width: 13px; height: 13px; border: 1px solid var(--gold); border-radius: 2px; background: linear-gradient(transparent 3px, currentColor 3px 4px, transparent 4px); color: var(--gold); }
.calendar-icon::before { position: absolute; top: -3px; left: 3px; width: 1px; height: 4px; background: currentColor; box-shadow: 4px 0 currentColor; content: ""; }

.booking { padding-block: 24px 55px; }
.booking-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.booking-heading h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: .045em; }
.booking-limit { margin: 0; padding: 3px 9px; border-radius: 12px; background: var(--accent-light); color: #6b5318; font-size: 12px; white-space: nowrap; }
.booking-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, .45fr); align-items: start; gap: 16px; }
.schedule, .reservation { padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.reservation { background: var(--tinted-surface); }
.step + .step { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.step h3, .reservation h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 650; letter-spacing: .035em; }
.step-number { display: grid; flex: none; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--accent-light); color: #6b5318; font: 650 11px/1 var(--sans); letter-spacing: 0; }
.step-detail { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; }
.date-grid, .time-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.date-option, .time-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  transition: background .16s, border-color .16s, color .16s;
}
.date-option { min-height: 70px; gap: 3px; padding: 5px; }
.date-number { font: 400 29px/1.14 Georgia, serif; font-variant-numeric: lining-nums tabular-nums; }
.date-weekday, .slot-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.time-option { min-height: 54px; gap: 2px; padding: 5px 2px; }
.slot-range { font-size: clamp(10px, .98vw, 13px); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time-option[data-full="true"] { border-style: dashed; background: #f9f7f1; color: #5e5748; }
.time-option[data-full="true"] .slot-status { color: #825530; }
.time-option:disabled, .date-option:disabled { background: #faf9f6; color: #746f64; }
.date-option[aria-pressed="true"], .time-option[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent); color: #382e15; }
[aria-pressed="true"] .date-weekday, [aria-pressed="true"] .slot-status { color: #55461f; }

.reservation-summary { display: grid; gap: 8px; margin: 15px 0; padding-bottom: 15px; border-bottom: 1px solid var(--border); font-size: 13px; }
.reservation-summary div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.reservation-summary dt { color: var(--muted); }
.reservation-summary dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.reservation-summary .placeholder { color: #716a5a; }
.order-label-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 8px; margin-bottom: 6px; }
.reservation label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 650; }
.order-label-row label { margin-bottom: 0; }
.field-note { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.nickname-label { margin-top: 12px; }
.reservation input { width: 100%; min-height: 42px; padding: 7px 10px; border: 1px solid #d6cdb8; border-radius: 6px; background: var(--surface); color: var(--text); font-size: 16px; }
.reservation input[inputmode="numeric"] { font-variant-numeric: tabular-nums; }
.reservation input:disabled { border-color: var(--border); background: #f7f5ee; }
.reservation input[aria-invalid="true"] { border-color: #ab4937; }
.form-error { margin: 6px 0 0; color: #9c3528; font-size: 12px; }
.submit-button, .dialog-button { min-height: 42px; border: 1px solid var(--accent-line); border-radius: 6px; background: var(--accent); color: #382e15; font-weight: 650; transition: background .16s; }
.submit-button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding: 7px 10px; }
.submit-button:disabled { border-color: #ddc991; background: #f3ead0; color: #706342; }
.submit-button[aria-busy="true"] { cursor: progress; }
.load-message { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 11px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--tinted-surface); color: var(--muted); font-size: 13px; }
.text-button { padding: 0 3px; border: none; background: transparent; color: #6b5318; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }

dialog { width: min(400px, calc(100vw - 36px)); max-height: calc(100vh - 36px); padding: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); box-shadow: 0 12px 45px #362d1d29; }
dialog[open] { animation: appear .19s ease-out both; }
dialog::backdrop { background: #2b241d59; }
.dialog-content { padding: 22px; }
.dialog-symbol { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--accent-light); color: #6b5318; }
.dialog-content h2 { margin: 10px 0 6px; font-size: 21px; line-height: 1.35; }
.dialog-content p { margin: 0; color: var(--muted); font-size: 14px; }
.notice-qr { display: grid; justify-items: center; gap: 6px; margin-top: 12px; padding: 5px 10px 11px; border: 1px solid var(--border); border-radius: 6px; text-align: center; }
.notice-qr img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.notice-qr .notice-expiry { font-size: 12px; }
.save-qr { padding: 5px 10px; border-radius: 5px; background: var(--accent-light); color: #6b5318; font-size: 13px; font-weight: 650; transition: background .16s; }
.dialog-content .notice-qr-error { margin-top: 10px; }
.dialog-content .notice-reference { margin-top: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; overflow-wrap: anywhere; }
.dialog-button { width: 100%; margin-top: 17px; padding: 6px 9px; }

@media (hover: hover) {
  .date-option:hover:not(:disabled):not([aria-pressed="true"]),
  .time-option:hover:not(:disabled):not([aria-pressed="true"]) { border-color: var(--accent-line); background: var(--accent-light); }
  .submit-button:hover:not(:disabled), .dialog-button:hover, .save-qr:hover { background: var(--accent-hover); }
}

@media (max-width: 920px) {
  .shell { width: calc(100% - 54px); }
  .booking-grid { grid-template-columns: minmax(0, 1fr) minmax(230px, .58fr); }
  .schedule, .reservation { padding: 16px; }
  .time-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 660px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 54px; }
  .hero-inner { padding-block: 28px 20px; }
  .booking-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .slot-range { font-size: 12px; }
}

@media (max-width: 430px) {
  .wordmark-symbol { width: 78px; }
  .hero h1 { max-width: 12em; font-size: clamp(25px, 7.6vw, 33px); }
  .event-details { margin-top: 12px; }
  .booking { padding-block: 19px 30px; }
  .booking-heading h2 { font-size: 20px; }
  .schedule, .reservation { padding: 13px; }
  .date-grid, .time-grid { gap: 5px; }
  .date-option { min-height: 60px; }
  .date-number { font-size: 25px; }
  .time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot-range { font-size: clamp(9px, 2.9vw, 12px); }
}

@keyframes appear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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