*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --admin-bg: #0b0b0b;
  --admin-surface: #141414;
  --admin-elevated: #1c1c1c;
  --admin-border: #3a3a3a;
  --admin-text: #f3f4f6;
  --admin-text-muted: #c7c7c7;
  --admin-focus: #93c5fd;
  --admin-danger: #fca5a5;
  --admin-success: #bbf7d0;

  --area-website: #5b8fd4;
  --area-website-dim: rgba(91, 143, 212, 0.14);
  --area-website-border: rgba(91, 143, 212, 0.45);

  --area-medien: #c4a876;
  --area-medien-dim: rgba(196, 168, 118, 0.12);
  --area-medien-border: rgba(196, 168, 118, 0.45);

  --area-publish: #6ebe8a;
  --area-publish-dim: rgba(110, 190, 138, 0.12);
  --area-publish-border: rgba(110, 190, 138, 0.45);

  /* Releases-Editor: Höhe für scrollende Albumliste + sticky Edit-Box */
  --admin-releases-workspace-h: calc(100dvh - 12.75rem);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.6;
  font-size: 16px;
}

.skip-link {
  position: fixed;
  left: 0.75rem;
  top: -3rem;
  z-index: 200;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  background: #fff;
  color: #111;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 0.75rem;
}

body[data-admin-area="website"] {
  --admin-accent: var(--area-website);
  --admin-accent-dim: var(--area-website-dim);
  --admin-accent-border: var(--area-website-border);
}

body[data-admin-area="medien"] {
  --admin-accent: var(--area-medien);
  --admin-accent-dim: var(--area-medien-dim);
  --admin-accent-border: var(--area-medien-border);
}

body[data-admin-area="publish"] {
  --admin-accent: var(--area-publish);
  --admin-accent-dim: var(--area-publish-dim);
  --admin-accent-border: var(--area-publish-border);
}

.muted {
  color: var(--admin-text-muted);
}

.error {
  color: var(--admin-danger);
}

.error:not([hidden]) {
  display: block;
  margin: 0;
}

.status {
  min-height: 1.25rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--admin-success);
  background: transparent;
  border: 1px solid transparent;
}

.status.is-success {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.35);
  border-color: rgba(74, 222, 128, 0.35);
}

.status.is-error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.4);
  border-color: rgba(248, 113, 113, 0.35);
}

.admin-toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  opacity: 0;
  transform: translateY(0.5rem);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast--success {
  color: #ecfdf5;
  background: #166534;
  border: 1px solid #4ade80;
}

.admin-toast--error {
  color: #fef2f2;
  background: #7f1d1d;
  border: 1px solid #f87171;
}

.admin-toast--info {
  color: #e0e7ff;
  background: #312e81;
  border: 1px solid #818cf8;
}

button.primary.is-saving,
button.primary.is-saved {
  transition: background 0.2s ease, color 0.2s ease;
}

button.primary.is-saving {
  opacity: 0.85;
}

button.primary.is-saved {
  background: #166534;
  color: #ecfdf5;
}

.login-screen.is-hidden {
  display: none !important;
}

#global-status {
  position: fixed;
  inset: 0.75rem 0.75rem auto;
  z-index: 100;
  max-width: 28rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.4rem;
  background: #7f1d1d;
  color: #fecaca;
  display: none;
}

#global-status.is-visible {
  display: block;
}

.login-card {
  width: min(100%, 22rem);
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #333;
  border-radius: 0.75rem;
  background: #1a1a1a;
}

.login-card h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.app {
  min-height: 100vh;
  display: none;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "topbar"
    "context"
    "main";
}

.app.is-visible {
  display: grid;
}

.topbar {
  grid-area: topbar;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--admin-accent-border, #444);
  background: #101010;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-context {
  grid-area: context;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  background: var(--admin-accent-dim, rgba(255, 255, 255, 0.04));
  border-bottom: 1px solid var(--admin-border);
}

.ctx-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
  font-weight: 500;
  line-height: 1.35;
}

.ctx-chip[data-level="1"] {
  color: var(--admin-accent, #ccc);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--admin-accent-border, #444);
}

.ctx-chip[data-level="2"] {
  color: #eee;
  background: var(--admin-elevated);
  border: 1px solid var(--admin-border);
}

.ctx-chip[data-level="3"] {
  color: #bbb;
  background: transparent;
  border: 1px dashed #444;
  font-weight: 400;
}

.ctx-sep {
  color: #555;
  user-select: none;
}

.brand {
  font-weight: 600;
  margin-right: auto;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tab {
  border: 1px solid #444;
  background: transparent;
  color: #aaa;
  padding: 0.35rem 0.85rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font-weight: 500;
}

.tab[data-tab="website"].active {
  background: var(--area-website-dim);
  color: #d4e4f7;
  border-color: var(--area-website-border);
  box-shadow: inset 0 -2px 0 var(--area-website);
}

.tab[data-tab="medien"].active {
  background: var(--area-medien-dim);
  color: #e8dcc4;
  border-color: var(--area-medien-border);
  box-shadow: inset 0 -2px 0 var(--area-medien);
}

.tab[data-tab="publish"].active {
  background: var(--area-publish-dim);
  color: #d0eed9;
  border-color: var(--area-publish-border);
  box-shadow: inset 0 -2px 0 var(--area-publish);
}

.main {
  grid-area: main;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-area-website.active {
  background: linear-gradient(
    90deg,
    var(--area-website-dim) 0,
    transparent 12rem
  );
  border-radius: 0.5rem;
  padding: 0.25rem 0;
}

.panel-area-medien.active {
  background: linear-gradient(
    90deg,
    var(--area-medien-dim) 0,
    transparent 10rem
  );
  border-radius: 0.5rem;
  padding: 0.25rem 0;
}

.panel-area-publish.active {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--admin-border);
  border-left: 3px solid var(--area-publish);
  border-radius: 0.6rem;
  background: linear-gradient(
    90deg,
    var(--area-publish-dim) 0,
    #121816 10rem
  );
  min-height: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

h2,
h3 {
  margin: 0 0 0.75rem;
  font-weight: 500;
}

label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #bbb;
}

input,
textarea,
button,
.search {
  font: inherit;
}

input,
textarea,
.search {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 0.4rem;
  border: 1px solid #444;
  background: #0f0f0f;
  color: #eee;
}

.search {
  margin-bottom: 0.75rem;
  max-width: 24rem;
}

button,
.upload-btn {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.search:focus-visible,
.upload-btn:focus-visible,
[role="tab"]:focus-visible,
a:focus-visible {
  outline: 3px solid var(--admin-focus);
  outline-offset: 2px;
}

.primary,
.secondary,
.danger,
.ghost,
.upload-btn {
  border: none;
  border-radius: 0.4rem;
  padding: 0.55rem 0.9rem;
}

.primary {
  background: #f2f2f2;
  color: #111111;
  font-weight: 600;
}

.secondary,
.upload-btn {
  background: #2f2f2f;
  color: #f4f4f4;
  border: 1px solid #555;
}

.danger {
  background: #7f1d1d;
  color: #fecaca;
}

.ghost {
  background: transparent;
  color: #d0d0d0;
  border: 1px solid #575757;
}

button:disabled,
.upload-btn:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary-inline {
  display: inline-block;
  margin-top: 0.35rem;
}

.item-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.item-list.compact {
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

.gallery-toolbar {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0 0.5rem;
  background: linear-gradient(180deg, #121212 70%, rgba(18, 18, 18, 0));
}

.gallery-upload-progress {
  margin: 0.75rem 0 0.35rem;
}

.gallery-upload-status {
  margin: 0.35rem 0 0;
  min-height: 1.25rem;
}

.reference-toolbar,
.project-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0 0.5rem;
  background: linear-gradient(180deg, #121212 70%, rgba(18, 18, 18, 0));
}

.admin-modal-album-grid {
  max-height: 14rem;
  overflow-y: auto;
}

.gallery-status {
  margin: 0;
  min-height: 1.25rem;
}

.gallery-grid-wrap {
  margin: 1rem 0;
}

.gallery-grid-meta {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
}

.gallery-tile {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid #333;
  border-radius: 0.45rem;
  background: #1a1a1a;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.gallery-tile:hover {
  border-color: #666;
  transform: translateY(-1px);
}

.gallery-tile:focus-visible {
  outline: 2px solid #eee;
  outline-offset: 2px;
}

.gallery-tile--selected {
  border-color: var(--area-medien-border, #8a7355);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 110, 0.25);
}

.gallery-tile-thumb {
  position: relative;
  aspect-ratio: 1;
  background: #000;
}

.gallery-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-tile-caption {
  padding: 0.45rem 0.5rem 0.55rem;
  display: grid;
  gap: 0.15rem;
}

.gallery-tile-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  color: #eee;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-content-tile-thumb img {
  object-fit: contain;
  background: #111;
}

.page-content-tile-placement {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-content-tile-route {
  color: #9ab;
}

.page-content-detail-placement {
  margin: 0 0 0.35rem;
  font-weight: 600;
  line-height: 1.35;
  color: #eee;
}

.page-content-detail-route {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.page-content-edit-modal-card {
  max-width: min(34rem, 96vw);
}

.page-content-edit-modal-card .gallery-modal-preview {
  background: #0a0a0a;
}

.page-content-edit-modal-card .gallery-modal-preview img {
  object-fit: contain;
  max-height: min(40vh, 18rem);
}

.page-content-edit-modal-actions {
  position: sticky;
  bottom: 0;
  padding-top: 0.5rem;
  background: linear-gradient(transparent, var(--admin-elevated, #1e1e1e) 12%);
}

.gallery-tile-thumb .gallery-tile-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  background: #252525;
  color: #666;
  font-size: 0.75rem;
}

.gallery-tile-date {
  margin: 0;
  font-size: 0.68rem;
  color: #888;
}

.admin-confirm-message {
  margin: 0 0 1rem;
  white-space: pre-line;
}

#admin-build-label {
  font-size: 0.65rem;
  font-weight: 400;
  color: #888;
  margin-left: 0.35rem;
}

/* Modals werden per JS an document.body gehängt — kein Wrapper-Stacking */
body > .gallery-modal.is-open {
  z-index: 100000 !important;
}

body > .gallery-modal.admin-confirm-modal.is-open {
  z-index: 100010 !important;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 1rem;
}

.gallery-modal.is-open {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 1000 !important;
}

/* Muss nach .gallery-modal stehen — Confirm über anderen Upload-Dialogen */
.gallery-modal.admin-confirm-modal.is-open {
  z-index: 1010 !important;
}

.gallery-modal[hidden]:not(.is-open) {
  display: none !important;
}

body.admin-modal-open {
  overflow: hidden;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.gallery-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid #444;
  border-radius: 0.6rem;
  background: #1a1a1a;
}

.gallery-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 1;
  font-size: 1.25rem;
}

.gallery-modal-preview {
  border-radius: 0.4rem;
  overflow: hidden;
  background: #000;
}

.gallery-modal-preview img {
  display: block;
  width: 100%;
  max-height: min(50vh, 20rem);
  object-fit: contain;
}

.gallery-modal-fields {
  display: grid;
  gap: 0.65rem;
}

.gallery-modal-path {
  margin: 0;
  font-size: 0.75rem;
  word-break: break-all;
}

.gallery-upload-modal-card {
  max-width: 28rem;
}

.gallery-upload-heading {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
}

.gallery-upload-session-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.gallery-upload-actions {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-cover-picker-modal-card {
  max-width: min(42rem, 96vw);
}

.gallery-cover-picker-modal-card .admin-modal-album-grid {
  max-height: min(40vh, 16rem);
  overflow-y: auto;
}

.project-edit-modal-card {
  max-width: min(36rem, 96vw);
  max-height: min(92dvh, 44rem);
  overflow-y: auto;
}

.project-edit-modal-actions {
  position: sticky;
  bottom: 0;
  padding-top: 0.5rem;
  background: linear-gradient(transparent, var(--admin-elevated, #1e1e1e) 12%);
}

.reference-edit-modal-card {
  max-width: min(36rem, 96vw);
  max-height: min(92dvh, 44rem);
  overflow-y: auto;
}

.reference-edit-modal-fields .admin-modal-album-grid {
  max-height: min(28vh, 11rem);
  overflow-y: auto;
}

.reference-edit-modal-actions {
  position: sticky;
  bottom: 0;
  padding-top: 0.5rem;
  background: linear-gradient(transparent, var(--admin-elevated, #1e1e1e) 12%);
}

.gallery-tile-session {
  margin: 0;
  font-size: 0.6875rem;
  color: #888;
}

.gallery-row,
.project-card {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 0.5rem;
  background: #1a1a1a;
}

.gallery-row img,
.project-card img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.35rem;
  background: #000;
}

.gallery-fields {
  display: grid;
  gap: 0.35rem;
}

.project-card {
  grid-template-columns: 1fr;
  cursor: pointer;
}

.project-card:hover {
  border-color: #666;
}

.editor-card {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #444;
  border-radius: 0.5rem;
  background: #181818;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.text-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  margin-bottom: 1rem;
}

fieldset {
  border: 1px solid #333;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin: 0;
}

legend {
  padding: 0 0.35rem;
  color: #aaa;
}

.project-credits-fieldset {
  display: grid;
  gap: 0.65rem;
}

.project-credits-hint {
  margin: 0;
  font-size: 0.85rem;
}

.log {
  padding: 0.75rem;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 0.5rem;
  white-space: pre-wrap;
  overflow: auto;
  font-size: 0.8125rem;
}

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

  .pages-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .gallery-row {
    grid-template-columns: 1fr;
  }
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0;
}

.subtab {
  border: 1px solid #444;
  background: transparent;
  color: #ccc;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.subtab.active {
  background: #eee;
  color: #111;
  border-color: #eee;
}

.locale-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.locale-btn {
  border: 1px solid #444;
  background: transparent;
  color: #ccc;
  padding: 0.35rem 0.85rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font: inherit;
}

.locale-btn.active {
  background: var(--area-website-dim);
  color: #d4e4f7;
  border-color: var(--area-website-border);
}

.pages-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.pages-sidebar {
  position: sticky;
  top: 6.5rem;
  align-self: start;
  max-height: calc(100vh - 7.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.85rem;
  border: 1px solid var(--admin-border);
  border-left: 3px solid var(--area-website);
  border-radius: 0.6rem;
  background: #151820;
  -webkit-overflow-scrolling: touch;
}

.sidebar-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--area-website);
}

.pages-nav {
  display: grid;
  gap: 0.85rem;
}

.nav-group {
  display: grid;
  gap: 0.25rem;
  padding: 0.35rem 0 0.5rem;
  border-radius: 0.4rem;
}

.nav-group + .nav-group {
  border-top: 1px solid #252a33;
  padding-top: 0.65rem;
  margin-top: 0.15rem;
}

.nav-group-label {
  margin: 0.35rem 0 0.15rem;
  padding-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6a7a8f;
}

.nav-group:first-child .nav-group-label {
  margin-top: 0;
}

.nav-page {
  display: grid;
  gap: 0.1rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  background: transparent;
  color: #ddd;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.nav-page:hover {
  background: #222;
  border-color: #444;
}

.nav-page.active {
  background: var(--area-website-dim);
  border-color: var(--area-website-border);
  border-left: 3px solid var(--area-website);
  color: #fff;
  padding-left: calc(0.65rem - 2px);
}

.nav-page.active .nav-page-hint {
  color: #9eb8d4;
}

.nav-page-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-page-hint {
  font-size: 0.72rem;
  color: #6a7280;
  line-height: 1.35;
}

.nav-page--sub {
  margin-left: 0.5rem;
  padding-left: 0.55rem;
  border-left: 2px solid #2a3140;
}

.nav-page--sub.active {
  margin-left: 0.5rem;
  padding-left: calc(0.55rem - 2px);
}

.medien-subtab--wide {
  font-size: 0.78rem;
  letter-spacing: -0.01em;
}

.pages-main {
  min-width: 0;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--admin-border);
  border-top: 3px solid var(--area-website);
  border-radius: 0.6rem;
  background: var(--admin-surface);
}

.pages-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-border);
}

.pages-toolbar h2 {
  margin: 0;
  color: #f2f4f8;
}

.pages-page-hint {
  margin: 0.25rem 0 0;
  max-width: 36rem;
}

.pages-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  display: grid;
  gap: 0.35rem;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  background: linear-gradient(transparent, #171717 16%);
  padding-bottom: 0.6rem;
}

.pages-save-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.medien-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--admin-border);
  border-left: 3px solid var(--area-medien);
  border-radius: 0.5rem;
  background: #1a1814;
}

.medien-subtab {
  border: 1px solid #444;
  background: transparent;
  color: #aaa;
  padding: 0.4rem 0.85rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}

.medien-subtab.active {
  background: var(--area-medien-dim);
  color: #e8dcc4;
  border-color: var(--area-medien-border);
  box-shadow: inset 0 -2px 0 var(--area-medien);
}

.medien-view {
  display: none;
}

.medien-view.active {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--admin-border);
  border-top: 3px solid var(--area-medien);
  border-radius: 0.6rem;
  background: var(--admin-surface);
}

.panel-area-publish.active h2 {
  color: #d8f0e0;
  margin: 0;
}

.publish-page-header {
  margin-bottom: 1rem;
}

.publish-intro {
  margin: 0.45rem 0 0;
  max-width: 42rem;
  line-height: 1.5;
}

.publish-section {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--area-publish-border);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.18);
}

.publish-section:last-child {
  margin-bottom: 0;
}

.publish-section-primary {
  background: rgba(111, 207, 151, 0.06);
  border-color: rgba(111, 207, 151, 0.28);
}

.publish-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

#publish-btn {
  align-self: flex-start;
}

.publish-log {
  flex: 1 1 auto;
  min-height: 6rem;
  max-height: min(50vh, 24rem);
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.publish-log:empty {
  display: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.publish-abort-btn {
  border-color: rgba(220, 100, 90, 0.55);
  color: #f0c4c0;
}

.publish-abort-btn:hover:not(:disabled) {
  background: rgba(220, 100, 90, 0.12);
  border-color: rgba(220, 100, 90, 0.75);
}

.deploy-ftp-panel {
  padding: 1rem 1.1rem;
}

.deploy-ftp-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 500;
  color: #d8f0e0;
}

.deploy-ftp-form {
  display: grid;
  gap: 0.85rem;
}

.deploy-ftp-fields {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.deploy-ftp-path {
  grid-column: 1 / -1;
}

.deploy-ftp-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.ftp-password-state {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
}

.deploy-ftp-form input[type="text"],
.deploy-ftp-form input[type="password"],
.deploy-ftp-form input[type="number"] {
  padding: 0.45rem 0.55rem;
  border: 1px solid #444;
  border-radius: 0.4rem;
  background: #111;
  color: inherit;
}

.deploy-ftp-toggle {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.deploy-ftp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.publish-progress {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid var(--area-publish-border);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: #d8f0e0;
}

.publish-progress-wrap {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid var(--area-publish-border);
  background: rgba(0, 0, 0, 0.24);
}

.publish-progress-wrap[hidden] {
  display: none !important;
}

.publish-progress-wrap progress {
  display: block;
  width: 100%;
  height: 0.55rem;
  margin-top: 0.55rem;
  accent-color: #6fcf97;
}

.publish-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.publish-steps li {
  text-align: center;
  padding: 0.4rem 0.45rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #b8d4c4;
  font-size: 0.82rem;
}

.publish-steps li.is-active {
  border-color: rgba(111, 207, 151, 0.65);
  background: rgba(111, 207, 151, 0.16);
  color: #ddf5e6;
}

.publish-steps li.is-done {
  border-color: rgba(111, 207, 151, 0.45);
  color: #d2efdd;
}

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

.admin-upload-progress {
  margin: 0.65rem 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
}

.admin-upload-progress[hidden] {
  display: none !important;
}

.admin-upload-progress-label {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #d8f0e0;
  font-variant-numeric: tabular-nums;
}

.admin-upload-progress progress {
  display: block;
  width: 100%;
  height: 0.55rem;
  margin-top: 0.55rem;
  accent-color: #6fcf97;
}

.admin-upload-progress.is-busy {
  border-color: rgba(111, 207, 151, 0.35);
}

.publish-progress[hidden] {
  display: none !important;
}

/* Fortschrittszeilen: [  45%] … */
.publish-log.progress-active,
#publish-log.progress-active {
  color: #c8e6d4;
}

.deploy-backup-panel h3 {
  margin: 0;
  font-size: 1rem;
  color: #d8f0e0;
}

.deploy-backup-header {
  display: grid;
  gap: 0.25rem;
}

.deploy-backup-status {
  margin: 0;
  font-size: 0.92rem;
}

.deploy-backup-meta-line {
  margin: 0;
  font-size: 0.85rem;
}

.deploy-backup-restore-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.deploy-backup-legacy-warning {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 196, 120, 0.45);
  background: rgba(255, 196, 120, 0.12);
  color: #ffd9a8;
  font-size: 0.88rem;
  line-height: 1.45;
}

.deploy-backup-restore-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.deploy-backup-options-label {
  font-size: 0.88rem;
  color: #b8d4c4;
  font-weight: 500;
}

.deploy-backup-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}

.deploy-backup-check.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.deploy-backup-runtime {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.deploy-backup-runtime[hidden] {
  display: none !important;
}

.deploy-backup-steps {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.deploy-backup-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.88rem;
}

.deploy-backup-step.is-active {
  border-color: rgba(111, 207, 151, 0.45);
  background: rgba(111, 207, 151, 0.1);
}

.deploy-backup-step.is-done {
  border-color: rgba(111, 207, 151, 0.25);
}

.deploy-backup-step.is-skipped {
  opacity: 0.55;
}

.deploy-backup-step.is-error {
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(255, 120, 120, 0.08);
}

.deploy-backup-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.restore-abort-btn:hover:not(:disabled) {
  border-color: rgba(255, 140, 140, 0.55);
  color: #ffb8b8;
}

.restore-progress {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid var(--area-publish-border);
  background: rgba(0, 0, 0, 0.22);
}

.restore-progress[hidden],
.deploy-backup-log[hidden] {
  display: none !important;
}

.restore-progress progress {
  display: block;
  width: 100%;
  height: 0.55rem;
  accent-color: #6fcf97;
}

.restore-progress-label {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  color: #d8f0e0;
  font-variant-numeric: tabular-nums;
}

.deploy-backup-log {
  min-height: 6rem;
  max-height: min(40vh, 18rem);
  margin-top: 0.75rem;
}

.deploy-backup-log.progress-active {
  color: #c8e6d4;
}

.deploy-backup-help {
  margin-top: 0.85rem;
  font-size: 0.88rem;
}

.deploy-backup-help summary {
  cursor: pointer;
  color: #a8c8b8;
  user-select: none;
}

.deploy-backup-help summary:hover {
  color: #d0eed9;
}

.deploy-backup-hint {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.deploy-backup-hint code {
  font-size: 0.82em;
}

.deploy-backup-result-status {
  margin: 0.65rem 0 0;
}

@media (max-width: 640px) {
  .deploy-backup-restore-section {
    flex-direction: column;
    align-items: stretch;
  }

  .deploy-backup-actions {
    margin-left: 0;
    width: 100%;
  }

  .deploy-backup-actions button {
    flex: 1 1 auto;
  }
}

.editor-panel {
  border: 1px solid var(--admin-border);
  border-left: 3px solid #3a3f4a;
  border-radius: 0.55rem;
  background: #1c1e22;
  overflow: hidden;
}

.editor-panel[open] {
  border-color: #4a5060;
  border-left-color: var(--area-website);
  background: #22252b;
}

.editor-panel-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  user-select: none;
  background: rgba(0, 0, 0, 0.2);
}

.editor-panel-summary::-webkit-details-marker {
  display: none;
}

.editor-panel-summary::before {
  content: "▸";
  color: #888;
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.editor-panel[open] > .editor-panel-summary::before {
  transform: rotate(90deg);
}

.editor-panel-title {
  flex: 1;
}

.editor-panel-desc {
  margin: 0;
  padding: 0 0.9rem 0.65rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid #2a2a2a;
}

.editor-panel-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem 1rem;
}

.editor-hint {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}

.locale-bar-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: #aaa;
}

.locale-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
}

@media (max-width: 960px) {
  .locale-columns {
    grid-template-columns: 1fr;
  }
}

.locale-column {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.locale-column-kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #888;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #333;
  margin-bottom: 0.15rem;
}

.locale-column .locale-field-label {
  display: grid;
  gap: 0.35rem;
}

.locale-field-shared {
  grid-column: 1 / -1;
}

.pages-editor,
.images-editor {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0;
}

.list-editor {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.list-item-card {
  border: 1px solid #333;
  border-radius: 0.5rem;
  background: #1a1a1a;
  padding: 0.65rem 0.85rem;
}

.list-item-card summary {
  cursor: pointer;
  font-weight: 500;
}

.list-item-body {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.image-group {
  margin-bottom: 2rem;
}

.image-group h3 {
  margin-bottom: 0.75rem;
}

.image-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.image-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 0.5rem;
  background: #1a1a1a;
}

.image-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.35rem;
  background: #000;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-row-main img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  object-position: center;
  border-radius: 0.35rem;
  background: #000;
}

.list-meta {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
}

.projects-layout {
  margin-top: 0.75rem;
}

.projects-layout--list-only {
  max-width: 52rem;
}

.projects-list-panel {
  min-width: 0;
}

.projects-list-scroll .search {
  margin-bottom: 0.65rem;
}

.projects-list-scroll .item-list {
  margin-top: 0;
}

.projects-list-hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.project-editor-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--area-medien-border, #555);
  border-left: 3px solid var(--area-medien);
  border-radius: 0.6rem;
  background: #181818;
}

.project-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #333;
}

.project-editor-head h3 {
  margin: 0;
}

.project-editor-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.project-editor-section {
  display: grid;
  gap: 0.65rem;
}

.project-editor-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
}

.project-cover-empty {
  margin: 0;
  font-size: 0.85rem;
}

.project-cover-path-label {
  margin-top: 0.25rem;
}

.project-editor-actions {
  padding-top: 0.5rem;
  border-top: 1px solid #333;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 0.5rem;
  background: #1a1a1a;
}

.project-row--selected {
  border-color: var(--area-medien-border, #8a7355);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 110, 0.25);
}

.project-row--draft {
  opacity: 0.72;
  border-style: dashed;
}

.project-row:hover {
  border-color: #666;
}

.project-row-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 0.35rem;
  background: #252525;
  color: #666;
  font-size: 1.5rem;
}

.project-row-main {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.project-row-main:hover {
  opacity: 0.92;
}

.audio-row {
  grid-template-columns: 1fr auto;
  width: 100%;
  margin-bottom: 0.5rem;
}

.row-order-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-self: center;
}

.row-order-btn {
  min-width: 2rem;
  padding: 0.2rem 0.45rem;
  line-height: 1;
  font-weight: 600;
}

.audio-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 0.35rem;
  background: #252525;
  font-size: 1.75rem;
  color: #888;
}

.audio-row-caption {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.reference-audio-preview {
  margin: 0.5rem 0;
}

.reference-audio-player {
  width: 100%;
  max-width: 32rem;
}

.reference-cover-preview {
  margin: 0.5rem 0 1rem;
}

.reference-cover-fieldset {
  margin: 0 0 1rem;
  padding: 0.75rem 0 0;
  border: 0;
  border-top: 1px solid #333;
}

.reference-cover-fieldset legend {
  padding: 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #bbb;
}

.reference-cover-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.reference-cover-hint {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.8rem;
}

.reference-cover-album-search {
  margin-top: 0.5rem;
}

.reference-cover-album-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.reference-cover-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
  max-height: 14rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  overflow-y: auto;
  border: 1px solid #333;
  border-radius: 0.35rem;
  background: #1a1a1a;
}

.reference-cover-album-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.3rem;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.reference-cover-album-tile:hover {
  border-color: #555;
}

.reference-cover-album-tile:focus-visible {
  outline: 2px solid #5999ff;
  outline-offset: 2px;
}

.reference-cover-album-tile--selected {
  border-color: #5999ff;
  box-shadow: 0 0 0 1px rgba(89, 153, 255, 0.35);
}

.reference-cover-album-tile-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.2rem;
  background: #252525;
}

.reference-cover-album-tile-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.reference-cover-album-tile-label {
  display: block;
  padding: 0 0.15rem 0.2rem;
  font-size: 0.62rem;
  line-height: 1.25;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-cover-preview img {
  display: block;
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  object-position: center;
  border-radius: 0.35rem;
  border: 1px solid #333;
  background: #000;
}

.reference-list-cover {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.35rem;
  background: #252525;
}

.project-row-main .reference-list-cover,
.project-row-main .audio-row-icon {
  grid-column: 1;
}

.project-row-main .reference-list-cover {
  pointer-events: none;
}

.project-highlight-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 3.25rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid #444;
  background: #222;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #aaa;
  cursor: pointer;
  user-select: none;
}

.project-highlight-toggle:has(input:checked) {
  border-color: #a68b5b;
  background: #3d3528;
  color: #c4a876;
}

.project-highlight-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  cursor: pointer;
}

.project-fields {
  display: grid;
  gap: 0.25rem;
  align-content: center;
}

.project-fields strong {
  font-weight: 500;
}

.badge-highlight {
  display: inline-block;
  width: fit-content;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #3d3528;
  color: #c4a876;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.checkbox-row input {
  margin-top: 0.2rem;
  width: auto;
}

.editor-section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #ccc;
  border-top: 1px solid #333;
  padding-top: 1.25rem;
}

.editor-section-title:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.content-block {
  border: 1px solid #333;
  border-radius: 0.5rem;
  background: #1a1a1a;
  padding: 0.85rem;
}

.content-block-head {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.content-block-head .image-preview {
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  aspect-ratio: auto;
}

.image-block {
  margin-bottom: 0.65rem;
}

.hero-brightness-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.hero-brightness-row input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: #c9a227;
}

.hero-brightness-value {
  min-width: 3.25rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: #e8e8e8;
}

.hero-brightness-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
}

.hero-admin-preview {
  width: 100%;
  max-width: 520px;
  margin-bottom: 0.5rem;
}

.hero-admin-preview-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.45rem;
  border: 1px solid #333;
  background: #111;
}

.hero-admin-preview-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sync mit src/app/globals.css — page-hero-fade-v3 / home-hero-slide-scrim (Proportionen 16:9) */
.hero-admin-preview-media {
  --hero-preview-top-height: 4.5%;
}

.hero-admin-preview--pageHero .hero-admin-preview-media {
  --page-hero-fade-start: 13.3%;
  --page-hero-fade-visual-end: 100%;
  --page-hero-fade-visual-span: calc(
    var(--page-hero-fade-visual-end) - var(--page-hero-fade-start)
  );
}

.hero-admin-preview-top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: var(--hero-preview-top-height);
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
}

.hero-admin-preview-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* = .page-hero-photo (globals.css) */
.hero-admin-preview--pageHero .hero-admin-preview-photo {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 var(--page-hero-fade-start),
    rgba(0, 0, 0, 0.9) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.22),
    rgba(0, 0, 0, 0.65) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.48),
    rgba(0, 0, 0, 0.35) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.72),
    rgba(0, 0, 0, 0.12) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.9),
    transparent var(--page-hero-fade-visual-end)
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 var(--page-hero-fade-start),
    rgba(0, 0, 0, 0.9) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.22),
    rgba(0, 0, 0, 0.65) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.48),
    rgba(0, 0, 0, 0.35) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.72),
    rgba(0, 0, 0, 0.12) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.9),
    transparent var(--page-hero-fade-visual-end)
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* = .page-hero-image-fade (globals.css) */
.hero-admin-preview--pageHero .hero-admin-preview-scrim {
  background: linear-gradient(
    to bottom,
    rgba(20, 20, 20, 0) 0,
    rgba(20, 20, 20, 0) var(--page-hero-fade-start),
    rgba(20, 20, 20, 0.14) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.12),
    rgba(20, 20, 20, 0.32) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.28),
    rgba(20, 20, 20, 0.5) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.44),
    rgba(20, 20, 20, 0.66) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.6),
    rgba(20, 20, 20, 0.78) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.76),
    rgba(20, 20, 20, 0.86) calc(var(--page-hero-fade-start) + var(--page-hero-fade-visual-span) * 0.9),
    rgba(20, 20, 20, 0.92) var(--page-hero-fade-visual-end)
  );
}

/* = .home-hero-backdrop-pin mask + .home-hero-slide-scrim (globals.css) */
.hero-admin-preview--homeHero .hero-admin-preview-media {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.hero-admin-preview--homeHero .hero-admin-preview-scrim {
  background: linear-gradient(
    to bottom,
    rgba(20, 20, 20, 0) 0%,
    rgba(20, 20, 20, 0) 42%,
    rgba(20, 20, 20, 0.28) 68%,
    rgba(20, 20, 20, 0.38) 80%,
    rgba(20, 20, 20, 0) 100%
  );
}

.hero-admin-preview-caption {
  position: absolute;
  left: 50%;
  bottom: 10%;
  z-index: 3;
  transform: translateX(-50%);
  max-width: 88%;
  padding: 0.45rem 0.75rem;
  border-radius: 0.35rem;
  border: 1px solid color-mix(in srgb, white 10%, transparent);
  background: color-mix(in srgb, black 32%, transparent);
  font-size: 0.72rem;
  font-weight: 500;
  color: #f2f2f2;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.hero-admin-preview-note {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.content-block-head:has(.hero-admin-preview--pageHero) {
  flex-direction: column;
  align-items: stretch;
}

.content-block-head:has(.hero-admin-preview--pageHero) .hero-admin-preview {
  max-width: none;
}

.image-block--homeHero {
  padding: 1rem;
}

.image-block-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 1.1rem;
  align-items: start;
}

@media (max-width: 900px) {
  .image-block-home-layout {
    grid-template-columns: 1fr;
  }
}

.image-block-preview-col {
  min-width: 0;
}

@media (min-width: 901px) {
  .image-block-preview-col {
    position: sticky;
    top: 0.75rem;
  }
}

.image-block-preview-col .content-block-head {
  margin-bottom: 0;
}

.image-block-preview-col .hero-admin-preview {
  max-width: none;
  width: 100%;
  margin-bottom: 0;
}

.image-block-preview-col .hero-zoom-crop-preview {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: none;
}

.image-block-controls-col {
  min-width: 0;
}

.image-block-controls-col .image-block-title {
  display: block;
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.image-block-controls-col label {
  display: block;
  margin-bottom: 0.55rem;
}

.home-hero-slider-global {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #333;
}

.home-hero-slider-global-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #e0e0e0;
}

.hero-zoom-crop-preview {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #2a2a2a;
}

.hero-zoom-crop-title {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #ddd;
}

.hero-zoom-crop-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .hero-zoom-crop-row {
    grid-template-columns: 1fr;
  }
}

.hero-zoom-crop-pane {
  margin: 0;
}

.hero-zoom-crop-pane figcaption {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: #aaa;
}

.hero-admin-preview-media {
  position: relative;
}

.hero-zoom-crop-host,
.hero-admin-preview-media .hero-zoom-crop-host {
  position: absolute;
  left: 0;
  right: 0;
  top: -22%;
  height: 142%;
  overflow: hidden;
  transform-origin: center top;
}

.hero-zoom-crop-viewport,
.hero-admin-preview-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.35rem;
}

.hero-zoom-crop-viewport {
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.hero-zoom-crop-viewport--mobile {
  aspect-ratio: 9 / 16;
  max-width: 132px;
  margin: 0 auto;
}

.hero-zoom-crop-host--mobile {
  top: -12%;
  height: 128%;
}

.hero-admin-preview-media {
  border: 1px solid #333;
  background: #111;
}

.hero-zoom-crop-frame-scale,
.hero-admin-preview-media .hero-zoom-crop-frame-scale {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: center top;
}

.hero-zoom-crop-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-zoom-crop-frame img {
  display: block;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.hero-zoom-crop-meta {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
}

.hero-zoom-crop-hint {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
}

.list-item-body .image-block {
  margin-bottom: 0.75rem;
}

.list-editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.list-editor-head .editor-section-title {
  margin: 0;
  border: none;
  padding: 0;
}

.list-editor-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ccc;
}

.list-action-btn {
  padding: 0.4rem 0.75rem;
  font: inherit;
  border-radius: 0.4rem;
  cursor: pointer;
  border: none;
}

.equipment-editor {
  margin-top: 1rem;
}

.equipment-editor h4 {
  margin: 0;
}

label select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 0.4rem;
  border: 1px solid #444;
  background: #0f0f0f;
  color: #eee;
  font: inherit;
}

.project-title-preview {
  margin: 0;
  font-size: 0.875rem;
}

.project-cover-preview {
  margin-top: 0.35rem;
  width: 8rem;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.35rem;
  background: #000;
}

.project-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.image-field-row {
  display: grid;
  gap: 0.35rem;
}
