/* Click Wheel — the iPod device + home page */
.ipod-stage { position: relative; display: grid; justify-items: center; gap: 14px; }
.ipod {
  --face: #fbfbf8; --face2: #ececE8; --wheel: #f1f1ed; --ring: #d3d3cc; --label: #a2a29b; --center: #fdfdfb; --edge: #dcdcd5;
  position: relative; width: 290px; height: 476px; border-radius: 34px;
  background: linear-gradient(160deg, var(--face) 0%, var(--face) 45%, var(--face2) 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.55),
    inset 0 -6px 14px rgba(0,0,0,.08),
    0 0 0 3px var(--edge),
    0 0 0 5px #c9c9c9,
    0 24px 50px rgba(0,0,0,.28), 0 6px 14px rgba(0,0,0,.2);
  user-select: none; -webkit-user-select: none; touch-action: manipulation; outline: none;
  transition: transform .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.ipod:focus-visible { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55), 0 0 0 3px var(--edge), 0 0 0 7px var(--cyan), 0 24px 50px rgba(0,0,0,.28); }
.ipod::after { /* top sheen */
  content: ""; position: absolute; inset: 0; border-radius: 34px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 32%);
}
.ipod-jack { position: absolute; top: -9px; left: 34px; width: 22px; height: 9px; border-radius: 4px 4px 0 0; background: #bfbfbf; }
.ipod-hold {
  position: absolute; top: -12px; right: 34px; width: 46px; height: 12px; border-radius: 6px 6px 0 0; border: 0; padding: 0;
  background: #c7c7c7; cursor: pointer; z-index: 2;
}
.ipod-hold::after { content: ""; position: absolute; top: 3px; left: 5px; width: 16px; height: 7px; border-radius: 3px; background: #f6f6f6; transition: left .15s ease; }
.ipod-hold[aria-pressed="true"]::after { left: 25px; background: #ff7a00; }

/* Screen */
.ipod-screen {
  position: absolute; left: 22px; top: 22px; width: 246px; height: 186px; border-radius: 6px; overflow: hidden;
  background: #fff; color: #000; box-shadow: 0 0 0 3px #1b1b1b, 0 0 0 4px rgba(0,0,0,.3);
  font: 500 14px/1 "Inter", system-ui, sans-serif;
}
.scr-bar {
  height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
  background: linear-gradient(#fdfdfd, #d9dde3); border-bottom: 1px solid #9ba3ad; font-weight: 700; font-size: 12.5px;
}
.scr-title { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.scr-ico { width: 22px; display: flex; align-items: center; }
.scr-ico.right { justify-content: flex-end; }
.scr-ico svg { width: 13px; height: 13px; }
.batt { width: 20px; height: 10px; border: 1.5px solid #333; border-radius: 2px; position: relative; padding: 1px; }
.batt::before { content: ""; display: block; height: 100%; width: 100%; background: linear-gradient(#9be15d, #3fae2a); border-radius: 1px; }
.batt::after { content: ""; position: absolute; right: -4px; top: 2px; width: 2px; height: 4px; background: #333; border-radius: 0 1px 1px 0; }
.scr-body { position: absolute; top: 22px; left: 0; right: 0; bottom: 0; overflow: hidden; }
.pane { position: absolute; inset: 0; background: #fff; }
.pane.enter-right { animation: paneInR .18s ease-out; }
.pane.enter-left { animation: paneInL .18s ease-out; }
@keyframes paneInR { from { transform: translateX(100%); } to { transform: none; } }
@keyframes paneInL { from { transform: translateX(-100%); } to { transform: none; } }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  height: 23px; display: flex; align-items: center; padding: 0 16px 0 7px; position: relative; white-space: nowrap;
  font-size: 14px; font-weight: 600;
}
.list li span.lbl { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.list li span.rt { font-weight: 500; font-size: 12px; color: #666; margin-left: 6px; }
.list li.chev::after { content: ""; position: absolute; right: 7px; top: 8px; width: 5px; height: 5px; border-top: 2px solid #555; border-right: 2px solid #555; transform: rotate(45deg); }
.list li.sel { background: linear-gradient(#5fb0ff, #2a7ee8); color: #fff; }
.list li.sel span.rt { color: #e6f0ff; }
.list li.sel.chev::after { border-color: #fff; }
.list li.dim { color: #999; }
.scrollbar { position: absolute; right: 0; top: 0; bottom: 0; width: 7px; background: #e8eaee; border-left: 1px solid #c9ced6; }
.scrollbar i { position: absolute; left: 1px; right: 1px; background: linear-gradient(90deg, #6aa8f0, #2a7ee8); border-radius: 2px; }
.has-scroll .list li { padding-right: 20px; }
.has-scroll .list li.chev::after { right: 14px; }

/* Now playing */
.np { padding: 6px 8px; display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: start; height: 100%; }
.np-art { width: 74px; height: 74px; border-radius: 3px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.35); margin-top: 4px; }
.np-art svg { width: 100%; height: 100%; display: block; }
.np-meta { min-width: 0; padding-top: 2px; }
.np-count { font-size: 11px; color: #555; margin-bottom: 5px; }
.np-t { font-weight: 800; font-size: 13.5px; line-height: 1.2; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-a, .np-al { font-size: 12px; line-height: 1.25; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-bottom { position: absolute; left: 8px; right: 8px; bottom: 9px; }
.np-bar { height: 9px; border: 1px solid #7d8794; background: linear-gradient(#fff, #e6e9ee); position: relative; border-radius: 1px; }
.np-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#8ec5ff, #2a7ee8); }
.np-bar.scrub i::after { content: ""; position: absolute; right: -5px; top: -3px; width: 9px; height: 13px; background: #2a7ee8; transform: rotate(45deg) scale(.7); }
.np-bar.vol i { background: linear-gradient(#bfbfbf, #6a6a6a); }
.np-times { display: flex; justify-content: space-between; font-size: 11px; margin-top: 3px; font-weight: 600; }
.np-mode { position: absolute; left: 8px; right: 8px; bottom: 36px; font-size: 10.5px; color: #555; text-align: center; height: 12px; }
.np-viz { display: flex; gap: 2px; align-items: flex-end; height: 16px; margin-top: 6px; }
.np-viz b { width: 4px; background: #2a7ee8; border-radius: 1px; height: 3px; transition: height .12s linear; }

/* Text panes (notes, quiz, clock) */
.txt { padding: 8px 10px; font-size: 13px; line-height: 1.35; font-weight: 500; }
.txt h4 { margin: 0 0 5px; font-size: 14px; font-weight: 800; }
.txt-scroll { position: absolute; inset: 0; overflow: hidden; }
.txt-inner { transition: transform .12s ease-out; }
.center-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10px; font-weight: 700; }
.clock-big { font-size: 40px; font-weight: 800; letter-spacing: -1px; text-align: center; margin-top: 14px; font-variant-numeric: tabular-nums; }
.clock-sub { text-align: center; font-size: 12px; color: #444; }
.clock-age { margin: 12px 10px 0; padding-top: 8px; border-top: 1px solid #ccd; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.quiz-q { padding: 5px 8px 4px; font-size: 12.5px; font-weight: 700; line-height: 1.22; min-height: 38px; border-bottom: 1px solid #dde; }
.quiz-top { display: flex; justify-content: space-between; padding: 3px 8px 0; font-size: 10.5px; color: #666; font-weight: 600; }
.quiz .list li { height: 22px; font-size: 12.5px; }
.quiz .list li.right { background: #36b24a; color: #fff; }
.quiz .list li.wrong { background: #e0453a; color: #fff; }
.quiz-fact { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; background: #fff8cc; font-size: 11px; line-height: 1.25; border-top: 1px solid #e5d98a; }
canvas.game { display: block; width: 246px; height: 164px; background: #000; }
.game-hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: 2px 6px; font: 700 10px/1.2 "Inter", sans-serif; color: #fff; pointer-events: none; }
.banner { position: absolute; left: 6px; right: 6px; bottom: 6px; background: rgba(20,20,20,.88); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 8px; border-radius: 6px; animation: bannerIn .25s ease-out; z-index: 5; }
@keyframes bannerIn { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.lock-ico { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.75); font-size: 13px; font-weight: 800; z-index: 6; }

/* Mono (1st gen / mini) screen */
.ipod.mono .ipod-screen { background: #b9c4b0; color: #1c2018; font-family: "VT323", ui-monospace, monospace; }
.ipod.mono .pane { background: #b9c4b0; }
.ipod.mono.lit .ipod-screen, .ipod.mono.lit .pane { background: #c7ddea; }
.ipod.mono .scr-bar { background: transparent; border-bottom: 2px solid #1c2018; font-family: "VT323", monospace; font-size: 17px; font-weight: 400; }
.ipod.mono .list li { font-size: 18px; font-weight: 400; }
.ipod.mono .list li.sel { background: #1c2018; color: #b9c4b0; }
.ipod.mono.lit .list li.sel { color: #c7ddea; }
.ipod.mono .list li.chev::after { border-color: #1c2018; }
.ipod.mono .list li.sel.chev::after { border-color: currentColor; }
.ipod.mono .list li span.rt { color: inherit; font-size: 16px; }
.ipod.mono .scrollbar { background: transparent; border-left: 2px solid #1c2018; }
.ipod.mono .scrollbar i { background: #1c2018; }
.ipod.mono .batt { border-color: #1c2018; }
.ipod.mono .batt::before { background: #1c2018; }
.ipod.mono .batt::after { background: #1c2018; }
.ipod.mono .txt, .ipod.mono .np, .ipod.mono .clock-sub, .ipod.mono .np-count, .ipod.mono .np-a, .ipod.mono .np-al { font-size: 16px; color: #1c2018; }
.ipod.mono .np-t { font-size: 17px; font-weight: 400; }
.ipod.mono .txt h4 { font-size: 18px; font-weight: 400; text-decoration: underline; }
.ipod.mono .np-bar { border-color: #1c2018; background: transparent; }
.ipod.mono .np-bar i { background: #1c2018; }
.ipod.mono .np-times, .ipod.mono .np-mode { font-size: 14px; font-weight: 400; color: #1c2018; }
.ipod.mono .np-viz b { background: #1c2018; }
.ipod.mono .clock-big { font-size: 50px; font-weight: 400; }
.ipod.mono .clock-age { font-size: 15px; font-weight: 400; border-color: #1c2018; }
.ipod.mono .quiz-q { font-size: 15px; font-weight: 400; border-color: #1c2018; }
.ipod.mono .quiz .list li { font-size: 15px; }
.ipod.mono .quiz-top { font-size: 13px; color: #1c2018; }
.ipod.mono .quiz-fact { background: #1c2018; color: #b9c4b0; font-size: 13px; border: 0; }
.ipod.mono .lock-ico { background: rgba(185,196,176,.8); font-size: 18px; font-weight: 400; }

/* Wheel */
.wheel {
  position: absolute; left: 50%; top: 244px; width: 196px; height: 196px; margin-left: -98px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--wheel) 92%, #fff), var(--wheel) 70%);
  box-shadow: inset 0 0 0 1.5px var(--ring), inset 0 2px 4px rgba(0,0,0,.08), 0 1px 0 rgba(255,255,255,.5);
  cursor: grab; touch-action: none;
}
.wheel.dragging { cursor: grabbing; }
.wb {
  position: absolute; border: 0; background: none; padding: 4px; color: var(--label); font: 800 13px/1 "Inter", sans-serif; letter-spacing: .06em;
  pointer-events: none; display: grid; place-items: center;
}
.wb:focus-visible { outline: 2px solid var(--cyan); }
.wb svg { width: 18px; height: 14px; fill: currentColor; }
.wb-menu { top: 14px; left: 50%; transform: translateX(-50%); }
.wb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.wb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.wb-play { bottom: 13px; left: 50%; transform: translateX(-50%); }
.wheel-center {
  position: absolute; left: 50%; top: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--center) 85%, #fff), var(--center));
  box-shadow: 0 0 0 1.5px var(--ring), 0 1px 2px rgba(0,0,0,.12); cursor: pointer; padding: 0;
}
.wheel-center:active, .wheel-center.down { background: color-mix(in srgb, var(--center) 88%, #000); }
.wheel .pulse { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.wb.flash { color: var(--cyan); }

/* 1st-gen: separate buttons ring look */
.ipod[data-shell="1g"] .wheel { box-shadow: inset 0 0 0 1.5px var(--ring), inset 0 0 0 26px rgba(0,0,0,0), 0 0 0 9px var(--face), 0 0 0 10.5px var(--ring); }
.ipod[data-shell="u2"] .wb { color: #111; }

/* Device scale for very small phones */
@media (max-width: 340px) { .ipod { transform: scale(.9); margin: -20px 0; } }

/* Home page */
.hero { padding: 36px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; grid-template-areas: "copy dev" "extra dev"; gap: 10px 28px; align-items: center; }
.hero-copy { grid-area: copy; align-self: end; }
.hero-grid > .ipod-stage { grid-area: dev; padding-top: 16px; }
.hero-extra { grid-area: extra; align-self: start; position: relative; z-index: 1; }
.hero h1 { margin-bottom: .3em; }
.hero .lede { font-size: 1.15rem; max-width: 34ch; }
.age { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.age span { background: #111; color: #fff; border-radius: 10px; padding: 8px 10px; font-weight: 800; font-variant-numeric: tabular-nums; font-size: .95rem; line-height: 1.1; text-align: center; min-width: 58px; }
.age span small { display: block; font-weight: 600; opacity: .7; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.hint { font-size: .85rem; text-align: center; max-width: 300px; opacity: .85; }
.hint kbd { font: 700 .75rem var(--font); border: 1px solid currentColor; border-radius: 5px; padding: 1px 5px; }
.shells { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; max-width: 330px; }
.shell-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); cursor: pointer; padding: 0; position: relative; }
.shell-dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--w); }
.shell-dot[aria-pressed="true"] { outline: 3px solid #111; outline-offset: 2px; }
[data-theme="dark"] .shell-dot[aria-pressed="true"] { outline-color: #fff; }
.dancer { right: -40px; bottom: -10px; width: 260px; opacity: .9; }
.dancer2 { left: -50px; bottom: -20px; width: 200px; transform: scaleX(-1); opacity: .9; }
.hero-copy { position: relative; z-index: 1; }
.hero .btn.ghost { color: inherit; border-color: currentColor; }
.do-card { display: flex; flex-direction: column; gap: 8px; }
.do-card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--line); }
.do-card .btn { margin-top: auto; align-self: flex-start; }
.score-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.score-list li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .85rem; opacity: .5; }
.ach.on { opacity: 1; border-color: var(--ink); }
.ach b { display: block; font-size: .92rem; }
.promo { display: block; text-decoration: none; border-radius: var(--radius); padding: 26px; min-height: 200px; position: relative; overflow: hidden; transition: transform .15s ease; }
.promo:hover { transform: translateY(-3px); }
.promo h3 { font-size: 1.5rem; }
.promo .go { font-weight: 800; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "dev" "extra"; gap: 18px; }
  .hero { padding-top: 22px; }
  .hero .lede { max-width: none; }
  .dancer, .dancer2 { display: none; }
}
