/* ============================================================
   BUILT IN — Design tokens
   Palette drawn from the uploaded lavender/cream background:
   deep plum ink for legibility, muted violet + burnt amber
   accents (echoing the sparkle dots already in the artwork).
   Signature motif: documentary timecodes used as eyebrows/
   dividers instead of generic numbered markers.
   ============================================================ */

:root {
  --ink: #2E2015;
  --ink-soft: #7A6252;
  --ink-faint: #B39C89;

  --accent: #E0722C;          /* light orange — primary CTA */
  --accent-2: #F0A24C;        /* warm amber-gold — secondary accent */
  --accent-soft: #F4B87A;

  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --surface-border: rgba(224, 114, 44, 0.14);
  --surface-border-strong: rgba(224, 114, 44, 0.22);

  --line: rgba(46, 32, 21, 0.10);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-glass: 0 8px 32px rgba(36, 31, 48, 0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
  --shadow-lift: 0 20px 48px rgba(36, 31, 48, 0.14);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  /* Background is fixed/uploaded — we keep light ink for contrast
     but soften surfaces slightly for OLED comfort. No hard theme swap. */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(160deg, #FFF8F0 0%, #FDEBD8 45%, #FBDDBE 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Typography ---------------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(201, 124, 76, 0.18);
}

.timecode {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

p { line-height: 1.7; color: var(--ink-soft); margin: 0; }
.lede { font-size: 19px; line-height: 1.65; color: var(--ink-soft); max-width: 60ch; }

/* ---------------- Glass surfaces ---------------- */

.glass {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-glass);
}

.glass-strong {
  background: var(--surface-strong);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--surface-border-strong);
  box-shadow: var(--shadow-glass);
}

/* ---------------- Nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-lg);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.nav-logo span { color: var(--accent-2); font-size: 26px; line-height: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(75, 59, 115, 0.10);
  color: var(--accent);
}

.nav-x {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.nav-x:hover { transform: translateY(-2px) rotate(8deg); background: var(--accent); }
.nav-x svg { width: 15px; height: 15px; }

.nav-toggle { display: none; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), opacity 0.2s;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #A94F1E 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(75, 59, 115, 0.30);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(75, 59, 115, 0.38); }

.btn-ghost {
  background: var(--surface-strong);
  backdrop-filter: blur(14px);
  color: var(--ink);
  border: 1px solid var(--surface-border-strong);
}
.btn-ghost:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.btn-sm { padding: 9px 18px; font-size: 13px; }

.btn[disabled], .btn.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn .spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.7; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Hero ---------------- */

.hero {
  padding: 100px 0 90px;
}

.hero-inner {
  max-width: 820px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 74px);
  margin: 20px 0 26px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 38px;
  flex-wrap: wrap;
}

/* ---------------- Sections ---------------- */

.section { padding: 90px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 14px; }

/* ---------------- Story grid & cards ---------------- */

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.story-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.story-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

.story-card-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #F7DCC0, #FDF2E3);
}

.story-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.story-card:hover .story-card-media img { transform: scale(1.06); }

.platform-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  color: var(--ink);
}

.story-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.story-card-body h3 { font-size: 19px; line-height: 1.3; }
.story-card-body p { font-size: 14.5px; }

.story-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
}

/* ---------------- Skeletons / loading ---------------- */

.skeleton {
  background: linear-gradient(100deg, rgba(255,255,255,0.4) 30%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.4) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.state-empty, .state-error {
  text-align: center;
  padding: 60px 20px;
  border-radius: var(--radius-md);
}
.state-empty h3, .state-error h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; }

/* ---------------- About ---------------- */

.about-block { max-width: 720px; margin: 0 auto; }
.about-block + .about-block { margin-top: 64px; }
.about-block h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 22px; }
.about-block p + p { margin-top: 16px; }
.about-block .quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  border-left: 2px solid var(--accent-2);
  padding-left: 20px;
  margin: 20px 0;
}

.founder-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 32px;
  border-radius: var(--radius-lg);
  margin-top: 20px;
}
.founder-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-size: 30px;
  overflow: hidden;
}
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- Contact ---------------- */

.contact-form {
  display: grid;
  gap: 18px;
  padding: 36px;
  border-radius: var(--radius-lg);
  max-width: 620px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border-strong);
  background: rgba(255,255,255,0.6);
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { min-height: 120px; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
}
.field-error { font-size: 12.5px; color: #B4423C; display: none; }
.field.has-error input, .field.has-error textarea { border-color: #B4423C; }
.field.has-error .field-error { display: block; }

.form-note { font-size: 13px; }
.form-success {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: rgba(75, 155, 105, 0.14);
  color: #2E6B45;
  font-size: 14.5px;
  font-weight: 500;
}
.form-error-banner {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: rgba(180, 66, 60, 0.12);
  color: #8C332E;
  font-size: 14.5px;
}

/* ---------------- Footer ---------------- */

.footer {
  padding: 50px 0 40px;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner .timecode { color: var(--ink-faint); }

/* ---------------- Story detail page ---------------- */

.story-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21/9;
  margin-bottom: 36px;
}
.story-hero img { width: 100%; height: 100%; object-fit: cover; }

.story-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.story-title { font-size: clamp(30px, 4.4vw, 52px); margin-bottom: 22px; }

.story-body { max-width: 720px; }
.story-body :is(h2, h3) { margin-top: 40px; margin-bottom: 14px; font-size: 24px; }
.story-body p { margin-bottom: 18px; font-size: 16.5px; }
.story-body img { border-radius: var(--radius-md); margin: 26px 0; }
.story-body blockquote {
  margin: 26px 0; padding-left: 20px;
  border-left: 2px solid var(--accent-2);
  font-family: var(--font-display); font-style: italic; font-size: 19px;
}
.story-body code {
  background: rgba(46,32,21,0.06); padding: 2px 6px; border-radius: 5px; font-family: var(--font-mono); font-size: 14px;
}
.story-body pre {
  background: rgba(46,32,21,0.06); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 36px 0;
}
.gallery img { border-radius: var(--radius-sm); aspect-ratio: 1; object-fit: cover; }

.share-row { display: flex; align-items: center; gap: 12px; margin: 32px 0; }
.share-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-strong); border: 1px solid var(--surface-border-strong);
  transition: transform 0.25s var(--ease), background 0.25s;
}
.share-btn:hover { transform: translateY(-2px); background: #fff; }
.share-btn svg { width: 16px; height: 16px; }

.story-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 60px 0;
}
.story-nav-card {
  padding: 22px;
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease);
}
.story-nav-card:hover { transform: translateY(-4px); }
.story-nav-card.next { text-align: right; }

/* ---------------- Custom video player ---------------- */

.player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0E0B14;
  aspect-ratio: 16/9;
}
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.player-overlay-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,11,20,0.25);
  cursor: pointer;
  transition: opacity 0.3s var(--ease);
}
.player-overlay-play .play-circle {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease);
}
.player-overlay-play:hover .play-circle { transform: scale(1.08); }
.player-overlay-play svg { width: 26px; height: 26px; margin-left: 3px; }

.player-loading {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(14,11,20,0.4);
}
.player-loading.active { display: flex; }
.player-loading .ring {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.player-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 16px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.player:hover .player-controls, .player.is-paused .player-controls, .player:focus-within .player-controls { opacity: 1; transform: translateY(0); }

.player-progress {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  margin-bottom: 12px;
}
.player-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent-2);
  border-radius: 999px;
}
.player-progress-buffer {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
}

.player-row { display: flex; align-items: center; gap: 14px; }
.player-row .spacer { flex: 1; }
.player-btn {
  background: none; border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; opacity: 0.9; transition: opacity 0.2s, transform 0.2s;
}
.player-btn:hover { opacity: 1; transform: scale(1.08); }
.player-btn svg { width: 18px; height: 18px; }
.player-time { font-family: var(--font-mono); font-size: 12px; color: #fff; opacity: 0.85; }
.player-volume { display: flex; align-items: center; gap: 6px; }
.player-volume input[type="range"] { width: 60px; accent-color: var(--accent-2); }
.player-speed {
  background: rgba(255,255,255,0.15); color: #fff; border: none; border-radius: 6px;
  font-family: var(--font-mono); font-size: 11px; padding: 4px 8px; cursor: pointer;
}

/* ---------------- Fade / reveal animation hooks ---------------- */

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--surface-strong); border: 1px solid var(--surface-border-strong);
  }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 20px; right: 20px;
    padding: 14px; border-radius: var(--radius-md);
    background: var(--surface-strong); backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border-strong);
    box-shadow: var(--shadow-lift);
  }
  .story-grid { grid-template-columns: 1fr; }
  .story-nav { grid-template-columns: 1fr; }
  .founder-card { flex-direction: column; }
  .hero { padding: 60px 0 50px; }
  .section { padding: 60px 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   ADMIN — shares every token above; only admin.html uses these.
   ============================================================ */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card { width: 100%; max-width: 380px; padding: 40px 36px; border-radius: var(--radius-lg); }
.login-card .field label { display:block; margin-bottom:0; }

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
}

.admin-sidebar .nav-logo { padding: 0 12px 22px; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}
.admin-nav-item:hover { background: rgba(75,59,115,0.08); color: var(--ink); }
.admin-nav-item.active { background: var(--accent); color: #fff; }
.admin-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.admin-sidebar-foot { margin-top: auto; }

.admin-main { padding: 34px 40px 80px; overflow-y: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-size: 26px; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 34px; }
.stat-card { padding: 22px; border-radius: var(--radius-md); }
.stat-card .num { font-family: var(--font-display); font-size: 32px; margin: 6px 0 2px; }
.stat-card .label { font-size: 13px; color: var(--ink-soft); }

/* Tables */
.admin-table-wrap { border-radius: var(--radius-md); overflow: hidden; }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th {
  text-align: left; padding: 14px 18px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; border-bottom: 1px solid var(--line);
}
table.admin-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tr:hover td { background: rgba(255,255,255,0.35); }

.status-pill { display:inline-flex; padding:4px 10px; border-radius:999px; font-size:11.5px; font-weight:600; }
.status-pill.published { background: rgba(75,155,105,0.16); color:#2E6B45; }
.status-pill.draft { background: rgba(201,124,76,0.16); color:#8C512C; }

.row-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--surface-border-strong);
  background: rgba(255,255,255,0.5); display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: background 0.2s, transform 0.2s;
}
.icon-btn:hover { background: #fff; transform: translateY(-1px); }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn.danger:hover { background: rgba(180,66,60,0.12); }

/* Forms */
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-form-grid .full { grid-column: 1 / -1; }
.admin-panel .field input, .admin-panel .field textarea, .admin-panel .field select {
  font-family: var(--font-body); font-size: 14.5px; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border-strong); background: rgba(255,255,255,0.6); color: var(--ink); width: 100%;
}
.admin-panel .field input:focus, .admin-panel .field textarea:focus, .admin-panel .field select:focus {
  outline: none; border-color: var(--accent); background: #fff;
}
.field-hint { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

.toggle-row { display: flex; align-items: center; gap: 10px; }
.switch { position: relative; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0; background: rgba(46,32,21,0.18); border-radius: 999px; cursor: pointer; transition: background 0.2s;
}
.switch-track::before {
  content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::before { transform: translateX(18px); }

/* Rich text editor */
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(255,255,255,0.55); border: 1px solid var(--surface-border-strong); border-bottom: none;
}
.editor-toolbar button {
  width: 32px; height: 32px; border-radius: 6px; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 13px; font-weight: 700;
  font-family: var(--font-body);
}
.editor-toolbar button:hover { background: rgba(75,59,115,0.12); color: var(--accent); }
.editor-toolbar button.active { background: var(--accent); color: #fff; }
.editor-toolbar .sep { width: 1px; background: var(--line); margin: 4px 6px; }

.editor-body {
  min-height: 300px; padding: 18px 20px; border: 1px solid var(--surface-border-strong); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(255,255,255,0.6); font-size: 15.5px; line-height: 1.75; color: var(--ink);
}
.editor-body:focus { outline: none; background: #fff; }
.editor-body h2 { font-family: var(--font-display); font-size: 22px; margin: 18px 0 10px; }
.editor-body h3 { font-family: var(--font-display); font-size: 18px; margin: 16px 0 8px; }
.editor-body p { margin: 0 0 14px; color: var(--ink); }
.editor-body blockquote { border-left: 2px solid var(--accent-2); padding-left: 14px; font-style: italic; margin: 14px 0; }
.editor-body pre { background: rgba(46,32,21,0.06); padding: 12px; border-radius: 8px; overflow-x: auto; }
.editor-body img { max-width: 100%; border-radius: 10px; }

/* Upload zones */
.upload-zone {
  border: 2px dashed var(--surface-border-strong); border-radius: var(--radius-md); padding: 30px; text-align: center;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: rgba(75,59,115,0.05); }
.upload-zone input { display: none; }
.upload-preview { margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.upload-preview img, .upload-preview video { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; }

.progress-bar-track { height: 6px; border-radius: 999px; background: rgba(46,32,21,0.1); overflow: hidden; margin-top: 10px; }
.progress-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.2s; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-faint); margin-top: 4px; font-family: var(--font-mono); }

.toast-stack { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast {
  padding: 13px 18px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; font-size: 14px;
  box-shadow: var(--shadow-lift); display: flex; align-items: center; gap: 10px; animation: toast-in 0.3s var(--ease);
}
.toast.error { background: #8C332E; }
.toast.success { background: #2E6B45; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-item { border-radius: var(--radius-sm); overflow: hidden; position: relative; aspect-ratio: 1; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item-overlay {
  position: absolute; inset: 0; background: rgba(20,16,28,0.55); opacity: 0; transition: opacity 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.media-item:hover .media-item-overlay { opacity: 1; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; flex-direction: row; overflow-x: auto; }
  .admin-sidebar .nav-logo { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-form-grid { grid-template-columns: 1fr; }
}
