/* The machine is the interface: a white face, a metal seam, a small LCD, one wheel. */
.os-window.pocket-window { width: 286px; min-width: 0; max-width: calc(100vw - 16px); max-height: calc(100svh - 112px); top: 50px; left: calc(50% - 143px); border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.pocket-window .os-window-body { padding: 0; max-height: none; background: transparent; overflow: visible; }
.pocket-stage { --pocket-width: min(262px,calc((100svh - 150px)*.61),calc(100vw - 60px)); display: flex; flex-direction: column; align-items: center; padding: 12px 12px 14px; color: #3d3d39; font-family: "Lucida Grande","Helvetica Neue","PingFang SC",sans-serif; }
.pocket-stage button { margin: 0; text-decoration: none; }
.pocket-device { position: relative; flex: none; width: var(--pocket-width); min-width: 170px; aspect-ratio: 262 / 430; border: 1px solid #8e908e; border-radius: 22px; background: linear-gradient(98deg,#b8bab8 0,#f8f8f6 1.2%,#fff 3%,#fefefd 72%,#eeeeeb 97%,#afb2b1 99%,#e7e9e7 100%); box-shadow: inset 0 1px 1px #fff,inset 0 -3px 2px #929791,1px 3px 0 #818580,0 10px 8px #0003; outline: none; }
.pocket-device > .os-titlebar { position: absolute; top: 2px; left: 0; width: calc(100% - 66px); height: 16px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; z-index: 2; }
.pocket-device > .os-titlebar > span { display: none; }
.pocket-device > .os-titlebar .os-window-controls { top: 1px; left: 13px; gap: 7px; }
.pocket-device::before { content: ""; position: absolute; inset: 2px 3px 3px; border-radius: 19px; border: 1px solid #fff; box-shadow: inset 0 -1px 1px #d4d6d1; pointer-events: none; }
.pocket-device::after { content: ""; position: absolute; left: 8%; right: 8%; top: 4px; height: 11%; border-radius: 12px 12px 50% 50%; background: linear-gradient(#fff9,#fff0); pointer-events: none; }
.pocket-device:focus-visible { outline: 1px solid #777; outline-offset: 5px; }
.pocket-top-edge { position: absolute; inset: -4px 9% auto; height: 9px; }
.pocket-stage .pocket-hold { position: absolute; top: 0; right: 0; width: 31px; height: 9px; padding: 0; border: 1px solid #8e928b; border-radius: 3px; background: #a7aaa2; box-shadow: inset 0 1px 2px #0005; cursor: pointer; z-index: 1; }
.pocket-hold > span { position: absolute; left: 1px; top: 0; bottom: 0; width: 17px; border-radius: 2px; background: linear-gradient(#f8f8f5,#b7bab2); box-shadow: 1px 0 1px #0005; transition: transform 120ms ease-out; }
.pocket-hold::before { content: ""; position: absolute; inset: -8px -4px; }
.is-held .pocket-hold { background: #d36b3b; }
.is-held .pocket-hold > span { transform: translateX(10px); }
.pocket-hold-engraving { position: absolute; top: 4px; right: 36px; font: 6px/1 Arial,sans-serif; color: #696d64; letter-spacing: .05em; }
.pocket-jack { position: absolute; right: 64px; top: 1px; width: 9px; height: 5px; border-radius: 50%; background: #4d514b; border: 1px solid #c4c7be; box-shadow: inset 0 1px 2px #000; }
.pocket-port { position: absolute; bottom: -2px; width: 50px; height: 3px; left: calc(50% - 25px); border-radius: 2px; background: #666b63; box-shadow: 0 1px #eee; }
.pocket-screen { position: absolute; top: 7%; left: 8%; right: 8%; height: 39.5%; display: flex; flex-direction: column; border: 2px solid #5b6156; border-radius: 4px; background: #e8eddd; color: #252a22; box-shadow: inset 0 1px 3px #3335,0 1px 0 #fff,0 0 0 2px #d0d3ca; overflow: hidden; font: 12px/1.3 "Lucida Grande","Helvetica Neue","PingFang SC",sans-serif; }
.pocket-screen-header { flex: 0 0 21px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 5px; border-bottom: 1px solid #737c68; background: linear-gradient(#f3f6e9,#d0d7c2); }
.pocket-screen-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.pocket-playing-symbol { position: absolute; left: 6px; font-size: 8px; }
.pocket-lock-symbol { position: absolute; right: 27px; font-size: 9px; }
.pocket-battery { position: absolute; right: 7px; width: 16px; height: 7px; border: 1px solid #4e5846; border-radius: 1px; box-shadow: inset 0 0 0 1px #e8eddd; background: #69775a; }
.pocket-battery::after { content: ""; position: absolute; top: 1px; right: -3px; width: 2px; height: 3px; background: #4e5846; }
.pocket-screen-content { flex: 1; min-height: 0; overflow: hidden; }
.pocket-menu-list { height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #88917d transparent; }
.pocket-stage .pocket-menu-row { width: 100%; height: 26px; display: flex; align-items: center; justify-content: space-between; gap: 3px; margin: 0; padding: 0 9px; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; font: 600 12px/1.2 "Lucida Grande","Helvetica Neue","PingFang SC",sans-serif; cursor: pointer; }
.pocket-menu-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pocket-menu-row.is-selected { background: linear-gradient(#7c8375,#626b5b); color: #fff; }
.pocket-row-arrow { font: 20px/1 Arial,sans-serif; }
.pocket-screen-footer { flex: 0 0 15px; padding: 0 7px 2px; display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: #434c3b; }
.pocket-screen-footer [data-pocket-status] { min-width: 0; flex: 1; padding: 0 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; font-size: 9px; }
.pocket-volume-meter { width: 27px; height: 4px; background: linear-gradient(to right,#637157 0%,#637157 calc(var(--pocket-volume,.65)*100%),#b4bea7 calc(var(--pocket-volume,.65)*100%)); }
.pocket-track { display: flex; align-items: center; gap: 8px; padding: 9px 8px 5px; }
.pocket-cover { flex: none; width: 55px; height: 55px; display: block; box-shadow: 1px 2px 2px #0003; }
.pocket-track-copy { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.pocket-track-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; line-height: 1.15; }
.pocket-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.pocket-track-copy small { font-size: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pocket-time { display: flex; justify-content: space-between; padding: 0 10px; font: 10px/1.2 "Lucida Grande",sans-serif; font-variant-numeric: tabular-nums; }
.pocket-screen input[type=range] { display: block; width: calc(100% - 20px); height: 12px; min-height: 0; margin: 2px 10px 1px; padding: 0; accent-color: #606b55; cursor: pointer; }
.pocket-screen input[type=range]:disabled { cursor: default; }
.pocket-volume-page { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pocket-volume-speaker { flex: none; width: 52px; height: 40px; object-fit: contain; }
.pocket-volume-page output { font-size: 15px; font-variant-numeric: tabular-nums; }
.pocket-help { height: 100%; overflow-y: auto; padding: 3px 9px; font-size: 9px; line-height: 1.5; scrollbar-width: thin; }
.pocket-help p { margin: 5px 0; }
.pocket-loading { padding: 12px 10px; text-align: center; font-size: 10px; }
.pocket-loading > [data-edit] { display: block; margin-bottom: 8px; }
.pocket-wheel { position: absolute; width: 62.5%; aspect-ratio: 1; left: 18.75%; bottom: 10.2%; border: 1px solid #c4c9cc; border-radius: 50%; background: radial-gradient(circle at 45% 35%,#dce0e2 0%,#d2d7da 65%,#c9ced2 100%); box-shadow: inset 0 1px 2px #fff8,0 1px 1px #fff; touch-action: none; user-select: none; cursor: grab; }
.pocket-wheel:active { cursor: grabbing; }
.pocket-stage .pocket-key { position: absolute; width: 27%; height: 23%; padding: 0; display: grid; place-items: center; color: #fff; border: 0; background: transparent; font: 700 10px/1 Arial,sans-serif; text-shadow: 0 1px 1px #92999e; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pocket-key svg { width: 21px; height: 14px; fill: currentColor; }
.pocket-key-menu { top: 5%; left: 36.5%; }
.pocket-key-previous { top: 38.5%; left: 3%; }
.pocket-key-next { top: 38.5%; right: 3%; }
.pocket-key-play { bottom: 5%; left: 36.5%; }
.pocket-key:active { color: #fafafa; transform: translateY(1px); }
.pocket-stage .pocket-centre { position: absolute; left: 32%; top: 32%; width: 36%; height: 36%; padding: 0; border: 1px solid #d0d5d8; border-radius: 50%; background: linear-gradient(135deg,#fff,#f4f6f7 70%,#e9edf0); box-shadow: inset 0 1px 1px #fff,inset 0 -1px 2px #c5cbd0,0 1px 1px #0001; cursor: pointer; }
.pocket-centre:active { background: linear-gradient(#dce0d5,#e9ece2); box-shadow: inset 0 1px 3px #9ba58d; }
.pocket-key:focus-visible,.pocket-centre:focus-visible,.pocket-hold:focus-visible { outline: 1px solid #636c5b; outline-offset: 3px; }
.is-held .pocket-key,.is-held .pocket-centre { cursor: default; color: #e9ecee; }
.pocket-stage .pocket-retry { display: inline-block; margin: 6px 0 2px; padding: 3px 10px; border: 1px solid #999c94; border-radius: 4px; background: linear-gradient(#fff,#e3e4de); font: inherit; color: #3d4436; cursor: pointer; }
.pocket-window.is-zoomed .os-window-body { display: grid; place-items: center; }
.pocket-window.is-zoomed .pocket-stage { --pocket-width: min(320px,calc((100svh - 150px)*.61)); width: 100%; }
.pocket-window:fullscreen .pocket-stage { --pocket-width: min(320px,calc((100svh - 50px)*.61)); }
.pocket-window::backdrop { background: transparent; }
@media(max-width:600px) {
  .os-window.pocket-window { left: max(8px,calc(50% - 143px)); top: 43px; width: min(286px,calc(100vw - 16px)); max-width: calc(100vw - 16px); max-height: calc(100svh - 112px); }
}
@media(max-height:620px) {
  .pocket-track { gap: 6px; padding: 5px 7px 2px; }
  .pocket-cover { width: 40px; height: 40px; }
  .pocket-track-copy { gap: 2px; }
  .pocket-track-copy strong { font-size: 10px; }
  .pocket-track-copy small { font-size: 9px; }
}
@media(max-height:520px) {
  .pocket-stage { padding-top: 8px; padding-bottom: 8px; }
  .pocket-cover { width: 34px; height: 34px; }
  .pocket-track { padding-top: 4px; padding-bottom: 1px; }
}
@media(prefers-reduced-motion:reduce) { .pocket-hold > span { transition: none; } }
