:root {
  color-scheme: light;
  --ink: #18342f;
  --muted: #68756f;
  --line: #dddddd;
  --paper: #ffffff;
  --wash: #f4f8f3;
  --mint: #2f806b;
  --mint-dark: #1f5e4e;
  --coral: #d86f57;
  --gold: #d6a642;
  --blue: #30688f;
  --button-line: #9aaca5;
  --button-edge: rgba(24, 52, 47, 0.18);
  --button-edge-strong: rgba(24, 52, 47, 0.24);
  --shadow: 0 8px 22px rgba(24, 52, 47, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #ffffff;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dddddd;
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf9;
}

.topnav a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: white;
  color: var(--ink);
  outline: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf9;
}

.language-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.language-switcher button:hover,
.language-switcher button:focus-visible,
.language-switcher button.is-active {
  border-color: var(--button-line);
  background: white;
  box-shadow: 0 1px 4px rgba(24, 52, 47, 0.12);
  color: var(--ink);
  outline: none;
}

main {
  overflow: hidden;
}

.visual-band {
  position: relative;
  display: grid;
  min-height: 260px;
  isolation: isolate;
}

.visual-band::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(34, 34, 34, 0.64), rgba(34, 34, 34, 0.2) 48%, rgba(34, 34, 34, 0.02)),
    linear-gradient(0deg, rgba(34, 34, 34, 0.16), rgba(34, 34, 34, 0));
  content: "";
}

.visual-band img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.visual-copy {
  align-self: end;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 clamp(26px, 5vw, 54px);
  color: #ffffff;
}

.visual-copy p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.visual-copy h1 {
  margin: 0;
  font-size: 3.45rem;
  line-height: 0.95;
}

.booking-layout,
.services-section,
.travel-section,
.visitor-section,
.ledger-section,
.confirmation {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 22px;
  align-items: start;
  padding: clamp(24px, 5vw, 52px) 0 34px;
}

.booking-panel,
.summary-panel,
.confirmation {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.booking-panel {
  padding: clamp(18px, 3.5vw, 30px);
}

.summary-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
}

.panel-heading h2,
.section-heading h2,
.summary-panel h2,
.confirmation h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.service-grid {
  display: grid;
  gap: 26px;
}

.service-group,
.service-list-group {
  display: grid;
  gap: 12px;
}

.service-group h3,
.service-list-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
}

.service-grid-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-card {
  display: grid;
  grid-template-columns: minmax(128px, 0.42fr) minmax(0, 1fr);
  min-height: 160px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--button-line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.service-card:hover,
.service-card:focus-visible {
  border-color: var(--mint);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.86),
    0 6px 16px rgba(24, 52, 47, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.service-card.is-selected {
  border-color: var(--mint-dark);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(47, 128, 107, 0.18);
}

.service-thumb {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: #edf1ee;
  object-fit: cover;
  object-position: center;
}

.service-card-body {
  display: grid;
  gap: 12px;
  align-content: space-between;
  padding: 15px;
}

.service-card h3,
.service-item h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.22;
}

.service-card p,
.service-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef7f2;
  color: var(--mint-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.pill.price {
  background: #fff4e1;
  color: #936313;
}

.date-heading,
.time-heading {
  margin-top: 28px;
}

.date-row {
  display: grid;
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

input {
  min-height: 46px;
  padding: 0 13px;
}

select {
  min-height: 46px;
  padding: 0 38px 0 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    #ffffff;
}

textarea {
  min-height: 104px;
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(47, 128, 107, 0.12);
  outline: none;
}

.quick-dates,
.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 10px;
}

.date-chip,
.time-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--button-line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.86),
    0 2px 5px rgba(24, 52, 47, 0.08);
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.date-chip strong,
.time-chip strong {
  font-size: 0.96rem;
  line-height: 1.1;
}

.date-chip span,
.time-chip span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.date-chip:hover,
.date-chip:focus-visible,
.time-chip:hover,
.time-chip:focus-visible {
  border-color: var(--mint);
  background: #f8fbf9;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 4px 10px rgba(24, 52, 47, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.date-chip.is-selected,
.time-chip.is-selected {
  border-color: var(--mint-dark);
  background: var(--mint);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 3px rgba(47, 128, 107, 0.18);
  color: white;
}

.date-chip.is-selected span,
.time-chip.is-selected span {
  color: rgba(255, 255, 255, 0.82);
}

.time-chip:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  text-decoration: line-through;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.summary-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  min-height: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.summary-list dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.summary-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.booking-form {
  display: grid;
  gap: 14px;
}

.booking-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.checkbox-label {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  color: var(--ink);
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--mint);
}

.sync-status {
  min-height: 40px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8f3;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.sync-status[data-state="syncSent"] {
  border-color: rgba(47, 128, 107, 0.32);
  background: #eef7f2;
  color: var(--mint-dark);
}

.sync-status[data-state="syncFailed"],
.sync-status[data-state="syncAvailabilityFailed"],
.sync-status[data-state="syncLocalSaved"] {
  border-color: rgba(216, 111, 87, 0.32);
  background: #fff7f4;
  color: #9b4b38;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.primary-button,
.secondary-button,
.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.primary-button {
  border: 1px solid var(--mint-dark);
  background: var(--mint);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 2px 0 var(--button-edge-strong);
  color: white;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--mint-dark);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 3px 0 var(--button-edge-strong);
  outline: none;
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--button-line);
  background: white;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.86),
    0 2px 0 var(--button-edge);
  color: var(--ink);
}

.secondary-button:hover,
.secondary-button:focus-visible,
.quiet-button:hover,
.quiet-button:focus-visible {
  border-color: var(--mint);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 3px 0 var(--button-edge);
  outline: none;
  transform: translateY(-1px);
}

.quiet-button {
  border: 1px solid var(--button-line);
  background: transparent;
  box-shadow: 0 2px 0 rgba(24, 52, 47, 0.1);
  color: var(--coral);
}

.primary-button:active,
.secondary-button:active,
.quiet-button:active,
.date-chip:active,
.time-chip:active,
.service-card:active {
  box-shadow: inset 0 0 0 1px rgba(24, 52, 47, 0.08);
  transform: translateY(1px);
}

.confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 8px;
  margin-bottom: 34px;
  padding: 22px;
  box-shadow: none;
}

.confirmation[hidden] {
  display: none;
}

.confirmation p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.confirmation-actions,
.ledger-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.services-section,
.travel-section,
.ledger-section {
  padding: 36px 0;
}

.travel-section {
  padding-top: 4px;
}

.travel-section p:not(.eyebrow) {
  max-width: 76ch;
  color: var(--muted);
  line-height: 1.8;
}

.services-intro {
  max-width: 76ch;
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

.visitor-section {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.visitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

.visitor-card {
  padding: 24px;
  border-radius: 8px;
  background: var(--wash);
}

.visitor-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.visitor-card p,
.visitor-note,
.visitor-faq p {
  max-width: 76ch;
  color: var(--muted);
  line-height: 1.8;
}

.visitor-card p {
  margin: 0;
}

.booking-steps {
  max-width: 76ch;
  padding-left: 1.5em;
  line-height: 1.8;
}

.booking-steps li + li {
  margin-top: 10px;
}

.visitor-faq details {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.visitor-faq summary {
  cursor: pointer;
  font-weight: 700;
}

.visitor-faq summary:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

.access-details {
  font-style: normal;
  line-height: 1.9;
}

.access-details a {
  color: var(--mint-dark);
  text-decoration: underline;
}

.service-list {
  display: grid;
  gap: 22px;
}

.service-list-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-item {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 178px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.service-accent {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: var(--mint);
}

.ledger-section {
  border-top: 1px solid var(--line);
}

.ledger-toolbar {
  justify-content: flex-end;
  margin: -56px 0 18px;
}

.ledger-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.ledger-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.ledger-table th,
.ledger-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ledger-table th {
  background: #f4f8f3;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.ledger-table tr:last-child td {
  border-bottom: 0;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #e9f5ff;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer div {
  display: grid;
  gap: 2px;
}

.site-footer strong {
  color: var(--ink);
}

@media (max-width: 980px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }

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

  .ledger-toolbar {
    justify-content: flex-start;
    margin: 0 0 18px;
  }
}

@media (max-width: 700px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .language-switcher {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .topnav a {
    justify-content: center;
    padding: 0 8px;
  }

  .visual-band {
    min-height: 240px;
  }

  .visual-copy h1 {
    font-size: 2.6rem;
  }

  .panel-heading h2,
  .section-heading h2,
  .summary-panel h2,
  .confirmation h2 {
    font-size: 1.34rem;
  }

  .visual-band::after {
    background: linear-gradient(0deg, rgba(24, 52, 47, 0.76), rgba(24, 52, 47, 0.12));
  }

  .service-grid-items,
  .service-list-items {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 148px;
  }

  .service-thumb {
    min-height: 148px;
  }

  .panel-heading,
  .section-heading,
  .confirmation,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 420px) {
  .quick-dates,
  .time-grid {
    grid-template-columns: 1fr;
  }

  .summary-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .service-card {
    grid-template-columns: 1fr;
    grid-template-rows: 150px minmax(0, 1fr);
  }

  .service-thumb {
    min-height: 150px;
  }
}
