* { box-sizing: border-box; }
:root {
  --shell-light: #f1f2f3; --shell-mid: #c9cbd0; --shell-dark: #92969d;
  --lcd: #e9f0f5; --ink: #17212c; --blue: #2d76b9; --highlight: #2d76b9;
}
html, body { margin: 0; min-height: 100%; }
body {
  background: #ffffff;
  color: #17212c; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
.stage { min-height: 100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:34px 16px 22px; }
.ipod {
  width:min(390px, 92vw); padding:22px 22px 18px; border-radius:38px;
  background: linear-gradient(115deg, #f4f5f6 0%, #d9dbe0 16%, #b8bbc1 45%, #e6e7e9 72%, #aeb2b9 100%);
  border:1px solid rgba(255,255,255,.7);
  box-shadow: inset 2px 2px 4px #fff, inset -3px -4px 8px #858990, 0 28px 70px rgba(0,0,0,.55), 0 5px 12px rgba(0,0,0,.35);
  color:#555b62; position:relative;
}
.top-shell { padding:0 2px; }
.screen-frame {
  background:linear-gradient(135deg,#25282c,#08090b 55%,#30343a); padding:10px;
  border-radius:9px; box-shadow:inset 0 2px 5px #000, 0 1px 1px rgba(255,255,255,.65);
}
.screen {
  height:300px; overflow:hidden; display:flex; flex-direction:column; position:relative;
  border:1px solid #606a74; border-radius:2px;
  background:linear-gradient(145deg,#f4f7fa,#dce6ee);
  color:var(--ink); box-shadow:inset 0 0 22px rgba(33,70,100,.12);
}
.statusbar {
  height:27px; flex:none; padding:4px 9px; display:flex; justify-content:space-between; align-items:center;
  background:linear-gradient(#f9fbfc,#d7e1e9); border-bottom:1px solid #9caab5;
  font-weight:700; font-size:13px; text-shadow:0 1px white;
}
.status-right { display:flex; gap:9px; align-items:center; color:#25394b; }
.screen-content { flex:1; overflow:hidden; position:relative; }
.screen-footer {
  height:23px; flex:none; display:flex; justify-content:space-between; align-items:center;
  padding:2px 9px; font-size:9px; font-weight:800; letter-spacing:.7px;
  color:#506273; background:linear-gradient(#e8eef3,#cbd7e0); border-top:1px solid #aab7c1;
}
.menu-view { height:100%; display:flex; flex-direction:column; }
.menu-title { font-size:20px; font-weight:800; padding:12px 12px 8px; border-bottom:1px solid #b5c1ca; text-shadow:0 1px white; }
.menu-list { flex:1; min-height:0; overflow:auto; position:relative; padding:3px 0; }
.menu-item {
  min-height:36px; display:flex; align-items:center; justify-content:space-between;
  padding:6px 12px; font-size:15px; border-bottom:1px solid rgba(92,112,128,.12);
}
.menu-item.selected { color:white; background:linear-gradient(#4d94cb,#2169a7); text-shadow:0 -1px rgba(0,0,0,.25); }
.about-link { color:inherit; text-decoration:none; }
.chevron { font-size:20px; opacity:.7; }
.now-playing { height:100%; display:flex; flex-direction:column; align-items:center; padding:10px 15px 6px; gap:6px; }
.now-playing > * { flex:none; }
.artwork { width:128px; height:128px; border:1px solid rgba(0,0,0,.25); box-shadow:0 2px 7px rgba(0,0,0,.25); object-fit:cover; background:linear-gradient(135deg,#334b68,#b6a3a2); }
.track-title { max-width:100%; font-size:15px; line-height:1.25; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.track-artist { max-width:100%; font-size:12px; color:#526474; margin-top:-4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.progress-wrap { width:100%; margin-top:2px; }
.progress { width:100%; height:5px; border-radius:5px; background:#aebbc5; overflow:hidden; }
.progress-fill { height:100%; width:0%; background:#397fb4; }
.time-row { display:flex; justify-content:space-between; font-size:10px; color:#536574; margin-top:3px; }
.empty-note { padding:18px 13px; font-size:13px; line-height:1.4; color:#506273; }
.library-row { display:flex; gap:9px; align-items:center; min-height:48px; padding:5px 10px; border-bottom:1px solid rgba(92,112,128,.14); }
.mini-art { width:36px; height:36px; object-fit:cover; border:1px solid #9aa8b3; flex:none; }
.library-copy { min-width:0; flex:1; }
.library-name { font-size:13px; font-weight:700; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.library-sub { font-size:10px; color:#637482; margin-top:2px; }
.library-row.selected { background:linear-gradient(#4d94cb,#2169a7); color:white; }
.library-row.selected .library-sub { color:#e0edf7; }
.wheel-area { display:flex; justify-content:center; padding:24px 0 17px; }
.clickwheel {
  width:226px; height:226px; border-radius:50%; position:relative; touch-action:none;
  background:radial-gradient(circle at 36% 27%,#fff 0%,#f7f7f7 32%,#e5e6e8 67%,#c4c7cb 100%);
  box-shadow:inset 0 2px 4px rgba(255,255,255,.95), inset 0 -5px 9px rgba(87,91,98,.3), 0 3px 6px rgba(0,0,0,.2), 0 1px 1px #fff;
  border:1px solid rgba(130,135,142,.35);
}
.wheel-button, .wheel-center { position:absolute; border:0; background:transparent; color:#777d84; cursor:pointer; font-weight:800; }
.wheel-button { font-size:12px; letter-spacing:.3px; padding:9px; }
.wheel-button:active, .wheel-center:active { color:#303841; }
.menu-button { top:12px; left:50%; transform:translateX(-50%); }
.prev-button { left:9px; top:50%; transform:translateY(-50%); font-size:15px; }
.next-button { right:9px; top:50%; transform:translateY(-50%); font-size:15px; }
.play-button { bottom:12px; left:50%; transform:translateX(-50%); font-size:12px; }
.wheel-center {
  left:50%; top:50%; transform:translate(-50%,-50%); width:82px; height:82px; border-radius:50%;
  background:linear-gradient(145deg,#f9f9fa,#e1e3e5); border:1px solid #c4c7cb;
  box-shadow:inset 0 1px 2px white, 0 1px 3px rgba(0,0,0,.12);
}
.shell-bottom { display:flex; justify-content:flex-end; align-items:center; padding:0 7px; font-size:9px; letter-spacing:1px; color:#7d8289; text-transform:uppercase; }
.hint { max-width:390px; text-align:center; color:#5f6670; font-size:12px; line-height:1.5; margin:16px 8px 0; }
button:focus-visible { outline:2px solid #2677b8; outline-offset:2px; }
/* Automatic sizing (used when no viewing style is forced) */
@media (max-width:480px) {
  :root:not([data-view]) .stage { padding:18px 10px; }
  :root:not([data-view]) .ipod { width:min(370px,94vw); padding:17px 17px 15px; border-radius:32px; }
  :root:not([data-view]) .screen { height:290px; }
  :root:not([data-view]) .clickwheel { width:min(218px,62vw); height:min(218px,62vw); }
  :root:not([data-view]) .wheel-center { width:36%; height:36%; }
}
@media (min-width:700px) {
  :root:not([data-view]) .ipod { transform:scale(1.04); }
}
.photo-view { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; background:#111; padding:6px; gap:6px; }
.photo-view img { max-width:100%; max-height:205px; object-fit:contain; }
.photo-caption { color:#e9eef2; font-size:12px; text-align:center; }

/* Viewing style switcher */
.view-switch {
  display:inline-flex; gap:2px; padding:3px; margin:0 0 22px; border-radius:999px;
  background:#eef0f2; border:1px solid #d6d9dd; box-shadow:inset 0 1px 2px rgba(0,0,0,.06);
}
.view-switch button {
  border:0; background:transparent; color:#5f6670; cursor:pointer;
  font:600 12px/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  padding:7px 12px; border-radius:999px; letter-spacing:.2px;
}
.view-switch button:hover { color:#17212c; }
.view-switch button[aria-pressed="true"] {
  background:#fff; color:#17212c; box-shadow:0 1px 3px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.04);
}

/* Forced: Mobile */
[data-view="mobile"] .stage { padding:18px 10px; }
[data-view="mobile"] .ipod { width:min(340px,94vw); padding:17px 17px 15px; border-radius:32px; }
[data-view="mobile"] .screen { height:290px; }
[data-view="mobile"] .clickwheel { width:min(210px,62vw); height:min(210px,62vw); }
[data-view="mobile"] .wheel-center { width:36%; height:36%; }
[data-view="mobile"] .hint { max-width:340px; }

/* Forced: Tablet */
[data-view="tablet"] .stage { padding:34px 24px 26px; }
[data-view="tablet"] .ipod { width:min(470px,96vw); padding:26px 26px 22px; border-radius:44px; }
[data-view="tablet"] .screen { height:360px; }
[data-view="tablet"] .statusbar { height:29px; font-size:14px; }
[data-view="tablet"] .menu-title { font-size:22px; }
[data-view="tablet"] .menu-item { min-height:40px; font-size:17px; }
[data-view="tablet"] .library-row { min-height:52px; }
[data-view="tablet"] .mini-art { width:40px; height:40px; }
[data-view="tablet"] .library-name { font-size:14px; }
[data-view="tablet"] .library-sub { font-size:11px; }
[data-view="tablet"] .artwork { width:160px; height:160px; }
[data-view="tablet"] .track-title { font-size:17px; }
[data-view="tablet"] .track-artist { font-size:13px; }
[data-view="tablet"] .photo-view img { max-height:265px; }
[data-view="tablet"] .clickwheel { width:270px; height:270px; }
[data-view="tablet"] .wheel-center { width:98px; height:98px; }
[data-view="tablet"] .wheel-button { font-size:14px; }
[data-view="tablet"] .prev-button, [data-view="tablet"] .next-button { font-size:17px; }
[data-view="tablet"] .wheel-area { padding:28px 0 20px; }
[data-view="tablet"] .hint { max-width:470px; font-size:13px; }

/* Forced: Desktop */
[data-view="desktop"] .stage { padding:40px 32px 30px; }
[data-view="desktop"] .ipod { width:min(540px,96vw); padding:30px 30px 24px; border-radius:50px; }
[data-view="desktop"] .screen { height:420px; }
[data-view="desktop"] .statusbar { height:31px; font-size:15px; }
[data-view="desktop"] .screen-footer { height:26px; font-size:10px; }
[data-view="desktop"] .menu-title { font-size:24px; padding:14px 14px 10px; }
[data-view="desktop"] .menu-item { min-height:44px; font-size:18px; padding:7px 14px; }
[data-view="desktop"] .library-row { min-height:58px; }
[data-view="desktop"] .mini-art { width:46px; height:46px; }
[data-view="desktop"] .library-name { font-size:15px; }
[data-view="desktop"] .library-sub { font-size:12px; }
[data-view="desktop"] .artwork { width:200px; height:200px; }
[data-view="desktop"] .track-title { font-size:19px; }
[data-view="desktop"] .track-artist { font-size:14px; }
[data-view="desktop"] .time-row { font-size:11px; }
[data-view="desktop"] .photo-view img { max-height:325px; }
[data-view="desktop"] .photo-caption { font-size:13px; }
[data-view="desktop"] .clickwheel { width:310px; height:310px; }
[data-view="desktop"] .wheel-center { width:112px; height:112px; }
[data-view="desktop"] .wheel-button { font-size:15px; padding:11px; }
[data-view="desktop"] .prev-button, [data-view="desktop"] .next-button { font-size:19px; }
[data-view="desktop"] .wheel-area { padding:32px 0 22px; }
[data-view="desktop"] .hint { max-width:540px; font-size:13px; }
