:root {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --theme-bg: #101a16;
  --theme-surface: #1a2821;
  --theme-surface-raised: #22352b;
  --theme-ink: #f1f6f2;
  --theme-muted: #b7c6bd;
  --theme-line: #3a4d42;
  --theme-green: #0b241d;
  --theme-green-soft: #1c362b;
  --theme-link: #a9ddbf;
}

.theme-toggle {
  display: inline-flex;
  flex: 0 0 40px;
  width: 40px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid var(--theme-line, #dfe7e1);
  border-radius: 999px;
  background: var(--theme-surface, #fff);
  color: var(--theme-ink, #1d2924);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.theme-toggle:focus-visible {
  outline: 3px solid #e9c77b;
  outline-offset: 3px;
}

.theme-icon {
  font-size: 16px;
  line-height: 1;
}

.theme-label {
  display: none;
}

.theme-toggle.on-dark {
  border-color: #ffffffa6;
  background: #ffffff14;
  color: #fff;
}

:root[data-theme="dark"] body[data-theme-page="booking"] {
  background: var(--theme-bg);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .brand {
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .kicker {
  color: var(--theme-link);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .brand small,
:root[data-theme="dark"] body[data-theme-page="booking"] .muted,
:root[data-theme="dark"] body[data-theme-page="booking"] .field label,
:root[data-theme="dark"] body[data-theme-page="booking"] .summary small {
  color: var(--theme-muted);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .nav a:last-child,
:root[data-theme="dark"] body[data-theme-page="booking"] .bookingbar,
:root[data-theme="dark"] body[data-theme-page="booking"] .how,
:root[data-theme="dark"] body[data-theme-page="booking"] .modal,
:root[data-theme="dark"] body[data-theme-page="booking"] .modalhead,
:root[data-theme="dark"] body[data-theme-page="booking"] .summary,
:root[data-theme="dark"] body[data-theme-page="booking"] .paycard {
  border-color: var(--theme-line);
  background: var(--theme-surface);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .bookingbar {
  box-shadow: 0 18px 50px #0008;
}

:root[data-theme="dark"] body[data-theme-page="booking"] .field {
  border-color: var(--theme-line);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .field input,
:root[data-theme="dark"] body[data-theme-page="booking"] .field select,
:root[data-theme="dark"] body[data-theme-page="booking"] .formgroup input,
:root[data-theme="dark"] body[data-theme-page="booking"] .formgroup select,
:root[data-theme="dark"] body[data-theme-page="booking"] .formgroup textarea {
  border-color: var(--theme-line);
  background: var(--theme-surface-raised);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="booking"] input::placeholder,
:root[data-theme="dark"] body[data-theme-page="booking"] textarea::placeholder,
:root[data-theme="dark"] body[data-theme-page="admin"] input::placeholder,
:root[data-theme="dark"] body[data-theme-page="admin"] textarea::placeholder {
  color: var(--theme-muted);
  opacity: 1;
}

:root[data-theme="dark"] body[data-theme-page="booking"] .amenities span,
:root[data-theme="dark"] body[data-theme-page="booking"] .num,
:root[data-theme="dark"] body[data-theme-page="booking"] .privacy-consent,
:root[data-theme="dark"] body[data-theme-page="booking"] .close {
  background: var(--theme-surface-raised);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .step {
  background: var(--theme-surface-raised);
  color: var(--theme-muted);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .step.active {
  background: #285d49;
  color: #fff;
}

:root[data-theme="dark"] body[data-theme-page="booking"] .rate,
:root[data-theme="dark"] body[data-theme-page="booking"] .total {
  color: var(--theme-link);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .photo-label {
  background: var(--theme-surface);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .deposit-note,
:root[data-theme="dark"] body[data-theme-page="booking"] .rules-card {
  background: var(--theme-surface);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="booking"] .alert,
:root[data-theme="dark"] body[data-theme-page="booking"] .success {
  border-color: #42644e;
  background: #1c3527;
  color: #e4f5e9;
}

:root[data-theme="dark"] body[data-theme-page="booking"] .alert.warn {
  border-color: #806b43;
  background: #382f20;
  color: #fff0cf;
}

:root[data-theme="dark"] body[data-theme-page="booking"] .qr {
  border-color: #65796c;
  background: #121e18;
  color: var(--theme-muted);
}

:root[data-theme="dark"] body[data-theme-page="booking"] section[style*="background"] {
  background: var(--theme-bg) !important;
}

:root[data-theme="dark"] body[data-theme-page="booking"] *:focus-visible {
  outline-color: #a9ddbf;
  box-shadow: 0 0 0 2px var(--theme-bg);
}

:root[data-theme="dark"] body[data-theme-page="admin"] {
  background: var(--theme-bg);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="admin"] .head {
  background: var(--theme-green);
}

:root[data-theme="dark"] body[data-theme-page="admin"] .panel,
:root[data-theme="dark"] body[data-theme-page="admin"] input,
:root[data-theme="dark"] body[data-theme-page="admin"] textarea,
:root[data-theme="dark"] body[data-theme-page="admin"] select {
  border-color: var(--theme-line);
  background: var(--theme-surface);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="admin"] .muted,
:root[data-theme="dark"] body[data-theme-page="admin"] th,
:root[data-theme="dark"] body[data-theme-page="admin"] .stat small {
  color: var(--theme-muted);
}

:root[data-theme="dark"] body[data-theme-page="admin"] .stat,
:root[data-theme="dark"] body[data-theme-page="admin"] .tag,
:root[data-theme="dark"] body[data-theme-page="admin"] .qr-preview {
  border-color: var(--theme-line);
  background: var(--theme-surface-raised);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="admin"] .btn.alt {
  background: var(--theme-surface-raised);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="admin"] .btn.danger {
  background: #a93232;
  color: #fff;
}

:root[data-theme="dark"] body[data-theme-page="admin"] .error {
  color: #ffaaa3;
}

:root[data-theme="dark"] body[data-theme-page="admin"] .success {
  color: #9ce0b5;
}

:root[data-theme="dark"] body[data-theme-page="admin"] .notice {
  border-color: #806b43;
  background: #382f20;
  color: #fff0cf;
}

:root[data-theme="dark"] body[data-theme-page="admin"] .media-item button {
  background: #422626;
  color: #ffb5ae;
}

:root[data-theme="dark"] body[data-theme-page="admin"] .skip-link {
  background: var(--theme-surface);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="admin"] *:focus-visible,
:root[data-theme="dark"] body[data-theme-page="policies"] *:focus-visible {
  outline-color: #a9ddbf;
  box-shadow: 0 0 0 2px var(--theme-bg);
}

:root[data-theme="dark"] body[data-theme-page="policies"] {
  background: var(--theme-bg);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="policies"] a {
  color: var(--theme-link);
}

:root[data-theme="dark"] body[data-theme-page="policies"] header {
  background: var(--theme-green);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="policies"] .intro,
:root[data-theme="dark"] body[data-theme-page="policies"] section {
  border-color: var(--theme-line);
  background: var(--theme-surface);
  color: var(--theme-ink);
}

:root[data-theme="dark"] body[data-theme-page="policies"] .muted {
  color: var(--theme-muted);
}

:root[data-theme="dark"] body[data-theme-page="policies"] .notice {
  border-color: #806b43;
  background: #382f20;
  color: #fff0cf;
}

:root[data-theme="dark"] body[data-theme-page="policies"] .skip-link {
  background: var(--theme-surface);
  color: var(--theme-ink);
}
