/* The public site has its own palette; administrator pages do not load this file. */
.site-theme-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 10px 14px; border: 1px solid currentColor; border-radius: 12px;
  background: transparent; color: inherit; cursor: pointer;
  font: 16px/1.3 Georgia, serif; text-align: left;
}
.site-theme-toggle:hover { background: #ffffff14; }
.site-theme-toggle > span:first-child { font-size: 23px; line-height: 1; }

html[data-site-theme="dark"] {
  color-scheme: dark;
  --paper: #191518;
  --ink: #f5ede1;
  --muted: #cbbdb3;
  --line: #695259;
  --clay: #f0b2a3;
  --green: #f0b2a3;
  --red: #f0b2a3;
  --cream: #f5ede1;
  --brown: #f5ede1;
  --olive: #c9c49a;
  --gold: #d9c38e;
  --glass: rgba(30, 22, 26, .96);
  --depth: 0 18px 40px -18px #0009, 0 4px 12px -6px #0008;
  --night-panel: #2b2227;
  --night-raised: #392b31;
  --night-button: #a33c38;
  --night-button-hover: #bd4a42;
  --night-outline: #ddbc9a;
}
html[data-site-theme="light"] { color-scheme: light; }

html[data-site-theme="dark"] body {
  background: var(--paper); color: var(--ink);
}
html[data-site-theme="dark"] main#top > .section,
html[data-site-theme="dark"] main#top > #values {
  background: #241c21; color: var(--ink);
}
html[data-site-theme="dark"] main#top > .section::before,
html[data-site-theme="dark"] #values::before {
  background-image: linear-gradient(105deg, #181217f2, #26191fe8), var(--scene, url('gallery-hall.webp'));
}
html[data-site-theme="dark"] .hero::after {
  background: linear-gradient(90deg, #181017a8, #18101718 85%), linear-gradient(0deg, #181017e6, #18101710 85%);
}
html[data-site-theme="dark"] .glass-header,
html[data-site-theme="dark"] .glass-header .nav {
  background: var(--glass); color: var(--cream); border-color: #ae8d806e;
}
html[data-site-theme="dark"] .glass-header .nav a:hover,
html[data-site-theme="dark"] .glass-header .nav a:focus-visible {
  background: var(--night-raised); color: var(--cream);
}
html[data-site-theme="dark"] body > header:not(.glass-header) .brand-wordmark {
  filter: brightness(0) invert(.94);
}

html[data-site-theme="dark"] #values .value-carousel .carousel-slide,
html[data-site-theme="dark"] #collections .card,
html[data-site-theme="dark"] #reviews .review-card,
html[data-site-theme="dark"] #partners .partner-card,
html[data-site-theme="dark"] .afisha-feature,
html[data-site-theme="dark"] .calendar-board,
html[data-site-theme="dark"] .calendar-details {
  background: var(--night-panel); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--depth);
}
html[data-site-theme="dark"] #values .value-carousel .carousel-slide { opacity: 1; }
html[data-site-theme="dark"] #values .value-panel h3,
html[data-site-theme="dark"] #collections .card h3,
html[data-site-theme="dark"] .calendar-month,
html[data-site-theme="dark"] .calendar-kicker,
html[data-site-theme="dark"] .calendar-details h3,
html[data-site-theme="dark"] .calendar-event h4,
html[data-site-theme="dark"] .calendar-event-link {
  color: var(--red);
}
html[data-site-theme="dark"] #values .value-panel p,
html[data-site-theme="dark"] #collections .card p,
html[data-site-theme="dark"] .calendar-board,
html[data-site-theme="dark"] .calendar-details p,
html[data-site-theme="dark"] .review-card blockquote {
  color: var(--ink);
}
html[data-site-theme="dark"] .calendar-weekdays,
html[data-site-theme="dark"] .calendar-legend,
html[data-site-theme="dark"] .calendar-event-time,
html[data-site-theme="dark"] .calendar-event-price,
html[data-site-theme="dark"] .calendar-event-seats,
html[data-site-theme="dark"] .catalog-number,
html[data-site-theme="dark"] .catalog-empty {
  color: var(--muted);
}
html[data-site-theme="dark"] .calendar-day { color: var(--ink); }
html[data-site-theme="dark"] button.calendar-day--event {
  color: var(--red); border-color: var(--red); background: transparent;
}
html[data-site-theme="dark"] button.calendar-day--event:hover,
html[data-site-theme="dark"] button.calendar-day--event[aria-pressed="true"] {
  background: var(--red); color: #281b20;
}
html[data-site-theme="dark"] .calendar-event + .calendar-event { border-color: var(--line); }
html[data-site-theme="dark"] .calendar-legend span { border-color: var(--red); }

html[data-site-theme="dark"] body .btn,
html[data-site-theme="dark"] #private-events .btn,
html[data-site-theme="dark"] #travel .btn,
html[data-site-theme="dark"] footer .btn,
html[data-site-theme="dark"] .review-read,
html[data-site-theme="dark"] .calendar-nav button,
html[data-site-theme="dark"] .carousel-controls button,
html[data-site-theme="dark"] .partners-controls button,
html[data-site-theme="dark"] #values .carousel-controls button,
html[data-site-theme="dark"] .cookie-banner button {
  background: var(--night-button); color: #fff6e9; border-color: var(--red);
}
html[data-site-theme="dark"] body .btn:hover,
html[data-site-theme="dark"] .review-read:hover,
html[data-site-theme="dark"] .calendar-nav button:hover:enabled,
html[data-site-theme="dark"] .carousel-controls button:hover:enabled,
html[data-site-theme="dark"] .partners-controls button:hover:enabled,
html[data-site-theme="dark"] .cookie-banner button:hover {
  background: var(--night-button-hover); color: #fff6e9;
}
html[data-site-theme="dark"] .hero .btn,
html[data-site-theme="dark"] header.glass-header .nav-cta,
html[data-site-theme="dark"] .contact-dialog .contact-main {
  background: var(--cream); color: #522a2b;
}
html[data-site-theme="dark"] .hero .btn:hover,
html[data-site-theme="dark"] header.glass-header .nav-cta:hover,
html[data-site-theme="dark"] .contact-dialog .contact-main:hover {
  background: #e7c8b1; color: #3f2227;
}
html[data-site-theme="dark"] .calendar-nav button:disabled,
html[data-site-theme="dark"] .carousel-controls button:disabled,
html[data-site-theme="dark"] .partners-controls button:disabled { opacity: .6; }
html[data-site-theme="dark"] .collection-actions a {
  color: var(--red); border-color: #aa8b80;
}
html[data-site-theme="dark"] .collection-actions a:hover {
  background: var(--night-button); color: var(--cream);
}

html[data-site-theme="dark"] #travel .world-frame {
  background: #241f23; color: var(--ink); border: 1px solid var(--line);
}
html[data-site-theme="dark"] .world-frame .map-caption,
html[data-site-theme="dark"] .world-frame .map-caption span,
html[data-site-theme="dark"] .world-frame .map-legend,
html[data-site-theme="dark"] .world-frame .map-help,
html[data-site-theme="dark"] .world-frame .map-info { color: var(--ink); }
html[data-site-theme="dark"] .map-info {
  background: var(--night-raised); border-color: #a98b81; border-radius: 12px;
}
html[data-site-theme="dark"] .map-marker::before {
  background: var(--red); border-color: #241f23; box-shadow: 0 0 0 2px var(--red);
}
html[data-site-theme="dark"] .map-marker:hover::before,
html[data-site-theme="dark"] .map-marker[aria-pressed="true"]::before {
  background: var(--cream); border-color: #241f23; box-shadow: 0 0 0 3px var(--red);
}
html[data-site-theme="dark"] #partners .partner-card img {
  box-sizing: border-box; background: #fcf9e9; border-radius: 12px; padding: 12px;
}

html[data-site-theme="dark"] .contact-dialog,
html[data-site-theme="dark"] .review-dialog,
html[data-site-theme="dark"] .catalog-dialog {
  background: var(--night-panel); color: var(--ink); border-color: #b39487;
  box-shadow: 0 28px 100px #000b;
}
html[data-site-theme="dark"] .contact-dialog::backdrop,
html[data-site-theme="dark"] .review-dialog::backdrop,
html[data-site-theme="dark"] .catalog-dialog::backdrop { background: #08060bd9; }
html[data-site-theme="dark"] .contact-dialog h2,
html[data-site-theme="dark"] .contact-dialog .eyebrow,
html[data-site-theme="dark"] .review-dialog h2,
html[data-site-theme="dark"] .catalog-dialog h2,
html[data-site-theme="dark"] .catalog-label,
html[data-site-theme="dark"] .catalog-group h3,
html[data-site-theme="dark"] .catalog-link { color: var(--red); }
html[data-site-theme="dark"] .contact-dialog p,
html[data-site-theme="dark"] .contact-dialog a:not(.contact-main),
html[data-site-theme="dark"] .contact-dialog .contact-close,
html[data-site-theme="dark"] .review-dialog .contact-close,
html[data-site-theme="dark"] .catalog-close { color: var(--ink); }
html[data-site-theme="dark"] .catalog-drawer {
  background: #493339; border-color: #a98b81; box-shadow: inset 0 5px 15px #0003;
}
html[data-site-theme="dark"] .catalog-file {
  --file-bg: #30272b; background: var(--file-bg); border-color: #a98b81; box-shadow: 0 5px 8px #0004;
}
html[data-site-theme="dark"] .catalog-file:nth-child(even) { --file-bg: #392b31; }
html[data-site-theme="dark"] .catalog-file summary { color: var(--ink); }
html[data-site-theme="dark"] .catalog-file summary::before {
  background: var(--file-bg); border-color: #a98b81;
}

html[data-site-theme="dark"] footer {
  background: #241b20; color: var(--cream); border-color: var(--line);
}
html[data-site-theme="dark"] footer .footer-social a:hover,
html[data-site-theme="dark"] footer .footer-social a:focus-visible {
  background: var(--red); color: #281b20;
}
html[data-site-theme="dark"] .cookie-banner {
  background: var(--night-panel); color: var(--ink); border-color: #b39487;
  border-radius: 14px; box-shadow: var(--depth);
}
html[data-site-theme="dark"] .cookie-banner a { color: var(--red); }
html[data-site-theme="dark"] .privacy-page,
html[data-site-theme="dark"] .page-404 { color: var(--ink); }
html[data-site-theme="dark"] :where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--night-outline); outline-offset: 4px;
}
html[data-site-theme="dark"] ::selection { background: #f0b2a3; color: #281b20; }
