/* scimbl's iPod: an iPod classic (6th generation) drawn in CSS.
   The body is sized in container units (1cqw = 1% of the iPod's width) so it scales as one piece;
   the screen is laid out at its native 320 × 240 and scaled to fit the bezel. */

html, body { height: 100%; }

body.music {
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.back {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
  z-index: 3;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 0.2s;
}
.back:hover { color: var(--ink); text-decoration: none; }

.archive-toggle {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  z-index: 3;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.625;
  color: var(--ink-3);
  transition: color 0.2s;
}
.archive-toggle:hover { color: var(--ink); }

.stage {
  height: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 28px;
}

/* ---------- the body ---------- */

.ipod {
  /* Real proportions: 61.8 × 103.5 mm. Near 1:1 with the screen's native 320 px at the largest size. */
  --w: min(380px, calc((100svh - 150px) * 0.5971), calc(100vw - 32px));
  --rim: 0.55cqw;
  --r: 11.5cqw;

  --face-hi: #e3e4e6;
  --face: #d3d4d7;
  --face-lo: #c2c4c7;
  --grain: 0.22;
  --wheel-hi: #fbfbfc;
  --wheel: #f3f4f5;
  --wheel-lo: #e9eaec;
  --wheel-edge: rgba(0, 0, 0, 0.11);
  --key: #a4aab1;
  --key-down: #7d838a;
  --center-hi: #f4f4f5;
  --center-lo: #e6e7e9;
  --center-ring: #cdd0d4;

  position: relative;
  flex: none;
  width: var(--w);
  aspect-ratio: 61.8 / 103.5;
  container-type: inline-size;
  border-radius: var(--r);
  /* Polished steel back, seen as a thin bright rim around the front. */
  background:
    linear-gradient(180deg, #fbfbfb 0%, #c2c4c7 9%, #f2f3f4 22%, #aeb1b5 52%, #e9eaec 80%, #8f9296 100%);
  box-shadow:
    0 0.3cqw 0.6cqw rgba(0, 0, 0, 0.12),
    0 5cqw 9cqw -3cqw rgba(0, 0, 0, 0.3),
    0 14cqw 26cqw -8cqw rgba(0, 0, 0, 0.28);
  touch-action: none;
}

.ipod[data-finish="black"] {
  --face-hi: #353941;
  --face: #2a2d34;
  --face-lo: #1f2126;
  --grain: 0.35;
  --wheel-hi: #26282d;
  --wheel: #1d1f23;
  --wheel-lo: #17181b;
  --wheel-edge: rgba(0, 0, 0, 0.5);
  --key: #5f646c;
  --key-down: #8a9098;
  --center-hi: #25272c;
  --center-lo: #1b1c20;
  --center-ring: #121316;
}

.face {
  position: absolute;
  inset: var(--rim);
  border-radius: calc(var(--r) - var(--rim));
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 22% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(180deg, var(--face-hi), var(--face) 45%, var(--face-lo));
  box-shadow:
    inset 0 0.25cqw 0.2cqw rgba(255, 255, 255, 0.35),
    inset 0 -0.25cqw 0.3cqw rgba(0, 0, 0, 0.12),
    0 0 0 0.12cqw rgba(0, 0, 0, 0.18);
}

/* Anodized grain: fine noise, stretched a little so it reads as bead-blasted metal. */
.face::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 110px 110px;
  pointer-events: none;
}

/* ---------- screen ---------- */

.bezel {
  position: absolute;
  /* 1.5cqw of black around a 4:3 panel 82.6cqw wide. */
  left: 7.2cqw;
  top: 7.1cqw;
  width: 85.6cqw;
  height: 64.95cqw;
  border-radius: 2.4cqw;
  background: #060607;
  box-shadow:
    0 0 0 0.12cqw rgba(0, 0, 0, 0.35),
    0 0.15cqw 0.2cqw rgba(255, 255, 255, 0.35);
}
.ipod[data-finish="black"] .bezel { box-shadow: 0 0 0 0.12cqw rgba(0, 0, 0, 0.6), 0 0.15cqw 0.2cqw rgba(255, 255, 255, 0.06); }

.lcd {
  position: absolute;
  top: 1.5cqw;
  left: 1.5cqw;
  width: 320px;
  height: 240px;
  transform-origin: 0 0;
  overflow: hidden;
  border-radius: 1.5px;
  background: #fff;
  color: #000;
  font-family: 'Helvetica Neue', Helvetica, Inter, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  transition: filter 0.8s ease;
}
.lcd.dim { filter: brightness(0.42) contrast(0.95); transition-duration: 1.6s; }
.lcd.off { filter: brightness(0); }

/* The glass: a faint diagonal glare and an edge shadow where the panel sits under it. */
.glass {
  position: absolute;
  inset: 1.5cqw;
  border-radius: 0.5cqw;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.035) 44%, transparent 44.2%);
  box-shadow: inset 0 0 0.8cqw rgba(0, 0, 0, 0.35), inset 0 0.3cqw 0.4cqw rgba(0, 0, 0, 0.25);
}

/* Title bar */
.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#fdfdfd, #eaeaea 48%, #dcdcdc 52%, #cfcfcf);
  border-bottom: 1px solid #7e7e7e;
}
.bar-title {
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.bar-state {
  position: absolute;
  right: 31px;
  top: 4.5px;
  width: 10px;
  height: 10px;
}
.bar-state svg { display: block; width: 100%; height: 100%; }
.bar-battery {
  position: absolute;
  right: 5px;
  top: 4.5px;
  width: 21px;
  height: 10px;
  border: 1px solid #5c5c5c;
  border-radius: 2px;
  background: linear-gradient(#fff, #d8d8d8);
}
.bar-battery::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: #5c5c5c;
}
.bar-battery i {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: calc((100% - 2px) * var(--level, 1));
  border-radius: 1px;
  background: linear-gradient(#d8ff8a, #7fd61c 50%, #58b70a 51%, #86e02b);
}
.bar-battery.low i { background: linear-gradient(#ffb0a0, #e8391c 50%, #cf2a0e 51%, #ee5a3c); }

/* Views slide inside this area. */
.views {
  position: absolute;
  inset: 20px 0 0 0;
  overflow: hidden;
  z-index: 2;
}
.views.half { right: 160px; }

.view {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 220px;
  background: #fff;
  will-change: transform;
}
.view.split { background: linear-gradient(90deg, #fff 160px, transparent 160px); }
.view.split::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 160px;
  width: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent);
}

/* ---------- lists ---------- */

.rows {
  position: absolute;
  inset: 0 0 auto 0;
  will-change: transform;
  transition: transform 90ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.split .rows { right: 160px; }
.scrolls .rows { right: 9px; }

.row {
  position: relative;
  height: 24.5px;
  display: flex;
  align-items: center;
  padding: 0 7px 0 7px;
  font-size: 15.5px;
  letter-spacing: -0.012em;
  white-space: nowrap;
  overflow: hidden;
}
.row .label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 0 1px;
}
.row .label.marquee { text-overflow: clip; }
.row .label span { display: inline-block; }
.row .aside {
  flex: none;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
}
.row .speaker { flex: none; width: 13px; height: 11px; margin-left: 5px; }
.row .speaker svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.row .check { flex: none; width: 12px; height: 11px; margin-left: 6px; }
.row .chev {
  flex: none;
  width: 7px;
  height: 11px;
  margin-left: 7px;
  visibility: hidden;
}
.row .chev svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square; }
.row.on {
  color: #fff;
  background: linear-gradient(#80baf5, #4c97ea 42%, #2f7de0 58%, #3a86e4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 #1e62c2;
}
.row.on .chev { visibility: visible; }
.row.on .label { text-shadow: 0 -1px 0 rgba(0, 40, 110, 0.35); }

.scrollbar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 9px;
  border-left: 1px solid #9c9c9c;
  background: linear-gradient(90deg, #e6e6e6, #fbfbfb);
}
.scrollbar i {
  position: absolute;
  left: 1px;
  right: 1px;
  border-radius: 1px;
  background: linear-gradient(90deg, #9a9a9a, #6c6c6c);
  border: 1px solid #555;
  transition: transform 90ms cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: transform;
}

.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #777;
}

/* The big letter shown while spinning quickly through a sorted list. */
.letter {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 64px;
  height: 64px;
  margin: -24px 0 0 -32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(40, 40, 40, 0.72);
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---------- album art beside split menus ---------- */

.art {
  position: absolute;
  top: 20px;
  left: 160px;
  width: 160px;
  height: 220px;
  overflow: hidden;
  background: #111;
  z-index: 1;
}
.art img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  height: 250px;
  margin: -125px 0 0 -125px;
  opacity: 0;
  will-change: transform, opacity;
}

/* ---------- now playing ---------- */

.np .count {
  position: absolute;
  left: 10px;
  top: 8px;
  font-size: 11.5px;
  font-weight: 600;
}
.np .cover {
  position: absolute;
  left: 13px;
  top: 30px;
  width: 116px;
  height: 116px;
  background: #ddd;
}
.np .cover img, .np .reflect img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.np .cover img { transition: opacity 0.25s; }
.np .cover::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.np .reflect {
  position: absolute;
  left: 13px;
  top: 147px;
  width: 116px;
  height: 116px;
  transform: scaleY(-1);
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 32%);
  mask-image: linear-gradient(to top, #000 0%, transparent 32%);
}
.np .info {
  position: absolute;
  left: 141px;
  right: 10px;
  top: 52px;
}
.np .line {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 2px 0;
  margin-bottom: 5px;
}
.np .line.marquee { text-overflow: clip; }
.np .line span { display: inline-block; }
.np .t { font-size: 14.5px; font-weight: 700; }
.np .a { font-size: 13px; font-weight: 600; }
.np .al { font-size: 13px; font-weight: 500; color: #333; }

.np .meter {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 172px;
  height: 36px;
}
.np .track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  border: 1px solid #6f6f6f;
  border-radius: 1px;
  background: linear-gradient(#ececec, #fff 45%, #dedede);
  overflow: hidden;
}
.np .fill {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(#a3d1ff, #4d9bf0 45%, #2476dc 55%, #3b8ce9);
  will-change: transform;
}
.np .knob {
  position: absolute;
  top: -3px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #b6dcff, #2c7ee0);
  border: 1px solid #1c55a3;
  display: none;
}
.np .times {
  position: absolute;
  left: 0;
  right: 0;
  top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.np[data-mode="scrub"] .knob { display: block; }
.np[data-mode="scrub"] .fill { background: linear-gradient(#e4e4e4, #b9b9b9); }
.np[data-mode="scrub"] .track { overflow: visible; }

.np .vol {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  display: none;
  align-items: center;
  gap: 7px;
}
.np .vol svg { flex: none; height: 12px; fill: #333; }
.np .vol .track { position: relative; flex: 1; top: 0; }
.np .vol .fill { background: linear-gradient(#cfcfcf, #8d8d8d 50%, #777 51%, #9b9b9b); }
.np[data-mode="volume"] .vol { display: flex; }
.np[data-mode="volume"] .progress { display: none; }

.np .stars {
  position: absolute;
  left: 141px;
  top: 120px;
  font-size: 12px;
  color: #999;
  letter-spacing: 3px;
}

/* ---------- cover flow ---------- */

.flow {
  background: #000 !important;
  perspective: 520px;
  perspective-origin: 50% 40%;
  overflow: hidden;
}
.flow .stagefx {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.flow .cf {
  position: absolute;
  left: -56px;
  top: 6px;
  width: 112px;
  height: 112px;
  transform-style: preserve-3d;
  transition: transform 340ms cubic-bezier(0.2, 0.75, 0.25, 1), opacity 340ms;
  will-change: transform;
}
.flow .card {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(0.3, 0.65, 0.2, 1);
}
.flow .front, .flow .backside {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flow .front { background: #222; }
.flow .front img { display: block; width: 100%; height: 100%; }
.flow .cf .mirror {
  position: absolute;
  left: 0;
  top: 113px;
  width: 112px;
  height: 112px;
  transform: scaleY(-1);
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 45%);
  mask-image: linear-gradient(to top, #000, transparent 45%);
  transition: opacity 0.3s;
}
.flow .cf .mirror img { display: block; width: 100%; height: 100%; }
.flow .backside {
  transform: rotateY(180deg);
  background: #fff;
  color: #000;
  overflow: hidden;
  box-shadow: 0 0 0 1px #888;
}
.flow .backside header {
  height: 26px;
  padding: 3px 6px 0;
  background: linear-gradient(#f5f5f5, #d6d6d6);
  border-bottom: 1px solid #888;
  text-align: center;
}
.flow .backside header b, .flow .backside header span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.flow .backside header b { font-size: 9.5px; }
.flow .backside header span { font-size: 8.5px; font-weight: 500; margin-top: 2px; }
.flow .backside .trk {
  position: absolute;
  left: 0;
  right: 0;
  top: 27px;
  bottom: 0;
  overflow: hidden;
}
.flow .backside .trk div {
  transition: transform 90ms;
}
.flow .backside .trk p {
  margin: 0;
  height: 14.2px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  font-size: 9px;
  white-space: nowrap;
}
.flow .backside .trk p span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.flow .backside .trk p span:last-child { margin-left: 5px; font-weight: 600; }
.flow .backside .trk p.on { color: #fff; background: linear-gradient(#80baf5, #3a88e6 50%, #2c79dd); }
.flow.flipped .cf.mid .card { transform: translate3d(0, 14px, 30px) rotateY(180deg) scale(1.36); }
.flow.flipped .cf.mid .mirror { opacity: 0; }
.flow .cf.far { opacity: 0; }
.flow.flipped .cf:not(.mid) { opacity: 0.3; }
.flow .fcap {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  text-align: center;
  color: #fff;
  transition: opacity 0.2s;
}
.flow .fcap b, .flow .fcap span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.flow .fcap b { font-size: 13px; }
.flow .fcap span { margin-top: 4px; font-size: 11.5px; font-weight: 500; color: #b8b8b8; }
.flow.flipped .fcap { opacity: 0; }

/* ---------- plain screens: about, clock ---------- */

.sheet { padding: 14px 16px; font-size: 13px; }
.sheet h3 { margin: 0 0 12px; font-size: 15px; text-align: center; }
.sheet dl { margin: 0; display: grid; grid-template-columns: 1fr auto; row-gap: 7px; }
.sheet dt { font-weight: 600; }
.sheet dd { margin: 0; font-weight: 500; text-align: right; }
.sheet p { margin: 0 0 9px; font-weight: 500; line-height: 1.35; }

.clock {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: linear-gradient(#1a1d22, #000) !important;
  color: #fff;
}
.clock .face-c {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, #e4e4e4);
  box-shadow: 0 0 0 3px #3a3d43, 0 4px 14px rgba(0, 0, 0, 0.6);
}
.clock .face-c i {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  border-radius: 2px;
  background: #111;
}
.clock .face-c .h { width: 4px; height: 30px; margin-left: -2px; }
.clock .face-c .m { width: 3px; height: 45px; margin-left: -1.5px; }
.clock .face-c .s { width: 1px; height: 48px; margin-left: -0.5px; background: #d33; }
.clock .face-c b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #111;
}
.clock .face-c u {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 2px;
  height: 7px;
  margin-left: -1px;
  background: #555;
  transform-origin: 50% 55px;
}
.clock .city { font-size: 14px; }
.clock .when { font-size: 11px; font-weight: 500; color: #aaa; }

/* ---------- brick ---------- */

.brick canvas { display: block; }

/* ---------- click wheel ---------- */

.wheel {
  position: absolute;
  left: 50%;
  top: 87.6cqw;
  width: 61.5cqw;
  height: 61.5cqw;
  margin-left: -30.75cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, var(--wheel-hi), var(--wheel) 55%, var(--wheel-lo));
  box-shadow:
    inset 0 0.25cqw 0.3cqw rgba(255, 255, 255, 0.5),
    inset 0 -0.3cqw 0.4cqw var(--wheel-edge),
    0 0 0 0.15cqw var(--wheel-edge),
    0 0.2cqw 0.2cqw rgba(255, 255, 255, 0.35);
  touch-action: none;
  cursor: grab;
}
.wheel.turning { cursor: grabbing; }
.ipod[data-finish="black"] .wheel {
  box-shadow:
    inset 0 0.25cqw 0.3cqw rgba(255, 255, 255, 0.05),
    inset 0 -0.3cqw 0.4cqw rgba(0, 0, 0, 0.4),
    0 0 0 0.15cqw rgba(0, 0, 0, 0.45),
    0 0.2cqw 0.2cqw rgba(255, 255, 255, 0.05);
}

.key {
  position: absolute;
  color: var(--key);
  fill: currentColor;
  pointer-events: none;
  transition: color 0.12s;
}
.key.down { color: var(--key-down); transition: none; }
.key svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.key-menu {
  top: 5.4cqw;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Helvetica Neue', Helvetica, Inter, Arial, sans-serif;
  font-size: 4.25cqw;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding-left: 0.08em;
}
.key-prev, .key-next { top: 50%; width: 6.4cqw; height: 3.2cqw; margin-top: -1.6cqw; }
.key-prev { left: 5.6cqw; }
.key-next { right: 5.6cqw; }
.key-play { bottom: 5.4cqw; left: 50%; width: 6.4cqw; height: 3.2cqw; margin-left: -3.2cqw; }

.center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22.6cqw;
  height: 22.6cqw;
  margin: -11.3cqw 0 0 -11.3cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 80%, var(--center-hi), var(--center-lo));
  box-shadow:
    0 0 0 0.18cqw var(--center-ring),
    inset 0 0.3cqw 0.5cqw rgba(0, 0, 0, 0.06),
    0 -0.15cqw 0.3cqw rgba(0, 0, 0, 0.05),
    0 0.25cqw 0.3cqw rgba(255, 255, 255, 0.7);
  cursor: pointer;
  touch-action: none;
  transition: filter 0.12s;
}
.center:focus-visible { outline: none; }
.center.down { filter: brightness(0.93); transition: none; }
.ipod[data-finish="black"] .center {
  box-shadow:
    0 0 0 0.18cqw var(--center-ring),
    inset 0 0.3cqw 0.5cqw rgba(0, 0, 0, 0.3),
    0 0.25cqw 0.3cqw rgba(255, 255, 255, 0.04);
}
.ipod[data-finish="black"] .center.down { filter: brightness(1.25); }

.wheel:focus-visible { outline: none; }
.ipod:has(.wheel:focus-visible) .face { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 30%, transparent); }

/* ---------- caption ---------- */

.caption {
  flex: none;
  height: 20px;
  margin: 28px 0 0;
  max-width: min(420px, 100%);
  font-size: 12.5px;
  line-height: 20px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transition: opacity 0.6s;
}
.caption a { color: var(--ink-2); }
.caption a:hover { color: var(--ink); text-decoration: none; }
.caption .am { color: var(--ink-3); }

/* ---------- archive: every song as a plain list ---------- */

.archive {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 72px 24px 96px;
  background: var(--bg);
  -webkit-user-select: text;
  user-select: text;
  /* Rows fade out under the two links at the top. */
  -webkit-mask-image: linear-gradient(transparent 0, #000 64px);
  mask-image: linear-gradient(transparent 0, #000 64px);
  animation: archive-in 0.28s var(--ease);
}
.archive:focus { outline: none; }
body.archiving .stage { visibility: hidden; }
@keyframes archive-in {
  from { opacity: 0; transform: translateY(6px); }
}
.archive-inner {
  max-width: 560px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.5;
}
.archive-count { margin: 0; font-size: 13px; color: var(--ink-3); }
.archive-letter {
  margin: 28px 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}
.archive-group { list-style: none; margin: 0; padding: 0; }
.archive-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  width: calc(100% + 16px);
  margin: 0 -8px;
  padding: 6px 8px;
  border-radius: 6px;
  text-align: left;
  transition: background-color 0.15s;
}
.archive-row:hover { background: var(--hover); }
.archive-name { flex: 1; min-width: 0; }
.archive-title { color: var(--ink); }
.archive-artist { color: var(--ink-3); }
.archive-year {
  flex: none;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.archive-row.now .archive-title { font-weight: 500; }
.archive-row.now .archive-year { font-size: 0; }
.archive-row.now .archive-year::after { content: 'Playing'; font-size: 13px; color: var(--ink-2); }

/* ---------- phones: the page is the iPod ---------- */

@media (max-width: 540px) {
  .back, .archive-toggle { top: max(12px, env(safe-area-inset-top)); }
  .back { left: 18px; }
  .archive-toggle { right: 18px; }
  .stage { padding: calc(max(12px, env(safe-area-inset-top)) + 34px) 12px max(14px, env(safe-area-inset-bottom)); }
  .ipod { --w: min(calc(100vw - 24px), calc((100svh - 98px) * 0.5971)); }
  .archive { padding: 64px 18px 80px; }
  .caption { margin-top: 14px; font-size: 12px; }
}
