/* ==========================================================================
   AcriusDraws Site Styles

   Editing map:
   1. Design tokens and base rules
   2. Shared header, navigation, buttons, and sections
   3. Home, social hub, gallery, commissions, timeline, about, legal
   4. Image handling, missing-image states, and lightbox
   5. Admin mock workspace
   6. Decorative fallback visuals and responsive rules
   ========================================================================== */

/* Local fonts avoid a render-blocking request to Google Fonts.
   Figtree is a variable font, so one file covers every body-text weight. */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/figtree-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-700-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/poppins-800-latin.woff2") format("woff2");
}

/* 1. Design tokens and base rules
   Change colors, max page width, and shared header heights here. */
:root {
  --bg: #141313;
  --bg-deep: #0e0e0e;
  --surface: #1c1d1d;
  --surface-soft: #242627;
  --surface-warm: #2a2725;
  --background: #4a4a4a;
  --background-accent: #4d5355;
  --text: #cbc4c4;
  --muted: #a9a2a4;
  --subtle: #817c84;
  --line: rgba(203, 196, 196, 0.13);
  --line-strong: rgba(203, 196, 196, 0.24);
  --accent: #a59cbb;
  --accent-strong: #4b3ce8;
  --accent-2: #4d5355;
  --accent-3: #c7a677;
  --ink: #111112;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  --max: 1360px;
  --header-height: 82px;
  --notice-height: 42px;
  --page-top-offset: calc(var(--header-height) + var(--notice-height));
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* Keep the HTML hidden attribute stronger than component display rules. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Figtree, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::selection {
  background: var(--accent);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 14px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  padding: 10px 14px;
  font-weight: 800;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* 2. Shared header, navigation, buttons, and common section layout */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 30px;
  padding: 22px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 16, 15, 0.92);
  backdrop-filter: blur(18px);
  color: var(--text);
  transition: border-color 180ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-strong);
}

.site-notice {
  position: fixed;
  inset: var(--header-height) 0 auto;
  z-index: 49;
  display: flex;
  min-height: var(--notice-height);
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: rgba(28, 29, 29, 0.94);
  color: var(--muted);
  padding: 8px clamp(20px, 5vw, 64px);
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  font-family: Poppins, sans-serif;
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--accent);
  content: "";
  transition: transform 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

/* 3a. Home hero and slideshow */
.home-hero {
  position: relative;
  min-height: 88vh;
  overflow: hidden;
  background: var(--bg-deep);
  padding-top: var(--page-top-offset);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  min-height: 88vh;
  padding: 140px clamp(20px, 6vw, 84px) 84px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide-art,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.slide-art {
  z-index: 0;
  transform: scale(1.02);
  transition: transform 900ms ease;
}

.slide-art.is-missing {
  z-index: 2;
}

.hero-slide.is-active .slide-art {
  transform: scale(1);
}

.hero-vignette {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11, 10, 9, 0.9), rgba(11, 10, 9, 0.38) 54%, rgba(11, 10, 9, 0.76)),
    linear-gradient(0deg, rgba(11, 10, 9, 0.92), rgba(11, 10, 9, 0.08) 56%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(800px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Poppins, Figtree, sans-serif;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 100%;
  font-size: 8rem;
  line-height: 0.94;
}

#home-title {
  max-width: none;
  white-space: nowrap;
}

.hero-copy h2 {
  max-width: 12ch;
  font-size: 6.4rem;
  line-height: 0.96;
}

.hero-copy p:not(.eyebrow),
.page-hero p,
.section-header p,
.about-copy p,
.legal-block p {
  color: var(--muted);
}

.hero-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 28px 0 0;
  font-size: 1.25rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 800;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.button-ghost {
  background: rgba(244, 234, 220, 0.04);
  color: var(--text);
}

.hero-inline-action {
  margin-top: 28px;
}

.slide-caption {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 5vw, 64px);
  bottom: 86px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.slide-controls {
  position: absolute;
  right: clamp(20px, 5vw, 64px);
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.slide-dot {
  min-width: 48px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.05);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
}

.slide-dot.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

/* Shared page sections and typography blocks */
.section {
  padding: clamp(72px, 9vw, 132px) clamp(20px, 6vw, 84px);
}

.surface-band {
  background: var(--surface);
}

.section-header,
.page-hero {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 34px;
}

.section-header h2,
.page-hero h1,
.about-copy h2 {
  max-width: 920px;
  font-size: 4.7rem;
  line-height: 1;
}

.section-header p,
.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 1.04rem;
}

.split-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 900;
}

.text-link::after {
  margin-left: 10px;
  content: "->";
}

.feature-grid {
  display: grid;
  width: min(var(--max), 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-item {
  min-height: 250px;
  padding: clamp(24px, 3vw, 42px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-item span,
.package-item small,
.art-meta small,
.gallery-card small,
.about-notes small,
.social-card small,
.spotlight-card small,
.process-item span,
.testimonial-card small,
.metric-card small {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-item h3,
.package-item h3,
.character-card h3 {
  margin-top: 18px;
  font-size: 1.8rem;
}

.feature-item p,
.package-item p,
.character-card p {
  color: var(--muted);
}

/* 3b. Home Social Hub */
.social-hub {
  background:
    linear-gradient(135deg, rgba(165, 156, 187, 0.08), transparent 34%),
    var(--bg);
}

.social-grid {
  display: grid;
  width: min(var(--max), 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.social-card {
  display: grid;
  min-height: 210px;
  align-content: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: clamp(22px, 3vw, 34px);
  transition: border-color 160ms ease, transform 160ms ease;
}

.social-card:hover {
  border-color: rgba(165, 156, 187, 0.52);
  transform: translateY(-2px);
}

.social-card strong {
  font-family: Poppins, sans-serif;
  font-size: clamp(1.6rem, 2vw, 2.35rem);
  line-height: 1;
}

.social-card span {
  color: var(--muted);
}

/* Shared artwork card rows used on Home and Commissions */
.preview-row,
.character-row {
  display: grid;
  width: min(var(--max), 100%);
  margin: 0 auto;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 18px;
}

.art-card,
.gallery-card,
.character-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.art-card {
  display: grid;
  min-height: 430px;
  color: var(--text);
}

.art-card.large-card {
  min-height: 560px;
}

.artwork {
  position: relative;
  display: block;
  min-height: 330px;
  overflow: hidden;
  background: var(--surface-warm);
}

.large-card .artwork {
  min-height: 460px;
}

.artwork::before,
.artwork::after,
.slide-art::before,
.slide-art::after,
.portrait-mark::before,
.portrait-mark::after {
  position: absolute;
  content: "";
}

.art-meta,
.gallery-card figcaption,
.gallery-caption {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.art-meta strong,
.gallery-card strong,
.gallery-caption strong {
  font-family: Poppins, sans-serif;
  font-size: 1.35rem;
}

.gallery-caption span {
  color: var(--muted);
}

/* 3c. Shared inner-page hero layout */
.page-main {
  padding-top: var(--page-top-offset);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: end;
  padding: clamp(54px, 7vw, 92px) clamp(20px, 6vw, 84px) clamp(48px, 6vw, 88px);
}

.page-hero > * {
  min-width: 0;
}

.compact-hero {
  min-height: 390px;
}

.admin-hero {
  min-height: 280px;
  padding-bottom: 42px;
}

.admin-hero h1 {
  font-size: clamp(3.2rem, 6vw, 6.6rem);
}

.timeline-hero {
  min-height: 240px;
  padding-top: clamp(54px, 7vw, 92px);
  padding-bottom: clamp(18px, 3vw, 34px);
}

.timeline-hero h1 {
  max-width: 12ch;
  font-size: clamp(3.3rem, 6vw, 6rem);
}

.commission-hero,
.about-hero {
  min-height: 480px;
}

/* 3d. Gallery page */
.gallery-section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: clamp(72px, 10vw, 132px);
}

.gallery-spotlight {
  padding-bottom: clamp(44px, 6vw, 84px);
}

.spotlight-layout {
  display: grid;
  width: min(var(--max), 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
}

.spotlight-strip {
  display: grid;
  grid-auto-columns: minmax(300px, 48%);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--accent) rgba(203, 196, 196, 0.08);
  scrollbar-width: thin;
}

.spotlight-card {
  display: grid;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: inherit;
  cursor: pointer;
  padding: 0;
  scroll-snap-align: start;
  text-align: left;
}

.spotlight-card.is-featured {
  grid-auto-rows: 1fr auto;
}

.spotlight-card .artwork {
  min-height: 410px;
}

.spotlight-card span:last-child {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.spotlight-card strong {
  font-family: Poppins, sans-serif;
  font-size: 1.45rem;
}

.spotlight-copy {
  display: grid;
  align-content: center;
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 4vw, 44px);
}

.spotlight-copy h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.spotlight-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.04rem;
}

.gallery-filter {
  position: sticky;
  top: 74px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding: 14px 0;
  background: rgba(18, 16, 15, 0.84);
  backdrop-filter: blur(14px);
}

.gallery-filter a,
.filter-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.03);
  padding: 9px 13px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
}

.gallery-filter a:hover,
.filter-button:hover,
.filter-button.is-active {
  border-color: var(--accent);
  background: rgba(165, 156, 187, 0.13);
  color: var(--text);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  margin: 0;
  min-height: 390px;
}

.gallery-card-button {
  display: grid;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.gallery-card .artwork {
  min-height: 300px;
}

.gallery-large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-large .artwork {
  min-height: 700px;
}

.gallery-wide {
  grid-column: span 2;
}

.sketch-card .artwork {
  min-height: 230px;
}

/* 3e. Commissions page */
.commission-layout,
.contact-layout,
.about-layout,
.legal-layout {
  display: grid;
  width: min(var(--max), 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(34px, 7vw, 92px);
}

.sticky-copy {
  position: static;
  top: auto;
  align-self: start;
  margin-bottom: 0;
}

.package-list {
  display: grid;
  gap: 14px;
}

.package-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.package-item.is-featured {
  border-color: rgba(165, 156, 187, 0.48);
  background: linear-gradient(135deg, rgba(165, 156, 187, 0.13), var(--surface-soft) 42%);
  box-shadow: var(--shadow);
}

.package-item strong {
  color: var(--accent-3);
  font-family: Poppins, sans-serif;
  font-size: 1.4rem;
  white-space: nowrap;
}

.character-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.character-card {
  padding-bottom: 22px;
}

.character-card .artwork {
  min-height: 360px;
}

.character-card h3,
.character-card p {
  padding: 0 22px;
}

.process-grid,
.testimonial-row {
  display: grid;
  width: min(var(--max), 100%);
  margin: 0 auto;
  gap: 16px;
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-item,
.testimonial-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: clamp(22px, 3vw, 34px);
}

.process-item {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 250px;
}

.process-item h3,
.testimonial-card strong {
  font-family: Poppins, sans-serif;
}

.process-item h3 {
  font-size: 1.55rem;
}

.process-item p,
.testimonial-card p {
  color: var(--muted);
}

.testimonial-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.testimonial-card {
  display: grid;
  gap: 18px;
}

.testimonial-card p {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.45;
}

/* Final call-to-action band on the Commissions page */
.cta-band {
  display: flex;
  width: min(var(--max), calc(100% - 40px));
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto clamp(72px, 9vw, 132px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(165, 156, 187, 0.12), transparent 42%),
    var(--surface);
}

.cta-band h2 {
  max-width: 780px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1;
}

.muted-note {
  color: var(--muted);
  margin: 0;
}

/* 4. Responsive images, missing artwork placeholders, and lightbox */
.image-frame {
  isolation: isolate;
}

.missing-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(203, 196, 196, 0.08);
  background:
    linear-gradient(135deg, rgba(203, 196, 196, 0.06), transparent 42%),
    var(--surface-warm);
  color: var(--subtle);
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slide-art.is-missing .missing-image {
  align-items: center;
  justify-items: end;
  padding: 0 clamp(42px, 10vw, 160px) 0 52%;
  text-align: center;
}

.image-frame:not(.is-missing) .missing-image {
  display: none;
}

.image-frame picture,
.image-frame img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.image-frame img {
  object-fit: cover;
  object-position: var(--crop-x, 50%) var(--crop-y, 50%);
  opacity: 0;
  transform: scale(var(--crop-zoom, 1));
  transform-origin: var(--crop-x, 50%) var(--crop-y, 50%);
  transition: opacity 240ms ease, transform 700ms ease;
}

.image-frame img.is-loaded {
  opacity: 1;
}

.image-frame img.is-hidden {
  display: none;
}

.media-badge {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(18, 16, 15, 0.72);
  color: var(--text);
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(11, 10, 9, 0.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-panel {
  position: relative;
  width: min(1500px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(18, 16, 15, 0.72);
  color: var(--text);
  cursor: pointer;
  padding: 9px 12px;
  font-weight: 900;
}

.lightbox [data-lightbox-content] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  max-height: calc(100vh - 28px);
}

.lightbox-art {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  background: var(--bg-deep);
}

.lightbox-art .artwork {
  width: 100%;
  height: min(86vh, calc(100vh - 64px));
  min-height: 420px;
  background: var(--bg-deep);
}

.lightbox-art .image-frame picture,
.lightbox-art .image-frame img {
  position: absolute;
  inset: 0;
}

.lightbox-art .image-frame img {
  object-fit: contain;
  object-position: center;
  transform: none;
  transform-origin: center;
}

.lightbox-overlay-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: grid;
  gap: 8px;
  padding: clamp(20px, 3vw, 38px);
  background:
    linear-gradient(0deg, rgba(11, 10, 9, 0.92), rgba(11, 10, 9, 0.52) 52%, transparent);
  pointer-events: none;
}

.lightbox-overlay-copy h2 {
  max-width: min(920px, 78%);
  font-size: clamp(2.2rem, 4.8vw, 5.6rem);
  line-height: 0.96;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.52);
}

.lightbox-overlay-copy .lightbox-meta {
  color: var(--text);
}

.lightbox-copy {
  display: grid;
  align-content: end;
  gap: 16px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 44px);
}

.lightbox-copy p {
  margin: 0;
  color: var(--muted);
}

.lightbox-copy.is-empty {
  display: none;
}

.lightbox[data-has-details="false"] [data-lightbox-content] {
  grid-template-columns: 1fr;
}

.lightbox[data-orientation="portrait"] .lightbox-panel {
  width: min(1560px, calc(100vw - 28px));
}

.lightbox[data-has-details="true"][data-orientation="portrait"] [data-lightbox-content],
.lightbox[data-has-details="true"][data-orientation="unknown"] [data-lightbox-content] {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.38fr);
}

.lightbox[data-orientation="portrait"] .lightbox-art .artwork {
  height: min(90vh, calc(100vh - 52px));
}

.lightbox[data-orientation="landscape"] .lightbox-panel,
.lightbox[data-orientation="square"] .lightbox-panel {
  width: min(1540px, calc(100vw - 28px));
}

.lightbox[data-orientation="landscape"] [data-lightbox-content] {
  grid-template-columns: 1fr;
  overflow-y: auto;
}

.lightbox[data-orientation="landscape"] .lightbox-art .artwork {
  height: min(78vh, calc(100vh - 172px));
  min-height: 480px;
}

.lightbox[data-orientation="landscape"] .lightbox-copy {
  max-height: 22vh;
  align-content: start;
  border-top: 1px solid var(--line);
  padding: clamp(18px, 2vw, 28px) clamp(22px, 3vw, 38px);
}

.lightbox[data-orientation="square"] .lightbox-copy {
  align-content: end;
}

.lightbox-meta {
  color: var(--subtle);
  font-size: 0.9rem;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

/* 3f. Timeline page */
.timeline-section {
  width: min(var(--max), calc(100% - 40px));
  min-height: 620px;
  margin: 0 auto;
  padding-bottom: clamp(72px, 10vw, 132px);
  overflow: hidden;
}

.timeline-toolbar {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 10px;
  background: transparent;
}

.timeline-toggle {
  display: flex;
  gap: 10px;
}

.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0 18px;
  scrollbar-color: var(--accent) rgba(244, 234, 220, 0.08);
  scrollbar-width: thin;
}

.timeline-scroll::-webkit-scrollbar {
  height: 10px;
}

.timeline-scroll::-webkit-scrollbar-track {
  background: rgba(244, 234, 220, 0.08);
  border-radius: 999px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.timeline-list {
  position: relative;
  display: grid;
  min-height: 500px;
  min-width: max-content;
  grid-auto-columns: minmax(360px, 430px);
  grid-auto-flow: column;
  gap: 22px;
  padding-top: 38px;
  padding-right: 20px;
}

.timeline-list > .muted-note {
  display: grid;
  width: min(430px, calc(100vw - 40px));
  min-height: 420px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 24px;
}

.timeline-list::before {
  position: absolute;
  top: 33px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 4%, var(--line-strong) 96%, transparent);
  content: "";
}

.timeline-entry {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 0;
}

.timeline-date {
  position: relative;
  align-self: start;
  display: grid;
  gap: 8px;
  min-height: 56px;
  padding-left: 18px;
}

.timeline-dot {
  position: absolute;
  left: 18px;
  top: -31px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(165, 156, 187, 0.14);
}

.timeline-date span:not(.timeline-dot) {
  color: var(--accent);
  font-family: Poppins, Figtree, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
}

.timeline-date time {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.timeline-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease;
}

.timeline-card:hover {
  border-color: rgba(165, 156, 187, 0.5);
  transform: translateY(-2px);
}

.timeline-card .artwork {
  min-height: 260px;
}

.timeline-copy {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.timeline-copy small,
.timeline-tags {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-copy strong {
  font-family: Poppins, Figtree, sans-serif;
  font-size: 1.75rem;
  line-height: 1;
}

.timeline-copy span {
  color: var(--muted);
}

.timeline-tags {
  color: var(--subtle);
  letter-spacing: 0;
  text-transform: none;
}

/* 3g. Forms, About page, and Legal page */
.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(165, 156, 187, 0.2);
}

.contact-form select option {
  color: var(--ink);
}

.contact-form textarea {
  resize: vertical;
}

.about-layout {
  align-items: start;
}

.about-copy p {
  font-size: 1.08rem;
}

.about-notes {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.about-notes div {
  display: grid;
  gap: 8px;
  padding: 24px;
  background: var(--surface-soft);
}

.about-notes strong {
  font-family: Poppins, sans-serif;
  font-size: 1.35rem;
}

.portrait-mark {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(111, 153, 144, 0.18), transparent 40%),
    linear-gradient(160deg, #211816, #39241f 48%, #14100f);
}

.portrait-mark::before {
  inset: 16% 26% 10%;
  border-radius: 46% 54% 42% 58%;
  background: linear-gradient(165deg, #d89c5b, #b9635b 54%, #241915);
}

.portrait-mark::after {
  inset: 12% 18% 54%;
  clip-path: polygon(2% 82%, 24% 0, 47% 60%, 68% 18%, 100% 74%, 64% 62%, 44% 100%, 24% 62%);
  background: rgba(244, 234, 220, 0.78);
}

.legal-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legal-block {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.legal-block h2 {
  font-size: 1.45rem;
}

.legal-block a {
  color: var(--accent);
}

/* 3h. Project system: homepage overview, project archive, detail, and recap */
.current-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.current-project-image,
.project-card-image {
  display: block;
  min-width: 0;
  background: var(--bg-deep);
}

.current-project-image .artwork {
  width: 100%;
  height: 100%;
  min-height: 520px;
  aspect-ratio: auto;
}

.current-project-image > .missing-image {
  display: grid;
  min-height: 520px;
  place-items: center;
}

.current-project-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 64px);
}

.current-project-copy h3 {
  font-size: clamp(2rem, 4vw, 4.3rem);
  line-height: 1;
}

.current-project-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge,
.stream-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(165, 156, 187, 0.08);
  color: var(--text);
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-active {
  border-color: rgba(124, 191, 151, 0.46);
  color: #b9dec6;
}

.status-completed {
  border-color: rgba(199, 166, 119, 0.5);
  color: #dfc79f;
}

.status-on-hold,
.status-archived {
  color: var(--muted);
}

.stream-badge {
  border-color: rgba(165, 156, 187, 0.48);
  color: #d8d0e5;
}

.project-facts,
.project-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.project-facts div,
.project-detail-stats div {
  display: grid;
  gap: 4px;
  background: rgba(20, 19, 19, 0.86);
  padding: 14px;
}

.project-facts dt,
.project-detail-stats dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-facts dd,
.project-detail-stats dd {
  margin: 0;
  font-weight: 800;
}

.project-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  gap: 1px;
}

.project-stat-grid > div {
  display: grid;
  min-height: 138px;
  align-content: center;
  gap: 7px;
  background: var(--surface-soft);
  padding: 20px;
}

.project-stat-grid strong {
  font-family: Poppins, sans-serif;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1;
}

.project-stat-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.comparison-item {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-deep);
}

.comparison-item .artwork {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

.comparison-item > span:last-child {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 4px;
  background: linear-gradient(transparent, rgba(10, 9, 9, 0.94));
  padding: 80px 24px 24px;
}

.comparison-item small {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-item strong {
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.projects-section {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 84px) clamp(72px, 9vw, 132px);
}

.project-filters {
  margin-bottom: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.project-card-image .artwork {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.project-card-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.project-card-copy h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.project-card-copy p {
  color: var(--muted);
}

.project-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  padding-top: 14px;
  font-size: 0.8rem;
  font-weight: 700;
}

.project-inline-link {
  display: inline-flex;
  width: fit-content;
  margin: 12px 18px 18px;
  border-bottom: 1px solid var(--accent);
  color: var(--text);
  font-weight: 800;
}

.timeline-entry > .project-inline-link {
  margin: 12px 0 0;
}

.project-detail-page,
.recap-page {
  min-height: 70vh;
}

.project-detail-hero,
.recap-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  width: min(var(--max), 100%);
  margin: 0 auto;
  gap: clamp(30px, 7vw, 100px);
  align-items: end;
  padding: clamp(80px, 10vw, 150px) clamp(20px, 6vw, 84px) clamp(54px, 7vw, 96px);
}

.project-detail-hero h1,
.recap-hero h1 {
  max-width: 960px;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.96;
}

.project-detail-hero > div > p:not(.eyebrow),
.recap-hero > p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.project-update-section {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 84px) clamp(72px, 9vw, 132px);
}

.project-update-list {
  display: grid;
  gap: 22px;
}

.project-update {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.project-update-media .artwork {
  width: 100%;
  height: 100%;
  min-height: 520px;
  aspect-ratio: auto;
}

.project-update-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 52px);
}

.project-update-copy h3 {
  font-size: clamp(1.8rem, 3vw, 3.4rem);
  line-height: 1;
}

.project-update-copy p {
  color: var(--muted);
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-content: center;
  justify-items: start;
  gap: 14px;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 48px clamp(20px, 6vw, 84px);
}

.recap-hero {
  grid-template-columns: 1fr;
}

.recap-year-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recap-year-links a {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 800;
}

.recap-year-links a.is-active {
  background: var(--accent);
  color: var(--ink);
}

.recap-stats {
  width: min(calc(var(--max) - 168px), calc(100% - 40px));
  margin: 0 auto;
}

.project-mini-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.project-mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.project-mini-list span {
  color: var(--muted);
}

.recap-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.recap-gallery > a {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.recap-gallery .artwork {
  aspect-ratio: 4 / 3;
}

.recap-gallery > a > span {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.recap-gallery small {
  color: var(--muted);
}

/* 5. Admin mock workspace
   These styles only affect admin.html. Real protection still needs a backend. */
.admin-layout {
  display: grid;
  width: min(var(--max), 100%);
  margin: 0 auto;
  gap: 24px;
  padding: 0 clamp(20px, 6vw, 84px) clamp(72px, 9vw, 132px);
}

[data-admin-panel] {
  display: grid;
  gap: 22px;
}

.admin-status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.admin-status-bar div {
  display: grid;
  gap: 8px;
  background: var(--surface-soft);
  padding: 18px 20px;
}

.admin-status-bar small,
.admin-card .eyebrow,
.admin-subcard p {
  color: var(--muted);
}

.admin-status-bar strong {
  font-family: Poppins, sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.42fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-library-column {
  position: sticky;
  top: calc(var(--page-top-offset) + 24px);
  display: grid;
  gap: 22px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: clamp(22px, 4vw, 38px);
}

.admin-gate-card {
  max-width: 560px;
  margin: 0 auto;
}

.admin-card h2 {
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.05;
}

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

.admin-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.admin-section-head h2 {
  max-width: 760px;
}

.admin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.admin-form input,
.admin-upload-form input,
.admin-upload-form select,
.admin-upload-form textarea,
.admin-edit-form input,
.admin-edit-form select,
.admin-edit-form textarea,
.admin-config-form input,
.admin-config-form select,
.admin-config-form textarea,
.project-admin-form input,
.project-admin-form select,
.project-admin-form textarea,
.project-upload-form input,
.project-upload-form select,
.project-upload-form textarea,
.admin-session-grid input,
.admin-editor-toolbar select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 13px 14px;
}

.admin-form input:focus,
.admin-upload-form input:focus,
.admin-upload-form select:focus,
.admin-upload-form textarea:focus,
.admin-edit-form input:focus,
.admin-edit-form select:focus,
.admin-edit-form textarea:focus,
.admin-config-form input:focus,
.admin-config-form select:focus,
.admin-config-form textarea:focus,
.admin-field-row select:focus,
.project-admin-form input:focus,
.project-admin-form select:focus,
.project-admin-form textarea:focus,
.project-upload-form input:focus,
.project-upload-form select:focus,
.project-upload-form textarea:focus,
.admin-session-grid input:focus,
.admin-editor-toolbar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(165, 156, 187, 0.18);
  outline: none;
}

.admin-upload-form,
.admin-edit-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
}

.admin-upload-form label,
.admin-edit-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.admin-upload-form textarea,
.admin-edit-form textarea,
.admin-config-form textarea {
  resize: vertical;
}

.admin-upload-form select option,
.admin-edit-form select option,
.admin-config-form select option {
  background: #111112;
  color: #f4eeee;
}

.project-admin-form select option,
.admin-editor-toolbar select option {
  background: #111112;
  color: #f4eeee;
}

.admin-upload-wide,
.admin-edit-wide {
  grid-column: 1 / -1;
}

.admin-checkbox-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
}

.admin-checkbox-row input {
  min-width: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.admin-upload-form button,
.admin-edit-form button {
  justify-self: start;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-subcard {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 19, 19, 0.52);
  padding: 18px;
}

.admin-subcard h3 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.05;
}

.admin-subcard p {
  margin: 0;
  font-size: 0.94rem;
}

.admin-picker {
  display: grid;
  gap: 14px;
}

.admin-field-list {
  display: grid;
  gap: 12px;
}

.admin-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
}

.admin-field-row span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
}

.admin-field-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
}

.admin-field-row select option {
  background: #111112;
  color: #f4eeee;
}

.admin-remove-slot {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.04);
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
  font-weight: 800;
}

.admin-add-slot {
  justify-self: start;
}

.admin-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 22px;
  align-items: start;
}

.admin-config-form {
  display: grid;
  gap: 18px;
}

.admin-config-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 19, 19, 0.46);
  padding: 0;
}

.admin-config-group summary {
  cursor: pointer;
  color: var(--text);
  font-family: Poppins, sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 800;
  list-style: none;
  padding: 18px 20px;
}

.admin-config-group summary::-webkit-details-marker {
  display: none;
}

.admin-config-group summary::after {
  float: right;
  color: var(--accent);
  content: "+";
}

.admin-config-group[open] summary::after {
  content: "-";
}

.admin-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 18px 20px;
}

.admin-config-grid label,
.admin-config-item label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.admin-config-wide {
  grid-column: 1 / -1;
}

.admin-config-list {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 18px 20px;
}

.admin-config-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 14px;
}

.admin-config-item label:has(textarea),
.admin-config-item .admin-config-wide {
  grid-column: 1 / -2;
}

.admin-config-remove {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.04);
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
  font-weight: 800;
}

.admin-config-add {
  justify-self: start;
}

.admin-config-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.admin-crop-form {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-crop-controls {
  display: grid;
  gap: 16px;
}

.admin-crop-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.admin-crop-controls select,
.admin-crop-controls input[type="range"] {
  width: 100%;
}

.admin-crop-controls select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 13px 14px;
}

.admin-crop-controls select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(165, 156, 187, 0.18);
  outline: none;
}

.admin-crop-controls select option {
  background: #111112;
  color: #f4eeee;
}

.admin-range-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-range-row output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.admin-crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-crop-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-crop-preview-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-deep);
}

.admin-crop-preview .artwork {
  width: 100%;
  min-height: 0;
}

.admin-crop-preview[data-crop-usage="homeHero"] .artwork {
  aspect-ratio: 21 / 9;
}

.admin-crop-preview[data-crop-usage="featuredCard"] .artwork,
.admin-crop-preview[data-crop-usage="galleryCard"] .artwork {
  aspect-ratio: 4 / 5;
}

.admin-crop-preview[data-crop-usage="commissionCard"] .artwork {
  aspect-ratio: 3 / 4;
}

.admin-crop-preview[data-crop-usage="timelineCard"] .artwork {
  aspect-ratio: 16 / 10;
}

.admin-output {
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 16px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.quick-actions div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.project-admin-panel {
  display: grid;
  gap: 18px;
}

.project-admin-status {
  min-height: 24px;
  margin: -6px 0 0;
  color: var(--accent) !important;
}

.project-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-admin-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 19, 19, 0.46);
}

.project-admin-group summary {
  cursor: pointer;
  padding: 18px 20px;
  color: var(--text);
  font-family: Poppins, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  list-style: none;
}

.project-admin-group summary::-webkit-details-marker {
  display: none;
}

.project-admin-group summary::after {
  float: right;
  color: var(--accent);
  content: "+";
}

.project-admin-group[open] summary::after {
  content: "-";
}

.project-admin-body {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 20px 22px;
}

.admin-editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.project-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-admin-form label {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.project-admin-form textarea {
  resize: vertical;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.danger-button {
  min-height: 44px;
  border: 1px solid rgba(215, 106, 106, 0.45);
  border-radius: 8px;
  background: transparent;
  color: #e0a3a3;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 800;
}

.admin-record-list {
  display: grid;
  max-height: 380px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.admin-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.admin-record > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-record strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-record small {
  width: 100%;
  color: var(--muted);
}

.admin-record.is-muted {
  opacity: 0.62;
}

/* Shared footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(20px, 6vw, 84px);
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a:hover {
  color: var(--text);
}

/* 6. Decorative fallback visuals
   These legacy CSS illustrations are kept as lightweight placeholders. */
.visual-ember {
  background:
    linear-gradient(90deg, rgba(18, 16, 15, 0.2), rgba(18, 16, 15, 0.46)),
    radial-gradient(circle at 65% 26%, rgba(216, 156, 91, 0.78) 0 11%, transparent 12%),
    linear-gradient(135deg, #141110, #35201b 42%, #85453c 74%, #d89c5b);
}

.visual-ember::before {
  inset: 18% 36% 10% 27%;
  clip-path: polygon(50% 0, 72% 18%, 65% 43%, 88% 88%, 50% 100%, 12% 88%, 34% 43%, 28% 18%);
  background: linear-gradient(170deg, #e8b46d, #b9635b 52%, #171210);
}

.visual-ember::after {
  inset: 52% 16% 27% 52%;
  clip-path: polygon(0 60%, 38% 25%, 48% 0, 66% 26%, 100% 45%, 72% 58%, 52% 100%, 33% 60%);
  background: rgba(244, 234, 220, 0.76);
}

.visual-nocturne {
  background:
    linear-gradient(90deg, rgba(18, 16, 15, 0.24), rgba(18, 16, 15, 0.6)),
    linear-gradient(145deg, #0c1518, #1f3133 42%, #31223a 72%, #6f9990);
}

.visual-nocturne::before {
  inset: 20% 24% 16% 42%;
  clip-path: polygon(46% 0, 72% 16%, 66% 46%, 92% 100%, 48% 88%, 12% 100%, 32% 46%, 28% 16%);
  background: linear-gradient(180deg, #6f9990, #b9635b 58%, #16100f);
}

.visual-nocturne::after {
  inset: 16% 52% 58% 16%;
  clip-path: polygon(0 74%, 18% 18%, 42% 56%, 56% 0, 76% 52%, 100% 20%, 90% 100%, 12% 100%);
  background: rgba(216, 156, 91, 0.68);
}

.visual-lantern {
  background:
    radial-gradient(circle at 42% 36%, rgba(245, 193, 114, 0.68) 0 16%, transparent 18%),
    linear-gradient(140deg, #201713, #5c3028 54%, #151210);
}

.visual-lantern::before {
  inset: 18% 33% 14%;
  border-radius: 42% 58% 44% 56%;
  background: linear-gradient(165deg, #e0ad6f, #b9635b 58%, #261a16);
}

.visual-lantern::after {
  inset: 58% 18% 16%;
  clip-path: polygon(10% 100%, 32% 0, 68% 0, 90% 100%);
  background: rgba(111, 153, 144, 0.72);
}

.visual-thorn {
  background:
    radial-gradient(circle at 28% 30%, rgba(111, 153, 144, 0.54) 0 12%, transparent 13%),
    linear-gradient(145deg, #111614, #263d35 48%, #5c3a2e);
}

.visual-thorn::before {
  inset: 20% 14% 14%;
  clip-path: polygon(10% 74%, 24% 30%, 42% 20%, 57% 4%, 66% 28%, 88% 38%, 76% 78%, 54% 92%, 24% 90%);
  background: linear-gradient(165deg, #6f9990, #2d4a41 50%, #151210);
}

.visual-thorn::after {
  inset: 10% 18% 62%;
  clip-path: polygon(0 100%, 16% 12%, 34% 72%, 54% 0, 68% 66%, 100% 18%, 88% 100%);
  background: rgba(244, 234, 220, 0.62);
}

.visual-river {
  background:
    linear-gradient(135deg, rgba(111, 153, 144, 0.2), transparent 40%),
    linear-gradient(150deg, #12100f, #253333 50%, #876c4b);
}

.visual-river::before {
  inset: 22% 33% 13%;
  clip-path: polygon(48% 0, 72% 16%, 66% 40%, 82% 100%, 18% 100%, 34% 40%, 28% 16%);
  background: linear-gradient(180deg, #c99458, #6f9990 50%, #171210);
}

.visual-river::after {
  inset: 35% 18% 38%;
  clip-path: polygon(0 42%, 38% 16%, 54% 0, 68% 18%, 100% 42%, 65% 58%, 52% 100%, 35% 58%);
  background: rgba(244, 234, 220, 0.68);
}

.visual-ash {
  background:
    linear-gradient(145deg, #151210, #2b2927 46%, #74423f);
}

.visual-ash::before {
  inset: 18% 26% 10%;
  clip-path: polygon(50% 0, 80% 22%, 66% 54%, 84% 100%, 16% 100%, 34% 54%, 20% 22%);
  background: linear-gradient(165deg, #c8beb0, #6f9990 44%, #171210);
}

.visual-ash::after {
  inset: 14% 18% 64%;
  clip-path: polygon(6% 80%, 26% 20%, 50% 54%, 74% 20%, 94% 80%, 54% 100%, 46% 100%);
  background: rgba(216, 156, 91, 0.72);
}

.visual-hollow {
  background:
    radial-gradient(circle at 58% 30%, rgba(216, 156, 91, 0.5) 0 9%, transparent 10%),
    linear-gradient(120deg, #101312, #2f2826 44%, #213836 72%, #0b0a09);
}

.visual-hollow::before {
  inset: 16% 18% 12% 50%;
  clip-path: polygon(28% 100%, 44% 18%, 58% 0, 55% 42%, 88% 32%, 64% 58%, 100% 74%, 60% 72%, 48% 100%);
  background: rgba(111, 153, 144, 0.76);
}

.visual-hollow::after {
  inset: 20% 50% 18% 12%;
  clip-path: polygon(22% 100%, 36% 36%, 0 26%, 44% 18%, 56% 0, 68% 24%, 100% 36%, 66% 52%, 84% 100%);
  background: rgba(185, 99, 91, 0.78);
}

.sketch-lines,
.sketch-shapes,
.sketch-faces {
  background:
    linear-gradient(135deg, rgba(244, 234, 220, 0.05) 25%, transparent 25%) 0 0 / 34px 34px,
    var(--surface-warm);
}

.sketch-lines::before {
  inset: 22% 18% 26%;
  border-top: 6px solid rgba(244, 234, 220, 0.46);
  border-bottom: 6px solid rgba(216, 156, 91, 0.46);
  transform: rotate(-8deg);
}

.sketch-lines::after {
  inset: 42% 16% 34%;
  border-top: 5px solid rgba(111, 153, 144, 0.55);
  transform: rotate(13deg);
}

.sketch-shapes::before {
  inset: 24% 52% 32% 14%;
  border: 5px solid rgba(216, 156, 91, 0.68);
  border-radius: 50%;
}

.sketch-shapes::after {
  inset: 18% 18% 24% 48%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: rgba(111, 153, 144, 0.48);
}

.sketch-faces::before {
  inset: 20% 24% 18%;
  border: 5px solid rgba(244, 234, 220, 0.48);
  border-radius: 48% 52% 46% 54%;
}

.sketch-faces::after {
  inset: 42% 32% 42%;
  border-top: 5px solid rgba(216, 156, 91, 0.72);
  border-bottom: 5px solid rgba(111, 153, 144, 0.62);
}

/* Responsive rules */
@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  h1 {
    font-size: 5.8rem;
  }

  #home-title {
    font-size: 5.6rem;
  }

  .hero-copy h2 {
    font-size: 4.8rem;
  }

  .section-header h2,
  .page-hero h1,
  .about-copy h2 {
    font-size: 3.6rem;
  }

}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--header-height) + var(--notice-height) + 10px);
    right: 18px;
    display: grid;
    width: min(320px, calc(100vw - 36px));
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(18, 16, 15, 0.96);
    padding: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 12px;
  }
}

@media (max-width: 980px) {

  .page-hero,
  .commission-layout,
  .contact-layout,
  .about-layout,
  .legal-layout,
  .spotlight-layout,
  .admin-grid,
  .admin-status-bar,
  .admin-workspace,
  .admin-library-column,
  .admin-section-head,
  .admin-bottom-grid,
  .admin-crop-form,
  .admin-config-grid,
  .admin-config-item,
  .project-admin-grid,
  .current-project-card,
  .project-detail-hero,
  .project-update,
  .lightbox-panel {
    grid-template-columns: 1fr;
  }

  .admin-library-column {
    position: static;
  }

  .admin-config-item label:has(textarea),
  .admin-config-item .admin-config-wide {
    grid-column: 1;
  }

  .lightbox [data-lightbox-content],
  .lightbox[data-orientation="portrait"] [data-lightbox-content],
  .lightbox[data-orientation="unknown"] [data-lightbox-content],
  .lightbox[data-orientation="landscape"] [data-lightbox-content] {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .lightbox-art .artwork,
  .lightbox[data-orientation="portrait"] .lightbox-art .artwork,
  .lightbox[data-orientation="landscape"] .lightbox-art .artwork {
    height: min(70vh, 720px);
    min-height: 320px;
  }

  .lightbox-overlay-copy h2 {
    max-width: calc(100% - 74px);
    font-size: clamp(2rem, 7vw, 4rem);
  }

  .lightbox-copy {
    max-height: none;
    align-content: start;
  }

  .feature-grid,
  .preview-row,
  .character-row,
  .testimonial-row,
  .admin-upload-form {
    grid-template-columns: 1fr;
  }

  .social-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spotlight-copy {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 28px;
    padding-left: 0;
  }

  .sticky-copy {
    position: static;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid,
  .recap-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .current-project-image .artwork,
  .project-update-media .artwork {
    min-height: 440px;
  }

  .gallery-large,
  .gallery-wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 74px;
    --notice-height: 54px;
  }

  .site-header {
    padding: 16px 18px;
  }

  .site-notice {
    padding: 8px 18px;
    font-size: 0.78rem;
  }

  .home-hero,
  .hero-slide {
    min-height: 90vh;
  }

  .hero-slide {
    padding: 120px 18px 110px;
  }

  h1,
  .hero-copy h2,
  .section-header h2,
  .page-hero h1,
  .about-copy h2 {
    max-width: 100%;
    font-size: 3.05rem;
  }

  #home-title {
    font-size: 3.2rem;
  }

  .hero-copy p:not(.eyebrow) {
    max-width: 36rem;
    font-size: 1.05rem;
  }

  .slide-art.is-missing .missing-image {
    align-items: end;
    justify-items: start;
    padding: 0 18px 150px;
  }

  .admin-field-row {
    grid-template-columns: 1fr;
  }

  .project-admin-form,
  .comparison-grid,
  .project-grid,
  .recap-gallery,
  .project-stat-grid,
  .project-facts,
  .project-detail-stats {
    grid-template-columns: 1fr;
  }

  .project-stat-grid > div {
    min-height: 100px;
  }

  .current-project-image .artwork,
  .project-update-media .artwork,
  .comparison-item,
  .comparison-item .artwork {
    min-height: 360px;
  }

  .projects-section,
  .project-update-section {
    padding-inline: 18px;
  }

  .project-detail-hero,
  .recap-hero {
    padding-inline: 18px;
  }

  .project-detail-hero h1,
  .recap-hero h1 {
    font-size: 3.2rem;
  }

  .recap-stats {
    width: calc(100% - 36px);
  }

  .admin-editor-toolbar,
  .admin-record {
    grid-template-columns: 1fr;
  }

  .admin-remove-slot {
    justify-self: start;
  }

  .slide-caption {
    left: 18px;
    right: 18px;
    bottom: 66px;
  }

  .slide-controls {
    left: 18px;
    right: auto;
    bottom: 22px;
  }

  .section {
    padding-inline: 18px;
  }

  .page-hero {
    padding-inline: 18px;
  }

  .split-header {
    display: grid;
    align-items: start;
  }

  .gallery-section {
    width: calc(100% - 36px);
  }

  .timeline-section {
    width: calc(100% - 36px);
    min-height: 560px;
  }

  .social-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .spotlight-strip {
    grid-auto-columns: minmax(260px, 88vw);
  }

  .spotlight-card {
    min-height: auto;
  }

  .spotlight-card .artwork {
    min-height: auto;
    aspect-ratio: 4 / 5;
  }

  .timeline-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .timeline-list {
    min-height: 470px;
    grid-auto-columns: minmax(280px, 82vw);
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }

  .timeline-date {
    position: relative;
  }

  .timeline-card .artwork {
    min-height: auto;
    aspect-ratio: 4 / 5;
  }

  .gallery-grid,
  .gallery-large,
  .gallery-wide {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-large,
  .gallery-wide {
    grid-column: auto;
  }

  .gallery-large .artwork,
  .gallery-card .artwork,
  .artwork,
  .large-card .artwork {
    min-height: auto;
    aspect-ratio: 4 / 5;
  }

  .package-item {
    grid-template-columns: 1fr;
  }

  .cta-band {
    display: grid;
    width: calc(100% - 36px);
  }

  .site-footer {
    display: grid;
  }
}

/* ==========================================================================
   Server-backed project admin
   ========================================================================== */

.admin-page {
  min-height: 100vh;
  background: #101010;
}

.admin-shell,
.admin-private-shell {
  min-height: 100vh;
}

.admin-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.admin-login-shell .admin-gate-card {
  width: min(480px, 100%);
}

.admin-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: #121111;
}

.admin-topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.admin-workspace {
  width: min(1520px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 32px clamp(20px, 4vw, 56px) 72px;
}

.project-switcher {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 0.9fr) minmax(170px, auto);
  gap: 28px;
  align-items: end;
}

.project-switcher h1,
.project-switcher p {
  margin: 0;
}

.project-switcher h1 {
  font-size: clamp(28px, 3vw, 42px);
}

.project-switcher-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.project-switcher-controls label {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 700;
}

.project-switcher-controls select {
  width: 100%;
  min-width: 0;
}

.project-switcher-controls .button {
  white-space: nowrap;
}

.project-switcher .admin-server-state {
  align-self: stretch;
  align-content: end;
  padding: 0 0 2px 22px;
  border-top: 0;
  border-left: 1px solid var(--line);
}

.project-selection-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.admin-project-context {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  background: #191919;
}

.admin-project-context h2,
.admin-project-context p {
  margin: 0;
}

.admin-project-context h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.admin-project-context [data-selected-project-updated] {
  margin-top: 6px;
  color: var(--text-muted);
}

.admin-project-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, auto));
  padding: 4px;
  border: 1px solid var(--line);
  background: #111;
}

.admin-project-tabs button {
  min-height: 44px;
  border: 0;
  padding: 9px 16px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-project-tabs button:hover,
.admin-project-tabs button:focus-visible {
  color: var(--text);
}

.admin-project-tabs button.is-active {
  background: var(--accent);
  color: #111;
}

.admin-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  background: #1a1a1a;
}

.admin-sidebar h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
}

.admin-sidebar p {
  margin: 0;
}

.admin-section-nav {
  display: grid;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.admin-section-nav a {
  padding: 9px 0;
  color: var(--text-muted);
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  color: var(--text);
}

.admin-server-state {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-server-state small,
.admin-server-state span {
  color: var(--text-muted);
}

.admin-main-column {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.admin-main-column > *,
.project-switcher,
.admin-project-context,
.project-upload-form {
  min-width: 0;
  max-width: 100%;
}

.admin-main-column > .admin-card {
  margin: 0;
}

.admin-page .admin-main-column .admin-card h2 {
  font-size: clamp(25px, 2.5vw, 36px);
}

.admin-flash {
  position: sticky;
  top: 12px;
  z-index: 20;
  padding: 14px 18px;
  border: 1px solid #607b62;
  background: #172119;
  color: #dceadd;
}

.admin-flash[data-tone="error"] {
  border-color: #8a5656;
  background: #281919;
  color: #ffdede;
}

.project-upload-form {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #191919;
}

.admin-upload-preview {
  min-height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  color: var(--text-muted);
}

.admin-upload-preview img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
}

.admin-upload-fields,
.admin-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-inline-details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.admin-inline-details summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 14px;
}

.admin-project-upload-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.admin-upload-record {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #191919;
}

.admin-upload-record.is-cover {
  border-color: var(--accent);
}

.admin-upload-record-image {
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101010;
  color: var(--text-muted);
}

.admin-upload-record-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-upload-record-copy {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.admin-upload-record-copy h3,
.admin-upload-record-copy p {
  margin: 0;
}

.admin-upload-record-copy small {
  color: var(--text-muted);
}

.admin-record-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-record-badges span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12px;
}

.admin-session-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.admin-session-list li {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

.text-button {
  appearance: none;
  border: 0;
  padding: 4px 7px;
  background: transparent;
  color: var(--accent-soft);
  cursor: pointer;
}

.danger-text {
  color: #e2a0a0;
}

.admin-session-editor {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--accent);
  background: #18171a;
}

.admin-empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--text-muted);
}

.admin-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-page select,
.admin-page input,
.admin-page textarea {
  color: var(--text);
  background-color: #111;
}

.admin-page select option {
  color: #fff;
  background: #111;
}

.admin-crop-preview {
  overflow: hidden;
}

.admin-crop-preview img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  transform-origin: center;
}

.collection-load-more {
  display: flex;
  justify-content: center;
  padding-top: 28px;
}

@media (max-width: 1000px) {
  .project-switcher {
    grid-template-columns: 1fr 1fr;
  }

  .project-switcher .admin-server-state {
    grid-column: 1 / -1;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-section-nav {
    grid-template-columns: repeat(5, auto);
    overflow-x: auto;
    gap: 16px;
  }
}

@media (max-width: 720px) {
  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-topbar nav {
    width: 100%;
    align-items: flex-start;
    overflow-x: auto;
  }

  .project-switcher,
  .project-switcher-controls {
    grid-template-columns: 1fr;
  }

  .project-switcher-controls .button {
    width: 100%;
  }

  .admin-project-context {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-project-tabs {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .project-upload-form,
  .admin-upload-record,
  .admin-upload-fields,
  .admin-session-grid {
    grid-template-columns: 1fr;
  }

  .admin-session-list li {
    grid-template-columns: 1fr;
  }
}
