/* =============================================================================
   Allfield v2 — radio-log aesthetic
   ============================================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:      #ece4d3;
  --paper-2:    #dfd4bb;
  --paper-3:    #f3ecdc;
  --ink:        #14120d;
  --ink-2:      #1c1913;
  --ink-3:      #24201a;
  --cream:      #f4ecd5;
  --cream-2:    #d8cfb7;
  --cream-3:    #8a8170;

  --orange:     #d85a2b;
  --orange-dim: #a44220;
  --amber:      #e3a23a;
  --moss:       #7a8a4a;
  --ice:        #8ec4d4;

  --accent:     var(--orange);
  --accent-fg:  var(--ink);

  --radius-sm: 4px;
  --radius:    10px;
  --radius-lg: 16px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --grain: 0.18;
}

[data-accent="orange"] { --accent: #d85a2b; --accent-fg: #14120d; }
[data-accent="amber"]  { --accent: #e3a23a; --accent-fg: #14120d; }
[data-accent="moss"]   { --accent: #9eb05c; --accent-fg: #14120d; }
[data-accent="ice"]    { --accent: #8ec4d4; --accent-fg: #14120d; }

/* ---------- Themes ---------- */
[data-theme="charcoal"] {
  --bg:          #14120d;
  --bg-2:        #1c1913;
  --bg-3:        #24201a;
  --fg:          #ede5d0;
  --fg-muted:    #a49b87;
  --fg-subtle:   #6b6556;
  --border:      rgba(237, 229, 208, 0.10);
  --border-2:    rgba(237, 229, 208, 0.20);
  --border-3:    rgba(237, 229, 208, 0.35);
}
[data-theme="paper"] {
  --bg:          #ece4d3;
  --bg-2:        #e2d9c3;
  --bg-3:        #f5eedd;
  --fg:          #1a1612;
  --fg-muted:    #5a5048;
  --fg-subtle:   #7a6f63;
  --border:      rgba(26, 22, 18, 0.14);
  --border-2:    rgba(26, 22, 18, 0.24);
  --border-3:    rgba(26, 22, 18, 0.42);
}
[data-theme="oxblood"] {
  --bg:          #26100f;
  --bg-2:        #2f1513;
  --bg-3:        #3a1b19;
  --fg:          #f4e8d0;
  --fg-muted:    #c4a898;
  --fg-subtle:   #8a7868;
  --border:      rgba(244, 232, 208, 0.10);
  --border-2:    rgba(244, 232, 208, 0.22);
  --border-3:    rgba(244, 232, 208, 0.40);
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overscroll-behavior: none;
  overflow-anchor: none;
  letter-spacing: -0.005em;
}
body {
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; border: 0; background: transparent; color: inherit; cursor: pointer; }

/* =============================================================================
   Background layers
   ============================================================================= */
.bg-paper, .bg-grain, .bg-vignette, .bg-paint {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}

/* Shader-rendered paint canvas — see bg-shader init in app.js */
.bg-paint {
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.9;
  mix-blend-mode: screen;
  filter: saturate(1.15);
}
[data-theme="paper"] .bg-paint {
  mix-blend-mode: multiply;
  opacity: 0.7;
  filter: saturate(1.05);
}
.bg-paper {
  background:
    radial-gradient(circle at 18% 15%, rgba(216, 90, 43, 0.10), transparent 40%),
    radial-gradient(circle at 82% 85%, rgba(237, 229, 208, 0.04), transparent 45%);
}
[data-theme="paper"] .bg-paper {
  background:
    radial-gradient(circle at 18% 15%, rgba(106, 30, 30, 0.08), transparent 40%),
    radial-gradient(circle at 82% 85%, rgba(74, 93, 58, 0.06), transparent 50%);
}
.bg-vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.35) 100%);
  z-index: 1;
}
[data-theme="paper"] .bg-vignette {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(26,22,18,0.15) 100%);
}
.bg-grain {
  z-index: 2;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.75 0 0 0 1.3 -0.2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
[data-theme="paper"] .bg-grain {
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 0 0.03 0 0 0 1.4 -0.3'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* =============================================================================
   Page
   ============================================================================= */
.page {
  position: relative;
  z-index: 3;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  animation: page-emerge 1.4s var(--ease) 0.45s both;
}
@media (min-width: 640px) { .page { padding: 48px 28px 80px; } }
@keyframes page-emerge {
  from { opacity: 0; filter: blur(6px); }
  to   { opacity: 1; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
}

/* =============================================================================
   Identity block
   ============================================================================= */
.id {
  margin-bottom: 20px;
  animation: rise 700ms var(--ease) both;
}

.id-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
}
.id-call-label, .id-freq-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 3px;
}
.id-call-value, .id-freq-value {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg);
  font-weight: 500;
}
.id-call-value span { color: var(--accent); }
.id-freq { text-align: right; }

.id-body {
  display: block;
  margin-bottom: 24px;
}

.id-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg-subtle);
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.id-hint { white-space: nowrap; }
@media (max-width: 639px) {
  .id-handle {
    font-size: 10px;
    gap: 3px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}
.id-handle .jig {
  display: inline-block;
  transform-origin: 50% 70%;
  animation: jig 1.1s ease-in-out infinite;
}
.id-handle .jig-1 { animation-delay: 0s; }
.id-handle .jig-2 { animation-delay: 0.18s; }
.id-handle .jig-3 { animation-delay: 0.36s; }
@keyframes jig {
  0%   { transform: translateY(0)    rotate(-4deg); }
  25%  { transform: translateY(-2px) rotate(3deg); }
  50%  { transform: translateY(0)    rotate(-3deg); }
  75%  { transform: translateY(-2px) rotate(4deg); }
  100% { transform: translateY(0)    rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .id-handle .jig { animation: none; }
}
.id-hash { color: var(--accent); }
.id-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(36px, 9vw, 56px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  margin-bottom: 10px;
  color: var(--fg);
}
.id-bio {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 42ch;
  text-wrap: pretty;
}
.id-bio em {
  font-style: normal;
  color: var(--fg);
  font-weight: 500;
}

/* Pills */
.pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--fg);
  background: var(--bg-2);
  transition: border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.pill svg { flex-shrink: 0; }
.pill .pill-mask {
  display: block;
  width: 22px;
  height: 22px;
  background-color: currentColor;
  transition: background-color 160ms var(--ease);
}
.pill .ra-mask {
  -webkit-mask: url('assets/logo-ra.png') center / contain no-repeat;
          mask: url('assets/logo-ra.png') center / contain no-repeat;
}
.pill .cham-mask {
  -webkit-mask: url('assets/logo-chameleon.png') center / contain no-repeat;
          mask: url('assets/logo-chameleon.png') center / contain no-repeat;
}
.pill img {
  flex-shrink: 0;
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* =============================================================================
   Next event
   ============================================================================= */
.next {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 10px 10px 13px;
  margin-bottom: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--fg);
  position: relative;
  overflow: hidden;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}
.next::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.next:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.next-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}
.next-body { min-width: 0; }
.next-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 500;
}
.next-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-arrow {
  width: 16px;
  height: 16px;
  color: var(--fg-subtle);
  margin-right: 6px;
  flex-shrink: 0;
  transition: color 160ms var(--ease);
}
.next:hover .next-arrow { color: var(--accent); }

/* =============================================================================
   Mixes — cards view
   ============================================================================= */
.mixes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

/* timeline rail visible in cards view */
.mixes.show-rail.cards::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 10px;
  bottom: 40px;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--border-2) 8%, var(--border-2) 92%, transparent 100%);
  z-index: 0;
}

/* Year divider */
.yr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  padding-left: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  position: relative;
}
.mixes > .yr:first-child {
  margin-top: 0;
}
.yr::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--bg);
  transform: translateY(-50%);
  z-index: 1;
}
.yr-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.yr-num {
  color: var(--fg);
  font-weight: 500;
  font-size: 12px;
}

/* Card */
.mix {
  display: grid;
  grid-template-columns: 18px 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 14px 10px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), background 180ms var(--ease);
  animation: rise 600ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms + 120ms);
}
.mix:hover {
  border-color: var(--border-3);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.mix:hover .mix-arrow { transform: translateX(2px); color: var(--accent); }
.mix:hover .mix-play { opacity: 1; }

.mix-rail {
  position: relative;
  height: 100%;
  min-height: 72px;
}
.mix-rail::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border-3);
  transform: translateY(-50%);
}
.mix[data-series="cham"] .mix-rail::before { background: var(--accent); border-color: var(--accent); }
.mix[data-series="live"] .mix-rail::before { background: var(--fg); border-color: var(--fg); }

.mix-art {
  width: 72px; height: 72px;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-3);
  box-shadow: 0 0 0 1px var(--border-2);
  flex-shrink: 0;
}
.mix-art img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.mix-art::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.6;
  pointer-events: none;
}
.mix-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  color: white;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}
.mix-play svg { width: 20px; height: 20px; }

.mix-body { min-width: 0; }
.mix-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.mix-code {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}
.mix-date { white-space: nowrap; flex-shrink: 0; }
.mix-meta { flex-wrap: nowrap; }
.mix-date { color: var(--fg-muted); }
.mix-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.mix-title {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}
.mix-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--fg-subtle);
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.mix-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  color: var(--fg-muted);
  border: 1px solid var(--border-2);
}

.mix-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.mix-arrow {
  width: 16px; height: 16px;
  color: var(--fg-subtle);
  transition: transform 200ms var(--ease), color 160ms var(--ease);
}

/* =============================================================================
   Log (table) view
   ============================================================================= */
.mixes.log {
  display: block;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.mixes.log::before { display: none !important; }
.mixes.log .yr {
  padding: 10px 16px;
  margin: 0;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.mixes.log .yr::before { display: none; }
.mixes.log .yr:first-child { border-top: 0; }

.mixes.log .mix {
  display: grid;
  grid-template-columns: 90px 1fr 110px;
  gap: 14px;
  padding: 9px 16px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  animation: none;
  min-height: 38px;
  align-items: center;
}
.mixes.log .mix:hover {
  background: var(--bg-3);
  transform: none;
}
.mixes.log .mix-rail { display: none; }
.mixes.log .mix-art { display: none; }
.mixes.log .mix-sub { display: none; }

/* In log view the mix-body becomes the title column; the meta (code + date)
   is split and hoisted into its own columns via CSS grid positioning. */
.mixes.log .mix-body {
  grid-column: 2 / 3;
  min-width: 0;
}
.mixes.log .mix-meta {
  display: contents; /* let children participate in the grid */
}
.mixes.log .mix-code {
  grid-column: 1 / 2;
  grid-row: 1;
  font-size: 10px;
  align-self: center;
}
.mixes.log .mix-date {
  grid-column: 1 / 2;
  grid-row: 1;
  font-size: 10px;
  color: var(--fg-muted);
  align-self: center;
}
.mixes.log .mix-dot { display: none; }
.mixes.log .mix-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mixes.log .mix-right {
  grid-column: 3 / 4;
  justify-content: flex-end;
}
.mixes.log .mix-arrow { display: none; }
.mixes.log .mix-tag { font-size: 8.5px; padding: 2px 6px; }

/* Platform badge (SoundCloud / Mixcloud / YouTube) */
.mix-plat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  color: var(--fg-subtle);
  border: 1px solid var(--border-2);
  background: var(--bg-2);
  flex-shrink: 0;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.mix-plat[data-plat="soundcloud"] { color: #ff7700; }
.mix-plat[data-plat="mixcloud"]   { color: #52aadc; }
.mix-plat[data-plat="youtube"]    { color: #ff3b30; }
.mix:hover .mix-plat {
  border-color: currentColor;
  background: transparent;
}
.mixes.log .mix-plat { width: 18px; height: 18px; }
.mixes.log .mix-plat svg { width: 10px; height: 10px; }

/* =============================================================================
   Footer
   ============================================================================= */
.foot {
  margin-top: 48px;
  font-family: 'JetBrains Mono', monospace;
}
.foot-line {
  height: 1px;
  background: var(--border);
  margin-bottom: 20px;
  position: relative;
}
.foot-line::before {
  content: '';
  position: absolute;
  left: 0; top: -3px;
  width: 40px; height: 7px;
  background: var(--accent);
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.foot-mark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-transform: lowercase;
  color: var(--fg);
  line-height: 1;
}
.foot-mark span { color: var(--accent); }
.foot-sub {
  margin-top: 6px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.foot-meta {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  text-align: right;
  line-height: 1.6;
}

/* =============================================================================
   Tweaks panel
   ============================================================================= */
.tweaks {
  position: fixed;
  bottom: 16px; right: 16px;
  z-index: 100;
  background: var(--bg-2);
  border: 1px solid var(--border-3);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.5);
  font-family: 'Space Grotesk', sans-serif;
  width: 272px;
  max-width: calc(100vw - 32px);
  display: none;
  flex-direction: column;
  gap: 14px;
}
.tweaks.open { display: flex; }
.tw-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.tw-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
}
.tw-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.tw-row { display: flex; flex-direction: column; gap: 6px; }
.tw-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.tw-val { color: var(--fg); letter-spacing: 0.04em; }
.tw-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 4px;
  border: 1px solid var(--border-2);
  color: var(--fg);
  transition: all 120ms var(--ease);
}
.chip:hover { border-color: var(--border-3); }
.chip.active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.chip.swatch {
  width: 28px; height: 28px;
  padding: 0;
  background: var(--sw);
  border: 2px solid var(--border);
}
.chip.swatch.active {
  border-color: var(--fg);
  box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3px var(--fg);
}

.tw-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--border-2);
  border-radius: 1px;
  outline: none;
}
.tw-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-2);
}
.tw-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-2);
}
.tw-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--fg);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tw-switch {
  width: 30px; height: 16px;
  border-radius: 10px;
  background: var(--border-3);
  position: relative;
  transition: background 160ms var(--ease);
}
.tw-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-2);
  transition: left 160ms var(--ease);
}
.tw-toggle input { display: none; }
.tw-toggle input:checked + .tw-switch { background: var(--accent); }
.tw-toggle input:checked + .tw-switch::after { left: 16px; background: var(--bg); }

/* =============================================================================
   Animations / responsive
   ============================================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .id, .mix {
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .page { padding: 20px 14px 48px; }
  .id-top { margin-bottom: 20px; }
  .id-body { grid-template-columns: 72px 1fr; gap: 14px; }
  .id-name { margin-bottom: 6px; letter-spacing: -0.045em; }
  .pills { gap: 5px; flex-wrap: wrap; }
  .next { grid-template-columns: 48px 1fr auto; gap: 10px; padding: 8px 8px 8px 11px; }
  .next-img { width: 48px; height: 48px; }
  .next-title { font-size: 14px; }

  .mix {
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    padding: 8px 12px 8px 8px;
  }
  .mix-rail { display: none; }
  .mix-art { width: 56px; height: 56px; }
  .mix-title { font-size: 13.5px; }
  .mix-meta { font-size: 10.5px; gap: 6px; }
  .mix-tag { font-size: 8.5px; padding: 2px 5px; letter-spacing: 0.14em; }
  .mix-plat { width: 20px; height: 20px; }
  .mix-right { gap: 8px; }
  .mix-arrow { display: none; }

  .mixes.log .mix { grid-template-columns: 1fr 84px; gap: 10px; padding: 10px 12px; }
  .mixes.log .mix-date { display: none; }
  .mixes.log .mix-body { grid-column: 1 / 2; }
  .mixes.log .mix-right { grid-column: 2 / 3; }

  .yr { margin: 14px 0 6px; }
  .foot-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .foot-meta { text-align: left; }
}

@media (max-width: 400px) {
  .page { padding: 16px 12px 40px; }
  .id-top .id-freq { display: none; }
  .mix { grid-template-columns: 48px 1fr auto; gap: 10px; padding: 8px 10px 8px 8px; }
  .mix-art { width: 48px; height: 48px; }
}
