/* ==========================================================
   TOKENS
   Paper: crisp, near-white with a cool blue cast — professional
   Ink: deep navy — used for text and as the dark alt-section bg
   Blue (--riso): the pop accent — vivid but not neon
   Sky (--mustard): lighter secondary blue
   Slate (--moss): muted support / dividers
   ========================================================== */
:root {
  --paper: #F7FAFF;
  --ink: #13233A;
  --riso: #2F6FED;
  --mustard: #6FA8DC;
  --moss: #64748B;

  --display: "Big Shoulders Display", sans-serif;
  --body: "IBM Plex Sans", sans-serif;
  --mono: "Space Mono", monospace;

  --nav-h: 64px;
  --edge: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

::selection { background: var(--riso); color: var(--paper); }

/* ==========================================================
   GRAIN OVERLAY — signature texture, sits over everything
   ========================================================== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================
   NAV
   ========================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--edge);
  background: var(--paper);
  border-bottom: 1px solid rgba(19, 35, 58, 0.12);
}

.nav-mark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.site-nav nav ul {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.nav-toggle { display: none; }

/* Glitch / RGB-split hover — the interaction signature */
.glitch-link {
  position: relative;
  display: inline-block;
}
.glitch-link::before,
.glitch-link::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  opacity: 0;
  clip-path: inset(0 0 0 0);
}
.glitch-link:hover::before {
  opacity: 0.7;
  color: var(--riso);
  transform: translate(2px, 0);
  animation: glitch-shift 0.3s steps(2, end) infinite;
}
.glitch-link:hover::after {
  opacity: 0.7;
  color: var(--moss);
  transform: translate(-2px, 0);
  animation: glitch-shift 0.35s steps(2, end) infinite reverse;
}
@keyframes glitch-shift {
  0%   { clip-path: inset(0 0 80% 0); }
  50%  { clip-path: inset(60% 0 10% 0); }
  100% { clip-path: inset(20% 0 50% 0); }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  min-height: clamp(280px, 42vh, 440px);
  scroll-margin-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: var(--edge);
  overflow: hidden;
}

.hero-title {
  position: relative;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6.5vw, 4.5rem);
  line-height: 0.9;
  margin: 0;
  letter-spacing: -0.01em;
}

.hero-tag {
  position: relative;
  max-width: 34ch;
  margin: 1rem 0 2rem;
  font-size: 1rem;
  color: var(--moss);
}

.hero-scroll {
  position: relative;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  border: 2px solid var(--ink);
  padding: 0.6em 1.2em;
  transition: background 0.15s ease, color 0.15s ease;
}
.hero-scroll:hover {
  background: var(--riso);
  color: var(--paper);
}

/* ==========================================================
   SECTIONS — shared
   ========================================================== */
.section {
  padding: clamp(32px, 6vw, 72px) var(--edge);
  border-bottom: 2px solid var(--ink);
  scroll-margin-top: var(--nav-h);
}
.section.alt { background: #EAF2FF; color: var(--ink); }
.section.alt ::selection { background: rgba(47, 111, 237, 0.32); color: var(--ink); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(20px, 4vw, 40px);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--riso);
}
.section h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5rem);
  margin: 0;
  line-height: 0.9;
}

/* ==========================================================
   GALLERY — asymmetric grid, slight rotation, breaks the grid
   ========================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.gallery-item {
  margin: 0;
  grid-column: span 1;
  transition: transform 0.25s ease;
}
.gallery-item:nth-child(4n+2) { grid-column: span 2; }
.gallery-item:nth-child(4n+4) { grid-column: span 2; }
.gallery-item:nth-child(9) { grid-column: span 2; }
.gallery-item:nth-child(12) { grid-column: span 2; }

.rot-1:hover { transform: rotate(-1deg) scale(1.02); }
.rot-2:hover { transform: rotate(1deg) scale(1.02); }
.rot-3:hover { transform: rotate(-0.6deg) scale(1.02); }

.placeholder-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 2px solid var(--ink);
  background: var(--ph, var(--moss));
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.gallery-item figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-top: 0.6rem;
  color: var(--moss);
}

/* ==========================================================
   MUSIC — featured release
   ========================================================== */
.featured-release {
  display: grid;
  grid-template-columns: minmax(200px, 340px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding-bottom: clamp(28px, 4vw, 48px);
  margin-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 2px solid var(--ink);
}

.featured-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(47, 111, 237, 0.45);
  background: var(--ph, var(--mustard));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 50px rgba(47, 111, 237, 0.12);
}
.featured-cover:hover { transform: scale(1.01) translateY(-2px); }

.featured-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 35, 58, 0.08) 0%, rgba(19, 35, 58, 0.22) 100%);
  opacity: 0.35;
}

.play-mark {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: rgba(19, 35, 58, 0.85);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--paper);
  box-shadow: 0 12px 30px rgba(19, 35, 58, 0.25);
}

.featured-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--riso);
  margin-bottom: 0.6rem;
}
.featured-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.9;
  margin: 0 0 0.4rem;
}
.featured-sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--moss);
  margin-bottom: 1.4rem;
}
.featured-audio {
  width: 100%;
  max-width: 420px;
  margin-bottom: 1.4rem;
}
.stream-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  padding: 0;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.stream-links a { border-bottom: 1px solid rgba(19, 35, 58, 0.18); }

.archive-label {
  margin-bottom: 1rem;
}
.archive-label .eyebrow { color: var(--moss); }

.now-playing-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(19, 35, 58, 0.12);
  border-radius: 18px;
  background: rgba(247, 250, 255, 0.86);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
}
.now-playing-banner.active {
  background: rgba(226, 244, 255, 0.98);
  border-color: var(--riso);
}
.now-playing-prefix {
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
}
.now-playing-title {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink);
}

/* ==========================================================
   MUSIC — upload panel
   ========================================================== */
.upload-panel {
  border: 2px solid var(--ink);
  padding: clamp(18px, 3vw, 24px);
  margin-bottom: 2rem;
  background: rgba(19, 35, 58, 0.03);
}
.upload-intro {
  margin: 0 0 1rem;
  font-family: var(--body);
  font-size: 1rem;
}
.upload-form {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr auto;
  gap: 0.9rem;
  align-items: end;
}
.upload-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.upload-field input {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 0.8rem 0.9rem;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
}
.upload-submit {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.upload-submit:hover {
  background: var(--riso);
  border-color: var(--riso);
}
.upload-status {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--riso);
}
.upload-hint {
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--moss);
}

/* ==========================================================
   MUSIC — archive list
   ========================================================== */
.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.track {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 2px solid var(--ink);
}
.track-num {
  font-family: var(--mono);
  color: var(--riso);
}
.track-meta { display: flex; flex-direction: column; gap: 0.6rem; }
.track-title-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.track-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(19, 35, 58, 0.12);
}
.track-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
}
.track-sub {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--moss);
}
.track audio { height: 32px; max-width: 260px; width: 40vw; }
.track-featured {
  background: rgba(19, 35, 58, 0.04);
}
.track-featured .track-title {
  color: var(--riso);
}
.track-featured .track-sub {
  color: var(--ink);
}
.music-note {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--moss);
}

/* ==========================================================
   FRAGMENTS — feed of short thoughts and sketches
   ========================================================== */
.fragment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem;
  border-top: 2px solid var(--ink);
}
.fragment {
  padding: 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
}
@media (max-width: 1080px) {
  .fragment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .fragment-list {
    grid-template-columns: 1fr;
  }
}
.fragment-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}
.fragment-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--moss);
}
.fragment-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--riso);
  border: 1px solid var(--riso);
  padding: 0.15rem 0.5rem;
}
.fragment-title {
  margin: 0.2rem 0 1rem;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.2;
}
.fragment-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 58ch;
}
.fragment audio {
  margin-top: 1rem;
  width: 100%;
  max-width: 420px;
}
.fragment-img {
  width: 220px;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}
.fragment-img.gallery-item-img,
.fragment-sketch img {
  width: 220px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid var(--ink);
  cursor: pointer;
}

/* ==========================================================
   ABOUT / CONTACT
   ========================================================== */
.about-body p, .contact-body { max-width: 60ch; font-size: 1.1rem; }

.contact-email {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  display: inline-block;
  margin-bottom: 2rem;
}
.social-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.social-list a { border-bottom: 1px solid var(--ink); }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem var(--edge);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--moss);
  border-top: 1px solid rgba(19, 35, 58, 0.1);
  background: rgba(247, 250, 255, 0.7);
}

/* ==========================================================
   LIGHTBOX
   ========================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(19, 35, 58, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--edge);
}
.lightbox[hidden] { display: none; }
.lightbox-inner { max-width: 640px; text-align: center; }
.lightbox-img {
  width: min(60vw, 480px);
  aspect-ratio: 4/5;
  margin: 0 auto;
  background: var(--moss);
  border: 2px solid var(--paper);
}
.lightbox-caption {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-top: 1rem;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: var(--edge);
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ==========================================================
   FOCUS VISIBILITY
   ========================================================== */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--riso);
  outline-offset: 2px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 780px) {
  .site-nav nav {
    display: none !important;
  }
  .site-nav nav.open {
    display: flex !important;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    z-index: 50;
  }
  .site-nav nav ul {
    flex-direction: column;
    width: 100%;
    padding: 1.5rem var(--edge);
    gap: 1.2rem;
  }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
  }

  .featured-release { grid-template-columns: 1fr; }
  .featured-cover { max-width: 260px; }

  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item,
  .gallery-item:nth-child(3n+1),
  .gallery-item:nth-child(3n+2),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5) {
    grid-column: span 1;
    margin-top: 0;
  }

  .upload-form {
    grid-template-columns: 1fr;
  }

  .track {
    grid-template-columns: 2rem 1fr;
    grid-template-areas:
      "num title"
      "audio audio";
  }
  .track-num { grid-area: num; }
  .track-meta { grid-area: title; }
  .track audio { grid-area: audio; width: 100%; max-width: none; margin-top: 0.5rem; }

  .fragment-img { width: 160px; }
}

/* ==========================================================
   NAV — current page indicator
   ========================================================== */
.glitch-link.current {
  color: var(--riso);
}
.glitch-link.current::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--riso);
  margin-top: 3px;
}

/* ==========================================================
   PAGE HEADER — used on music.html / art.html / writing.html
   ========================================================== */
.page-header {
  padding: clamp(36px, 6vw, 64px) var(--edge) 0;
  scroll-margin-top: var(--nav-h);
}
.page-header .eyebrow { display: block; margin-bottom: 0.6rem; }
.page-header h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.85;
  margin: 0;
}
.page-lede {
  max-width: 42ch;
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--moss);
}

/* ==========================================================
   HOME — quick links into the three sections
   ========================================================== */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}
.quick-link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 32px);
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.quick-link:hover {
  background: rgba(47, 111, 237, 0.08);
  color: var(--ink);
}
.quick-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--riso);
}
.quick-label {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
.quick-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--moss);
}
.quick-link:hover .quick-sub { color: var(--paper); opacity: 0.7; }

/* Real gallery images (once you swap in your own art) */
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 2px solid var(--ink);
  cursor: pointer;
}

/* ==========================================================
   ADMIN PAGE — lock gate
   ========================================================== */
.admin-gate {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: var(--edge);
  text-align: center;
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.98) 0%, rgba(231, 239, 250, 0.95) 100%);
  overflow-y: auto;
}
.admin-gate h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin: 0;
}
.admin-gate p {
  max-width: 46ch;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--moss);
}
.admin-gate-form {
  display: flex;
  gap: 0.8rem;
}
.admin-gate-form input {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  width: 220px;
}
.admin-gate-form button {
  border: 2px solid rgba(19, 35, 58, 0.12);
  background: var(--riso);
  color: var(--paper);
  padding: 0.8rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
}
.admin-gate-form button:hover { background: var(--riso); border-color: var(--riso); }
.admin-gate-error {
  min-height: 1.2rem;
  color: var(--riso);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.admin-warning {
  max-width: 52ch;
  border: 2px solid var(--riso);
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--ink);
  text-align: left;
}
.admin-gate-helper {
  max-width: 52ch;
  border: 2px dashed rgba(47, 111, 237, 0.7);
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  text-align: left;
  background: rgba(47, 111, 237, 0.08);
  box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.15);
}
.admin-gate-helper p {
  margin: 0 0 0.8rem;
}
.admin-gate-helper details {
  margin-top: 0.8rem;
}
.admin-gate-helper pre {
  background: rgba(19, 35, 58, 0.05);
  padding: 0.8rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.78rem;
}
.admin-gate-helper summary {
  cursor: pointer;
  font-weight: 700;
}

/* ==========================================================
   ADMIN PAGE — content generator
   ========================================================== */
.admin-body { padding: clamp(40px, 8vw, 80px) var(--edge) 120px; }
.admin-body[hidden] { display: none; }

.admin-tabs {
  display: flex;
  gap: 0.6rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 2.5rem;
}
.admin-tab {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.9rem 1.4rem;
  border: 1px solid rgba(19, 35, 58, 0.14);
  border-bottom: none;
  background: #FFFFFF;
  cursor: pointer;
  transform: translateY(2px);
  border-radius: 12px 12px 0 0;
}
.admin-tab.active {
  background: var(--riso);
  color: var(--paper);
  transform: translateY(0);
}

.admin-subtab {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--ink);
  background: none;
  cursor: pointer;
}
.admin-subtab.active {
  background: var(--riso);
  color: var(--paper);
}
.admin-subtab + .admin-subtab { border-left: none; }

.admin-panel[hidden] { display: none; }

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.admin-form .full { grid-column: 1 / -1; }
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-field input,
.admin-field textarea,
.admin-field select {
  border: 1px solid rgba(19, 35, 58, 0.16);
  background: #FFFFFF;
  padding: 0.9rem 1rem;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
  resize: vertical;
  border-radius: 10px;
}

.admin-generate {
  border: none;
  background: var(--riso);
  color: var(--paper);
  padding: 0.95rem 1.6rem;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 20px 40px rgba(47, 111, 237, 0.12);
}
.admin-generate:hover { background: var(--riso); border-color: var(--riso); }

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.admin-cancel {
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--moss);
  text-decoration: underline;
  cursor: pointer;
}
.admin-cancel:hover { color: var(--riso); }

.admin-form-status {
  min-height: 1.2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 0.8rem;
}

.admin-logout {
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.admin-instructions {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--moss);
}

/* ==========================================================
   ADMIN — overview (list everything, edit / delete)
   ========================================================== */
.overview-group { margin-bottom: 2.8rem; }
.overview-heading {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--riso);
  margin: 0 0 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);
}
.overview-list { display: flex; flex-direction: column; }
.overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(19, 35, 58,0.15);
}
.overview-summary {
  font-size: 0.92rem;
  line-height: 1.4;
  max-width: 60ch;
}
.overview-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}
.overview-handle {
  cursor: grab;
  color: var(--moss);
  margin-right: 0.75rem;
  font-size: 1rem;
  user-select: none;
}
.overview-row.drag-over {
  background: rgba(47, 111, 237, 0.08);
}
.overview-row.dragging {
  opacity: 0.4;
}
.overview-row {
  cursor: grab;
}
.admin-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--moss);
  margin: 0 0 1rem;
}
.track-group-heading {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.4rem 0 0.5rem;
}
.track-audio-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.track-audio-item {
  display: grid;
  gap: 0.5rem;
  background: rgba(19, 35, 58, 0.04);
  padding: 0.85rem 1rem;
  border-radius: 16px;
}
.track-audio-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--moss);
}
.track-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.track-title-row img.track-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
}
.track-title-row div {
  display: grid;
  gap: 0.35rem;
}
.track-title {
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.4;
  display: block;
}
.track-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--moss);
}
.overview-edit, .overview-delete {
  border: 1px solid var(--ink);
  background: none;
  padding: 0.4rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
}
.overview-edit:hover { background: var(--ink); color: var(--paper); }
.overview-delete:hover { background: var(--riso); border-color: var(--riso); color: var(--paper); }
.overview-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0.4rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}
.overview-download:hover { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }
.empty-note {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--moss);
}

@media (max-width: 780px) {
  .quick-links { grid-template-columns: 1fr; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-gate-form { flex-direction: column; }
  .admin-gate-form input { width: 100%; }
  .overview-row { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}
