﻿/* FOTOlager admin/auth/gallery UI, themed by site.css variables */
.masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .masonry {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1100px) {
  .masonry {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
  }
}

.tile {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.2s;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  border-color: rgba(201, 169, 98, 0.22);
}

.tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tile-cap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem 1.15rem;
}

.tile-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.pswp-caption-outer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  pointer-events: none;
}

.pswp__custom-caption {
  position: relative;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem clamp(1rem, 5vw, 3rem);
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.45;
  pointer-events: none;
}

.pswp__custom-caption h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.pswp__custom-caption p {
  margin: 0;
  opacity: 0.85;
}

.pswp__custom-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: auto;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.pswp__custom-back:hover,
.pswp__custom-back:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  outline: none;
}

.pswp__button--close {
  opacity: 1;
  color: #fff;
}

.pswp__video-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #000;
}

.pswp__video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  background: #000;
}

.tile-img-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fde8f2;
  position: relative;
}

.tile-img-wrap img,
.tile-img-wrap video.tile-video-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
  background: transparent;
}

.tile:hover .tile-img-wrap img,
.tile:hover .tile-img-wrap video.tile-video-preview {
  transform: none;
}

.tile-video-preview:not(.is-ready) {
}

/* Admin */
.page-admin .site-head a {
  color: var(--accent);
}

.admin-wrap {
  max-width: 34rem;
  margin-inline: auto;
}

.admin-sticky-dock {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0.45rem 0.5rem 0.5rem;
  isolation: isolate;
  transform: translateZ(0);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--theme-bg, #d4e4ef);
  box-shadow: 0 10px 28px rgba(42, 21, 36, 0.16);
}

.admin-subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.admin-sticky-dock.is-floating {
  position: fixed;
  margin-bottom: 0;
}

.admin-sticky-dock-spacer {
  height: 0;
}

.admin-setup-body {
  position: relative;
  z-index: 0;
}

.page-main:has(.admin-subnav) .panel {
  backdrop-filter: none;
}

.admin-subnav a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.35);
}

.admin-subnav a:hover {
  background: rgba(255, 255, 255, 0.7);
}

.admin-subnav a.is-active {
  border-color: var(--accent, #e56b9a);
  background: var(--accent-soft, rgba(229, 107, 154, 0.18));
  color: var(--text);
}

.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.admin-search label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 16rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-search input[type="search"] {
  width: 100%;
}

.admin-photo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.admin-photo-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 10rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-photo-filters input,
.admin-photo-filters select {
  width: 100%;
}

.admin-topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.2;
}

.admin-topic-chip.is-child {
  margin-left: 0.35rem;
}

.admin-topic-chip:hover {
  border-color: rgba(196, 163, 90, 0.45);
}

.admin-topic-chip.is-active {
  border-color: var(--accent, #c4a35a);
  background: rgba(196, 163, 90, 0.12);
}

.admin-topic-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-topic-pending {
  font-size: 0.72rem;
  color: var(--accent, #c4a35a);
  margin-left: 0.15rem;
}

.admin-photo-topic-section {
  margin-bottom: 2rem;
}

.admin-photo-topic-section:last-child {
  margin-bottom: 0;
}

.admin-photo-topic-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.admin-photo-topic-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.admin-photo-topic-open {
  margin-left: auto;
  font-size: 0.85rem;
}

.admin-photo-topic-cap {
  margin-top: 1rem;
}

.admin-photo-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.account-upload-item.is-topic-cover {
  border-color: rgba(196, 163, 90, 0.35);
}

.account-upload-thumb-wrap {
  position: relative;
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
}

.account-upload-thumb-wrap img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-cover-badge {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(196, 163, 90, 0.92);
  color: #0a0c10;
  font-size: 0.72rem;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.admin-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
}

.admin-pager a {
  color: var(--accent, #c4a35a);
}

.admin-stats {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.2rem 1.25rem;
}

.admin-stats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.35rem;
}

.admin-stats-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-stats-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.admin-stats-period {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
}

.admin-stats-period:hover {
  color: var(--text);
  border-color: rgba(196, 163, 90, 0.45);
}

.admin-stats-period.is-active {
  color: var(--text);
  border-color: var(--accent, #c4a35a);
  background: rgba(196, 163, 90, 0.14);
  font-weight: 500;
}

.admin-stats-range {
  margin: 0 0 1rem;
  font-size: 0.82rem;
}

.admin-stats-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

@media (min-width: 720px) {
  .admin-stats-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.admin-stats-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.admin-stats-card:hover {
  border-color: rgba(196, 163, 90, 0.55);
  background: rgba(196, 163, 90, 0.08);
}

.admin-stats-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.1rem;
}

.admin-stats-detail h3 {
  margin-top: 1.35rem;
}

.admin-stats-card strong {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.admin-stats-card span {
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-stats-devices {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 720px) {
  .admin-stats-devices {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem 1.25rem;
  }
}

.admin-stats-device-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

.admin-stats-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.admin-stats-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(196, 163, 90, 0.55), rgba(196, 163, 90, 0.95));
  min-width: 0;
}

.admin-stats-split {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 800px) {
  .admin-stats-split {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-stats h3 {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
}

.admin-stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.admin-stats-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.admin-stats-list-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-stats-list-val {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--accent, #c4a35a);
}

.admin-stats-bots {
  margin: 0 0 1.25rem;
  max-width: 28rem;
}

.admin-stats-log-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.admin-stats-log {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-stats-log th,
.admin-stats-log td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

.admin-stats-log th {
  color: var(--muted);
  font-weight: 500;
  background: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.admin-stats-log tr.is-bot td {
  color: var(--muted);
}

.admin-stats-device-pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  white-space: nowrap;
}

.admin-stats-device-pill--bot {
  border-color: rgba(180, 100, 100, 0.45);
  color: #e0a8a8;
}

.admin-stats-device-pill--mobile {
  border-color: rgba(100, 160, 200, 0.45);
  color: #a8c8e0;
}

.admin-stats-device-pill--tablet {
  border-color: rgba(140, 180, 120, 0.45);
  color: #b8d8a8;
}

.admin-stats-device-pill--desktop {
  border-color: rgba(196, 163, 90, 0.4);
  color: var(--accent, #c4a35a);
}

.admin-stats-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

.admin-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .admin-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-home-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-home-card:hover {
  border-color: rgba(196, 163, 90, 0.55);
  background: rgba(196, 163, 90, 0.08);
}

.admin-home-card strong {
  font-size: 1.05rem;
}

.account-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
}

.account-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.account-subnav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.account-subnav a.is-active {
  border-color: var(--accent, #c4a35a);
  background: rgba(196, 163, 90, 0.14);
  color: #f4f1ea;
}

.account-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .account-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.account-home-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.account-home-card:hover {
  border-color: rgba(196, 163, 90, 0.55);
  background: rgba(196, 163, 90, 0.08);
}

.panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
}

.panel label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.panel input[type="text"],
.panel input[type="password"],
.panel input[type="email"],
.panel input[type="file"],
.panel .password-field input,
.panel select,
.panel textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.panel .password-field input {
  margin-top: 0;
  padding-right: 4.25rem;
  box-sizing: border-box;
}

.panel .password-toggle {
  background: transparent;
  border: none;
  border-radius: 6px;
  box-shadow: none;
  color: var(--accent, #c4a35a);
  font-weight: 500;
  padding: 0.35rem 0.65rem;
}

.panel .password-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme-fill="gradient"] .panel button[type="submit"] {
  background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-2));
  color: var(--theme-accent-ink, #fff);
}

.upload-form textarea {
  resize: vertical;
  min-height: 4rem;
}

.upload-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0 1.25rem;
}

.upload-preview-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  min-width: 0;
}

.upload-preview-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f3d4e4;
  position: relative;
}

a.upload-preview-link {
  display: block;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
}

a.upload-preview-link:focus-visible {
  outline: 2px solid var(--accent, #c94d86);
  outline-offset: 2px;
}

.upload-preview-thumb.is-wm-loading::after {
  content: '';
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent, #c94d86);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
  z-index: 2;
}

.upload-preview-thumb img,
.upload-preview-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.upload-preview-thumb.is-dng {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent, #c94d86);
}

.upload-preview-thumb.is-video {
  position: relative;
}

.upload-preview-thumb.is-video::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(80, 30, 55, 0.28);
  color: #fff;
  font-size: 1rem;
  pointer-events: none;
}

.upload-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.upload-preview-meta strong {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview-meta span {
  font-size: 0.7rem;
  color: var(--muted);
}

.upload-preview-remove {
  margin: 0;
  padding: 0.3rem 0.45rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.upload-preview-remove:hover {
  color: #b4234a;
  border-color: rgba(180, 50, 90, 0.45);
  background: rgba(229, 107, 154, 0.18);
}

.page-upload-compact .upload-preview-list {
  margin: 0.15rem 0 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.45rem;
}

.form-error {
  color: #f0a8a8;
}

.admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-list li:last-child {
  border-bottom: 0;
}

.admin-list img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.admin-pending-thumb {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 8px;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
}

.admin-pending-thumb:focus-visible {
  outline: 2px solid var(--accent, #7eb8ff);
  outline-offset: 2px;
}

.admin-media-thumb {
  position: relative;
  flex-shrink: 0;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #0d1118;
}

.admin-media-thumb--video {
  width: 72px;
  height: 72px;
}

.admin-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0d1118;
}

.admin-media-video-badge {
  position: absolute;
  right: 0.2rem;
  bottom: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 12, 0.78);
  color: #f5f5f7;
  font-size: 0.55rem;
  line-height: 1;
  pointer-events: none;
}

.account-upload-list .account-upload-thumb-wrap img {
  width: 96px;
  height: 96px;
}

.account-upload-thumb-link {
  flex-shrink: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
}

.account-upload-list .account-upload-thumb-link .admin-media-thumb,
.account-upload-list .account-upload-thumb-link img {
  width: 72px;
  height: 72px;
}

.account-upload-item--video {
  flex-wrap: wrap;
  align-items: flex-start;
}

.account-upload-video-wrap {
  flex: 0 0 min(100%, 320px);
  width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-list-video {
  width: 100%;
  min-height: 180px;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #0d1118;
  object-fit: contain;
  flex-shrink: 0;
}

.admin-video-missing {
  margin: 0;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
}

.admin-video-open {
  font-size: 0.82rem;
  padding: 0.2rem 0;
  align-self: flex-start;
}

.account-upload-list li.account-upload-item {
  align-items: flex-start;
}

.account-upload-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.account-upload-edit {
  flex: 1 1 16rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.account-upload-fields {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .account-upload-fields {
    grid-template-columns: 1.4fr 1fr;
  }
}

.account-upload-fields label {
  display: block;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.account-upload-fields input,
.account-upload-fields select {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}

.account-upload-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.account-upload-delete {
  margin: 0;
  flex: 0 0 auto;
}

.account-upload-delete .btn-danger,
button.btn-danger {
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 100, 100, 0.45);
  background: rgba(180, 60, 60, 0.25);
  color: #f0c4c4;
  cursor: pointer;
}

.account-upload-delete .btn-danger:hover,
button.btn-danger:hover {
  background: rgba(180, 60, 60, 0.4);
}

.admin-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(200, 80, 80, 0.2);
  color: #ffb4b4;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.admin-meta {
  flex: 1;
}

.admin-meta strong {
  display: block;
  font-weight: 500;
}

.muted {
  font-size: calc(0.82rem * var(--font-body-scale, 1));
  color: var(--muted);
}

.btn-danger {
  background: rgba(200, 80, 80, 0.25) !important;
  color: #ffb4b4 !important;
}

.btn-ghost {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
}

.logout-row {
}

.page-auth .page-main {
  max-width: 32rem;
}

.page-upload-compact .upload-card-compact h1 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  margin: 0 0 0.25rem;
}

.page-upload-compact .lead-compact {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.page-upload-compact .notice-compact {
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
}

.page-upload-compact .stack-form-compact label {
  margin-bottom: 0.55rem;
  font-size: 0.84rem;
}

.page-upload-compact .stack-form-compact input,
.page-upload-compact .stack-form-compact select {
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
}

.page-upload-compact .upload-dng-hint {
  margin: -0.15rem 0 0.15rem;
  font-size: 0.78rem;
}

.upload-topic-pick {
  display: grid;
  gap: 0.55rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .upload-topic-pick {
    grid-template-columns: 1fr 1fr;
  }
}

.upload-topic-field {
  min-width: 0;
}

.upload-topic-pick select,
.upload-topic-field select {
  width: 100%;
}

.upload-child-wrap[hidden] {
  display: none !important;
}

.upload-topic-hint {
  display: none;
}

.upload-topic-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  padding: 0;
  border: 0;
}

.upload-topic-mode-block {
  margin: 0 0 0.15rem;
}

.upload-topic-mode-label {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.page-upload-compact .upload-topic-mode {
  margin-bottom: 0.5rem;
}

.upload-mode-chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.upload-mode-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-mode-chip span {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
}

.upload-mode-chip input:checked + span {
  border-color: var(--accent, #c94d86);
  background: color-mix(in srgb, var(--accent, #c94d86) 16%, white);
  color: var(--text);
  font-weight: 500;
}

.upload-mode-chip input:focus-visible + span {
  outline: 2px solid var(--accent, #c94d86);
  outline-offset: 2px;
}

.upload-new-topic {
  margin-bottom: 0.35rem;
}

.upload-new-topic[hidden],
.upload-topic-pick[hidden] {
  display: none !important;
}

.upload-meta-row {
  display: grid;
  gap: 0.55rem;
}

.page-upload-compact .upload-file-field {
  margin-top: 1.15rem;
}

@media (min-width: 640px) {
  .upload-meta-row {
    grid-template-columns: 1fr 1fr;
  }
}

.page-upload-compact .panel button {
  margin-top: 0.25rem;
  padding: 0.55rem 1.1rem;
}

.auth-card.wide {
  max-width: 40rem;
}

.auth-card h1 {
  margin-top: 0;
  font-family: var(--font-display);
  font-weight: 400;
}

.stack-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.password-field {
  position: relative;
  display: block;
  margin-top: 0.35rem;
}

.password-field input {
  width: 100%;
  padding-right: 4.25rem;
  box-sizing: border-box;
}

.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent, #c4a35a);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.password-toggle[aria-pressed="true"] {
  color: var(--text);
}


.auth-links {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-links a {
  color: var(--accent);
}

.admin-row {
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-actions form {
  margin: 0;
}

.admin-actions button {
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.status-pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.status-pending {
  background: rgba(201, 169, 98, 0.2);
  color: #e6d3a0;
}

.status-approved {
  background: rgba(90, 180, 130, 0.2);
  color: #b8e0cc;
}

.status-rejected {
  background: rgba(200, 80, 80, 0.2);
  color: #ffb4b4;
}

.panel-sub {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.panel-hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--muted);
}

.topic-admin-list .admin-meta {
  min-width: 12rem;
}

.album-section {
  margin-bottom: 2.75rem;
}

.album-section-head {
  margin-bottom: 1rem;
}

.album-section-head .topic-hero-split {
  margin-top: 0.65rem;
}

.album-section-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 400;
}

.album-section-head h2 a {
  color: inherit;
  text-decoration: none;
}

.album-section-head h2 a:hover {
  color: var(--accent);
}

.album-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.album-section-desc {
  margin-top: 0.35rem !important;
  max-width: 40rem;
}

.topic-grid-single {
  margin-bottom: 2rem;
}

/* â€”â€” Admin: compact user photos â€”â€” */
.page-admin-user-photos .hero-block-compact {
  margin-bottom: 0.75rem;
}

.page-admin-user-photos .hero-block-compact h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 0;
}

.page-admin-user-photos .notice-compact {
  margin: 0.5rem 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.admin-user-photos-panel {
  padding-top: 1rem;
}

.admin-photo-filters-compact {
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.admin-photo-filters-compact label {
  flex: 1 1 8rem;
  font-size: 0.82rem;
  gap: 0.2rem;
}

.admin-photo-filters-compact input,
.admin-photo-filters-compact select {
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
}

.admin-user-photo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-user-photo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-user-photo-row:last-child {
  border-bottom: 0;
}

.admin-user-photo-row.is-pending {
  background: rgba(196, 163, 90, 0.04);
}

.admin-user-photo-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  display: block;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: zoom-in;
}

.admin-user-photo-thumb .admin-media-thumb,
.admin-user-photo-thumb .admin-media-thumb--video {
  width: 64px;
  height: 64px;
}

.admin-user-photo-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-user-photo-thumb .admin-media-video,
.admin-user-photo-thumb video {
  pointer-events: none;
}

.admin-user-photo-form {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.admin-user-photo-form input:not([type="hidden"]),
.admin-user-photo-form select {
  margin: 0;
  box-sizing: border-box;
  height: 1.85rem;
  padding: 0 0.45rem;
  font-size: 0.84rem;
  line-height: 1.25;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
}

.admin-user-photo-title {
  flex: 1 1 8rem;
  min-width: 5rem;
}

.admin-user-photo-topic {
  flex: 2 1 16rem;
  min-width: 12rem;
  max-width: none;
  width: 100%;
}

.admin-user-photo-status {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: 7.25rem;
  padding-left: 0.35rem;
  padding-right: 1.35rem;
  field-sizing: content;
}

.admin-user-photo-thumb-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: max-content;
  max-width: 9.5rem;
}

.admin-user-photo-thumb-col .admin-user-photo-meta {
  flex: none;
  padding-left: 0;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}

.admin-user-photo-meta--top,
.admin-user-photo-meta--bottom {
  font-size: 0.72rem;
  line-height: 1.1;
  text-align: center;
  word-break: break-word;
  width: 100%;
  padding: 0;
  margin: 0;
}

.admin-user-photo-meta--top {
  margin-bottom: 0.05rem;
}

.admin-user-photo-meta--bottom {
  margin-top: 0.05rem;
}

.admin-user-photo-meta {
  flex: 1 1 100%;
  font-size: 0.76rem;
  line-height: 1.3;
  padding-left: calc(64px + 0.55rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-photo-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}

.page-admin-photos .admin-user-photo-list {
  display: grid;
  grid-template-columns:
    max-content
    minmax(0, max-content)
    minmax(8rem, 1fr)
    minmax(0, max-content)
    max-content;
  column-gap: 0.25rem;
  row-gap: 0.15rem;
  align-items: center;
}

.page-admin-photos .admin-user-photo-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0;
  padding: 0.3rem 0;
}

.page-admin-photos .admin-user-photo-form {
  display: contents;
}

.page-admin-photos .admin-user-photo-form input[type="hidden"] {
  display: none;
}

.page-admin-photos .admin-user-photo-thumb-col {
  grid-column: 1;
}

.page-admin-photos .admin-user-photo-title {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
  field-sizing: content;
}

.page-admin-photos .admin-user-photo-desc {
  grid-column: 3;
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
}

.page-admin-photos .admin-user-photo-topic {
  grid-column: 4;
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
  field-sizing: content;
  padding-right: 1.1rem;
}

.page-admin-photos .admin-user-photo-actions {
  grid-column: 5;
  justify-self: end;
  justify-content: flex-end;
  margin-left: 0;
}

.page-admin-photos .admin-user-photo-form input:not([type="hidden"]),
.page-admin-photos .admin-user-photo-form select {
  padding: 0 0.35rem;
}

@media (max-width: 767px) {
  .page-admin-photos .admin-user-photo-list {
    display: block;
  }

  .page-admin-photos .admin-user-photo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
  }

  .page-admin-photos .admin-user-photo-form {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
  }

  .page-admin-photos .admin-user-photo-title,
  .page-admin-photos .admin-user-photo-desc,
  .page-admin-photos .admin-user-photo-topic,
  .page-admin-photos .admin-user-photo-actions {
    grid-column: auto;
    width: auto;
  }

  .page-admin-photos .admin-user-photo-desc {
    flex: 1 1 12rem;
    min-width: 8rem;
  }

  .page-admin-photos .admin-user-photo-actions {
    margin-left: auto;
  }
}

.admin-user-photo-actions .inline-form {
  display: inline-flex;
  margin: 0;
  vertical-align: middle;
}

.panel .admin-user-photo-actions .admin-user-photo-btn,
.admin-user-photo-actions .admin-user-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 1.85rem;
  min-width: 3.1rem;
  margin: 0;
  padding: 0 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.panel .admin-user-photo-actions .admin-user-photo-btn--ok,
.admin-user-photo-actions .admin-user-photo-btn--ok {
  background: linear-gradient(135deg, #c9a962, #a88b42);
  border-color: transparent;
  color: #15130a;
  font-weight: 600;
}

.panel .admin-user-photo-actions .admin-user-photo-btn--save,
.admin-user-photo-actions .admin-user-photo-btn--save {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
}

.panel .admin-user-photo-actions .admin-user-photo-btn--danger,
.admin-user-photo-actions .admin-user-photo-btn--danger {
  background: rgba(200, 80, 80, 0.22);
  border-color: rgba(200, 80, 80, 0.35);
  color: #ffb4b4;
}

.panel .admin-user-photo-actions .admin-user-photo-btn--cover,
.admin-user-photo-actions .admin-user-photo-btn--cover {
  min-width: 1.85rem;
  padding: 0;
  font-size: 0.95rem;
}

.panel .admin-user-photo-actions .admin-user-photo-btn--cover.is-active,
.admin-user-photo-actions .admin-user-photo-btn--cover.is-active {
  background: rgba(245, 213, 71, 0.2);
  border-color: rgba(245, 213, 71, 0.55);
  color: #f5d547;
  font-weight: 700;
  cursor: default;
}

.panel .admin-user-photo-actions .admin-user-photo-btn--cover.is-disabled,
.admin-user-photo-actions .admin-user-photo-btn--cover.is-disabled {
  opacity: 0.4;
  cursor: default;
}

@media (min-width: 768px) {
  .admin-user-photo-meta {
    flex: 0 1 11rem;
    padding-left: 0;
  }
}

.panel input[type="number"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.panel input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 28rem;
  height: 0.42rem;
  margin-top: 0.5rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text) 16%, transparent);
  accent-color: var(--theme-accent, var(--accent, #c4a35a));
}

.panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--theme-accent, var(--accent, #c4a35a));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 3px rgba(42, 21, 36, 0.3);
}

.panel input[type="range"]::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--theme-accent, var(--accent, #c4a35a));
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
}

.check-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.range-hint {
  display: flex;
  justify-content: space-between;
  max-width: 28rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.watermark-form {
  max-width: 36rem;
}

.watermark-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .watermark-layout {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  }
}

.watermark-preview-panel {
  min-width: 0;
}

.watermark-preview-note {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.watermark-preview-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #1a1218;
  max-width: 36rem;
}

.watermark-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.watermark-preview-status {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
}

.wm-font-dropdown {
  position: relative;
  margin-top: 0.35rem;
  max-width: 36rem;
}

.wm-font-trigger.panel-like-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  text-align: left;
}

.wm-font-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  flex-shrink: 0;
}

.wm-font-dropdown.is-open .wm-font-caret {
  transform: rotate(180deg);
}

.wm-font-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev, #fff);
  box-shadow: 0 12px 28px rgba(138, 74, 110, 0.18);
  max-height: 16rem;
  overflow: auto;
}

.wm-font-menu[hidden] {
  display: none !important;
}

.wm-font-item {
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
}

.wm-font-item:hover {
  background: rgba(229, 107, 154, 0.12);
}

.wm-font-item.is-selected {
  background: rgba(229, 107, 154, 0.2);
}

.user-wm-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 960px) {
  .user-wm-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.user-wm-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
}

.user-wm-card h2 {
  color: var(--accent, #e56b9a);
  flex: 0 0 auto;
}

.user-wm-card .stack-form {
  flex: 1 1 auto;
}

.uwm-preview-block {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 1.25rem;
}

.user-wm-card .uwm-preview-frame {
  margin-top: 0;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 3 / 2;
  position: relative;
  background: #1a1218;
}

.user-wm-card .uwm-preview-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.uwm-combo-note {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  min-height: 2.4em;
  line-height: 1.35;
}

.uwm-current-img {
  vertical-align: middle;
  max-height: 56px;
  width: auto;
  display: block;
}

.uwm-current-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.12) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: rgba(0, 0, 0, 0.35);
  vertical-align: middle;
}

.setup-logo {
  margin: 0.35rem 0 1rem;
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}

.setup-logo legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 0 0.35rem;
}

.setup-logo-editor {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 1rem 1.4rem;
  align-items: start;
}

.setup-logo-crop-label {
  margin: 0 0 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.setup-logo-crop-help {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.setup-logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  padding: 0;
  border: 1px dashed var(--border);
  border-radius: 12px;
  cursor: grab;
  touch-action: none;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.28) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.28) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.28) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.28) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-color: rgba(255, 255, 255, 0.2);
}

.setup-logo-stage.is-dragging {
  cursor: grabbing;
}

.setup-logo-frame.logo-frame {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.setup-logo-frame.logo-frame[data-logo-shape="original"] {
  width: auto;
  max-width: 160px;
  height: 160px;
}

.setup-logo-tools {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.setup-logo-files {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}

.setup-logo-download {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
}

.setup-logo-download:hover,
.setup-logo-download:focus-visible {
  border-color: color-mix(in srgb, var(--theme-accent) 55%, var(--border));
  background: color-mix(in srgb, var(--theme-accent) 18%, white);
}

.setup-logo-remove {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
}

.setup-logo-remove input {
  width: auto;
  margin: 0;
}

.setup-logo-save-row {
  margin-top: 0.55rem;
}

.setup-logo-save-row button {
  margin: 0;
}

@media (max-width: 720px) {
  .setup-logo-editor {
    grid-template-columns: 1fr;
  }
}

.setup-nav {
  margin: 0.35rem 0 1rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}

.setup-nav legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 0 0.35rem;
}

.setup-nav > .muted {
  margin: 0 0 0.75rem;
}

.setup-nav .setup-logo-size-row {
  margin: 0 0 0.9rem;
}

.setup-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.setup-nav-row {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) auto;
  gap: 0.4rem 0.55rem;
  align-items: end;
  padding: 0.65rem 0 0.7rem;
  border-bottom: 1px dashed var(--border);
}

.setup-nav-row .setup-nav-gate {
  grid-column: 1 / -1;
  margin: 0;
}

.setup-nav-row > label {
  margin-bottom: 0 !important;
}

.setup-nav-visible {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  margin: 0 !important;
  font-size: 0.75rem;
}

.setup-nav-visible input {
  width: auto;
  margin: 0;
}

.setup-nav-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  padding-bottom: 0.15rem;
}

.setup-nav-move,
.setup-nav-remove,
.setup-nav-actions button {
  margin-top: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.setup-nav-remove {
  color: #8a1c3a;
}

.setup-nav-actions {
  margin-top: 0.75rem;
}

.setup-nav .setup-logo-save-row {
  margin-top: 0.55rem;
}

.setup-nav-actions button {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--theme-accent, var(--accent));
  color: var(--theme-accent-ink, #fff);
  border: none;
}

@media (max-width: 860px) {
  .setup-nav-row {
    grid-template-columns: 4.4rem 1fr;
  }

  .setup-nav-row label,
  .setup-nav-tools,
  .setup-nav-row .setup-nav-gate {
    grid-column: 1 / -1;
  }
}

.setup-fonts {
  margin: 0.35rem 0 1rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}

.setup-nav-btns {
  margin: 0.35rem 0 1rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}

.setup-nav-btns legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 0 0.35rem;
}

.setup-nav-btns > .muted {
  margin: 0 0 0.75rem;
}

.setup-nav-btn-colors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

@media (min-width: 900px) {
  .setup-nav-btn-colors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.setup-nav-btn-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem 0.85rem;
  align-items: start;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
}

.setup-nav-btn-row .setup-theme-wells {
  margin-top: 1.35rem;
}

.setup-nav-btn-row .setup-theme-rgb input[data-nav-btn-r] {
  accent-color: #d44545;
}

.setup-nav-btn-row .setup-theme-rgb input[data-nav-btn-g] {
  accent-color: #2f9e4f;
}

.setup-nav-btn-row .setup-theme-rgb input[data-nav-btn-b] {
  accent-color: #3b6fd4;
}

.setup-nav-btn-sizes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1rem;
  margin: 0 0 0.85rem;
}

@media (min-width: 720px) {
  .setup-nav-btn-sizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.setup-nav-btn-sizes .setup-nav-btn-size-row {
  margin: 0.15rem 0 0;
}

.setup-nav-btn-shapes-label {
  margin: 0 0 0.45rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.setup-nav-btn-shapes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.setup-nav-btn-shape {
  margin: 0 !important;
  cursor: pointer;
}

.setup-nav-btn-shape input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setup-nav-btn-shape-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
}

.setup-nav-btn-shape-preview[data-shape="square"] {
  border-radius: 0;
}

.setup-nav-btn-shape-preview[data-shape="soft"] {
  border-radius: 4px;
}

.setup-nav-btn-shape-preview[data-shape="rounded"] {
  border-radius: 10px;
}

.setup-nav-btn-shape-preview[data-shape="pill"] {
  border-radius: 999px;
}

.setup-nav-btn-shape input:checked + .setup-nav-btn-shape-preview {
  border-color: var(--theme-accent, var(--accent));
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 16%, white);
}

.setup-nav-btn-shape input:focus-visible + .setup-nav-btn-shape-preview {
  outline: 2px solid var(--theme-accent, var(--accent));
  outline-offset: 2px;
}

.setup-fonts legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 0 0.35rem;
}

.setup-fonts > .muted {
  margin: 0 0 0.75rem;
}

.setup-font-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1rem;
}

.setup-nav > .setup-font-grid {
  margin: 0.35rem 0 1rem;
}

.setup-brand-texts {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.setup-brand-texts > .muted {
  margin: 0;
}

.setup-brand-texts .setup-font-grid {
  margin: 0;
}

.setup-home-hero-align {
  margin: 0.75rem 0 1rem;
}

.setup-home-hero-align + .setup-font-grid {
  margin-bottom: 1rem;
}

.setup-brand-text-label {
  display: block;
  margin: 0 0 0.55rem !important;
}

@media (min-width: 720px) {
  .setup-font-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .setup-font-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.setup-font-pick {
  margin-bottom: 0 !important;
}

.setup-font-preview {
  display: block;
  margin-top: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.3;
  min-height: 2.6rem;
}

.setup-font-preview[data-font-preview="name"] {
  font-family: var(--font-name);
  font-size: calc(1.15rem * var(--font-name-scale, 1));
}

.setup-font-preview[data-font-preview="display"] {
  font-family: var(--font-display);
  font-size: calc(1.35rem * var(--font-display-scale, 1));
}

.setup-font-preview[data-font-preview="body"] {
  font-family: var(--font-body);
  font-size: calc(1.05rem * var(--font-body-scale, 1));
}

.setup-font-preview[data-font-preview="nav"] {
  font-family: var(--font-nav);
  font-size: calc(0.95rem * var(--font-nav-scale, 1));
}

.setup-font-preview[data-font-preview="user"] {
  font-family: var(--font-user, var(--font-nav));
  font-size: calc(0.9rem * var(--font-user-scale, 1));
}

.setup-font-preview[data-font-preview="lang"] {
  font-family: var(--font-lang, var(--font-nav));
  font-size: calc(0.85rem * var(--font-lang-scale, 1));
  letter-spacing: 0.06em;
  font-weight: 600;
}

.setup-font-preview[data-font-preview="sub"] {
  font-family: var(--font-sub, var(--font-body));
  font-size: var(--font-sub-size, 0.92rem);
}

.setup-font-preview[data-font-preview="footer"] {
  font-family: var(--font-footer, var(--font-nav));
  font-size: calc(0.95rem * var(--font-footer-scale, 1));
}

.setup-font-preview[data-font-preview="legal"] {
  font-family: var(--font-legal, var(--font-body));
  font-size: calc(0.9rem * var(--font-legal-scale, 1));
}

.setup-font-preview[data-font-preview="home_title"] {
  font-family: var(--font-home-title, var(--font-display));
  font-size: calc(1.35rem * var(--font-home-title-scale, var(--font-display-scale, 1)));
}

.setup-font-preview[data-font-preview="home_intro"] {
  font-family: var(--font-home-intro, var(--font-body));
  font-size: calc(1.05rem * var(--font-home-intro-scale, var(--font-body-scale, 1)));
}

.setup-font-preview[data-font-preview="gallery_title"] {
  font-family: var(--font-gallery-title, var(--font-display));
  font-size: calc(1.35rem * var(--font-gallery-title-scale, var(--font-display-scale, 1)));
}

.setup-font-preview[data-font-preview="gallery_lead"] {
  font-family: var(--font-gallery-lead, var(--font-body));
  font-size: calc(1.05rem * var(--font-gallery-lead-scale, var(--font-body-scale, 1)));
}

.setup-font-preview[data-font-preview="gallery_section"] {
  font-family: var(--font-gallery-section, var(--font-display));
  font-size: calc(1.2rem * var(--font-gallery-section-scale, var(--font-display-scale, 1)));
}

.setup-font-size {
  display: grid;
  grid-template-columns: auto 1fr 4.2rem;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.setup-font-size input[type="range"] {
  width: 100%;
  margin: 0;
}

.setup-font-size [data-font-size-val] {
  font-family: ui-monospace, Consolas, monospace;
  text-align: right;
  color: var(--text);
}

.setup-font-import {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
}

.setup-font-import-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.setup-font-import .muted a {
  color: var(--accent);
  white-space: nowrap;
}

.setup-font-import textarea {
  min-height: 4.2rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
}

.setup-font-upload-row {
  display: grid;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
}

@media (min-width: 720px) {
  .setup-font-upload-row {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

.setup-font-imported {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.setup-font-imported li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
}

.setup-font-imported-remove {
  margin: 0;
  padding: 0.28rem 0.7rem;
  min-width: 0;
}

.setup-heights {
  margin: 0;
  padding: 0.35rem 0.35rem 0.15rem;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  min-width: 0;
  min-inline-size: 0;
}

.setup-heights > .muted {
  display: none;
}

.setup-heights legend {
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 0 0.35rem;
}

.setup-heights-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 0.15rem 1rem;
}

.stack-form label.setup-height-row,
.setup-height-row {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0.2rem 0 0;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
}

.admin-sticky-dock .setup-height-row {
  margin: 0.15rem 0 0;
}

.admin-sticky-dock input[type="range"] {
  position: relative;
  z-index: 0;
  transform: translateZ(0);
}

.setup-height-row input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--theme-accent, var(--accent));
}

.setup-height-row [data-theme-height-val] {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 500;
  text-align: right;
  color: var(--text);
}

.setup-theme {
  margin: 0.4rem 0 0.75rem;
  padding: 0.85rem 0.9rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}

.setup-theme legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 0 0.35rem;
}

.setup-theme > .muted {
  margin: 0 0 0.75rem;
}

.setup-theme-choice {
  margin: 0 0 0.85rem;
}

.setup-theme-choice-label {
  margin: 0 0 0.4rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.setup-theme-choice-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.setup-theme-choice-opts label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 !important;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  font-size: 0.86rem;
  cursor: pointer;
}

.setup-theme-choice-opts label:has(input:checked) {
  border-color: color-mix(in srgb, var(--theme-accent) 55%, var(--border));
  background: color-mix(in srgb, var(--theme-accent) 18%, white);
}

.setup-theme-choice-opts input {
  margin: 0;
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--theme-accent, var(--accent));
}

.setup-theme[data-theme-scope="each"] .setup-theme-row--uniform,
.setup-theme[data-theme-scope="all"] .setup-theme-row[data-theme-row] {
  opacity: 0.42;
  pointer-events: none;
}

.setup-theme[data-theme-fill="gradient"] .setup-theme-solid-only,
.setup-theme[data-theme-fill="gradient"] .setup-theme-solid-help {
  display: none;
}

.setup-theme[data-theme-fill="solid"] .setup-theme-hsl {
  display: none;
}

.setup-theme-solid-help {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.78rem;
}

.setup-theme[data-theme-fill="solid"] .setup-theme-picker input[type="color"],
.panel .setup-theme[data-theme-fill="solid"] .setup-theme-picker input[type="color"] {
  width: 3.9rem;
  max-width: 3.9rem;
  height: 3.9rem;
  margin-top: 0.2rem;
}

.setup-theme-row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.55rem 0.85rem;
  align-items: start;
  margin: 0 0 0.85rem;
}

.setup-theme[data-theme-fill="solid"] .setup-theme-row {
  grid-template-columns: 4.1rem 1fr;
}

.setup-theme-row--uniform {
  margin: 0 0 1.05rem;
  padding: 0.65rem 0.7rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
}

.setup-theme-uniform-help {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.setup-theme-picker {
  display: block;
  margin: 0;
  padding: 0;
}

.panel .setup-theme-picker {
  margin-bottom: 0;
}

.panel .setup-theme-picker input[type="color"] {
  width: 3.25rem;
  max-width: 3.25rem;
  height: 3.25rem;
}

.setup-theme-picker input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 3.25rem;
  height: 3.25rem;
  margin: 1.55rem 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(42, 21, 36, 0.16);
}

.setup-theme-row--uniform .setup-theme-picker input[type="color"] {
  margin-top: 0.15rem;
}

.setup-theme-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.setup-theme-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.setup-theme-picker input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

.setup-theme-sliders input[data-theme-hex],
.setup-theme-sliders input[data-theme-uniform-hex] {
  width: 8.4rem;
  max-width: 100%;
  margin: 0;
  padding: 0.4rem 0.55rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.setup-theme-rgb {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 0.35rem;
}

.setup-theme-rgb label {
  display: grid;
  grid-template-columns: 1.2rem 1fr 2.1rem;
  align-items: center;
  gap: 0.4rem;
  margin: 0 !important;
  font-size: 0.75rem;
  color: var(--muted);
}

.setup-theme-rgb input[type="range"] {
  width: 100%;
  max-width: none;
  margin: 0;
}

.setup-theme-rgb input[data-theme-r],
.setup-theme-rgb input[data-theme-uniform-r] {
  accent-color: #d44545;
}

.setup-theme-rgb input[data-theme-g],
.setup-theme-rgb input[data-theme-uniform-g] {
  accent-color: #2f9e4f;
}

.setup-theme-rgb input[data-theme-b],
.setup-theme-rgb input[data-theme-uniform-b] {
  accent-color: #3b6fd4;
}

.setup-theme-rgb [data-theme-rgb-val] {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  text-align: right;
  color: var(--text);
}

.setup-theme-sliders label.setup-theme-solid-only {
  grid-template-columns: 1fr;
  gap: 0.3rem;
  align-items: stretch;
}

.setup-theme-gray {
  display: grid;
  grid-template-columns: 4.6rem 1fr 4.6rem;
  align-items: center;
  gap: 0.4rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.setup-theme-gray input[type="range"] {
  width: 100%;
}

.setup-theme-sliders {
  min-width: 0;
}

.setup-theme-label {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.setup-theme-sliders label {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.setup-theme-sliders .setup-theme-rgb label {
  grid-template-columns: 1.2rem 1fr 2.1rem;
  margin: 0 0 0.15rem !important;
}

.setup-theme-sliders input[type="range"] {
  margin: 0;
  max-width: none;
  width: 100%;
  accent-color: var(--theme-accent, var(--accent));
}

.setup-theme-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 0.35rem;
}

.setup-theme-reset {
  margin-top: 0.5rem !important;
  padding: 0.55rem 1rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-weight: 500 !important;
}

.setup-theme-wells {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.panel .setup-theme-pipette,
.setup-theme-pipette {
  width: 2.05rem;
  height: 2.05rem;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  place-items: center;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--theme-page-ink, var(--text)) !important;
  box-shadow: 0 1px 4px rgba(42, 21, 36, 0.1);
  cursor: pointer;
  font-weight: 500 !important;
}

.panel .setup-theme-pipette:hover,
.panel .setup-theme-pipette:focus-visible,
.setup-theme-pipette:hover,
.setup-theme-pipette:focus-visible {
  border-color: var(--theme-accent, var(--accent)) !important;
  color: var(--theme-accent, var(--accent)) !important;
}

.theme-pipette[hidden] {
  display: none !important;
}

.theme-pipette {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(42, 21, 36, 0.46);
}

.theme-pipette-panel {
  width: min(52rem, 100%);
  max-height: min(90vh, 46rem);
  overflow: auto;
  background: var(--theme-header, #fde8f2);
  color: var(--theme-header-ink, #2a1524);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(42, 21, 36, 0.28);
  padding: 1rem 1.1rem 1.15rem;
}

.theme-pipette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.35rem;
}

.theme-pipette-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.theme-pipette-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.theme-pipette-help {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
}

.theme-pipette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr));
  gap: 0.4rem;
  max-height: 18rem;
  overflow: auto;
  margin: 0 0 0.65rem;
  padding: 0.1rem;
}

.theme-pipette-grid[hidden] {
  display: none !important;
}

.theme-pipette-thumb {
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.65);
}

.theme-pipette-thumb:hover,
.theme-pipette-thumb:focus-visible {
  border-color: var(--theme-accent, var(--accent));
  outline: 2px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 45%, transparent);
  outline-offset: 1px;
}

.theme-pipette-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.theme-pipette-status,
.theme-pipette-empty {
  margin: 0 0 0.65rem;
}

.theme-pipette-stage[hidden] {
  display: none !important;
}

.theme-pipette-canvas-wrap {
  overflow: auto;
  max-height: 52vh;
  border-radius: 10px;
  background: rgba(42, 21, 36, 0.08);
  margin: 0.55rem 0 0.7rem;
}

.theme-pipette-canvas-wrap canvas[data-theme-pipette-canvas] {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: none;
  margin: 0 auto;
  touch-action: none;
}

.theme-pipette-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.theme-pipette-swatch {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.theme-pipette-readout code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.theme-pipette-close,
.theme-pipette-back,
.theme-pipette-screen,
.theme-pipette-use {
  margin: 0;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.theme-pipette-close {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--theme-header-ink, #2a1524);
  font-size: 1.25rem;
  line-height: 1;
}

.theme-pipette-back,
.theme-pipette-screen {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--theme-header-ink, #2a1524);
}

.theme-pipette-use {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: none;
  background: var(--theme-accent, var(--accent));
  color: var(--theme-accent-ink, #fff);
  font-weight: 600;
}

.theme-pipette-use:disabled {
  opacity: 0.45;
  cursor: default;
}

.theme-pipette-page-hint[hidden] {
  display: none !important;
}

.theme-pipette-page-hint {
  position: fixed;
  z-index: 90;
  left: 50%;
  top: 0.75rem;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--theme-header, #fde8f2);
  color: var(--theme-header-ink, #2a1524);
  box-shadow: 0 10px 28px rgba(42, 21, 36, 0.22);
}

.theme-pipette-live-bar {
  top: auto;
  bottom: 1rem;
  border-radius: 16px;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 250, 252, 0.96);
  box-shadow: 0 12px 36px rgba(42, 21, 36, 0.28);
}

.theme-pipette-live-bar .theme-pipette-swatch {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  flex: 0 0 auto;
}

.theme-pipette-live-bar code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  min-width: 6.4rem;
}

.theme-pipette-page-hint p {
  margin: 0;
  font-size: 0.82rem;
}

.theme-pipette-page-hint button {
  margin: 0;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.theme-pipette-live-bar .theme-pipette-use {
  padding: 0.45rem 0.95rem;
  border: none;
  background: var(--theme-accent, var(--accent));
  color: var(--theme-accent-ink, #fff);
  font-weight: 600;
}

.theme-pipette-live-bar .theme-pipette-use:disabled {
  opacity: 0.45;
  cursor: default;
}

.theme-pipette-loupe[hidden] {
  display: none !important;
}

.theme-pipette-loupe {
  position: fixed;
  z-index: 95;
  width: 7.25rem;
  height: 7.25rem;
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #2a1524, 0 10px 24px rgba(42, 21, 36, 0.35);
  pointer-events: none;
  background: #fff;
  image-rendering: pixelated;
}

.theme-pipette-hotspot[hidden] {
  display: none !important;
}

.theme-pipette-hotspot {
  position: fixed;
  z-index: 97;
  width: 11px;
  height: 11px;
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px #2a1524;
  background: transparent;
  pointer-events: none;
}

.theme-pipette-hotspot::before,
.theme-pipette-hotspot::after {
  content: '';
  position: absolute;
  background: #2a1524;
  box-shadow: 0 0 0 1px #fff;
}

.theme-pipette-hotspot::before {
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 1px;
  transform: translateX(-50%);
}

.theme-pipette-hotspot::after {
  top: 50%;
  left: -5px;
  right: -5px;
  height: 1px;
  transform: translateY(-50%);
}

body.theme-pipette-page-pick {
  cursor: none;
}

body.theme-pipette-page-pick .theme-pipette-page-hint,
body.theme-pipette-page-pick .theme-pipette-page-hint * {
  cursor: pointer !important;
}

body.theme-pipette-eyedrop {
  cursor: auto;
}

body.theme-pipette-eyedrop .theme-pipette-loupe,
body.theme-pipette-eyedrop .theme-pipette-hotspot,
body.theme-pipette-eyedrop .theme-pipette-live-bar {
  display: none !important;
}


