:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { min-height: 100vh; display: grid; place-items: center; overflow: hidden; background: #d9dadd; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }

.ipod {
  position: relative;
  width: min(100vw, calc(100vh * 393 / 852), 393px);
  aspect-ratio: 393 / 852;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #d9dadd;
  box-shadow: 0 24px 70px rgb(0 0 0 / 18%);
}

.ipod-body {
  position: relative;
  width: 86%;
  height: 96%;
  padding: 3.6% 5.5%;
  display: grid;
  grid-template-rows: 44% 1fr;
  row-gap: 4%;
  border-radius: 22px;
  background: linear-gradient(160deg, #f6f7f8 0%, #dfe1e4 45%, #c7c9cd 100%);
  box-shadow:
    0 2px 0 rgb(255 255 255 / 80%) inset,
    0 -6px 10px rgb(0 0 0 / 12%) inset,
    0 18px 40px rgb(0 0 0 / 22%);
}

.ipod-screen-frame {
  border-radius: 8px;
  padding: 6px;
  background: linear-gradient(160deg, #b9bcc2, #8d9096);
  box-shadow: 0 2px 4px rgb(0 0 0 / 30%) inset;
}

.ipod-screen {
  position: relative;
  height: calc(100% - 26px);
  overflow: hidden;
  border-radius: 3px;
  background: linear-gradient(175deg, #eef3e4 0%, #dbe4cd 100%);
  box-shadow: 0 1px 3px rgb(0 0 0 / 35%) inset;
}

.ipod-statusbar {
  height: 26px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 3px 3px 0 0;
  color: #24291f;
  background: linear-gradient(180deg, #cddab0, #b7c795);
  font-size: 11px;
  font-weight: 700;
}
.ipod-home { color: #24291f; text-decoration: none; font-size: 16px; line-height: 1; padding: 2px 4px; }
.ipod-title { flex: 1; text-align: center; letter-spacing: .3px; }
.ipod-battery { position: relative; display: inline-block; width: 18px; height: 9px; border: 1.3px solid #24291f; border-radius: 2px; }
.ipod-battery::after { content: ""; position: absolute; top: 50%; right: -3px; width: 2px; height: 4px; background: #24291f; transform: translateY(-50%); }
.ipod-battery i { position: absolute; inset: 1.5px; border-radius: 1px; background: #24291f; width: 70%; }

.ipod-list { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ipod-list::-webkit-scrollbar { display: none; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; color: #26301b; font-size: 13px; font-weight: 500; border-bottom: 1px solid rgb(0 0 0 / 6%); }
.list-row .row-icon { width: 14px; text-align: center; opacity: .75; font-size: 11px; }
.list-row .row-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .row-arrow { opacity: .55; font-size: 11px; }
.list-row.is-selected { color: #fff; background: linear-gradient(180deg, #8fae52, #6f9038); }
.list-row.is-selected .row-arrow, .list-row.is-selected .row-icon { opacity: .95; }
.list-row.is-playing-row .row-label::before { content: "♪ "; }

.ipod-nowplaying { position: absolute; inset: 0; padding: 10px 10px 8px; display: grid; grid-template-rows: auto 1fr auto auto; color: #26301b; }
.np-art { width: 78px; height: 78px; margin: 2px auto 6px; display: grid; place-items: center; border: 1px solid rgb(0 0 0 / 15%); border-radius: 4px; background: linear-gradient(155deg, #fff, #cfd8bd); box-shadow: 0 2px 5px rgb(0 0 0 / 18%); font-size: 30px; }
.np-info { text-align: center; overflow: hidden; }
.np-info strong { display: block; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-info span { display: block; margin-top: 2px; font-size: 12px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-progress { padding: 0 2px; }
.np-progress-bar { height: 5px; border-radius: 3px; background: rgb(0 0 0 / 12%); overflow: hidden; }
.np-progress-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(180deg, #8fae52, #6f9038); }
.np-time { margin-top: 3px; display: flex; justify-content: space-between; font-size: 10px; opacity: .8; font-variant-numeric: tabular-nums; }
.np-modes { display: flex; justify-content: center; gap: 6px; margin-top: 4px; min-height: 14px; }
.np-mode-tag { padding: 1px 6px; border-radius: 6px; background: rgb(0 0 0 / 10%); font-size: 9px; font-weight: 700; }

.ipod-empty { position: absolute; inset: 0; display: grid; place-items: center; justify-items: center; gap: 4px; padding: 0 16px; color: #4a5540; text-align: center; }
.ipod-empty p { margin: 0; font-size: 13px; font-weight: 600; }
.ipod-empty-hint { font-size: 11px !important; font-weight: 400 !important; opacity: .75; }

.clickwheel { position: relative; width: 100%; max-width: 260px; aspect-ratio: 1; margin: 0 auto; justify-self: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fdfdfe, #d3d5d9 70%, #c1c3c7); box-shadow: 0 3px 0 rgb(255 255 255 / 70%) inset, 0 -3px 8px rgb(0 0 0 / 12%) inset, 0 10px 22px rgb(0 0 0 / 18%); }
.wheel-zone { position: absolute; border: 0; background: none; color: #6b6f74; font-size: 11px; font-weight: 700; letter-spacing: .5px; cursor: pointer; }
.wheel-menu { top: 9%; left: 50%; transform: translateX(-50%); }
.wheel-prev { left: 8%; top: 50%; transform: translateY(-50%); font-size: 18px; }
.wheel-next { right: 8%; top: 50%; transform: translateY(-50%); font-size: 18px; }
.wheel-play { bottom: 8%; left: 50%; transform: translateX(-50%); font-size: 16px; }
.wheel-zone:active { color: #33363a; }
.wheel-ring { position: absolute; inset: 0; border-radius: 50%; touch-action: none; }
.wheel-select { position: absolute; top: 50%; left: 50%; width: 40%; height: 40%; transform: translate(-50%, -50%); border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #e3e4e8 75%, #d0d2d6); box-shadow: 0 2px 0 rgb(255 255 255 / 85%) inset, 0 -2px 5px rgb(0 0 0 / 12%) inset, 0 4px 10px rgb(0 0 0 / 15%); }
.wheel-select:active { box-shadow: 0 1px 3px rgb(0 0 0 / 20%) inset; }

.ipod[data-skin="black"] .ipod-body { background: linear-gradient(160deg, #4a4c50 0%, #2b2c2f 45%, #17181a 100%); }
.ipod[data-skin="black"] .clickwheel { background: radial-gradient(circle at 35% 30%, #3a3b3e, #1b1c1e 70%, #0f1011); }
.ipod[data-skin="black"] .wheel-zone { color: #9a9c9f; }
.ipod[data-skin="black"] .wheel-select { background: radial-gradient(circle at 35% 30%, #4a4b4e, #232427 75%, #161718); }

@media (max-width: 480px) {
  body { background: #d9dadd; }
  .ipod { width: 100vw; height: 100vh; box-shadow: none; padding: var(--safe-top) 0 var(--safe-bottom); }
}

/* ---------- Landscape "now playing" view ---------- */
.np-landscape {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
}
@media (orientation: landscape) {
  .ipod { display: none; }
  .np-landscape.is-active { display: block; }
}

.npl-bgstack {
  position: absolute;
  inset: -10% -10% 30% -10%;
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(1.3) brightness(.6);
  transform: scale(1.15);
}
.npl-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 35%) 0%, rgb(0 0 0 / 10%) 30%, rgb(0 0 0 / 75%) 78%, #000 100%);
}

.npl-cover-wrap {
  position: absolute;
  left: 5%;
  top: 8%;
  width: 40%;
  aspect-ratio: 1;
  filter: drop-shadow(0 30px 60px rgb(0 0 0 / 55%));
}
.npl-cover {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(155deg, #555, #222);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 15%;
  color: rgb(255 255 255 / 40%);
}

.npl-record-card {
  position: absolute;
  right: 4%;
  top: 6%;
  width: 46%;
  height: 62%;
  border-radius: 20px;
  padding: 5% 5% 4%;
  background: linear-gradient(175deg, #f7f3ea, #e9e3d4);
  color: #1c1a14;
  box-shadow: 0 30px 60px rgb(0 0 0 / 45%);
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}
.npl-record-close {
  position: absolute;
  top: 4%;
  right: 4%;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 10%);
  color: #1c1a14;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.npl-record-head { padding-right: 30px; margin-bottom: 4%; }
.npl-record-head strong { display: block; font-size: clamp(13px, 1.7vw, 17px); font-weight: 800; line-height: 1.25; }

.npl-record { position: relative; width: 92%; aspect-ratio: 1; margin: 0 auto 6%; }
.npl-record-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, rgb(0 0 0 / 55%) 0 1px, rgb(30 30 30 / 90%) 1px 3px),
    radial-gradient(circle at center, #111 0 0);
  background-size: cover;
  box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
  animation: npl-spin 8s linear infinite;
}
.npl-record-disc::after {
  content: "";
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: inherit;
  background-image: var(--npl-art, none);
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 3px #1c1a14 inset;
}
.npl-record-disc::before {
  content: "";
  position: absolute;
  inset: 47%;
  border-radius: 50%;
  background: #f7f3ea;
}
.np-landscape.is-paused .npl-record-disc { animation-play-state: paused; }
@keyframes npl-spin { to { transform: rotate(360deg); } }
.npl-tonearm {
  position: absolute;
  top: -6%;
  right: -8%;
  width: 46%;
  height: 46%;
  border-radius: 3px 3px 3px 40%;
  background: linear-gradient(120deg, #cfcfd2, #8f9096);
  transform: rotate(28deg);
  transform-origin: top right;
  box-shadow: 0 4px 8px rgb(0 0 0 / 25%);
}
.npl-tonearm::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3a3d;
}

.npl-tracklist { overflow-y: auto; margin: 0 -2%; padding: 0 2%; }
.npl-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: clamp(11px, 1.3vw, 13px);
  font-weight: 600;
  color: #4a4636;
}
.npl-track-row.is-current { background: #f2d478; color: #1c1a14; }
.npl-track-row .npl-track-idx { width: 14px; text-align: center; opacity: .6; font-size: 10px; }

.npl-bottom {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 15%;
  display: flex;
  align-items: center;
  gap: 3%;
}
.npl-thumb {
  width: clamp(34px, 5vw, 48px);
  height: clamp(34px, 5vw, 48px);
  flex: none;
  border-radius: 6px;
  background: linear-gradient(155deg, #555, #222);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: rgb(255 255 255 / 45%);
}
.npl-bottom-mid { flex: 1; min-width: 0; }
.npl-progress-bar { height: 4px; border-radius: 2px; background: rgb(255 255 255 / 25%); overflow: hidden; }
.npl-progress-bar i { display: block; height: 100%; width: 0%; background: #fff; border-radius: 2px; }
.npl-time-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: clamp(10px, 1.1vw, 12px);
  font-variant-numeric: tabular-nums;
  color: rgb(255 255 255 / 75%);
}
.npl-track-name { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #fff; }
.npl-airplay { flex: none; font-size: clamp(16px, 2vw, 22px); }

.npl-title-block {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 4%;
}
.npl-title-block strong {
  display: block;
  font-size: clamp(15px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: -.2px;
  line-height: 1.15;
}
.npl-title-block span {
  display: block;
  margin-top: 2px;
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 700;
  color: rgb(255 255 255 / 55%);
}
