/* ============================================================
   Music: earbuds hanging over the top edge of the screen, and a
   pocket music player that pops up with a Spotify playlist.
   ============================================================ */

/* ---------- earbuds (in the world: lit by the lamp, shadow on the desk) ---------- */
.earbuds {
  position: fixed;
  top: 0;
  /* right-hand side: the left already carries the menu note and the email tape */
  right: clamp(22px, 3vw, 46px);
  z-index: 42;
  width: 112px;
  height: 118px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 0;
  animation: buds-sway 7s ease-in-out infinite;
  filter: drop-shadow(7px 12px 5px rgba(32, 20, 6, .32)) drop-shadow(1px 2px 1px rgba(32, 20, 6, .25));
  -webkit-tap-highlight-color: transparent;
}
.earbuds svg { display: block; width: 100%; height: 100%; overflow: visible; }
.earbuds .bud-l, .earbuds .bud-r { transform-box: fill-box; transition: transform .5s cubic-bezier(.2, .9, .25, 1.3); }
.earbuds .bud-l { transform-origin: 50% 0; }
.earbuds .bud-r { transform-origin: 50% 0; }
.earbuds:hover .bud-l, .earbuds:focus-visible .bud-l { transform: rotate(9deg) translateY(4px); }
.earbuds:hover .bud-r, .earbuds:focus-visible .bud-r { transform: rotate(-7deg) translateY(6px); }
.earbuds:focus-visible { outline: 2px dashed rgba(240, 232, 205, .9); outline-offset: 2px; border-radius: 8px; }
.earbuds .tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  translate: -50% 0;
  padding: 3px 8px 2px;
  font: 700 12px "Courier Prime", monospace;
  color: #2b261d;
  white-space: nowrap;
  background: rgba(236, 222, 190, .95);
  clip-path: polygon(2px 0, 100% 2px, calc(100% - 2px) 100%, 0 calc(100% - 1px));
  opacity: 0;
  transition: opacity .2s ease;
}
.earbuds:hover .tip, .earbuds:focus-visible .tip { opacity: 1; }
@keyframes buds-sway { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 2.5deg; } }
body[data-modal] .earbuds { visibility: hidden; }

/* ---------- the player popup ---------- */
.music-modal {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 18px;
}
.music-modal[hidden] { display: none; }
.music-scrim { position: absolute; inset: 0; background: rgba(26, 15, 4, .44); }
body[data-modal="music"] .work-badge { visibility: hidden; }

.player {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 18px;
  width: min(330px, 80vw, calc((100vh - 170px) * .58));
}

/* ---------- a classic click-wheel player, built the same way as the About board ---------- */
/* the shadow is cast by the tilted device, so it follows its real outline; soft, like a lamp a metre away */
.device-shadow {
  width: 100%;
  filter:
    drop-shadow(1px 2px 2px rgba(32, 20, 6, .28))
    drop-shadow(8px 16px 22px rgba(32, 20, 6, .22));
}
.device {
  --rx: 9deg;
  --ry: 8deg;
  --rz: 2deg;
  position: relative;
  width: 100%;
  aspect-ratio: 61.8 / 103.5;
  border-radius: 9% / 5.4%;
  /* matte anodised aluminium: an even satin silver with only a faint grain */
  background-color: #d3d5d8;
  background-image:
    linear-gradient(165deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 45%, rgba(60, 52, 40, .08)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.9 .02' numOctaves='2' seed='9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23b)'/></svg>");
  /* the thin chamfered edge catches a line of light on the lamp side; the far side falls into shade */
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .7),
    inset -1px -1px 0 rgba(90, 84, 74, .25),
    inset -24px -30px 50px rgba(70, 62, 50, .10),
    0 0 0 .5px #9a9ca0,
    0 2px 0 .5px #a9abaf,
    0 3px 0 .5px #8a8c90;
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
/* a broad, soft sheen from the lamp that slides as it tilts (matte metal: no sharp highlight) */
.device::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background: radial-gradient(80% 55% at var(--gx, 26%) var(--gy, 16%), rgba(255, 250, 238, .55), rgba(255, 250, 238, 0) 70%);
}

.ip-bezel {
  position: absolute;
  top: 6.6%;
  left: 7.5%;
  right: 7.5%;
  aspect-ratio: 4 / 3;
  padding: 2.4%;
  border-radius: 2.2%;
  background: #141416;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6), 0 .5px 0 rgba(255, 255, 255, .5);
}
.ip-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #f7f7f5;
  container-type: size;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #111;
}
/* glass: a gentle lamp reflection and a faint band, kept light so the screen reads clearly */
.ip-bezel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(45% 45% at var(--sx, 22%) var(--sy, 14%), rgba(255, 240, 215, .13), rgba(255, 240, 215, 0) 75%),
    linear-gradient(118deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .025) var(--band, 36%), rgba(255, 255, 255, 0) calc(var(--band, 36%) + .4%));
}
.ip-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .035) 0 1px, transparent 1px 3px);
}

/* title bar */
.ip-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 10cqh;
  padding: 0 3cqw;
  background: linear-gradient(#fdfdfd, #d6d8dc);
  border-bottom: 1px solid #9ea2a8;
  font-size: 5.6cqh;
  font-weight: 700;
}
.ip-bar .ttl { max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-bar .state { position: absolute; left: 3cqw; font-size: 5cqh; color: #3a84d8; }
.ip-bar .batt {
  position: absolute;
  right: 3.4cqw;
  width: 8cqw;
  height: 4.4cqh;
  border: 1px solid #555;
  border-radius: 1px;
  background: linear-gradient(#7be05e, #3fae2a) 1px 1px / calc(100% - 3px) calc(100% - 2px) no-repeat;
}
.ip-bar .batt::after { content: ""; position: absolute; right: -3px; top: 30%; width: 2px; height: 40%; background: #555; }

.ip-body { position: relative; height: 90cqh; }
.ip-split { display: grid; grid-template-columns: 50% 50%; height: 100%; }
.ip-menu { margin: 0; padding: 0; list-style: none; overflow: hidden; }
.ip-menu li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 11cqh;
  padding: 0 2.6cqw 0 3.4cqw;
  font-size: 6.4cqh;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}
.ip-menu li span:first-child { overflow: hidden; text-overflow: ellipsis; }
.ip-menu li.sel { color: #fff; background: linear-gradient(#5fa6f0, #2f7fdc); }
.ip-menu li .chev { font-weight: 400; opacity: .8; }
.ip-menu li .sub { display: block; font-size: 4.6cqh; font-weight: 400; color: #666; }
.ip-menu li.sel .sub { color: #e8f1ff; }
.ip-songs li { height: 13cqh; }
.ip-songs li > span:first-child { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ip-songs li > span:first-child b, .ip-songs li .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-artpane { position: relative; overflow: hidden; background: #222; }
.ip-artpane img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-scroll { position: absolute; top: 0; right: 0; bottom: 0; width: 2.6cqw; background: #e4e6ea; border-left: 1px solid #c4c8ce; }
.ip-scroll i { position: absolute; left: 0; right: 0; background: linear-gradient(90deg, #6a9fd8, #3a78c4); border-radius: 1px; }
.ip-list-wrap { position: relative; height: 100%; padding-right: 2.6cqw; }

.ip-now { display: grid; grid-template-columns: 44% 1fr; grid-template-rows: 1fr auto; gap: 3cqh 4cqw; height: 100%; padding: 5cqh 4cqw 5cqh; }
.ip-now .art { position: relative; align-self: center; aspect-ratio: 1; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); background: #ddd; }
.ip-now .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-now .art::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 22%;
  background-image: var(--art);
  background-size: cover;
  background-position: bottom;
  transform: scaleY(-1);
  opacity: .22;
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
          mask-image: linear-gradient(to top, #000, transparent);
}
.ip-now .meta { align-self: center; min-width: 0; font-size: 5.6cqh; line-height: 1.25; }
.ip-now .meta b, .ip-now .meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-now .meta b { font-size: 6.4cqh; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ip-now .meta .count { margin-top: 2cqh; color: #666; font-size: 4.8cqh; }
.ip-prog { grid-column: 1 / -1; }
.ip-prog .bar { height: 3.4cqh; border: 1px solid #8a8f97; background: linear-gradient(#fdfdfd, #dfe2e6); }
.ip-prog .bar i { display: block; height: 100%; width: 0; background: linear-gradient(#7fb4ef, #3a7fd5); }
.ip-prog .times { display: flex; justify-content: space-between; margin-top: 1.4cqh; font-size: 4.6cqh; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- the click wheel: matte white plastic, sitting very slightly proud of the face ---------- */
.wheel {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 64%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #fbfbf9, #f1f1ee 60%, #e4e4e0 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .9),
    inset -1px -2px 3px rgba(80, 74, 64, .10),
    0 0 0 1px rgba(120, 122, 126, .28),
    .5px 1px 1px rgba(60, 54, 44, .18);
  touch-action: none;
  cursor: grab;
  transition: transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.wheel:active { cursor: grabbing; }
.wheel.rock-menu { transform: perspective(400px) rotateX(3deg); }
.wheel.rock-play { transform: perspective(400px) rotateX(-3deg); }
.wheel.rock-prev { transform: perspective(400px) rotateY(-3deg); }
.wheel.rock-next { transform: perspective(400px) rotateY(3deg); }
.wb {
  position: absolute;
  display: grid;
  place-items: center;
  width: 26%;
  height: 20%;
  padding: 0;
  border: 0;
  background: none;
  color: #a6aab0;
  font: 700 clamp(10px, 3.3vw, 13px) "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
}
.wb svg { width: 60%; height: 60%; fill: currentColor; }
.wb.menu { top: 4%; left: 37%; }
.wb.play { bottom: 4%; left: 37%; }
.wb.prev { left: 2%; top: 40%; }
.wb.next { right: 2%; top: 40%; }
.wb:focus-visible { outline: 2px solid #3a84d8; outline-offset: -2px; border-radius: 6px; }
.center {
  position: absolute;
  inset: 33%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 34%, #dfe0e3, #c8cace 80%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .7), inset -1px -1px 2px rgba(60, 60, 66, .12), 0 0 0 1px rgba(110, 112, 116, .3);
  cursor: pointer;
}
.center.is-down, .center:active { background: radial-gradient(circle at 45% 40%, #d4d5d8, #bfc1c5 80%); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2), 0 0 0 1px rgba(110, 112, 116, .3); }
.center:focus-visible { outline: 2px solid #3a84d8; outline-offset: 2px; }

/* Spotify's own player does the playback; it sits in a little dock under the device */
.spot-dock {
  width: calc(100% + 40px);
  max-width: 92vw;
  padding: 8px;
  border-radius: 14px;
  background: rgba(20, 16, 10, .55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.spot-dock iframe { display: block; width: 100%; border: 0; border-radius: 10px; }
.mspot-ph { height: 80px; border-radius: 10px; background: #181a20; display: grid; place-items: center; font: 13px system-ui, sans-serif; color: #9aa0ab; }

@media (max-width: 700px) {
  .earbuds { right: 10px; width: 80px; height: 86px; }
  .device { --rx: 6deg; --ry: 4deg; --rz: 1deg; }
}
@media (prefers-reduced-motion: reduce) {
  .earbuds { animation: none; }
}

/* while music plays (even with the player put away), the earbuds' label stays up and bobs */
body.music-playing .earbuds .tip { opacity: 1; animation: tip-bob 1.2s ease-in-out infinite; }
@keyframes tip-bob { 50% { translate: -50% -2px; } }
@media (prefers-reduced-motion: reduce) { body.music-playing .earbuds .tip { animation: none; } }


/* ============================================================
   First-generation look: glossy white polycarbonate face behind a
   clear acrylic layer, a grey-green monochrome LCD, and four
   buttons around a touch wheel. Overrides the styles above.
   ============================================================ */
.device {
  border-radius: 8.5% / 5%;
  background-color: #f3f3f1;
  background-image:
    /* the clear acrylic layer: a slightly cooler, brighter band just inside the edge */
    linear-gradient(90deg, rgba(196, 212, 222, .45), rgba(255, 255, 255, 0) 4%, rgba(255, 255, 255, 0) 96%, rgba(170, 186, 196, .45)),
    linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0) 75%, rgba(70, 64, 54, .07));
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, .9),
    inset 0 0 0 3px rgba(198, 212, 220, .55),
    inset -18px -24px 40px rgba(80, 74, 64, .07),
    0 0 0 1px rgba(150, 166, 176, .75),     /* clear edge seen side-on */
    0 0 0 2.5px rgba(214, 224, 230, .6),
    0 2px 0 2px #b9bcc0,                    /* stainless back peeking out below */
    0 3px 0 2px #8f9296;
}
.device::after {
  /* glossy plastic: the lamp shows as a soft broad highlight, not a mirror */
  mix-blend-mode: screen;
  background:
    radial-gradient(70% 40% at var(--gx, 30%) var(--gy, 12%), rgba(255, 250, 240, .38), rgba(255, 250, 240, 0) 70%),
    linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .10) 38%, rgba(255, 255, 255, 0) 46%);
}

/* the screen sits flush under the acrylic: no black surround, just a fine dark edge */
.ip-bezel {
  top: 6%;
  left: 18.5%;
  right: 18.5%;
  aspect-ratio: 1.24;
  padding: 0;
  border-radius: 4%;
  background: #c9cbc3;
  box-shadow: inset 0 0 0 1px rgba(60, 62, 56, .45), inset 0 2px 4px rgba(0, 0, 0, .12), 0 .5px 0 rgba(255, 255, 255, .8);
  overflow: hidden;
}
.ip-screen {
  background: linear-gradient(180deg, #dcddd5, #d2d4cb);
  color: #33342f;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  border-radius: 4%;
}
.ip-screen::after { background: repeating-linear-gradient(90deg, rgba(40, 42, 36, .05) 0 1px, transparent 1px 3px), repeating-linear-gradient(0deg, rgba(40, 42, 36, .04) 0 1px, transparent 1px 3px); }
.ip-bezel::after {
  background:
    radial-gradient(50% 45% at var(--sx, 22%) var(--sy, 14%), rgba(255, 250, 240, .16), rgba(255, 250, 240, 0) 75%),
    linear-gradient(118deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .03) var(--band, 36%), rgba(255, 255, 255, 0) calc(var(--band, 36%) + .4%));
}

.ip-bar { background: none; border-bottom: 1.5px solid #3c3d38; font-size: 7cqh; height: 12cqh; }
.ip-bar .state { color: #33342f; }
.ip-bar .batt { border-color: #33342f; background: repeating-linear-gradient(90deg, #33342f 0 2px, transparent 2px 3.5px) 2px 2px / calc(100% - 5px) calc(100% - 4px) no-repeat; }
.ip-bar .batt::after { background: #33342f; }
.ip-body { height: 88cqh; }
.ip-menu li { height: 14cqh; font-size: 8cqh; padding: 0 4cqw 0 4cqw; }
.ip-menu li.sel { color: #e2e3dc; background: #4a4b46; }
.ip-menu li .chev { font-weight: 700; opacity: 1; }
.ip-menu li .sub { color: #5d5e58; font-size: 5.6cqh; }
.ip-menu li.sel .sub { color: #c9cac3; }
.ip-songs li { height: 17cqh; }
.ip-scroll { background: transparent; border-left: 1px solid #6a6b65; width: 3cqw; }
.ip-scroll i { background: #4a4b46; border-radius: 0; }
.ip-list-wrap { padding-right: 3cqw; }
/* a monochrome screen can't show colour: album art becomes a soft grey print on the LCD */
.ip-artpane, .ip-now .art { background: #c4c6bd; }
.ip-artpane img, .ip-now .art img { filter: grayscale(1) contrast(1.15) brightness(1.05); mix-blend-mode: multiply; opacity: .9; }
.ip-now .art { box-shadow: 0 0 0 1px rgba(50, 52, 46, .5); }
.ip-now .art::after { display: none; }
.ip-now .meta .count { color: #5d5e58; }
.ip-prog .bar { border: 1.5px solid #3c3d38; background: none; }
.ip-prog .bar i { background: repeating-linear-gradient(90deg, #3c3d38 0 2px, #6b6c66 2px 3px); }

/* ---------- wheel: four buttons in a ring around a touch wheel ---------- */
.wheel {
  bottom: 7%;
  width: 72%;
  background: radial-gradient(circle at 42% 34%, #ffffff, #f4f4f2 55%, #e8e8e5 100%);
  box-shadow:
    inset 1px 1.5px 0 rgba(255, 255, 255, .95),
    inset -1px -2px 3px rgba(90, 84, 74, .12),
    0 0 0 1px rgba(150, 152, 156, .55),
    0 0 0 3px rgba(255, 255, 255, .55),
    .5px 1.5px 2px rgba(60, 54, 44, .2);
}
/* the four seams that split the ring into buttons, at the diagonals */
.wheel-seams {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    linear-gradient(45deg, transparent calc(50% - .7px), rgba(120, 122, 126, .38) calc(50% - .7px), rgba(120, 122, 126, .38) calc(50% + .7px), transparent calc(50% + .7px)),
    linear-gradient(-45deg, transparent calc(50% - .7px), rgba(120, 122, 126, .38) calc(50% - .7px), rgba(120, 122, 126, .38) calc(50% + .7px), transparent calc(50% + .7px));
  -webkit-mask: radial-gradient(circle, transparent 59%, #000 59.5%, #000 92%, transparent 92.5%);
          mask: radial-gradient(circle, transparent 59%, #000 59.5%, #000 92%, transparent 92.5%);
}
/* the touch wheel inside the ring: a separate, very slightly recessed disc */
.wheel-inner {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 44% 36%, #fcfcfb, #f1f1ef 70%, #e9e9e6);
  box-shadow:
    0 0 0 1px rgba(140, 142, 146, .55),
    inset 1px 2px 3px rgba(90, 84, 74, .14),
    inset -1px -1px 0 rgba(255, 255, 255, .8);
}
.wb { color: #9da1a7; font: 700 clamp(11px, 3.6vw, 14px) "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .02em; }
.wb.menu { top: 2%; }
.wb.play { bottom: 2%; }
.wb.prev { left: 0; }
.wb.next { right: 0; }
.center {
  inset: 37%;
  background: radial-gradient(circle at 42% 34%, #ffffff, #f2f2f0 65%, #e3e3e0);
  box-shadow:
    inset 1px 1.5px 0 rgba(255, 255, 255, .95),
    inset -1px -1px 2px rgba(90, 84, 74, .12),
    0 0 0 1px rgba(150, 152, 156, .5),
    .5px 1px 2px rgba(60, 54, 44, .18);
}
.center.is-down, .center:active { background: radial-gradient(circle at 45% 40%, #efefed, #e1e1de 70%); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15), 0 0 0 1px rgba(150, 152, 156, .5); }
/* first-gen menus run the full width of the screen */
.ip-split { grid-template-columns: 1fr; }
.ip-artpane { display: none; }

/* ============================================================
   Lighting pass. The lamp is up and to the LEFT, so:
   - raised parts: lit top-left edge, shaded bottom-right edge,
     and they cast a small shadow down-right onto what's below
   - recessed parts: the top-left wall is in shade, the
     bottom-right wall catches light
   ============================================================ */

/* ---- body: a thick clear-acrylic shell over the white face ---- */
.device {
  background-color: #f2f2f0;
  background-image:
    /* the face itself: brighter toward the lamp, falling off down-right */
    radial-gradient(120% 85% at 22% 10%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0) 45%, rgba(80, 72, 60, .09) 100%);
  box-shadow:
    /* rounded edge of the shell: top & left roll toward the lamp, bottom & right roll away */
    inset 2px 2px 1.5px rgba(255, 255, 255, .95),
    inset 4px 5px 6px rgba(255, 255, 255, .35),
    inset -2px -3px 2px rgba(96, 104, 112, .28),
    inset -5px -7px 9px rgba(96, 104, 112, .10),
    /* outline where the acrylic meets the air */
    0 0 0 1px rgba(120, 134, 144, .65),
    /* the side faces we can see because it's tilted: lit acrylic, then the steel back */
    1px 2px 0 1px #ccd3d8,
    1.5px 3.5px 0 1px #a8b0b6,
    2px 5px 0 1px #8d9195;
}
/* the acrylic band: clear plastic thickness all round, bright where it faces the lamp */
.device::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 2.6%;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, .95) 0%, rgba(222, 232, 238, .7) 22%,
    rgba(196, 210, 218, .55) 55%, rgba(150, 164, 174, .6) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.device::after { z-index: 6; }

/* ---- screen: a window recessed into the face ---- */
.ip-bezel {
  z-index: 2;
  background: #b9bbb3;
  box-shadow:
    /* inside the recess: top-left wall in shade, bottom-right wall catching light */
    inset 2px 3px 3px rgba(40, 40, 36, .34),
    inset 1px 1px 0 rgba(40, 40, 36, .4),
    inset -1px -1px 0 rgba(255, 255, 255, .55),
    /* the lip of the cut-out on the face */
    -1px -1px 0 rgba(255, 255, 255, .95),
    1px 1px 0 rgba(120, 116, 108, .25),
    1.5px 2px 2px rgba(120, 116, 108, .12);
}
/* the LCD sits a hair deeper than its window: a thin dark gap on the shaded side */
.ip-screen { box-shadow: inset 1.5px 2px 3px rgba(30, 32, 28, .28), inset 0 0 0 .5px rgba(30, 32, 28, .3); }

/* ---- the button ring: raised, slightly domed ---- */
.wheel {
  z-index: 2;
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, #f8f8f6 38%, #ececea 72%, #dfdfdb 100%);
  box-shadow:
    /* bevel of the ring's outer edge */
    inset 1.5px 1.5px 1px rgba(255, 255, 255, .95),
    inset -1.5px -2px 2px rgba(96, 90, 80, .22),
    inset -3px -4px 6px rgba(96, 90, 80, .08),
    /* where the ring meets the face */
    0 0 0 1px rgba(140, 144, 150, .5),
    -1px -1px 1px rgba(255, 255, 255, .9),
    /* it stands proud of the face, so it casts a little shadow down-right */
    1.5px 2.5px 2.5px rgba(70, 62, 50, .26),
    3px 5px 9px rgba(70, 62, 50, .10);
}

/* ---- seams: real grooves from the touch disc all the way to the outer edge ---- */
.wheel-seams {
  background:
    /* each groove: a dark line with a lit edge beside it (light falling into the cut) */
    linear-gradient(45deg, transparent calc(50% - 1px), rgba(84, 86, 90, .5) calc(50% - 1px), rgba(84, 86, 90, .5) calc(50% + .4px), rgba(255, 255, 255, .95) calc(50% + .4px), rgba(255, 255, 255, .95) calc(50% + 1.3px), transparent calc(50% + 1.3px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), rgba(84, 86, 90, .5) calc(50% - 1px), rgba(84, 86, 90, .5) calc(50% + .4px), rgba(255, 255, 255, .95) calc(50% + .4px), rgba(255, 255, 255, .95) calc(50% + 1.3px), transparent calc(50% + 1.3px));
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 59%, #000 59.5% 100%);
          mask: radial-gradient(circle closest-side, transparent 0 59%, #000 59.5% 100%);
}

/* ---- the touch disc: sits lower than the ring, so the ring's inner wall shades its top-left ---- */
.wheel-inner {
  z-index: 1;
  background: radial-gradient(circle at 62% 68%, #fbfbfa 0%, #f2f2f0 55%, #e7e7e4 100%);
  box-shadow:
    inset 2.5px 3px 4px rgba(70, 64, 54, .24),
    inset 1px 1px 0 rgba(70, 64, 54, .18),
    inset -1px -1px 0 rgba(255, 255, 255, .95),
    /* the ring's inner wall: shaded where it faces away from the lamp, lit where it faces it */
    -1px -1px 0 rgba(120, 116, 108, .28),
    1px 1.5px 0 rgba(255, 255, 255, .95);
}

/* ---- centre button: raised from the disc, domed ---- */
.center {
  z-index: 3;
  background: radial-gradient(circle at 36% 30%, #ffffff 0%, #f6f6f4 45%, #e4e4e0 100%);
  box-shadow:
    inset 1.5px 1.5px 1px rgba(255, 255, 255, .95),
    inset -1.5px -2px 2px rgba(96, 90, 80, .2),
    0 0 0 1px rgba(150, 152, 156, .45),
    -1px -1px 1px rgba(255, 255, 255, .85),
    1.5px 2.5px 3px rgba(70, 62, 50, .26),
    3px 5px 8px rgba(70, 62, 50, .08);
}
.center.is-down, .center:active {
  background: radial-gradient(circle at 40% 36%, #f4f4f2, #e2e2de 100%);
  box-shadow:
    inset 1.5px 2px 3px rgba(70, 64, 54, .22),
    0 0 0 1px rgba(150, 152, 156, .45),
    .5px 1px 1px rgba(70, 62, 50, .2);
}
.wb { z-index: 2; }

/* pressing part of the ring tips it toward that button */
.wheel.rock-menu { transform: perspective(500px) rotateX(4deg); }
.wheel.rock-play { transform: perspective(500px) rotateX(-4deg); }
.wheel.rock-prev { transform: perspective(500px) rotateY(-4deg); }
.wheel.rock-next { transform: perspective(500px) rotateY(4deg); }
