:root {
  color-scheme: light;
  --ink: #202020;
  --soft-ink: rgba(32, 32, 32, 0.66);
  --paper: rgba(255, 252, 244, 0.76);
  --paper-strong: rgba(255, 252, 244, 0.88);
  --line: rgba(32, 32, 32, 0.16);
  --line-strong: rgba(32, 32, 32, 0.32);
  --shadow: rgba(46, 46, 46, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Songti SC", "Noto Serif SC", "Microsoft YaHei", serif;
  color: var(--ink);
  background: #f7f2e8;
  overflow-x: hidden;
}

a,
button {
  font: inherit;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  padding: 24px;
  isolation: isolate;
}

.painting-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.72) 0%, rgba(255, 252, 244, 0.2) 32%, rgba(255, 252, 244, 0.08) 64%, rgba(255, 252, 244, 0.74) 100%),
    url("./assets/shanshui-bg.png") center bottom / cover no-repeat;
  animation: paintingBreath 22s cubic-bezier(0.45, 0, 0.2, 1) infinite alternate;
  transform-origin: center bottom;
  will-change: transform, filter;
}

.painting-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.72), transparent 34rem);
  opacity: 0.72;
  animation: lightBreath 12s ease-in-out infinite alternate;
}

.mist {
  position: absolute;
  width: var(--w);
  height: 13vh;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.76), transparent);
  filter: blur(28px);
  opacity: var(--opacity);
  animation: mistMove var(--duration) cubic-bezier(0.45, 0, 0.2, 1) infinite alternate;
}

.mist-one {
  --w: 52vw;
  --opacity: 0.72;
  --duration: 32s;
  top: 32vh;
  left: 4vw;
}

.mist-two {
  --w: 60vw;
  --opacity: 0.54;
  --duration: 38s;
  top: 54vh;
  right: 2vw;
}

.brand-header {
  position: sticky;
  top: 18px;
  z-index: 10;
  width: min(1240px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.brand-lockup,
.hero-tabs {
  border: 1px solid var(--line);
  background: rgba(255, 252, 244, 0.72);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 70px var(--shadow);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  animation: softFloat 8s cubic-bezier(0.45, 0, 0.2, 1) infinite alternate;
}

.brand-lockup img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  animation: logoBreath 7s ease-in-out infinite alternate;
}

.brand-lockup span,
.brand-lockup small {
  display: block;
}

.brand-lockup span {
  font-size: 16px;
  line-height: 1.15;
}

.brand-lockup small {
  margin-top: 3px;
  color: var(--soft-ink);
  font: 9px/1.2 "Times New Roman", serif;
  letter-spacing: 0.14em;
}

.hero {
  width: min(1120px, 100%);
  min-height: 320px;
  margin: 42px auto 24px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.hero-tabs {
  display: inline-flex;
  gap: 6px;
  min-height: 56px;
  margin-top: 24px;
  padding: 6px;
  border-radius: 999px;
  z-index: 20;
  position: relative;
  overflow: hidden;
  transition: background 360ms ease, box-shadow 360ms ease;
}

.hero-tabs::after {
  content: "";
  position: absolute;
  inset: -80% auto auto -35%;
  width: 36%;
  height: 260%;
  background: linear-gradient(105deg, transparent 10%, rgba(255, 255, 255, 0.5) 48%, transparent 75%);
  transform: translateX(-40%) rotate(12deg);
  animation: sheenMove 7s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  pointer-events: none;
}

.tab-button {
  min-width: 108px;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background 360ms ease, box-shadow 360ms ease, color 360ms ease;
}

.tab-button small {
  display: block;
  margin-top: 2px;
  color: var(--soft-ink);
  font: 9px/1.2 "Times New Roman", serif;
  letter-spacing: 0.14em;
}

.tab-button:hover,
.tab-button.is-active {
  background: rgba(32, 32, 32, 0.07);
  box-shadow: inset 0 0 0 1px rgba(32, 32, 32, 0.08);
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(32, 32, 32, 0.52);
  font: 11px/1.6 "Times New Roman", serif;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-size: clamp(56px, 9vw, 112px);
  line-height: 1;
  font-weight: 700;
  color: var(--ink);
  text-shadow: 0 18px 56px rgba(32, 32, 32, 0.12);
  animation: titleBreath 9s ease-in-out infinite alternate;
}

.title-en {
  margin: 13px 0 0;
  color: rgba(32, 32, 32, 0.56);
  font: 12px/1.4 "Times New Roman", serif;
  letter-spacing: 0.22em;
}

.intro {
  width: min(680px, 100%);
  margin: 22px auto 0;
  color: var(--soft-ink);
  font-size: clamp(15px, 2.1vw, 18px);
  line-height: 1.9;
}

.management-board {
  width: min(1240px, 100%);
  margin: 0 auto 52px;
  display: grid;
  align-items: start;
}

.board-panel {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 45%),
    var(--paper);
  backdrop-filter: blur(26px);
  box-shadow: 0 26px 90px var(--shadow);
  transition: box-shadow 700ms ease;
}

.board-panel:hover {
  box-shadow: 0 30px 96px rgba(46, 46, 46, 0.16);
}

.tab-panel {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(12px) scale(0.996);
  filter: blur(6px);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 560ms ease,
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 560ms ease,
    visibility 0ms linear 560ms;
}

.tab-panel.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 620ms ease,
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 620ms ease,
    visibility 0ms linear 0ms;
}

.management-board.is-switching .tab-panel.is-active {
  opacity: 0;
  transform: translateY(6px) scale(0.998);
  filter: blur(6px);
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.nav-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.product-panel,
.consult-panel {
  width: min(980px, 100%);
  margin: 0 auto;
}

.panel-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-title p {
  margin: 0;
  color: rgba(32, 32, 32, 0.5);
  font: 10px/1.4 "Times New Roman", serif;
  letter-spacing: 0.18em;
}

.panel-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.slot-list,
.product-grid,
.form-grid {
  display: grid;
  gap: 12px;
}

.product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-slot {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px solid rgba(32, 32, 32, 0.18);
  border-radius: 16px;
  color: rgba(32, 32, 32, 0.52);
  background:
    repeating-linear-gradient(135deg, rgba(32, 32, 32, 0.035) 0 1px, transparent 1px 8px),
    rgba(255, 252, 244, 0.48);
  text-decoration: none;
  overflow: hidden;
}

.admin-slot img {
  width: 100%;
  max-height: 150px;
  border-radius: 12px;
  object-fit: cover;
}

.admin-slot small {
  color: rgba(32, 32, 32, 0.44);
  line-height: 1.4;
  text-align: center;
}

.admin-slot::after {
  content: attr(data-admin-slot);
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(32, 32, 32, 0.28);
  font: 9px/1 "Times New Roman", serif;
  letter-spacing: 0.08em;
}

.nav-slot {
  min-height: 70px;
}

.product-slot {
  min-height: 126px;
}

.field-slot {
  min-height: 48px;
  justify-items: start;
  padding: 0 14px;
}

.consult-card {
  display: block;
}

.qr-slot {
  min-height: 170px;
  gap: 8px;
  align-content: center;
}

.qr-slot img {
  width: min(150px, 82%);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(32, 32, 32, 0.12);
}

.consult-form {
  display: grid;
  gap: 16px;
}

.flow-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  padding: 14px 0 2px;
}

.flow-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(32, 32, 32, 0.16);
  border-radius: 50%;
  color: rgba(32, 32, 32, 0.54);
  background: rgba(255, 252, 244, 0.56);
  font: 12px/1 "Times New Roman", serif;
  letter-spacing: 0.12em;
}

.flow-block h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.flow-block p {
  margin: 5px 0 0;
  color: rgba(32, 32, 32, 0.52);
  font-size: 14px;
  line-height: 1.6;
}

.form-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field span,
.form-field legend {
  color: var(--ink);
  font-size: 18px;
}

.required > span::before,
.required > legend::before {
  content: "*";
  margin-right: 6px;
  color: #d33;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(32, 32, 32, 0.14);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.62);
  outline: none;
}

.form-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(32, 32, 32, 0.55) 50%),
    linear-gradient(135deg, rgba(32, 32, 32, 0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 14px) 50%;
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.form-field input::placeholder {
  color: rgba(32, 32, 32, 0.38);
}

.is-invalid > input,
.is-invalid.form-field input,
.is-invalid.form-field select,
.is-invalid .calendar-tabs label,
.is-invalid .appointment-grid label,
.is-invalid.appointment-field,
.is-invalid.package-field {
  border-color: rgba(190, 38, 31, 0.58);
  box-shadow: inset 0 0 0 1px rgba(190, 38, 31, 0.12);
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: #b52822;
  line-height: 1.6;
}

.package-field {
  padding: 14px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 18px;
  background: rgba(255, 252, 244, 0.48);
}

.date-panel,
.time-panel {
  display: none;
}

.date-panel.is-active {
  display: grid;
  gap: 10px;
}

select.time-panel.is-active {
  display: block;
}

.lunar-leap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.46);
}

.package-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.package-card {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 244, 0.5);
  cursor: pointer;
  transition: background 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.package-card input {
  margin: 0;
}

.package-card strong {
  color: #9f251f;
  font-size: 24px;
  line-height: 1.1;
}

.package-card small {
  color: rgba(32, 32, 32, 0.52);
  line-height: 1.5;
}

.package-name {
  font-size: 17px;
}

.package-card.is-selected,
.package-card:has(input:checked) {
  border-color: rgba(159, 37, 31, 0.32);
  background: rgba(255, 248, 236, 0.78);
  box-shadow: inset 0 0 0 1px rgba(159, 37, 31, 0.12), 0 18px 42px rgba(46, 46, 46, 0.08);
}

.palace-choice {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 244, 0.44);
}

.palace-choice.is-hidden {
  display: none;
}

.palace-choice h4,
.palace-choice p {
  margin: 0;
}

.palace-choice h4 {
  font-size: 17px;
}

.palace-choice p {
  color: rgba(32, 32, 32, 0.5);
  font-size: 14px;
}

.palace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.palace-grid label {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.52);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.palace-grid label:has(input:checked) {
  border-color: rgba(159, 37, 31, 0.32);
  background: rgba(255, 248, 236, 0.86);
  box-shadow: inset 0 0 0 1px rgba(159, 37, 31, 0.12);
}

.palace-grid small {
  color: rgba(32, 32, 32, 0.48);
  font-size: 12px;
}

.palace-stepper,
.price-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.52);
}

.palace-stepper {
  justify-content: flex-start;
}

.palace-stepper span {
  margin-right: auto;
  color: rgba(32, 32, 32, 0.68);
}

.stepper-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(32, 32, 32, 0.14);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.72);
  cursor: pointer;
  transition: background 220ms ease, box-shadow 220ms ease;
}

.stepper-button:hover {
  background: rgba(255, 248, 236, 0.94);
  box-shadow: 0 8px 18px rgba(46, 46, 46, 0.08);
}

.stepper-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
  box-shadow: none;
}

#extra-palace-count {
  min-width: 26px;
  text-align: center;
  font-size: 18px;
}

.price-summary strong {
  color: #9f251f;
  font-size: 22px;
}

.package-note {
  margin: 0;
  color: rgba(32, 32, 32, 0.54);
  font-size: 14px;
}

.appointment-field {
  padding: 14px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 18px;
  background: rgba(255, 252, 244, 0.48);
}

.appointment-group {
  display: grid;
  gap: 10px;
}

.appointment-group h4 {
  margin: 0;
  color: rgba(32, 32, 32, 0.72);
  font-size: 17px;
  line-height: 1.35;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.weekday-grid label,
.appointment-grid {
  display: grid;
}

.weekday-grid label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.5);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.weekday-grid label:has(input:checked),
.appointment-grid label:has(input:checked) {
  border-color: rgba(32, 32, 32, 0.26);
  background: rgba(206, 202, 192, 0.72);
  box-shadow: inset 0 0 0 1px rgba(32, 32, 32, 0.08);
}

.appointment-grid label.is-booked {
  color: rgba(32, 32, 32, 0.32);
  background: rgba(208, 208, 208, 0.5);
  border-color: rgba(32, 32, 32, 0.1);
  cursor: not-allowed;
}

.appointment-grid label.is-booked input {
  pointer-events: none;
}

.slot-status {
  margin-left: auto;
  color: rgba(32, 32, 32, 0.42);
  font-size: 12px;
}

.appointment-times {
  display: none;
  gap: 10px;
}

.appointment-times.is-active {
  display: grid;
}

.appointment-times p {
  margin: 0;
  color: rgba(32, 32, 32, 0.5);
  font-size: 14px;
}

.appointment-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.appointment-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.5);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.payment-panel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.payment-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 244, 0.5);
}

.payment-copy span {
  color: rgba(32, 32, 32, 0.58);
}

.payment-copy strong {
  color: #9f251f;
  font-size: 34px;
  line-height: 1.1;
}

.payment-copy small {
  color: rgba(32, 32, 32, 0.46);
  line-height: 1.6;
}

.form-field > label,
.calendar-tabs label,
.time-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.46);
}

.calendar-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.time-grid {
  display: grid;
  gap: 8px;
}

.submit-button {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #d92e2e;
  cursor: pointer;
  font-size: 18px;
}

.secondary-button {
  min-height: 50px;
  border: 1px solid rgba(32, 32, 32, 0.14);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.66);
  cursor: pointer;
  font-size: 16px;
}

.checkout-stage {
  display: none;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
}

.checkout-stage.is-visible {
  display: grid;
  opacity: 1;
  transform: translateY(0);
  animation: stageReveal 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-slot span,
.qr-slot small {
  display: block;
}

.qr-slot small {
  color: rgba(32, 32, 32, 0.42);
  font: 11px/1.2 "Times New Roman", serif;
  letter-spacing: 0.16em;
}

@keyframes mistMove {
  from {
    transform: translate3d(-2vw, 0, 0);
  }

  to {
    transform: translate3d(7vw, -1vh, 0);
  }
}

@keyframes paintingBreath {
  from {
    transform: scale(1);
    filter: saturate(1) contrast(1);
  }

  to {
    transform: scale(1.018);
    filter: saturate(1.02) contrast(1.015);
  }
}

@keyframes lightBreath {
  from {
    opacity: 0.58;
  }

  to {
    opacity: 0.82;
  }
}

@keyframes softFloat {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-3px);
  }
}

@keyframes logoBreath {
  from {
    box-shadow: 0 0 0 rgba(32, 32, 32, 0);
  }

  to {
    box-shadow: 0 0 22px rgba(32, 32, 32, 0.1);
  }
}

@keyframes titleBreath {
  from {
    text-shadow: 0 18px 56px rgba(32, 32, 32, 0.12);
  }

  to {
    text-shadow: 0 22px 68px rgba(32, 32, 32, 0.18);
  }
}

@keyframes sheenMove {
  0%,
  42% {
    transform: translateX(-45%) rotate(12deg);
    opacity: 0;
  }

  58% {
    opacity: 0.9;
  }

  100% {
    transform: translateX(420%) rotate(12deg);
    opacity: 0;
  }
}

@keyframes stageReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 940px) {
  .management-board {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-shell {
    padding: 16px 14px 42px;
  }

  .brand-header {
    top: 12px;
  }

  .brand-lockup {
    max-width: 56px;
    padding: 8px;
  }

  .brand-lockup span {
    display: none;
  }

  .hero-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 22px;
  }

  .management-board {
    scroll-margin-top: 148px;
  }

  .tab-button {
    min-width: 0;
    padding: 8px 10px;
  }

  .hero {
    min-height: 300px;
    margin-top: 34px;
  }

  .board-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .calendar-tabs {
    grid-template-columns: 1fr;
  }

  .package-options {
    grid-template-columns: 1fr;
  }

  .palace-grid {
    grid-template-columns: 1fr;
  }

  .appointment-grid {
    grid-template-columns: 1fr;
  }

  .weekday-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-panel {
    grid-template-columns: 1fr;
  }
}

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