:root {
  color-scheme: light;
  --ink: #211f18;
  --muted: #625f53;
  --line: #e7e3d8;
  --paper: #f7f6f2;
  --yellow: #ffd54b;
  --soft: #fff8dd;
  --radius: 16px;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 15px; line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid #715700; outline-offset: 3px; }
p, h1, h2, h3, dl, dd, ol, ul { margin: 0; }
.shell { width: min(1104px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #fffefa; }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; font-size: 18px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.brand-logo { display: block; width: 76px; height: auto; flex: none; }
.brand-title { border-inline-start: 1px solid var(--line); padding-inline-start: 16px; }
.header-actions { display: flex; gap: 6px; align-items: center; }
.text-button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-weight: 600; }
.search-icon { width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; margin-right: 2px; }
.search-icon::after { content: ""; width: 5px; height: 1.5px; background: currentColor; position: absolute; right: -4px; bottom: -2px; transform: rotate(45deg); }

.hero {
  position: relative; overflow: hidden; min-height: 320px; margin-block: 28px 24px; border-radius: var(--radius);
  display: flex; align-items: center; color: #fffefa; background: #302619;
  background-image: url("/assets/exhibition.jpg");
  background-position: center 55%; background-size: cover;
}
.hero-content { position: relative; padding: 36px 40px; }
.hero .hero-action { width: auto; min-width: 128px; margin-top: 24px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: 0; font-weight: 500; line-height: 1.3; }
.hero-description { max-width: 60ch; font-size: 16px; margin-top: 12px; color: #fff4d7; }

.layout {
  display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(245px, 1fr);
  grid-template-areas: "form guide"; gap: 24px; padding-bottom: 40px; align-items: start;
}
.layout.with-location { grid-template-areas: "form location" "form guide"; grid-template-rows: auto 1fr; }
.layout aside { grid-area: guide; }
.card { border: 1px solid var(--line); background: #fffefa; border-radius: var(--radius); }
.form-card { grid-area: form; padding: 24px 32px 32px; }
.venue-card { grid-area: location; display: grid; gap: 12px; padding: 20px; min-width: 0; }
.section-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.venue-card h2, .arrival-maps h3 { font-size: 18px; }
.example-label { padding: 2px 8px; border-radius: 5px; background: var(--soft); color: #674d00; font-size: 12px; font-weight: 600; }
.status-note, .media-status { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.venue-address { overflow-wrap: anywhere; user-select: text; }
.location-preview, .map-thumbnail {
  display: grid; place-items: center; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.location-preview { min-height: 72px; }
.location-preview img { width: 100%; max-height: 168px; object-fit: contain; display: block; }
.venue-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.venue-actions .primary, .venue-actions .secondary {
  display: inline-flex; align-items: center; justify-content: center; width: auto; padding-inline: 8px;
  flex: 1 0 auto; white-space: nowrap; text-decoration: none; font-size: 13px;
}
#address-status:empty { display: none; }
.stepper { display: flex; align-items: center; list-style: none; padding: 0 0 20px; border-bottom: 1px solid var(--line); gap: 12px; font-size: 13px; color: var(--muted); }
.stepper li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.stepper li:not(:last-child) { flex: 1; }
.stepper li:not(:last-child)::after { content: ""; height: 1px; background: var(--line); flex: 1; margin-inline: 4px; }
.stepper li span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--paper); font-size: 12px; font-weight: 600; }
.stepper [aria-current] { color: var(--ink); font-weight: 600; }
.stepper [aria-current] span { background: var(--yellow); }
.stepper .completed span { background: var(--soft); color: #6f5400; }

.section-heading, .load-state { margin: 24px 0 20px; }
h2 { font-size: 24px; line-height: 1.35; font-weight: 600; }
.section-heading p, dialog > p { color: var(--muted); margin-top: 8px; font-size: 14px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }
.form-card { scroll-margin-top: 24px; }
.fields label, dialog form label { display: grid; gap: 8px; font-weight: 500; font-size: 14px; }
.plate-field { grid-column: 1 / -1; margin: 0; }
.plate-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.plate-row { display: flex; gap: 8px; align-items: center; }
.plate-row input { min-width: 0; }
.plate-row .vehicle-type { width: 92px; padding-inline: 7px; flex-shrink: 0; }
.plate-remove { white-space: nowrap; padding-inline: 10px; }
.add-plate { margin-top: 8px; font-size: 13px; }
.field-note { color: var(--muted); font-size: 12px; font-weight: 400; }
input:not([type="checkbox"], [type="radio"]), select {
  width: 100%; min-height: 48px; border: 1px solid #969287; padding: 8px 12px;
  border-radius: 8px; background: #fff; color: var(--ink); font-weight: 400;
}
input::placeholder, select:invalid { color: #736f61; opacity: 1; }
select { padding-right: 8px; }
fieldset { padding: 0; margin: 16px 0 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 500; font-size: 14px; }
.booking-dates { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.booking-date { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 5px 3px; min-height: 48px; line-height: 1.25; }
.booking-date strong, .booking-date small { display: block; }
.booking-date small { color: var(--muted); margin-top: 3px; }
.booking-date[aria-pressed="true"] { background: var(--soft); border-color: #855f00; }
.slot-period { margin-top: 14px; }
.slot-period h3 { margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; line-height: 1.45; font-size: 13px;
}
.slot:has(:checked) { border-color: #a57600; background: var(--soft); }
.slot:has(:disabled) { opacity: .58; cursor: default; }
.slot input, .consent input { margin: 0; width: 16px; height: 16px; accent-color: #855f00; }
.slot small { display: block; color: var(--muted); font-size: 12px; }
.availability { margin-top: 8px; display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.availability button { font-size: inherit; }
.consent { display: flex; align-items: center; gap: 8px; margin-block: 20px 16px; font-size: 13px; }
.consent input { flex-shrink: 0; }
.phone-verification {
  margin: 0 0 16px; padding: 12px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.phone-verification legend { margin-bottom: 0; padding-inline: 4px; }
.phone-verification .secondary { font-size: 13px; }
#send-phone-code, .phone-code { margin-top: 8px; }
.phone-code label { color: var(--muted); font-size: 13px; }
.phone-code-actions { display: flex; gap: 8px; margin-top: 4px; }
.phone-code-actions input { flex: 1; min-width: 0; }
.phone-code-actions button { flex-shrink: 0; }
.phone-verification-status { margin-top: 8px; color: var(--muted); font-size: 13px; }
.phone-verification-status:empty { display: none; }
.phone-verification-status[data-error="true"] { color: #8e311c; }
.inline-link { padding: 0; border: 0; background: none; color: #674d00; text-decoration: underline; text-underline-offset: 2px; }
.primary, .secondary { min-height: 48px; border-radius: 8px; padding: 8px 16px; font-weight: 600; color: var(--ink); }
.primary { border: 1px solid #f0c337; background: var(--yellow); width: 100%; display: flex; justify-content: center; gap: 12px; align-items: center; }
.primary:hover { background: #ffcd26; }
.secondary { border: 1px solid var(--line); background: #fff; }
.actions { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 20px; }

.guide { padding: 24px 24px; }
.guide-heading { display: flex; gap: 12px; align-items: center; }
.guide-heading h2 { font-size: 18px; }
.guide-icon { display: grid; place-items: center; width: 28px; height: 28px; background: var(--soft); color: #735600; border-radius: 8px; font-weight: 600; font-family: Georgia, serif; }
.guide ul { list-style: none; padding: 16px 0 0; display: grid; gap: 16px; }
.guide li { position: relative; padding-left: 16px; }
.guide li::before { content: ""; position: absolute; top: 8px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #ac8100; }
.guide li strong { font-size: 13px; }
.guide li p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.privacy-note { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px; margin-top: 12px; background: transparent; border-radius: 12px; font-size: 13px; font-weight: 500; }
.privacy-note span:not(.lock-icon) { color: var(--muted); font-weight: 400; }
.privacy-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.privacy-section { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.privacy-section h3 { margin-bottom: 4px; font-size: 14px; }
.privacy-section p { color: var(--muted); overflow-wrap: anywhere; }
.privacy-dialog #close-privacy { display: block; margin: 16px 0 0 auto; }
.lock-icon { width: 13px; height: 10px; margin-top: 8px; position: relative; border: 1.4px solid #756541; border-radius: 2px; }
.lock-icon::before { content: ""; position: absolute; width: 5px; height: 5px; border: 1.4px solid #756541; border-bottom: 0; border-radius: 6px 6px 0 0; top: -6px; left: 2px; }

.summary { display: grid; }
.summary div { display: grid; grid-template-columns: minmax(82px, 26%) 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { overflow-wrap: anywhere; }
.success-mark { display: grid; place-items: center; width: 39px; height: 39px; background: #eaf2df; color: #345120; border-radius: 50%; margin-bottom: 12px; font-weight: 600; }
.receipt { padding: 16px; border-radius: 8px; background: var(--soft); display: grid; justify-items: start; gap: 8px; }
.receipt strong { overflow-wrap: anywhere; font-family: "IBM Plex Mono", monospace; }
.receipt span { font-size: 13px; }
.receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.receipt-actions .primary { width: auto; }
.receipt-qr-image { display: block; width: min(232px, 100%); aspect-ratio: 1; margin: 16px auto; image-rendering: pixelated; }
.receipt-qr-download { text-decoration: none; }
#receipt-qr-status:not([hidden]) { margin-block: 12px; }
#copy-result { color: var(--muted); font-size: 13px; }
#copy-result:not(:empty) { margin: 8px 0; }
.sms-preview { margin-top: 16px; padding: 12px 16px; border-radius: 8px; background: var(--paper); font-size: 14px; }
#sms-message { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.lookup-record { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.lookup-record h3, .arrival-guide h3 { font-size: 18px; }
.lookup-record > p:not(.record-support) { margin-top: 4px; color: var(--muted); font-size: 14px; }
.arrival-guide { background: var(--paper); border-radius: 10px; padding: 12px 16px; margin-top: 16px; }
.arrival-guide .summary { margin-top: 4px; }
.arrival-guide .summary div:last-child { border-bottom: 0; padding-bottom: 2px; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.record-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.record-actions .secondary, .record-support { font-size: 13px; }
.record-support { color: var(--muted); margin-top: 12px; overflow-wrap: anywhere; }
.error { background: #fff0e9; border-radius: 7px; color: #8e311c; padding: 8px 12px; margin-top: 12px; font-size: 14px; }
#form-error { margin: 0 0 16px; }

.arrival-maps { margin-top: 20px; }
.arrival-map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.arrival-map {
  display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; text-align: start; color: var(--ink); font-size: 14px; font-weight: 500;
}
.arrival-map > span:last-child { display: flex; justify-content: space-between; padding-inline: 2px; }
.arrival-map > span:last-child span { color: var(--muted); }
.map-thumbnail { aspect-ratio: 16 / 10; }
.map-thumbnail img { width: 100%; height: 100%; object-fit: contain; display: block; }
.media-status { padding: 8px; text-align: center; }

dialog { width: min(490px, calc(100% - 30px)); max-height: 85dvh; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fffefa; color: var(--ink); }
dialog::backdrop { background: #251e136e; }
dialog form { display: grid; gap: 12px; margin-top: 16px; }
dialog .summary { margin-top: 12px; }
.close { border: 0; border-radius: 8px; background: var(--paper); width: 40px; height: 40px; float: right; color: var(--ink); font-size: 24px; line-height: 1; margin: -4px -4px 4px 12px; }
.map-dialog { width: min(860px, calc(100% - 30px)); }
.map-dialog h2 { font-size: 20px; }
.map-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.map-viewport {
  max-height: 56vh; max-height: 56dvh; overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.map-viewport img { display: block; width: 100%; height: auto; max-width: none; }
.map-viewport[data-zoom="1"] img { width: 150%; }
.map-viewport[data-zoom="2"] img { width: 200%; }
.map-viewport[data-zoom="3"] img { width: 300%; }
#map-status { text-align: start; padding: 0; margin-bottom: 12px; }

@media (max-width: 780px) {
  .shell { width: calc(100% - 36px); }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "form" "guide"; gap: 16px; }
  .layout.with-location { grid-template-areas: "location" "form" "guide"; grid-template-rows: auto; }
  .venue-card.has-preview { grid-template-columns: minmax(0, 1fr) minmax(90px, 29%); align-items: start; }
  .venue-actions, #address-status { grid-column: 1 / -1; }
  .hero { min-height: 232px; margin-block: 16px 16px; }
  .hero-content { padding: 24px; }
  .form-card { padding: 20px; }
}

@media (max-width: 480px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 72px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand-logo { width: 60px; }
  .brand-title { padding-inline-start: 8px; }
  .hero { min-height: 208px; background-position: 56% 58%; }
  .hero-content { padding: 20px; }
  .form-card { padding: 16px; }
  .venue-card, .map-dialog { padding: 16px; }
  .stepper { gap: 8px; padding-bottom: 16px; font-size: 12px; }
  .stepper li { gap: 4px; }
  .stepper li:not(:last-child)::after { margin-inline: 1px; }
  .stepper li span { width: 20px; height: 20px; }
  .fields { grid-template-columns: 1fr; gap: 12px; }
  input:not([type="checkbox"], [type="radio"]), select { font-size: 16px; }
  .slot { padding: 12px; font-size: 14px; gap: 8px; }
  .hero-description { font-size: 14px; }
}

.hero-image { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.hero-shade { position:absolute;inset:0;background:linear-gradient(90deg,rgba(24,23,20,.92),rgba(24,23,20,.76) 48%,rgba(24,23,20,.18)); }
.booking-date:hover, .secondary:hover:not(:disabled), .text-button:hover { background: var(--soft); border-color: #aaa393; }
.slot:has(input:focus-visible) { outline: 2px solid #715700; outline-offset: 3px; }
button, a.primary, a.secondary { transition: background-color 160ms cubic-bezier(.22,1,.36,1), border-color 160ms cubic-bezier(.22,1,.36,1); }
input, select, .summary, .booking-date { font-variant-numeric: tabular-nums; }
@media(max-width:480px) {
  .hero-content { padding:24px; }
  .hero-shade { background:rgba(24,23,20,.68); }
  .hero .hero-action { min-height:44px; margin-top:20px; }
  .plate-list { grid-template-columns: minmax(0,1fr); }
  .header-actions { justify-content: flex-end; flex-wrap: wrap; gap: 4px; padding-block: 8px; }
  .header-actions .text-button { min-height: 40px; padding: 6px 8px; white-space: nowrap; font-size: 13px; }
  .venue-card.has-preview { grid-template-columns:minmax(0,1fr); }
  .location-preview img { max-height:160px; }
  .slots { grid-template-columns:minmax(0,1fr); }
}
@media (min-width: 360px) and (max-width: 480px) {
  .rolling-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rolling-slots .slot { padding: 8px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { transition:none !important; scroll-behavior:auto !important; }
}
