/* Theme is a colour layer only. Layout, photographic pixels and motion stay intact. */
@property --theme-page {
  syntax: '<color>';
  inherits: true;
  initial-value: #f6f8fc;
}
@property --theme-wash-a {
  syntax: '<color>';
  inherits: true;
  initial-value: #fff;
}
@property --theme-wash-b {
  syntax: '<color>';
  inherits: true;
  initial-value: #fdfaff;
}
@property --theme-surface {
  syntax: '<color>';
  inherits: true;
  initial-value: #fff;
}
@property --theme-soft {
  syntax: '<color>';
  inherits: true;
  initial-value: #f1f4fa;
}
@property --theme-glass {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(255, 255, 255, 0.7);
}
@property --theme-text {
  syntax: '<color>';
  inherits: true;
  initial-value: #233247;
}
@property --theme-subtle {
  syntax: '<color>';
  inherits: true;
  initial-value: #718096;
}
@property --theme-edge {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(32, 48, 72, 0.13);
}
:root {
  --theme-page: var(--bg, #f6f8fc);
  --theme-wash-a: #fff;
  --theme-wash-b: #fdfaff;
  --theme-surface: #ffffff;
  --theme-soft: #f1f4fa;
  --theme-glass: rgba(255, 255, 255, 0.7);
  --theme-edge: rgba(32, 48, 72, 0.13);
  --theme-text: #233247;
  --theme-subtle: #718096;
  --theme-selected: #eef1ff;
  --theme-selected-text: #5269bf;
  --theme-shadow: 0 18px 55px #23344b18;
  transition:
    --theme-page 0.58s ease,
    --theme-wash-a 0.58s ease,
    --theme-wash-b 0.58s ease;
}
body:not(.admin-body) {
  background: linear-gradient(
    135deg,
    var(--theme-wash-a),
    var(--theme-page) 52%,
    var(--theme-wash-b)
  );
}
html[data-theme='light'] {
  color-scheme: light;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #10141d !important;
  --ink: #edf1f9;
  --muted: #a5b0c2;
  --panel: rgba(27, 34, 48, 0.7);
  --line: rgba(182, 201, 232, 0.16);
  --theme-page: #10141d;
  --theme-wash-a: #171e2c;
  --theme-wash-b: #201c2b;
  --theme-surface: #1b2230;
  --theme-soft: #242d3e;
  --theme-glass: rgba(27, 34, 48, 0.76);
  --theme-edge: rgba(182, 201, 232, 0.16);
  --theme-text: #edf1f9;
  --theme-subtle: #a5b0c2;
  --theme-selected: #2b3554;
  --theme-selected-text: #bbc8ff;
  --theme-shadow: 0 18px 55px #00000035;
}
.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  border: 1px solid var(--theme-edge);
  border-radius: 14px;
  background: var(--theme-glass);
  color: var(--theme-text);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: inset 0 1px 0 #ffffff60;
  transition:
    background-color 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    scale 0.25s ease;
}
.theme-toggle:hover {
  background: var(--theme-surface);
  box-shadow:
    inset 0 1px 0 #ffffff40,
    0 5px 18px #7188ef18;
}
.theme-toggle:active {
  scale: 0.94;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent, #8fa4ff);
  outline-offset: 4px;
}
.theme-toggle svg {
  position: absolute;
  width: 21px;
  height: 21px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    opacity 0.45s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.theme-toggle .theme-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.theme-toggle .theme-moon {
  opacity: 0;
  transform: rotate(-40deg) scale(0.6);
}
html[data-theme='dark'] .theme-toggle .theme-sun {
  opacity: 0;
  transform: rotate(60deg) scale(0.6);
}
html[data-theme='dark'] .theme-toggle .theme-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.topbar > .theme-toggle {
  margin-left: 10px;
  order: 3;
}
.topbar > .menu-toggle {
  order: 4;
}
@media (min-width: 901px) {
  .topbar > #nav {
    margin-left: auto;
  }
}
.admin-body .admin-utility-actions > .theme-toggle {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--theme-edge);
  background: var(--theme-glass);
  color: var(--theme-text);
}
.login-theme-toggle {
  position: absolute;
  z-index: 5;
  top: calc(24px + env(safe-area-inset-top));
  right: calc(24px + env(safe-area-inset-right));
}
html[data-theme='dark'] body {
  color: var(--theme-text);
  background: linear-gradient(
    135deg,
    var(--theme-wash-a),
    var(--theme-page) 52%,
    var(--theme-wash-b)
  );
}
html[data-theme='dark'] .brand-logo {
  filter: brightness(0) invert(0.94);
}
html[data-theme='dark'] :is(.glass, .topbar, .site-footer, .gate-card) {
  background: linear-gradient(135deg, #ffffff08, #ffffff00 60%, #ffffff05), var(--theme-glass);
  border-color: var(--theme-edge);
  box-shadow:
    inset 0 1px 0 #ffffff14,
    inset 0 -1px 0 #ffffff05,
    0 18px 60px #00000026;
  color: var(--theme-text);
}
html[data-theme='dark']
  :is(
    .topbar nav > a,
    .footer-logo,
    .footer-column > a,
    .footer-mail,
    .nav-social-trigger,
    .nav-social-item,
    .history-point
  ) {
  color: var(--theme-text);
}
html[data-theme='dark'] :is(.topbar nav > a.active, .topbar nav > a:hover) {
  background: var(--theme-selected);
  color: var(--theme-selected-text);
}
html[data-theme='dark']
  :is(
    .nav-social-trigger,
    .nav-social-menu,
    .nav-social-trigger > span > i,
    .nav-social-item > i,
    .footer-contact,
    .footer-mail,
    .footer-bottom a span,
    .text-link,
    .intro-link,
    .button:not(.primary):not(.danger),
    .stat,
    .services,
    .services-list > div,
    .stats-strip > div,
    .home-cta,
    .marquee,
    .editorial-shot span,
    .project-card.style-split,
    .live-now > a,
    .now-action,
    .latest-traces a,
    .album-context a,
    .album-backstage,
    .frame-note,
    .contact-selection,
    .photo-favorite,
    .favorites-toggle,
    .favorites-drawer,
    .gate-card
  ) {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
  box-shadow:
    inset 0 1px 0 #ffffff0d,
    0 8px 28px #00000018;
}
html[data-theme='dark']
  :is(
    .services-list > div:hover,
    .nav-social-item:hover,
    .nav-social-item:hover > i,
    .text-link:hover,
    .button:not(.primary):hover
  ) {
  background: var(--theme-soft);
  color: var(--theme-text);
}
html[data-theme='dark']
  :is(
    .footer-title,
    .footer-kicker,
    .footer-primary #footer-note,
    .footer-contact > p:not(.footer-title),
    .footer-bottom,
    .stat span,
    .services-list span,
    .nav-social-trigger > b,
    .nav-social-item > em,
    .nav-social .nav-social-item.is-disabled,
    .frame-note p,
    .lightbox-meta,
    .lightbox-footer > p,
    .calendar-hero > div:first-child > p:last-child,
    .calendar-hero .eyebrow,
    .calendar-weekdays span,
    .calendar-day-number,
    .event-date span,
    .event-card-main > p,
    .event-quick,
    .event-reveal > p,
    .event-reveal > small,
    .calendar-empty p,
    .map-point-card > p,
    .map-instruction,
    .map-point-count,
    .map-album-card small,
    .map-no-albums,
    .map-story-rail > header span,
    .map-place-panel > header small,
    .map-rail-index small,
    .map-mobile-stories article p,
    .map-mobile-stories > article > span,
    .journal-block-text p,
    .journal-article-meta span,
    .journal-wave-copy > p,
    .journal-wave-copy footer,
    .journal-wave-heading > p,
    .journal-signal-copy > p,
    .journal-horizontal-meter,
    .memory-copy > p,
    .memory-copy footer,
    .memory-coordinates,
    .memory-node b,
    .journal-mobile-journey > header > p:last-child,
    .live-classic .live-description,
    .live-exhibition-state,
    .live-album-note
  ) {
  color: var(--theme-subtle);
}
html[data-theme='dark']
  :is(
    .stat strong,
    .calendar-hero h1,
    .calendar-glass > header h2,
    .calendar-agenda > header h2,
    .calendar-orbit span,
    .event-date b,
    .event-card-main h2,
    .calendar-empty,
    .journal-wave-copy h2,
    .journal-wave-heading h2,
    .journal-signal-copy h1,
    .journal-mobile-journey > header h2,
    .memory-copy h3,
    .live-exhibition-state b
  ) {
  color: var(--theme-text);
}
/* Album backgrounds and editorial panels; keep cover captions white. */
html[data-theme='dark'] :is(.project-card:not(.style-minimal), .category-card) {
  background: var(--theme-surface);
  border-color: #b6c9e826;
  box-shadow: 0 22px 65px #00000030;
}
html[data-theme='dark'] .category-card:hover {
  box-shadow: 0 28px 75px #00000040;
}
html[data-theme='dark'] .project-card.style-minimal {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
html[data-theme='dark'] .project-card:is(.style-split, .style-minimal) .round-arrow {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
/* Discovery uses the same graphite glass as the gallery, not a light-theme panel. */
html[data-theme='dark'] .random-photo-toolbar {
  background: linear-gradient(130deg, #8fa4ff0c, #8fa4ff00 65%), var(--theme-glass);
  border-color: var(--theme-edge);
  box-shadow:
    inset 0 1px 0 #ffffff09,
    0 8px 28px #00000018;
}
html[data-theme='dark']
  :is(
    .random-photo-toolbar small,
    .random-photo-dialog header > span,
    .random-photo-dialog small,
    .random-photo-dialog [role='status']
  ) {
  color: var(--theme-subtle);
}
html[data-theme='dark'] .random-photo-toolbar p {
  color: var(--theme-text);
}
html[data-theme='dark'] :is(.random-photo-trigger, .random-photo-dialog button) {
  background: linear-gradient(135deg, #8fa4ff14, #8fa4ff04), var(--theme-surface);
  border-color: #b6c9e82e;
  color: var(--theme-text);
  box-shadow:
    inset 0 1px 0 #ffffff08,
    0 5px 20px #00000018;
}
html[data-theme='dark']
  :is(.random-photo-trigger:hover, .random-photo-dialog button:not(:disabled):hover) {
  background: var(--theme-soft);
  border-color: #a8baff60;
  box-shadow: 0 9px 22px #00000026;
}
html[data-theme='dark']
  :is(.random-photo-trigger, .random-photo-dialog button, .random-photo-dialog a):focus-visible {
  outline: 2px solid var(--theme-selected-text);
  outline-offset: 4px;
}
html[data-theme='dark'] .random-photo-dialog {
  background: linear-gradient(130deg, #8fa4ff08, transparent 65%), var(--theme-surface);
  border-color: var(--theme-edge);
  color: var(--theme-text);
  box-shadow: 0 25px 100px #00000060;
}
html[data-theme='dark'] .random-photo-dialog::backdrop {
  background: #080d18b3;
}
html[data-theme='dark'] .random-photo-stage {
  background: #10141d80;
}
html[data-theme='dark'] .random-photo-dialog a {
  color: var(--theme-selected-text);
}
html[data-theme='dark'] :is(.gallery-page, .custom-section:not(.custom-image)) {
  background-color: var(--bg);
}
html[data-theme='dark'] .gallery-page {
  --gallery-bg: var(--theme-page) !important;
}
html[data-theme='dark'] :is(.page-head h1, .about-copy h1, .about-copy .lead, .contact-copy h1) {
  color: var(--theme-text);
}
html[data-theme='dark'] .hero-cover .page-head h1 {
  color: #fff;
}
html[data-theme='dark'] .gallery-facts > .gallery-count {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  box-shadow: inset 0 1px 0 #ffffff14;
  color: var(--theme-text);
}
html[data-theme='dark'] .custom-section:not(.custom-image) {
  --custom-bg: var(--bg) !important;
}
html[data-theme='dark'] .gallery-item:after {
  background: var(--theme-glass);
  color: var(--theme-text);
}
html[data-theme='dark'] .gallery-page:not(.hero-cover) .page-head-row > div:before {
  background:
    radial-gradient(ellipse at 38% 50%, #8b76d838, transparent 62%),
    radial-gradient(ellipse at 72% 44%, #60b8d12e, transparent 60%);
}
html[data-theme='dark'] .gallery-page:not(.hero-cover) .page-head-row > div:after {
  background: radial-gradient(ellipse at 60% 60%, #8e68c92a, transparent 65%);
}
/* Viewer and context menu are the same theme, never an inverted photograph. */
html[data-theme='dark'] .lightbox {
  background: #10141df5;
  color: var(--theme-text);
}
html[data-theme='dark'] .lightbox-shell {
  background: linear-gradient(145deg, #1d2534, #131a25);
  border-color: var(--theme-edge);
}
html[data-theme='dark'] :is(.lightbox-head, .lightbox-footer) {
  background: #1b223080;
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark'] .lightbox-stage {
  background: radial-gradient(ellipse at 50% 35%, #26314980, #131a2540);
}
html[data-theme='dark'] :is(.lightbox-counter, .lightbox-head) {
  color: var(--theme-text);
}
html[data-theme='dark']
  .lightbox
  :is(button:not(.lightbox-download), .viewer-detail-controls button) {
  background: var(--theme-soft);
  border-color: var(--theme-edge);
  color: var(--theme-text);
  box-shadow: none;
}
html[data-theme='dark'] .lightbox .lightbox-thumbs button {
  background: #1b2433;
}
html[data-theme='dark'] .lightbox .thumb-selection {
  box-shadow:
    0 0 0 2px #161d2a,
    0 0 0 3px #a8b7ff90;
}
html[data-theme='dark'] .viewer-detail-controls output {
  color: var(--theme-subtle);
}
html[data-theme='dark'] :is(.photo-context-menu, .favorites-drawer, .favorites-drawer button) {
  background: var(--theme-surface);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark'] :is(.photo-context-menu > a, .context-download-off) {
  color: var(--theme-text);
}
html[data-theme='dark'] .photo-context-menu > a:hover {
  background: var(--theme-selected);
}
/* Contact forms, native controls and feedback. */
html[data-theme='dark']
  :is(
    input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not(
        [type='file']
      ),
    textarea,
    select:not(.choice-native):not(.admin-switch-source)
  ) {
  background-color: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-edge);
}
html[data-theme='dark'] :is(input, textarea)::placeholder {
  color: #8492a8;
}
html[data-theme='dark'] option {
  background: var(--theme-surface);
  color: var(--theme-text);
}
html[data-theme='dark']
  :is(.contact-form, .contact-promises > div, .contact-project-types label span) {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark']
  :is(
    .contact-form label,
    .contact-form-head p,
    .contact-form-head > span,
    .contact-project-types legend,
    .contact-message small,
    .contact-message small b,
    .contact-submit p,
    .phone-hint,
    .contact-promises span
  ) {
  color: var(--theme-subtle);
}
html[data-theme='dark'] :is(.contact-promises b, .contact-form .phone-control select) {
  background: var(--theme-soft);
}
html[data-theme='dark'] :is(.contact-form input, .contact-form textarea):focus {
  background: var(--theme-soft);
  border-color: #8fa2ed;
}
html[data-theme='dark'] .contact-project-types input:checked + span {
  background: var(--theme-selected);
  color: var(--theme-selected-text);
  border-color: #8397dd;
}
html[data-theme='dark'] .form-status.success {
  background: #1d3b30;
  color: #91dfb6;
}
html[data-theme='dark'] .form-status.error {
  background: #412630;
  color: #ffb1bd;
}
/* Calendar and the Polish map retain their gradients and orbit animations. */
html[data-theme='dark']
  :is(
    .calendar-glass,
    .calendar-event-card,
    .calendar-empty,
    .event-date,
    .calendar-glass > header > button,
    .event-expand,
    .calendar-day
  ) {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark'] .calendar-day:hover {
  background: var(--theme-soft);
}
html[data-theme='dark'] .calendar-day.is-empty {
  background: #1b223050;
}
html[data-theme='dark'] .calendar-day.is-today .calendar-day-number {
  background: #bac8ff;
  color: #182039;
}
html[data-theme='dark'] .event-quick strong {
  background: var(--theme-selected);
  color: var(--theme-selected-text);
}
html[data-theme='dark'] .history-map-page {
  background:
    radial-gradient(circle at 78% 12%, #7656ad20, transparent 30%),
    radial-gradient(circle at 9% 52%, #377e9920, transparent 30%), var(--bg);
}
html[data-theme='dark']
  :is(
    .history-map-shell,
    .map-hero > aside,
    .map-point-card,
    .map-album-card,
    .history-point > em,
    .map-story-rail,
    .map-place-panel,
    .map-mobile-stories > article,
    .map-empty,
    .map-no-albums
  ) {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark']
  :is(
    .history-point:hover > em,
    .history-point:focus-visible > em,
    .history-point.is-open > em,
    .map-album-card:hover
  ) {
  background: var(--theme-soft);
  color: var(--theme-text);
}
html[data-theme='dark'] .voivodeship {
  fill: #28354a !important;
  stroke: #66768f !important;
}
html[data-theme='dark'] .voivodeship:nth-child(3n) {
  fill: #303954 !important;
}
html[data-theme='dark'] .voivodeship:nth-child(4n) {
  fill: #34324b !important;
}
html[data-theme='dark'] .map-rail-index strong {
  background-image: linear-gradient(135deg, #edf1f9, #a58de7);
}
html[data-theme='dark']
  :is(
    .map-place-button,
    .map-place-button:hover,
    .map-place-button.active,
    .map-place-button:focus-visible
  ) {
  background: var(--theme-glass);
  color: var(--theme-text);
  border-color: var(--theme-edge);
}
html[data-theme='dark'] .map-place-button.active {
  background: var(--theme-selected);
}
html[data-theme='dark'] .map-place-button em {
  background: var(--theme-soft);
  color: var(--theme-subtle);
}
html[data-theme='dark'] :is(.map-rail-index p, .map-hero .eyebrow) {
  color: var(--theme-subtle);
}
html[data-theme='dark'] .history-map-svg {
  color-scheme: dark;
}
html[data-theme='light'] .history-map-svg {
  color-scheme: light;
}
/* Journal: paper becomes graphite, with the animated timeline unchanged. */
html[data-theme='dark']
  :is(.journal-index, .journal-index-reimagined, .journal-article, .journal-mobile-journey) {
  background: var(--bg);
}
html[data-theme='dark'] .journal-horizontal-pin {
  background: linear-gradient(110deg, #182537, #1f2135 52%, #29212a);
}
html[data-theme='dark'] .journal-horizontal-pin:before {
  background: linear-gradient(90deg, #182537, transparent);
}
html[data-theme='dark'] .journal-horizontal-pin:after {
  background: linear-gradient(-90deg, #29212a, transparent);
}
html[data-theme='dark']
  :is(
    .journal-wave-copy,
    .journal-manifesto,
    .journal-manifesto-final,
    .journal-manifesto a,
    .memory-copy,
    .memory-node,
    .journal-signal-cover > span
  ) {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark'] .journal-wave-track-line {
  stroke: #b8c7e52b;
}
html[data-theme='dark'] :is(.journal-article-meta, .journal-wave-copy footer, .memory-copy footer) {
  border-color: var(--theme-edge);
}
html[data-theme='dark'] :is(.journal-card h2, .journal-card h3, .journal-block-quote blockquote) {
  color: var(--theme-text);
}
/* Loading and live arrivals preserve all their existing timing and particles. */
html[data-theme='dark'] .site-loader {
  background: linear-gradient(145deg, #131a27, #1a2033 54%, #201a2e);
  color: var(--theme-text);
}
html[data-theme='dark'] :is(.loader-meta, .loader-index) {
  color: var(--theme-subtle);
}
html[data-theme='dark'] .loader-track-base {
  stroke: #a1b2db2e;
}
html[data-theme='dark'] .live-premiere-veil {
  background: #141c2c80;
}
html[data-theme='dark'] .live-premiere-aura {
  background: radial-gradient(ellipse, #b0b7ff26, #a179d01a 35%, transparent 72%);
}
html[data-theme='dark']
  :is(.live-premiere-close, .live-new-frames, .live-exhibition-state > span:first-child) {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark'] .partner-ribbon {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark'] .partner-ribbon.is-minimal {
  background: none;
  border-color: transparent;
}
html[data-theme='dark'] .partner-mark img {
  filter: brightness(0) invert(0.87);
}
/* Remote presentation, selection and pairing. The QR stays white for reliable scanning. */
html[data-theme='dark']
  :is(
    .presentation-pair,
    .presentation-control-panel,
    .presentation-card,
    .presentation-tabs,
    .presentation-scene-grid button,
    .presentation-inline-actions button,
    .presentation-pad button,
    .contact-sheet-viewer,
    .contact-sheet-frame,
    .contact-build-dock,
    .contact-album-list label
  ) {
  background: var(--theme-surface);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark']
  :is(
    .presentation-card-symbol,
    .presentation-tabs [aria-selected='true'],
    .contact-control-grid button,
    .contact-sheet-viewer.is-composition .contact-sheet-frame
  ) {
  background: var(--theme-soft);
  color: var(--theme-text);
}
html[data-theme='dark'] .presentation-qr-frame {
  background: #fff;
}
/* Compact admin surfaces, controls, menus, camera import and security. */
html[data-theme='dark'] .admin-body {
  --ink: var(--theme-text);
  --muted: var(--theme-subtle);
  --bg: #10141d;
  --panel: var(--theme-surface);
  --line: var(--theme-edge);
  --admin-ink: var(--theme-text);
  --admin-muted: var(--theme-subtle);
  --admin-blue: #a8baff;
  --admin-blue-soft: var(--theme-selected);
  background: var(--bg);
  color: var(--theme-text);
}
.admin-body .admin-shell-v4 {
  background: var(--theme-page);
}
html[data-theme='dark']
  .admin-body
  :is(
    .admin-summary-strip,
    .admin-row,
    .admin-leave-dialog,
    .builder-outline,
    .builder-inspector,
    .builder-preview,
    .builder-palette,
    .media-item,
    .messages-inbox,
    .message-detail,
    .message-row,
    .gallery-editor-summary,
    .event-admin-stats > div,
    .event-admin-row,
    .map-admin-stats > div,
    .map-admin-canvas,
    .map-admin-side,
    .map-position-panel,
    .journal-admin-stats > div,
    .journal-admin-row,
    .journal-editor-preview,
    .journal-editor-tips,
    .security-form,
    .security-confirm,
    .section-add,
    .photo-editor,
    .admin-photo-stage
  ) {
  background: var(--theme-surface);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark']
  .admin-body
  :is(
    .dropzone,
    .drop-icon,
    .cover-badge,
    .photo-toolbar,
    .section-card-actions button,
    .builder-section-item,
    .builder-section-item.built-in,
    .builder-built-note,
    .builder-empty,
    .builder-item-actions button,
    .builder-add-inline,
    .builder-visibility,
    .event-admin-date,
    .settings-group-index,
    .message-brief-meta,
    .security-password-grid,
    .end-other-sessions,
    .map-album-picker,
    .journal-add-block,
    .journal-links-grid,
    .journal-gallery-links,
    .studio-tile-check,
    .studio-assets-grid button,
    .admin-start-card > i,
    .admin-summary-strip button,
    .admin-help-path i,
    .login-trust span,
    .login-trust b,
    .admin-utility-actions kbd
  ) {
  background: var(--theme-soft);
  border-color: var(--theme-edge);
  color: var(--theme-selected-text);
}
html[data-theme='dark']
  .admin-body
  :is(
    .admin-summary-strip,
    .admin-summary-strip > article,
    .admin-row,
    .photo-toolbar,
    .builder-section-item,
    .journal-admin-row,
    .event-admin-row
  ) {
  box-shadow: none;
  border-color: var(--theme-edge);
}
html[data-theme='dark']
  .admin-body
  :is(
    .glass,
    .admin-sidebar-v4,
    .admin-utilitybar,
    .admin-panel,
    .admin-command,
    .admin-help,
    .admin-mobile-sheet,
    .admin-bottom-nav,
    .studio-page-selector,
    .studio-workspace-tabs,
    .settings-group,
    .studio-messages > aside,
    .studio-messages > section,
    .studio-message-row,
    .studio-photo-inspector,
    .studio-conflict-dialog,
    .studio-asset-dialog,
    .studio-health,
    .studio-album-presets,
    .camera-link-card,
    .camera-live-album,
    .camera-link-fields,
    .camera-workspace-tabs,
    .camera-inbox-tools,
    .camera-batch-bar,
    .camera-inbox,
    .camera-editor-host,
    .partners-settings,
    .partner-logo-editor,
    .partners-save-dock,
    .live-preview-panel,
    .security-panel,
    .security-card,
    .map-copy-form,
    .map-point-list,
    .map-point-form,
    .journal-editor-aside,
    .journal-editor-main,
    .quick-action,
    .admin-stat,
    .stat-card,
    .builder-save-bar,
    .content-save-floating,
    .content-save-float
  ) {
  background: var(--theme-surface);
  border-color: var(--theme-edge);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}
html[data-theme='dark']
  .admin-body
  :is(
    h1,
    h2,
    h3,
    h4,
    strong,
    .admin-sidebar-v4 .brand,
    .admin-sidebar-foot b,
    .admin-location b,
    .studio-message-body,
    .camera-link-heading h2,
    .camera-live-album h2,
    .camera-editor-head h2,
    .camera-item b,
    .camera-link-fields strong,
    .studio-health b
  ) {
  color: var(--theme-text);
}
html[data-theme='dark']
  .admin-body
  :is(
    label,
    small,
    .eyebrow,
    .admin-head p,
    .admin-location,
    .admin-sidebar-foot small,
    .admin-workspace-brand small,
    .studio-page-note,
    .studio-help,
    .studio-message-row p,
    .studio-message-row small,
    .studio-message-row time,
    .studio-message-contact,
    .studio-photo-meta,
    .studio-pagination,
    .camera-empty p,
    .camera-live-album > p,
    .camera-link-note,
    .camera-link-fields > div > span,
    .camera-summary span,
    .camera-summary small,
    .camera-batch-fields small,
    .camera-live-details summary,
    .partners-status,
    .preview-footnote,
    .live-preview-panel > header small,
    .live-preview-panel > footer
  ) {
  color: var(--theme-subtle);
}
html[data-theme='dark']
  .admin-body
  :is(
    button:not(.primary):not(.admin-switch):not(.theme-toggle):not(.login-submit):not(
        .admin-nav-item
      ),
    .icon-button,
    .studio-message-contact > *,
    .studio-reply,
    .studio-photo-batch,
    .studio-photo-tile,
    .studio-inspector-image,
    .studio-conflict-dialog article,
    .studio-image-field button,
    .partners-preview,
    .partner-logo-thumb,
    .partners-upload,
    .camera-stage,
    .camera-link-fields > div.camera-host,
    .camera-live-flow span,
    .camera-live-album .camera-live-warning,
    .camera-live-icon,
    .camera-setup-panel,
    .camera-guide li,
    .camera-account-note,
    .camera-help,
    .camera-settings-panel,
    .camera-values > div,
    .current-session,
    .security-grade,
    .security-checks > div,
    .security-overview,
    .security-session,
    .section-card,
    .builder-section-card,
    .optimization-note > *,
    .draft-tools,
    .map-album-picker label > span,
    .map-publish-row label,
    .journal-block-editor,
    .journal-block-picker
  ) {
  background: var(--theme-soft);
  border-color: var(--theme-edge);
  color: var(--theme-text);
}
html[data-theme='dark']
  .admin-body
  :is(.admin-sidebar-v4 .admin-nav-item, .studio-nav-group summary) {
  color: var(--theme-subtle);
  background: transparent;
  box-shadow: none;
}
html[data-theme='dark']
  .admin-body
  :is(.admin-sidebar-v4 .admin-nav-item:hover, .studio-nav-group summary:hover) {
  background: var(--theme-soft);
  color: var(--theme-text);
}
html[data-theme='dark']
  .admin-body
  :is(
    .admin-sidebar-v4 .admin-nav-item.active,
    .studio-nav-group[data-expanded='true'] summary,
    .studio-page-buttons button.active,
    .studio-workspace-tabs button[aria-current],
    .studio-album-tabs button[aria-pressed='true'],
    .admin-bottom-nav button.active,
    .admin-preview-tabs button[aria-pressed='true'],
    .camera-workspace-tabs button[aria-selected='true'],
    .studio-message-row.selected,
    .studio-photo-tile.current,
    .studio-photo-tile.checked,
    .camera-item.selected,
    .choice-option[aria-selected='true'],
    .choice-option.is-active
  ) {
  background: var(--theme-selected);
  color: var(--theme-selected-text);
  border-color: #7186c7;
  box-shadow: inset 0 0 0 1px #a3b4ff19;
}
html[data-theme='dark']
  .admin-body
  :is(
    .admin-workspace-brand,
    .admin-sidebar-foot,
    .studio-message-row,
    .studio-message-filters,
    .studio-inspector-actions,
    .studio-photo-inspector header
  ) {
  border-color: var(--theme-edge);
}
html[data-theme='dark'] .admin-body :is(.button.primary, .studio-inspector-publish) {
  background: linear-gradient(125deg, #657ad4, #8b64b8);
  color: #fff;
  border-color: #a3b4ff40;
}
html[data-theme='dark'] .admin-body :is(.button.danger, .studio-message-actions .danger) {
  background: #412630;
  color: #ffb1bd;
  border-color: #875268;
}
html[data-theme='dark'] .admin-body .admin-switch {
  color: var(--theme-subtle);
}
html[data-theme='dark'] .admin-switch:not([aria-checked='true']) .admin-switch-track {
  background: #46516a;
  border-color: #7383a3;
}
html[data-theme='dark'] .admin-body .admin-switch[aria-checked='true'] {
  color: var(--theme-selected-text);
}
html[data-theme='dark'] .admin-body :is(.choice-trigger, .choice-popover, .choice-search input) {
  background: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-edge);
  box-shadow: var(--theme-shadow);
}
html[data-theme='dark'] .admin-body :is(.choice-chevron, .message-avatar) {
  background: var(--theme-soft);
  color: var(--theme-selected-text);
}
html[data-theme='dark'] .admin-body .choice-option:not([aria-disabled='true']):hover {
  background: var(--theme-selected);
  color: var(--theme-selected-text);
}
html[data-theme='dark'] .admin-body :is(.choice-group, .choice-empty) {
  color: var(--theme-subtle);
}
html[data-theme='dark']
  .admin-body
  :is(
    .studio-inline-status[data-state='error'],
    .studio-messages form [data-state='error'],
    .studio-health .has-errors
  ) {
  color: #ffb1bd;
}
html[data-theme='dark'] .admin-body :is(.camera-link-state.is-ready, .current-session > em) {
  background: #213d33;
  color: #94dabb;
  border-color: #3c6251;
}
html[data-theme='dark']
  .admin-body
  :is(
    .studio-message-row.unread b,
    .camera-host strong,
    .camera-summary strong,
    .live-is-on .camera-live-flow span:last-child
  ) {
  color: var(--theme-selected-text);
}
html[data-theme='dark'] .admin-body .login-panel {
  background: var(--theme-glass);
  border-color: var(--theme-edge);
  box-shadow: var(--theme-shadow);
}
html[data-theme='dark'] .admin-body .admin-login-screen {
  background:
    radial-gradient(ellipse at 18% 20%, #29334d80, transparent 58%),
    radial-gradient(ellipse at 90% 80%, #382a482e, transparent 55%), var(--bg);
  color: var(--theme-text);
}
html[data-theme='dark']
  .admin-body
  :is(
    .login-panel-copy,
    .login-story > p,
    .login-panel-top p,
    .login-trust span,
    .login-kicker,
    .login-panel footer
  ) {
  color: var(--theme-subtle);
}
html[data-theme='dark'] .admin-body .login-emblem {
  background: #293449;
  color: #c2ceff;
  border-color: var(--theme-edge);
}
html[data-theme='dark'] .admin-body .login-contact-outline {
  stroke: #dce5fc;
}
html[data-theme='dark'] .admin-body .login-contact-shield {
  fill: #2c3b54;
  stroke: #b0c1ff;
}
html[data-theme='dark'] .admin-body .login-contact-check {
  stroke: #dce5fc;
}
/* Preview chrome follows admin theme; its iframe receives the same preference. */
html[data-theme='dark']
  .admin-body
  :is(
    .preview-canvas,
    .preview-loading,
    .preview-devices,
    .live-preview-panel > footer,
    .live-preview-panel footer button
  ) {
  background: var(--theme-soft);
  border-color: var(--theme-edge);
  color: var(--theme-subtle);
}
html[data-theme='dark'] .admin-body .preview-browser {
  background: var(--theme-surface) !important;
  border-color: var(--theme-edge);
  color: var(--theme-subtle);
}
html[data-theme='dark'] .admin-body .preview-browser > span {
  background: #596880 !important;
}
html[data-theme='dark']
  .admin-body
  :is(.live-preview-panel > header, .preview-draft-badge, .preview-devices button.active) {
  color: var(--theme-selected-text);
}
html[data-theme='dark'] .admin-body .preview-draft-badge {
  background: var(--theme-selected);
}
html[data-theme='dark'] .admin-body .live-preview-panel.preview-expanded {
  box-shadow:
    0 0 0 100vmax #10141ded,
    0 24px 70px #0008;
}
@media (max-width: 1100px) {
  .topbar > .theme-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin-left: 6px;
  }
}
@media (max-width: 900px) {
  .topbar > .theme-toggle {
    margin-left: auto;
    margin-right: 8px;
  }
  html[data-theme='dark'] body:not(.admin-body) #nav {
    background: linear-gradient(165deg, #1b2230fa, #161d2afa);
  }
  html[data-theme='dark'] body:not(.admin-body) #nav > a {
    background: transparent;
    color: var(--theme-text);
    border-color: var(--theme-edge);
  }
  html[data-theme='dark'] body:not(.admin-body) #nav > a.active {
    background: linear-gradient(90deg, #879aff1c, transparent 66%);
    color: var(--theme-selected-text);
  }
  html[data-theme='dark'] body:not(.admin-body) #nav > a:after {
    background: var(--theme-soft);
    color: var(--theme-subtle);
  }
  html[data-theme='dark'] body:not(.admin-body) #nav > a[href='/kontakt'] {
    background: var(--theme-selected);
  }
  html[data-theme='dark']
    body:not(.admin-body)
    :is(.menu-toggle, .menu-open .topbar, .menu-open .topbar.hidden) {
    background: var(--theme-surface);
  }
  html[data-theme='dark'] body:not(.admin-body) .menu-toggle span {
    background: var(--theme-text);
  }
  html[data-theme='dark'] .admin-body .admin-utility-actions > .theme-toggle {
    display: grid;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root,
  .theme-toggle,
  .theme-toggle svg {
    transition: none;
  }
}
html[data-motion='off'],
html[data-motion='off'] .theme-toggle,
html[data-motion='off'] .theme-toggle svg {
  transition: none;
}
