/* ============================================================
   PRESSING PLANT LEDGER - design tokens
   Studio White / Carbon / Signal Blue / Press Grey / Stamp Red
   ============================================================ */
/* dwnturn - near-black / off-white / lavender (matches existing brand) */
:root {
  --white:  #0F0F12;   /* page background (token names kept from original build) */
  --carbon: #F2F0FA;   /* foreground */
  --signal: #CDC1F5;   /* lavender accent - buttons, playhead, active states */
  --press:  #26262C;   /* dividers, idle surfaces */
  --stamp:  #FF5C4D;

  --font-display: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --rule: 1px solid #33333B;
  --pad: clamp(16px, 4vw, 48px);
  --tap: 44px; /* minimum tap target */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--white);
  color: var(--carbon);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: 96px; /* room for sticky bar */
}

.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 12px var(--pad);
  border-bottom: var(--rule);
}
.brand-switcher {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
}
.brand-logo {
  text-decoration: none; line-height: 1;
  transition: filter 120ms linear;
}
.brand-logo.is-active { opacity: 1; cursor: default; }
.brand-logo.is-sister { opacity: 0.35; filter: grayscale(0.6); cursor: pointer; }
.brand-logo.is-sister:hover { opacity: 0.65; filter: grayscale(0.3); }
button.brand-logo {
  background: none; border: none; padding: 0; cursor: pointer; color: inherit;
}
button.brand-logo.is-active:disabled {
  cursor: default; opacity: 1; filter: none;
}
button.brand-logo.is-sister:not(:disabled) {
  cursor: pointer;
}
/* dwnturn wordmark — Archivo bold lowercase (active or greyed sister). */
.wordmark,
.brand-logo.wordmark,
#brand-logo-dwnturn.wordmark {
  grid-column: 1;
  min-width: 0;
  justify-self: start;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  font-size: 15px;
}
.brand-switcher .wordmark { grid-column: auto; justify-self: auto; }
/* Miharamafia wordmark — Permanent Marker uppercase (active or greyed sister). */
.brand-logo-mm,
.brand-logo.brand-logo-mm,
#brand-logo-mm {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 15px;
  text-shadow: 1px 1px 0 #333, -0.5px 0.5px 0 #666;
}
.brand-switcher .brand-logo-mm.is-sister {
  text-shadow: none;
  filter: grayscale(1);
}
.brand-switch-x { opacity: 0.35; font-size: 13px; user-select: none; }
.admin-header { align-items: center; }
.admin-header-end { gap: 16px; }
.admin-back-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}
.admin-back-link:hover { color: var(--signal); }
.admin-badge { opacity: 0.6; }
.header-end {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
}
.header-end > .socials,
.header-end > .header-actions,
.header-end > .cart-btn {
  margin-left: 0;
  flex-shrink: 0;
}
#socials,
#cart-btn {
  margin-left: 0;
}
.socials { display: flex; gap: 12px; align-items: center; flex-wrap: nowrap; flex-shrink: 0; width: max-content; }
.socials a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  white-space: nowrap;
}
.socials a:hover { color: var(--signal); }

/* ---------- masthead ---------- */
.masthead {
  padding: clamp(32px, 8vw, 96px) var(--pad) clamp(20px, 4vw, 48px);
  border-bottom: var(--rule);
}
.masthead-title {
  font-weight: 900;
  font-stretch: 110%;
  text-transform: lowercase;
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-size: clamp(44px, 12vw, 140px);
}
.masthead-index { margin-top: 16px; color: var(--carbon); }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden;
  border-bottom: var(--rule);
  background: var(--carbon);
  color: var(--white);
  padding: 8px 0;
}
.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-line {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  padding: 14px var(--pad) 0;
}
.tab {
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid #33333B;
  color: var(--carbon);
  opacity: 0.7;
}
.tab.is-active {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--white);
  opacity: 1;
  font-weight: 500;
}
.tab:not(.is-active):hover { opacity: 1; border-color: var(--carbon); }

/* ---------- beatstars panel ---------- */
.beatstars-panel { padding: 14px var(--pad) 0; }
.beatstars-panel iframe {
  width: 100%;
  height: 800px;
  border: 1px solid #33333B;
  display: block;
  background: #1A1A1F;
}

/* ---------- ledger ---------- */
.ledger { list-style: none; margin-top: 14px; }

.beat-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas:
    "idx cover main buy";
  align-items: center;
  gap: 0 16px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--press);
  position: relative;
}
.beat-row:last-child { border-bottom: var(--rule); }

.beat-idx {
  grid-area: idx;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--carbon);
  opacity: 0.5;
  width: 3ch;
}

.beat-cover-wrap {
  grid-area: cover;
  position: relative;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: block;
  width: 56px;
  height: 56px;
}

.beat-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--press);
  display: block;
}

.cover-play .cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 18, 0.48);
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
  border-radius: inherit;
}
.cover-play .cover-overlay svg {
  width: 22px;
  height: 22px;
  fill: var(--white);
}
.cover-overlay-lg svg {
  width: 36px;
  height: 36px;
}
.cover-play.is-playing .cover-overlay {
  opacity: 1;
}
@media (hover: hover) {
  .cover-play:hover .cover-overlay,
  .cover-play:focus-visible .cover-overlay {
    opacity: 1;
  }
}
.cover-play.is-playing .icon-play { display: none; }
.cover-play:not(.is-playing) .icon-pause { display: none; }

/* play surface = everything except the BUY button */
.beat-main {
  grid-area: main;
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr auto;
  align-items: center;
  gap: 16px;
  text-align: left;
  min-height: var(--tap);
  cursor: pointer;
}

.beat-title {
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.beat-tags {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: lowercase;
  opacity: 0.55;
  margin-top: 2px;
}

.beat-wave {
  width: 100%;
  height: 40px;
  display: block;
}

.beat-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
  text-align: right;
}
.beat-meta .price { display: block; font-weight: 500; }

.beat-buy {
  grid-area: buy;
  justify-self: end;
}

.btn-buy {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  background: var(--carbon);
  color: var(--white);
  min-height: var(--tap);
  min-width: 72px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-buy:hover { background: var(--signal); }

/* hover state (no hover dependency - purely additive) */
@media (hover: hover) {
  .beat-row:not(.is-playing):hover { background: #1A1A1F; }
  .beat-row:hover .beat-title { transform: translateX(4px); }
}
.beat-title { transition: transform 140ms ease; }

/* playing state */
.beat-row.is-playing { background: var(--carbon); color: var(--white); }
.beat-row.is-playing .beat-idx { opacity: 0.6; }
.beat-row.is-playing .btn-buy { background: var(--signal); }
.cover-play.is-playing,
.beat-row.is-playing .beat-cover-wrap {
  border-radius: 50%;
  overflow: hidden;
}
.beat-row.is-playing .cover-play .beat-cover {
  animation: vinyl-spin 3s linear infinite;
  border-radius: 50%;
}
@keyframes vinyl-spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

/* sold state */
.beat-row.is-sold .beat-main { cursor: default; }
.beat-row.is-sold .beat-title,
.beat-row.is-sold .beat-meta { opacity: 0.35; }
.sold-stamp {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  padding: 10px 14px;
  transform: rotate(-4deg);
}

.ledger-empty { padding: 32px var(--pad); }

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--pad);
}

/* ---------- sticky bar ---------- */
body.has-playbar { padding-bottom: 76px; }
body.has-playbar .site-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

.stickybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--carbon);
  color: var(--white);
  padding: 10px var(--pad);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  animation: bar-rise 220ms ease-out;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}
@keyframes bar-rise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.stickybar-toggle {
  width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.stickybar-toggle svg { width: 18px; height: 18px; fill: var(--white); }
.stickybar[data-state="paused"] .icon-pause { display: none; }
.stickybar[data-state="playing"] .icon-play { display: none; }
.stickybar-cover {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: none;
}
.stickybar-meta { flex: 1; min-width: 0; }
.stickybar-title {
  display: block;
  font-weight: 800;
  text-transform: lowercase;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stickybar-scrub { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.stickybar-wave { flex: 1; min-width: 0; height: 28px; display: block; cursor: pointer; }
.stickybar-time { font-size: 10px; opacity: 0.7; flex: none; white-space: nowrap; }
.stickybar .btn-buy { background: var(--signal); flex: none; }

/* ---------- license modal ---------- */
.license-modal {
  border: var(--rule);
  padding: 0;
  width: min(480px, calc(100vw - 24px));
  background: var(--white);
  color: var(--carbon);
}
.license-modal::backdrop { background: rgba(10, 10, 10, 0.55); }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: var(--rule);
}
.modal-beat-title {
  font-weight: 900;
  text-transform: lowercase;
  font-size: 18px;
  line-height: 1.1;
}
.modal-close {
  width: var(--tap);
  height: var(--tap);
  font-size: 26px;
  line-height: 1;
  flex: none;
}

.tier-table { border-bottom: var(--rule); }
.tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--tap);
  padding: 12px 20px;
  border-bottom: 1px solid var(--press);
  text-align: left;
}
.tier-row:last-child { border-bottom: none; }
.tier-row[aria-checked="true"] { background: var(--carbon); color: var(--white); }
.tier-name { font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: 0.04em; }
.tier-includes { font-family: var(--font-mono); font-size: 11px; opacity: 0.6; display: block; margin-top: 2px; }
.tier-price { font-family: var(--font-mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
.tier-row[disabled] { opacity: 0.35; }

.direct-perk { padding: 14px 20px 0; color: var(--signal); }

.checkout-rails {
  display: flex;
  gap: 10px;
  margin: 12px 20px 0;
}
.checkout-rails .btn-direct { flex: 1 1 0; margin: 0; }
.checkout-rails .btn-direct[hidden] { display: none !important; }

.btn-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 20px 0;
  min-height: 52px;
  background: var(--signal);
  color: var(--white);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-direct:hover { background: var(--carbon); }
.btn-direct:disabled { opacity: 0.5; cursor: progress; }
.btn-direct.is-disabled {
  background: color-mix(in srgb, var(--signal) 22%, var(--white));
  color: color-mix(in srgb, var(--carbon) 60%, transparent);
  cursor: not-allowed;
  pointer-events: none;
}

.btn-stripe {
  background: var(--carbon);
  color: var(--white);
}
.btn-stripe:hover { background: var(--signal); }
.btn-stripe.is-disabled {
  background: color-mix(in srgb, var(--carbon) 18%, var(--white));
  color: color-mix(in srgb, var(--carbon) 55%, transparent);
  cursor: not-allowed;
}
.btn-stripe.is-disabled:hover { background: color-mix(in srgb, var(--carbon) 18%, var(--white)); }

.btn-offer {
  background: var(--carbon);
  color: var(--white);
  text-align: center;
  text-decoration: none;
}
.btn-offer:hover { background: var(--signal); color: var(--black); }

.direct-hint {
  padding: 8px 20px 0;
  text-align: center;
  color: var(--carbon);
  opacity: 0.75;
  font-size: 11px;
  line-height: 1.4;
}

.wallet-hint { text-align: center; padding: 8px 20px 0; opacity: 0.55; font-size: 11px; }

.beatstars-slot { padding: 14px 20px 20px; text-align: center; }
.beatstars-or {
  margin: 4px 0 10px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
}
.btn-beatstars {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  background: var(--white);
  color: var(--carbon);
  border: 2px solid var(--carbon);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
  text-decoration: none;
}
.btn-beatstars:hover { background: var(--carbon); color: var(--white); }
.btn-beatstars.is-primary {
  background: var(--signal);
  color: var(--white);
  border-color: var(--signal);
  min-height: 52px;
  font-size: 15px;
  font-weight: 800;
}
.btn-beatstars.is-primary:hover { background: var(--carbon); border-color: var(--carbon); }
.beatstars-embed { margin-top: 12px; }
.beatstars-embed iframe { width: 100%; border: var(--rule); min-height: 320px; }

/* ---------- responsive (down to 360px) ---------- */
@media (max-width: 720px) {
  .beat-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "cover main buy";
  }
  .beat-idx { display: none; }
  .beat-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
  }
  .beat-meta { text-align: left; }
  .beat-meta .price { display: inline; margin-left: 12px; }
  .beat-wave { height: 32px; }
  .beat-cover-wrap { width: 48px; height: 48px; align-self: start; }
}

@media (max-width: 420px) {
  .masthead-title { font-size: clamp(36px, 13vw, 48px); }
  .stickybar { gap: 8px; }
}

/* sound kit rows: no vinyl spin, no BPM slot, longer title */
.beat-row.is-kit .beat-cover-wrap,
.beat-row.is-kit .cover-play.is-playing { border-radius: 0; overflow: visible; }
.beat-row.is-kit .cover-play .beat-cover { border-radius: 0; }
.beat-row.is-kit.is-playing .cover-play .beat-cover { animation: none; }
.beat-row.is-kit .beat-title { font-size: clamp(14px, 2vw, 18px); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn-buy, .btn-direct, .socials a, .btn-beatstars { transition: background-color 120ms linear, color 120ms linear, opacity 120ms linear; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   ADMIN PANEL (BeatStars-like)
   ============================================================ */

.admin-shell { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
  width: 220px;
  border-right: var(--rule);
  padding: 20px 0;
  background: #131318;
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: calc(100vh - 60px);
}
.admin-sidebar h2 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.5; padding: 0 20px; margin: 20px 0 8px;
}
.admin-sidebar h2:first-child { margin-top: 0; }
.admin-nav { display: flex; flex-direction: column; }
.admin-nav button {
  text-align: left; padding: 12px 20px; font-family: var(--font-mono);
  font-size: 13px; color: var(--carbon); opacity: 0.75; border-left: 3px solid transparent;
}
.admin-nav button:hover { opacity: 1; background: #1A1A20; }
.admin-nav button.is-active {
  opacity: 1; background: #1A1A20; border-left-color: var(--signal);
  font-weight: 600;
}
.admin-nav .count { opacity: 0.5; font-size: 11px; margin-left: 6px; }

.admin-main {
  flex: 1;
  padding: 28px clamp(20px, 4vw, 44px);
  max-width: 1080px;
  width: 100%;
}
.admin-main h1 {
  font-weight: 900; text-transform: lowercase;
  font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 4px;
}
.admin-sub {
  font-family: var(--font-mono); font-size: 12px; opacity: 0.6; margin-bottom: 22px;
}

/* metrics strip */
.admin-metrics {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px;
}
.metric-card {
  flex: 1; min-width: 100px;
  background: #131318; border: 1px solid #26262C; padding: 14px 16px;
}
.metric-card.is-placeholder { opacity: 0.75; }
.metric-val { display: block; font-weight: 900; font-size: 26px; line-height: 1; }
.metric-lbl { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.55; margin-top: 4px; }

/* bulk actions */
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #1A1A1F; border: 1px solid var(--signal); padding: 10px 14px;
  margin-bottom: 12px;
}
.bulk-count { font-size: 12px; opacity: 0.8; margin-right: auto; }

/* toolbar */
.toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar .select-all {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; opacity: 0.75; white-space: nowrap;
}
.toolbar .sort-select {
  background: #1A1A1F; border: 1px solid #33333B; color: var(--carbon);
  padding: 10px 12px; min-height: 40px; font-size: 12px;
}
.toolbar .search {
  flex: 1; min-width: 200px;
  background: #1A1A1F; border: 1px solid #33333B; color: var(--carbon);
  padding: 10px 12px; min-height: 40px; font: inherit;
}
.toolbar .search:focus-visible { outline: 2px solid var(--signal); }

/* item cards */
.item-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid #26262C; }
.item-card {
  display: grid;
  grid-template-columns: 28px 56px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid #26262C;
  transition: background-color 120ms linear;
}
.item-card:hover { background: #1A1A1F; }
.item-card.is-selected { background: #18181E; }
.item-card.is-selected:hover { background: #1E1E26; }
.item-card .row-check { display: flex; align-items: center; justify-content: center; }
.item-card img {
  width: 56px; height: 56px; object-fit: cover; background: var(--press); display: block;
}
.item-card .meta {
  min-width: 0;
}
.item-card .name { font-weight: 800; text-transform: lowercase; font-size: 17px; line-height: 1.1; }
.item-card .sub {
  font-family: var(--font-mono); font-size: 11px; opacity: 0.6; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-card .price {
  font-family: var(--font-mono); font-size: 12px; white-space: nowrap;
}
.item-card .actions { display: flex; gap: 8px; }
.item-card .badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--press);
  margin-left: 6px; opacity: 0.7;
}
.item-card .badge.sold { color: var(--stamp); border-color: var(--stamp); opacity: 1; }
.item-card .badge.kit { color: var(--signal); border-color: var(--signal); opacity: 1; }
.item-card .badge.featured { color: #FFD166; border-color: #FFD166; opacity: 1; }
.item-card.is-playing { background: #1A1A1F; }
.item-card.is-playing img { outline: 2px solid var(--signal); outline-offset: -2px; }
.item-card img { cursor: pointer; }
.item-player { margin-top: 6px; }
.admin-list-wave { width: 100%; height: 32px; display: block; cursor: pointer; }
.admin-time { font-size: 10px; opacity: 0.55; margin-top: 2px; display: block; letter-spacing: 0.04em; }
.admin-time:empty { display: none; }
.preview-player .admin-time { margin-bottom: 6px; }
.empty-state {
  padding: 40px 16px; text-align: center; opacity: 0.55;
  font-family: var(--font-mono); font-size: 13px;
}

/* ---------- form ---------- */
.form-panel {
  background: #131318; border: 1px solid #26262C; padding: 24px;
  margin-top: 22px;
}
.form-panel h2 { font-weight: 900; text-transform: lowercase; font-size: 22px; margin-bottom: 6px; }
.form-panel .h2-sub { font-family: var(--font-mono); font-size: 12px; opacity: 0.55; margin-bottom: 18px; }

.field { margin-bottom: 14px; display: flex; flex-direction: column; }
.field > label,
.field > .lbl {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; opacity: 0.65; margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%; background: #1A1A1F; border: 1px solid #33333B; color: var(--carbon);
  font: inherit; padding: 11px 12px; min-height: 44px;
}
.field textarea { min-height: 84px; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; }
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible { outline: 2px solid var(--signal); }
.field .hint { font-family: var(--font-mono); font-size: 11px; opacity: 0.45; margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* drop zones */
.dropzone {
  border: 1.5px dashed #444451; padding: 20px; text-align: center;
  min-height: 100px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: #16161B;
  font-family: var(--font-mono); font-size: 12px; opacity: 0.85;
  transition: border-color 120ms linear, background-color 120ms linear;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--signal); background: #191922; }
.dropzone .dz-file { color: var(--signal); font-weight: 600; word-break: break-all; }
.dropzone.has-file { border-style: solid; border-color: #33333B; }
.file-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.hint-inline { opacity: 0.5; font-size: 11px; font-weight: 400; text-transform: lowercase; }
.cover-preview { width: 72px; height: 72px; object-fit: cover; margin-top: 8px; border-radius: 4px; border: 1px solid #33333B; }
.preview-player { margin-top: 8px; }
.preview-player audio { width: 100%; height: 32px; display: block; }
.preview-load-status { padding: 4px 0 0; min-height: 0; font-size: 11px; }
.preview-load-status:empty { display: none; }
.dropzone-preview { width: 72px; height: 72px; object-fit: cover; margin-right: 12px; }

/* tier blocks */
.tier-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .tier-blocks { grid-template-columns: 1fr; } }
.tier-block {
  background: #16161B; border: 1px solid #26262C; padding: 14px;
}
.tier-block h3 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 4px;
}
.tier-block .tier-desc { font-family: var(--font-mono); font-size: 11px; opacity: 0.55; margin-bottom: 12px; }
.tier-block.is-exclusive { border-color: var(--signal); }
.tier-block.is-exclusive h3 { color: var(--signal); }

/* checkbox row */
.checkrow { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; }

/* admin checkboxes — custom styling for dark dwnturn + MM brand themes */
.checkrow input[type="checkbox"],
.item-card .row-check input,
.toolbar .select-all input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--carbon);
  border-radius: 3px;
  background: var(--white);
  cursor: pointer;
  vertical-align: middle;
}
.item-card .row-check input { width: 16px; height: 16px; }
.checkrow input[type="checkbox"]:checked,
.item-card .row-check input:checked,
.toolbar .select-all input[type="checkbox"]:checked,
.checkrow input[type="checkbox"]:indeterminate,
.item-card .row-check input:indeterminate,
.toolbar .select-all input[type="checkbox"]:indeterminate {
  background: var(--carbon);
  border-color: var(--carbon);
}
.checkrow input[type="checkbox"]:checked::after,
.item-card .row-check input:checked::after,
.toolbar .select-all input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.item-card .row-check input:checked::after {
  left: 3px;
  top: 0;
  width: 4px;
  height: 8px;
}
.checkrow input[type="checkbox"]:indeterminate::after,
.item-card .row-check input:indeterminate::after,
.toolbar .select-all input[type="checkbox"]:indeterminate::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--white);
}

/* buttons */
.btn {
  background: var(--signal); color: var(--white); border: none;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 13px; min-height: 44px; padding: 0 22px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover { background: var(--carbon); }
.btn.ghost { background: transparent; color: var(--carbon); border: 1px solid #33333B; }
.btn.ghost:hover { background: #1A1A1F; color: var(--signal); }
.btn.danger { background: transparent; color: var(--stamp); border: 1px solid var(--stamp); }
.btn.danger:hover { background: var(--stamp); color: var(--white); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 11px; }

.form-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px;
  padding-top: 18px; border-top: 1px solid #26262C;
}
.form-actions .spacer { flex: 1; }

.status {
  font-family: var(--font-mono); font-size: 12px; padding: 12px 0; min-height: 20px;
  color: var(--signal);
}
.status.error { color: var(--stamp); }

/* progress bar */
.progress {
  height: 4px; background: #26262C; margin-top: 10px; overflow: hidden;
}
.progress .bar {
  height: 100%; background: var(--signal); width: 0%;
  transition: width 200ms linear;
}

/* mobile admin */
@media (max-width: 780px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%; min-height: auto; position: static;
    border-right: none; border-bottom: var(--rule); padding: 12px 0;
  }
  .admin-nav { flex-direction: row; overflow-x: auto; }
  .admin-nav button { border-left: none; border-bottom: 3px solid transparent; }
  .admin-nav button.is-active { border-left: none; border-bottom-color: var(--signal); }
  .admin-sidebar h2 { display: none; }
  .item-card { grid-template-columns: 48px 1fr auto; grid-template-rows: auto auto; gap: 8px 12px; }
  .item-card .price { grid-column: 2; }
  .item-card .actions { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .file-slots { grid-template-columns: 1fr; }
}

/* featured hero carousel */
.featured {
  padding: clamp(24px, 5vw, 56px) var(--pad) 0;
  border-bottom: var(--rule);
}
.featured-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(8px, 2vw, 20px);
}
.featured-viewport {
  overflow: hidden;
  min-width: 0;
}
.featured-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.featured-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: min(440px, 44vw) 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-bottom: clamp(24px, 4vw, 40px);
}
.featured-cover-wrap {
  width: 100%;
  aspect-ratio: 1;
  border: var(--rule);
  padding: 0;
  background: none;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0;
  cursor: pointer;
}
.featured-cover-wrap .featured-cover {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 0;
  display: block;
}
.featured-cover-wrap .cover-overlay {
  border-radius: 0;
}
.featured-cover-wrap .cover-overlay svg {
  width: 48px;
  height: 48px;
}
/* Featured hero stays square — override global .cover-play.is-playing vinyl crop */
.featured-cover-wrap.cover-play.is-playing,
.featured-slide.is-playing .featured-cover-wrap {
  border-radius: 0;
  overflow: hidden;
}
.featured-cover-wrap.is-playing .featured-cover,
.featured-slide.is-playing .featured-cover {
  border-radius: 0;
  animation: none;
}
.featured-body { min-width: 0; }
.featured-label {
  font-size: 12px;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.featured-title {
  font-size: clamp(36px, 8vw, 80px);
  font-weight: 900;
  text-transform: lowercase;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-top: 10px;
}
.featured-title a {
  color: inherit;
  text-decoration: none;
}
.featured-title a:hover { color: var(--signal); }
.featured-meta {
  margin-top: 14px;
  opacity: 0.65;
  font-size: 14px;
}
.featured-player {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(20px, 3vw, 32px);
}
.featured-play {
  width: 56px;
  height: 56px;
  border: var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.featured-play svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.featured-slide:not(.is-playing) .featured-play .icon-pause { display: none; }
.featured-slide.is-playing .featured-play .icon-play { display: none; }
.featured-wave {
  flex: 1;
  height: 80px;
  min-width: 0;
  cursor: pointer;
}
.featured-buy { margin-top: clamp(18px, 2.5vw, 28px); }
.featured-nav {
  width: var(--tap);
  height: var(--tap);
  border: var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  flex-shrink: 0;
}
.featured-nav:hover { opacity: 1; color: var(--signal); }
.featured-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.featured-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-bottom: clamp(20px, 3vw, 36px);
}
.featured-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--carbon);
  background: transparent;
  padding: 0;
}
.featured-dot.is-active {
  background: var(--signal);
  border-color: var(--signal);
}
@media (max-width: 820px) {
  .featured-carousel { grid-template-columns: 1fr; }
  .featured-nav { display: none; }
  .featured-slide {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .featured-cover {
    max-width: min(360px, 88vw);
    margin: 0 auto;
  }
  .featured-player { justify-content: center; }
  .featured-wave { max-width: 100%; }
}

/* header account links */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0;
}
.header-end .header-actions { margin-left: 0; }
.site-header:not(:has(.header-end)) .header-actions { margin-left: auto; }
.header-link {
  font-size: 12px;
  text-decoration: none;
  opacity: 0.75;
}
.header-link:hover { color: var(--signal); opacity: 1; }

/* cart */
.cart-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: var(--rule);
  min-height: var(--tap);
  min-width: 72px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  box-sizing: border-box;
}
.cart-btn:hover { border-color: var(--signal); color: var(--signal); }
.btn-cart, .btn-cart-add {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: var(--rule);
  min-height: var(--tap);
  min-width: 72px;
  padding: 0 18px;
  cursor: pointer;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.btn-cart:hover, .btn-cart-add:hover { border-color: var(--signal); color: var(--signal); }
.btn-cart-add {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  text-align: center;
}
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  background: var(--signal);
  color: var(--white);
  border-radius: 999px;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 12px;
}
.modal-actions .btn-add-cart {
  width: 100%;
  text-align: center;
}
.modal-actions .btn-offer {
  width: 100%;
  text-align: center;
  margin: 0;
}
.modal-hint {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 11px;
  opacity: 0.55;
}
.cart-tier-select {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  background: var(--white);
  color: var(--carbon);
  border: var(--rule);
  padding: 4px 6px;
  max-width: 100%;
}
.beat-buy { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.featured-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cart-drawer {
  border: var(--rule);
  padding: 0;
  max-width: min(420px, 92vw);
  width: 100%;
}
.cart-drawer::backdrop { background: rgba(15, 15, 18, 0.55); }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: var(--rule);
}
.cart-head h2 { margin: 0; font-size: 14px; }
.cart-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
.cart-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: var(--rule);
}
.cart-row-cover { width: 48px; height: 48px; object-fit: cover; border: var(--rule); }
.cart-row-title { display: block; font-weight: 700; text-transform: lowercase; }
.cart-row-tier { display: block; font-size: 11px; opacity: 0.65; margin-top: 2px; }
.cart-remove {
  background: none;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.5;
  padding: 4px 8px;
}
.cart-remove:hover { opacity: 1; color: var(--signal); }
.cart-empty, .cart-total, .cart-hint { padding: 12px 20px; margin: 0; font-size: 12px; }
.cart-actions { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.cart-actions .btn-direct, .cart-actions .btn-beatstars { width: 100%; margin: 0; text-align: center; }

/* product pages */
.product-page { padding: var(--pad); max-width: 960px; margin: 0 auto; }
.product-back { display: inline-block; margin-bottom: 20px; text-decoration: none; opacity: 0.6; }
.product-hero { display: grid; grid-template-columns: min(320px, 40vw) 1fr; gap: clamp(20px, 4vw, 48px); }
.product-cover { width: 100%; aspect-ratio: 1; object-fit: cover; border: var(--rule); }
.product-cover-btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  width: 100%;
}
.product-cover-btn:hover .product-cover { opacity: 0.92; }
.product-cover-btn.is-playing {
  border-radius: 50%;
  overflow: hidden;
}
.product-cover-btn.is-playing .product-cover {
  border-radius: 50%;
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  animation: vinyl-spin 3s linear infinite;
}
.product-body h1 { font-size: clamp(28px, 6vw, 56px); font-weight: 900; text-transform: lowercase; }
.product-meta, .product-tags { opacity: 0.65; margin-top: 8px; }
.product-desc { margin-top: 16px; max-width: 52ch; }
.product-date { margin-top: 8px; font-size: 0.85rem; opacity: 0.65; }
.product-wave { width: 100%; height: 64px; margin: 20px 0; cursor: pointer; }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.admin-wave { width: 100%; height: 48px; margin-bottom: 8px; cursor: pointer; display: block; }
.beat-title { color: inherit; text-decoration: none; font-weight: 800; }
.beat-title:hover { color: var(--signal); }
.btn-free { margin-right: 6px; }

@media (max-width: 720px) {
  .product-hero { grid-template-columns: 1fr; }
  .header-end .socials { gap: 8px; }
  .header-end .socials a {
    min-width: 0;
    min-height: 32px;
    padding: 4px 6px;
    font-size: 11px;
  }
  .header-end .cart-btn {
    min-width: 52px;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 11px;
  }
}
