/* Droply - Spotify-inspired dark theme: pure black base + Spotify green */
:root {
  --bg: #000000;
  --bg-2: #121212;
  --bg-3: #181818;
  --surface: #181818;
  --surface-2: #242424;
  --surface-3: #2a2a2a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #b3b3b3;
  --muted-2: #8a8a8a;
  --green: #1db954;
  --green-2: #1ed760;
  --green-dim: rgba(29, 185, 84, 0.14);
  --grad: linear-gradient(135deg, #1ed760 0%, #1db954 100%);
  --danger: #f23f4e;
  --danger-dim: rgba(242, 63, 78, 0.14);
  --ok: #1ed760;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --shadow-green: 0 10px 30px -12px rgba(29, 185, 84, 0.55);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shell-max: 1440px;
  --sidebar-w: 264px;
  --gutter: 24px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient green glow (Spotify style) */
body::before {
  content: "";
  position: fixed;
  inset: -30% 0 auto 0;
  height: 70vh;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(900px 460px at 8% 0%, rgba(29, 185, 84, 0.20), transparent 65%);
}
/* Lock scrolling while the drawer is open */
html.nav-open, html.nav-open body { overflow: hidden; }

a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  color: var(--green-2);
}
img, video { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 0.5em; font-weight: 750; }
h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(780px, 100% - 2.5rem); }
.center { text-align: center; }
section[id], #dropzone, #session-gallery { scroll-margin-top: 96px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--green); color: #04140b;
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- shell */
.shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: var(--gutter);
  width: min(var(--shell-max), 100%);
  margin-inline: auto;
  padding: var(--gutter) var(--gutter) 0;
}
.site-main { min-width: 0; padding-bottom: 104px; }
/* The page views already provide their own containers - avoid double padding. */
.site-main .container { width: 100%; max-width: none; margin-inline: 0; }
.site-main .container.narrow { max-width: 780px; margin-inline: auto; }

/* -------------------------------------------------------------- sidebar */
.sidebar {
  position: sticky;
  top: var(--gutter);
  align-self: start;
  height: calc(100vh - var(--gutter) * 2);
}
.sidebar-inner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 100%;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 10px; overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.brand-logo { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { font-size: 1.2rem; letter-spacing: -0.035em; line-height: 1; }
.brand-side { padding: 2px 6px 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }

.side-nav { display: grid; gap: 2px; }
.side-link {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.94rem;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s ease, background .15s ease;
}
.side-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.side-link.active { color: var(--text); background: var(--surface-2); }
.side-link.active::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: var(--green);
  margin-right: 9px;
  vertical-align: -3px;
}
.side-cta { width: 100%; margin-top: auto; }
.side-note { color: var(--muted-2); font-size: 0.76rem; margin: 12px 6px 0; line-height: 1.5; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, 0.6); }
.sidebar-backdrop[hidden] { display: none; }

/* ---------------------------------------------------------- header (mobile) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.88);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 12px; height: 62px; }
.site-nav { display: flex; gap: 1.1rem; align-items: center; margin-left: auto; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.site-nav a:hover, .site-nav a.active { color: var(--text); text-decoration: none; }

.menu-btn {
  display: none;
  width: 40px; height: 40px; flex: 0 0 40px;
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px;
  cursor: pointer; padding: 0; place-items: center;
}
.menu-icon { display: block; color: var(--text); }
.menu-btn[aria-expanded="true"] .menu-icon { color: var(--green-2); }
.menu-btn[aria-expanded="true"] .menu-line { d: path("M6 6l12 12M6 18L18 6"); }

/* ------------------------------------------------------------------ hero */
.hero { padding: 8px 0 44px; }
/* minmax(0, …) + min-width:0 on the items: without them a grid column grows
   to the min-content width of its content and overflows the viewport. */
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero-inner > * { min-width: 0; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
  font-weight: 700; color: var(--green-2); border: 1px solid rgba(29, 185, 84, 0.35);
  background: var(--green-dim); padding: 0.34rem 0.8rem; border-radius: var(--radius-pill);
  margin-bottom: 1.1rem;
}
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: 1.08rem; max-width: 46ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.2rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; }
.stat { display: grid; gap: 2px; }
.stat-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-label { font-size: 0.78rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; }

.hero-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
}

/* Hero side note (replaces the old second dropzone column) */
.hero-note { min-width: 0; }
.hero-note-card {
  background: linear-gradient(160deg, rgba(29, 185, 84, 0.12), rgba(18, 18, 18, 0.9) 55%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.hero-note-kicker {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-2); margin-bottom: 10px;
}
.hero-note-text { font-size: 1.15rem; font-weight: 700; line-height: 1.35; margin-bottom: 20px; }
.hero-note-links { display: grid; gap: 8px; }
.hero-note-link { color: var(--muted); font-size: 0.9rem; display: flex; gap: 8px; align-items: center; }
.hero-note-link code { flex: 0 0 auto; }

/* -------------------------------------------------------------- dropzone */
.dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: var(--bg-3);
  padding: 2.8rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--green); background: #1c1c1c;
}
.dropzone.dragover {
  border-color: var(--green-2); background: var(--green-dim); transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(29, 185, 84, 0.12);
}
.dz-icon {
  width: 76px; height: 76px; margin: 0 auto 1rem; display: grid; place-items: center;
  border-radius: 18px; background: var(--grad); color: #04140b; box-shadow: var(--shadow-green);
}
.dz-title { font-weight: 750; font-size: 1.15rem; margin: 0 0 0.2rem; }
.dz-sub { color: var(--muted-2); margin: 0 0 0.5rem; font-size: 0.88rem; }
.dz-cta { min-width: 168px; }
.dz-limits { color: var(--muted-2); font-size: 0.8rem; margin: 1rem 0 0; }

/* ---------------------------------------------------------- upload queue */
.upload-queue { display: grid; gap: 10px; margin-top: 12px; }
.upload-queue:empty { display: none; }
.uq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-3);
  padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  animation: rise .25s ease both;
}
.uq-thumb {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-2);
  display: grid; place-items: center; font-size: 1.3rem; overflow: hidden; border: 1px solid var(--border);
}
.uq-thumb img, .uq-thumb video { width: 100%; height: 100%; object-fit: cover; }
.uq-name { font-weight: 650; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq-sub { color: var(--muted-2); font-size: 0.8rem; }
.uq-progress { height: 5px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; margin-top: 0.5rem; }
.uq-bar { height: 100%; width: 0%; background: var(--grad); transition: width .18s ease; }
.uq-actions { display: flex; gap: 6px; align-items: center; }
.uq-error { color: #ff8b95; font-size: 0.82rem; margin-top: 0.25rem; }

/* --------------------------------------------------------- format chips */
.format-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  font-size: 0.7rem; letter-spacing: 0.05em; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 0.3rem 0.65rem; border-radius: var(--radius-pill);
}

/* -------------------------------------------------------------- sections */
.section { padding: 40px 0; }
.section-alt {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-block: 8px;
}
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head h2 { margin: 0 0 0.2rem; }
.section-head p { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.features-grid { grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); }
.feature { display: flex; flex-direction: column; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 1.35rem; margin-bottom: 14px;
}
.step { display: flex; flex-direction: column; }
.card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card h3 { margin-bottom: 0.4rem; }
.card p, .card li { color: var(--muted); font-size: 0.94rem; }
.card-num {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 1rem;
  background: var(--grad); font-weight: 800; color: #04140b;
}
.link-card code { font-size: 0.95rem; }
/* --------------------------------------------------------- upload section */
.upload-section { background: linear-gradient(180deg, rgba(29, 185, 84, 0.05), transparent 70%); }
.upload-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
}
.dropzone-wrap { min-width: 0; }

/* ---------------------------------------------------------- format table */
.format-list-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 20px;
  display: grid;
  gap: 2px;
}
.format-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.format-row:last-child { border-bottom: none; }
.format-name {
  font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--green-2);
}
.format-list { color: var(--muted); font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; overflow-wrap: anywhere; }

.cta-section { padding-top: 0; }
.cta { text-align: center; padding: 32px 0 48px; }
.cta p { color: var(--muted); }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: var(--radius-pill); padding: 0 1.3rem; min-height: 44px;
  font-weight: 700; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer;
  color: var(--text); background: transparent; white-space: nowrap;
  transition: transform .15s ease, filter .15s ease, background .15s ease, border-color .15s;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #04140b; box-shadow: var(--shadow-green); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-3); }
.btn-danger { border-color: rgba(242, 63, 78, 0.42); background: var(--danger-dim); color: #ff8b95; }
.btn-danger:hover { background: rgba(242, 63, 78, 0.24); }
.btn-sm { min-height: 34px; padding: 0 0.9rem; font-size: 0.83rem; }
.btn-lg { min-height: 50px; padding: 0 1.6rem; font-size: 1rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------- panels */
.panel {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.panel-head h1, .panel-head h2 { font-size: 1.1rem; margin: 0; }
.panel-danger { border-color: rgba(242, 63, 78, 0.28); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ------------------------------------------------------------- file page */
.file-page { padding: 8px 0 40px; }
.crumbs { color: var(--muted-2); font-size: 0.88rem; margin-bottom: 1rem; }
.file-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.file-header { margin-bottom: 1.2rem; }
.file-name { font-size: clamp(1.35rem, 3vw, 1.9rem); overflow-wrap: anywhere; margin-bottom: 0.5rem; }
.file-meta { color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.92rem; margin: 0; }
.dot { color: var(--muted-2); }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; padding: 0.3rem 0.65rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
.badge-image { color: #f472b6; border-color: rgba(244, 114, 182, 0.32); }
.badge-video { color: #60a5fa; border-color: rgba(96, 165, 250, 0.32); }
.badge-audio { color: #34d399; border-color: rgba(52, 211, 153, 0.32); }
.badge-document { color: #fbbf24; border-color: rgba(251, 191, 36, 0.32); }
.badge-archive { color: #fb7185; border-color: rgba(251, 113, 133, 0.32); }
.badge-code { color: #a5b4fc; border-color: rgba(165, 180, 252, 0.32); }
.badge-lock { color: #fbbf24; }
.file-title-row { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; flex-wrap: wrap; }

.preview-shell {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2);
  min-height: 220px; display: grid; place-items: center; overflow: hidden; margin-bottom: 1.4rem;
}
.preview { width: 100%; }
.preview img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; background:
  repeating-conic-gradient(rgba(255,255,255,0.03) 0% 25%, transparent 0% 50%) 50% / 24px 24px; }
.preview video { width: 100%; max-height: 70vh; background: #000; }
.preview audio { width: 100%; padding: 2rem 1rem; }
.preview-text { width: 100%; }
.preview-text pre {
  margin: 0; padding: 1.1rem; max-height: 480px; overflow: auto; font-family: var(--mono);
  font-size: 0.85rem; color: var(--muted); white-space: pre-wrap; word-break: break-word;
}
.preview-pdf embed { border: 0; min-height: 480px; width: 100%; }
.file-icon-block { text-align: center; padding: 3rem 1rem; }
.file-icon { font-size: 3.4rem; line-height: 1; margin-bottom: 0.7rem; }
.file-icon-label { font-weight: 650; }
.file-icon-note { color: var(--muted-2); font-size: 0.86rem; }

.link-list { display: grid; gap: 0.9rem; }
.link-row { display: grid; gap: 0.4rem; }
.link-kind { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.copy-row { display: flex; gap: 8px; }
.copy-row input {
  flex: 1; min-width: 0; background: var(--bg-3); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; font-family: var(--mono); font-size: 0.82rem;
}
.copy-row input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.18); }
.file-actions { display: flex; gap: 10px; margin-top: 1.2rem; flex-wrap: wrap; }
.center-actions { justify-content: center; }

.embed-grid { display: grid; gap: 0.8rem; }
.embed-field { display: grid; gap: 0.4rem; }
.embed-field > span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 1rem 1.2rem; margin: 0; }
.detail-grid dt { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.detail-grid dd { margin: 0.15rem 0 0; font-size: 0.94rem; overflow-wrap: anywhere; }
.detail-wide { grid-column: 1 / -1; }
.hash { font-size: 0.75rem; word-break: break-all; }

.file-side .panel { margin-bottom: 16px; }
.sticky-panel { position: sticky; top: 92px; }
.note-list { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.88rem; display: grid; gap: 0.5rem; }
.stack-form { display: grid; gap: 0.8rem; }
.stack-form label { display: grid; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.stack-form input, .stack-form select, .stack-form textarea {
  background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 0.65rem 0.8rem; font: inherit; min-height: 44px;
}
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.18);
}
.stack-actions { display: grid; gap: 0.6rem; }
.form-error { color: #ff8b95; font-size: 0.88rem; }

/* ------------------------------------------------------- filters + gallery */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  border-radius: var(--radius-pill); padding: 0.4rem 0.9rem; font-size: 0.83rem;
  cursor: pointer; font-weight: 650; min-height: 34px;
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { background: var(--green); border-color: var(--green); color: #04140b; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.g-item {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-2);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  animation: rise .3s ease both;
}
.g-item:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.g-thumb { height: 158px; background: var(--bg-3); display: grid; place-items: center; overflow: hidden; }
.g-thumb img, .g-thumb video { width: 100%; height: 100%; object-fit: cover; }
.g-thumb .g-icon { font-size: 2.4rem; opacity: 0.9; }
.g-body { padding: 12px 14px 14px; }
.g-name { font-weight: 650; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-meta { color: var(--muted-2); font-size: 0.78rem; display: flex; gap: 0.35rem; align-items: center; margin-top: 0.2rem; }
.g-actions { display: flex; gap: 6px; margin-top: 0.8rem; flex-wrap: wrap; }
.empty-state {
  border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 2.5rem; text-align: center;
  color: var(--muted); grid-column: 1 / -1; background: var(--bg-2);
}

/* --------------------------------------------------------- now playing bar */
.player-bar {
  position: fixed; z-index: 70;
  left: calc(max(0px, (100vw - var(--shell-max)) / 2) + var(--sidebar-w) + var(--gutter) * 2);
  right: calc(max(0px, (100vw - var(--shell-max)) / 2) + var(--gutter));
  bottom: var(--gutter);
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: rgba(24, 24, 24, 0.97); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px 16px; box-shadow: var(--shadow); backdrop-filter: blur(14px);
  animation: rise .28s ease both;
}
.player-bar[hidden] { display: none; }
.player-thumb {
  width: 56px; height: 56px; border-radius: 10px; background: var(--bg-3);
  display: grid; place-items: center; overflow: hidden; font-size: 1.4rem;
}
.player-thumb img { width: 100%; height: 100%; object-fit: cover; }
.player-meta { min-width: 0; }
.player-name { font-weight: 700; font-size: 0.93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-sub { color: var(--muted-2); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-progress { height: 4px; border-radius: var(--radius-pill); background: var(--surface-3); margin-top: 7px; overflow: hidden; }
.player-fill { height: 100%; width: 0; background: var(--grad); transition: width .2s ease; }
.player-actions { display: flex; gap: 8px; align-items: center; }
.player-actions[hidden] { display: none; }
.player-bar.is-error { border-color: rgba(242, 63, 78, 0.45); }
.player-bar.is-error .player-fill { background: var(--danger); }

/* ------------------------------------------------------------- skeletons */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 37%, rgba(255,255,255,0.06) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 10px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 124px; transform: translateX(-50%);
  background: rgba(24, 24, 24, 0.98); border: 1px solid var(--border);
  border-left: 4px solid var(--green); color: var(--text);
  padding: 0.75rem 1.2rem; border-radius: 10px; z-index: 80; box-shadow: var(--shadow);
  font-size: 0.92rem; max-width: min(90vw, 460px); text-align: center;
}
.toast[hidden] { display: none; }

/* --------------------------------------------------------- about / tables */
.page-hero { padding: 12px 0 20px; }
.fmt-table, .api-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.fmt-table th, .fmt-table td, .api-table td {
  text-align: left; padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top;
}
.fmt-table th {
  color: var(--muted-2); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
}
.fmt-table tr:last-child td { border-bottom: none; }
.fmt-table caption { caption-side: bottom; padding-top: 0.7rem; text-align: left; color: var(--muted-2); font-size: 0.85rem; }
.cat-image { color: #f472b6; } .cat-video { color: #60a5fa; } .cat-audio { color: #34d399; }
.cat-document { color: #fbbf24; } .cat-archive { color: #fb7185; } .cat-code { color: #a5b4fc; }
.cat-other { color: var(--muted); }
.fmt-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt {
  font-family: var(--mono); font-size: 0.76rem; padding: 0.2rem 0.5rem; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.api-table code { white-space: nowrap; }
.faq {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.1rem;
  background: var(--bg-2); margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--muted); margin: 0.6rem 0 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: #000; padding: 40px 0 48px; margin-top: 24px; }
.footer-inner { display: grid; gap: 1.2rem; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 56ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--green-2); }
.footer-note { color: var(--muted-2); font-size: 0.82rem; margin: 0; }

/* -------------------------------------------------------- focus visibility */
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ responsive */
@media (min-width: 1024px) {
  .site-header { display: none; }
  .menu-btn, .sidebar-backdrop { display: none !important; }
}

@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 24px; }
  .site-main { padding-bottom: 120px; }
  .menu-btn { display: grid; }
  .site-header .site-nav { display: none; }

  .sidebar {
    display: block; position: fixed; top: 0; left: 0; bottom: 0; z-index: 70;
    width: 280px; height: 100vh; padding: 12px;
    transform: translateX(-102%); transition: transform .25s ease;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  }
  .sidebar.open { transform: none; }
  .sidebar-inner { height: 100%; }

  .player-bar { left: 12px; right: 12px; bottom: 16px; }
  .toast { bottom: 92px; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-copy { text-align: left; }
  .file-layout { grid-template-columns: minmax(0, 1fr); }
  .sticky-panel { position: static; }
  .section-alt { padding: 28px 20px; border-radius: var(--radius); }
}

@media (max-width: 700px) {
  .player-bar { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .player-thumb { width: 44px; height: 44px; }
  .player-actions .btn-ghost { display: none; }
  .hero-stats { gap: 22px; }
  .stat-value { font-size: 1.15rem; }
}

@media (max-width: 560px) {
  .header-inner { height: 58px; }
  .shell { padding: 16px 14px 0; }
  .uq-item { grid-template-columns: auto minmax(0, 1fr); }
  .uq-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .copy-row { flex-direction: column; }
  .copy-row .btn { width: 100%; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
  .g-thumb { height: 120px; }
  .section { padding: 28px 0; }
  .format-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hero-note-card { padding: 20px; }
  .hero-stats { gap: 20px; }
}

@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;
  }
}
