/* THF•POD 0.6.1: progressive enhancements layered on top of v0.6.
   Existing device silhouette, approved colors, artwork and transport retained. */
:root{--thf-accent:#f3b0d5}
body.arcade-open{overflow:hidden!important}
.intro{max-height:66px!important;flex-shrink:0}
.intro h1{letter-spacing:-.045em;white-space:nowrap;line-height:1.06;margin:2px 0 4px}
.intro em{font-style:normal;color:#d4a2e9}
.device-footer span:first-child{font-size:1.07em}
/* Pearl is an explicit contrast mode, not an OS/light-mode guess. */
.screen[data-wallpaper='pearl']:not(.has-custom-wallpaper) .screen-content,
.screen[data-text-tone='dark'] .screen-content{color:#15131e!important}
.screen[data-wallpaper='pearl']:not(.has-custom-wallpaper) .screen-title,
.screen[data-text-tone='dark'] .screen-title{color:#181520!important;text-shadow:none!important}
.screen[data-wallpaper='pearl']:not(.has-custom-wallpaper) .byline,
.screen[data-text-tone='dark'] .byline{color:#382c48!important}
.screen[data-wallpaper='pearl']:not(.has-custom-wallpaper) .screen-subtitle,
.screen[data-text-tone='dark'] .screen-subtitle,
.screen[data-text-tone='dark'] .device-volume-note{color:#32303b!important}
.screen[data-wallpaper='pearl']:not(.has-custom-wallpaper) .screen-note,
.screen[data-wallpaper='pearl']:not(.has-custom-wallpaper) .mini-card,
.screen[data-wallpaper='pearl']:not(.has-custom-wallpaper) .option-button,
.screen[data-text-tone='dark'] .screen-note,
.screen[data-text-tone='dark'] .mini-card,
.screen[data-text-tone='dark'] .option-button{color:#17141f!important;background:rgba(255,255,255,.72)!important;border-color:#41374b77!important}
.screen[data-text-tone='dark'] .mini-card strong,
.screen[data-text-tone='dark'] .mini-card small,
.screen[data-text-tone='dark'] .player-links button,
.screen[data-text-tone='dark'] .transport button,
.screen[data-text-tone='dark'] .timeline span,
.screen[data-text-tone='dark'] .playlist-title,
.screen[data-text-tone='dark'] .device-info b,
.screen[data-text-tone='dark'] .milestone-card small{color:#23212b!important;text-shadow:none!important}
.screen[data-text-tone='dark'] .milestone-card{color:#17141f!important;background:rgba(255,255,255,.87)!important}
.screen[data-text-tone='dark'] .player-links button,
.screen[data-text-tone='dark'] .screen-cta{color:#1b1a27!important;background:#fff9!important;border:1px solid #686075!important}
.screen[data-text-tone='dark'] .player .primary{background:#2a2337!important;color:white!important}
.screen[data-text-tone='dark'] .status,
.screen[data-text-tone='dark'] .screen-bottom{color:white}
/* Pill controls and vertical screen scrollbar remain discoverable by wheel. */
.screen-content{scrollbar-width:thin;scrollbar-color:#f0bcdf9c #1a17254f;overflow-anchor:none}
.screen-content [data-choice]:focus-visible{outline:2px solid #eeacd5;outline-offset:-2px}
.screen-content .mini-card:active,.screen-content .menu-item:active,.screen-content .option-button:active{filter:brightness(1.12);transform:scale(.989)}
.screen-content [data-choice]{transition:filter .11s,transform .11s,border-color .11s}
.battery-text{font-size:8px;font-weight:900;letter-spacing:0;color:#f6eaf3}
/* Extra screens: short but readable cards, scrolling exclusively in the device. */
.screen-content .screen-note{line-height:1.55}
/* No external iframe/website is ever allowed to cover the hardware controls. */
.arcade-overlay,.thf-store-overlay{position:fixed;inset:0;z-index:60;background:rgba(5,6,14,.94);overflow:auto;overscroll-behavior:contain;display:flex;align-items:center;justify-content:center;padding:12px max(10px,env(safe-area-inset-right))}
.arcade-overlay[hidden],.thf-store-overlay[hidden]{display:none!important}
.arcade-shell{width:min(95vw,490px);max-height:calc(100dvh - 20px);display:flex;flex-direction:column;color:#f3ebff;background:linear-gradient(160deg,#151728,#17112a);border:1px solid #b998c288;border-radius:23px;overflow:hidden;box-shadow:0 16px 70px #000d}
.arcade-top{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#23283b;padding:10px 14px;border-bottom:1px solid #f5b2d445}
.arcade-top div{display:flex;flex-direction:column;gap:2px}
.arcade-top small{font-weight:850;color:#e8a6cb;letter-spacing:.14em;font-size:9px}
.arcade-top strong{font-size:18px;letter-spacing:-.02em}
.arcade-top button,.thf-store-modal header button{border:1px solid #fbd0ea77;background:#ffffff1c;color:#fff;border-radius:10px;font-size:22px;min-height:40px;min-width:42px;cursor:pointer}
.arcade-status{display:flex;justify-content:space-between;align-items:center;gap:4px;padding:8px 11px;color:#f6ecfa;font-size:10px;font-weight:850;flex-wrap:wrap}
.arcade-stage{position:relative;min-height:0;flex:1;display:flex;justify-content:center;background:#101629;overflow:hidden}
.arcade-stage canvas{height:auto;width:auto;max-width:100%;max-height:min(64dvh,580px);aspect-ratio:420/590;object-fit:contain;touch-action:none;display:block;}
.arcade-cover{position:absolute;inset:0;background:#0a0e1bd7;display:flex;align-items:center;justify-content:center;overflow-y:auto;padding:12px}
.arcade-cover[hidden]{display:none}
.arcade-prompt{width:min(100%,380px);display:flex;flex-direction:column;gap:9px;background:#191b32e9;padding:15px;border:1px solid #f5b5d565;border-radius:18px;color:white;box-shadow:0 15px 50px #0007}
.arcade-prompt h2{margin:0;text-align:center;font-size:20px}
.arcade-prompt p{font-size:12px;color:#e5d7e9;line-height:1.4;margin:2px 0}
.arcade-prompt fieldset{padding:8px;border:1px solid #ffffff4a;border-radius:12px}
.arcade-prompt legend{font-size:10px;font-weight:850;letter-spacing:.12em}
.arcade-prompt fieldset label{font-size:12px;display:block;margin:7px 0}
.arcade-prompt button{padding:12px;min-height:40px;border-radius:10px;border:1px solid #eac3ec77;background:#393146;color:white;cursor:pointer;font-weight:850;letter-spacing:.03em}
.arcade-prompt button.arcade-primary{background:linear-gradient(115deg,#eca6cf,#9879e8);color:#151022}
.arcade-controls{padding:8px;display:flex;gap:5px;background:#171c2c}
.arcade-controls[hidden]{display:none}
.arcade-controls button{flex:1;min-width:0;border-radius:9px;color:white;background:#3f354e;border:1px solid #ffc5e36d;padding:8px 3px;font-size:10px;font-weight:800;touch-action:manipulation;cursor:pointer}
.arcade-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;background:#22243a;font-size:9px;font-weight:800;letter-spacing:.03em}
.arcade-bottom button{border:1px solid #ffffff66;color:white;background:#332c43;padding:9px;border-radius:9px;font-size:10px;cursor:pointer}
/* Purchase previews have deliberate disabled commerce, no card number/email capture. */
.thf-store-modal{width:min(95vw,560px);max-height:88dvh;overflow-y:auto;border:1px solid #d6aecabb;border-radius:23px;background:linear-gradient(155deg,#252035,#111629);color:#f8edfa;box-shadow:0 18px 70px #000e}
.thf-store-modal header{padding:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e9bfd547}
.thf-store-modal header strong{font-size:14px;letter-spacing:.09em}
#thfStoreBody{padding:16px}
.thf-store-product{display:flex;align-items:center;gap:15px}
.thf-store-product img{width:115px;height:115px;object-fit:contain;border-radius:12px;background:#ffffff1a}
.thf-store-product h2{font-size:18px;line-height:1.1;margin:0 0 7px}
.thf-store-product p{color:#d7cada;font-size:12px;line-height:1.4}
.thf-store-price{font-size:24px;color:#f5b7d3}
.thf-store-note{margin:14px 0;padding:13px;border:1px solid #b894b775;border-radius:13px;background:#ffffff0d;font-size:12px;line-height:1.5}
.thf-store-note p{margin:7px 0;color:#e8dce8}
.thf-store-register{min-height:42px;padding:9px 14px;border:0;border-radius:10px;background:#e8b2ce;color:#211a2d;font-weight:800;cursor:pointer}
.merch-variation{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:13px}
.merch-variation label{font-size:10px;letter-spacing:.1em;font-weight:850;color:#f1c6dd;align-self:end}
.merch-variation select{min-width:0;max-width:100%;width:100%;font-size:16px;color:#eee3f0;background:#393043;border:1px solid #ad86a4;border-radius:10px;padding:11px}
.merch-variation label[for='merchColor']{grid-column:1}.merch-variation #merchColor{grid-column:1}
.merch-variation label[for='merchSize']{grid-column:2;grid-row:1}.merch-variation #merchSize{grid-column:2;grid-row:2}
.merch-variation label[for='merchQuantity'],.merch-variation #merchQuantity{grid-column:1/-1}
.merch-not-for-sale{display:block;width:100%;border:1px solid #efb2d7;color:#fff4fa;cursor:pointer;background:#67506d}
/* Modal help and product detail: independent scroll, touch not trapped. */
.modal-backdrop{z-index:55}
@media(max-width:700px){
 .site-header{height:28px;min-height:28px}
 .intro{margin:0;max-height:54px!important}
 .intro h1{font-size:clamp(13px,3.65vw,23px);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:clip;letter-spacing:-.035em}
 .intro>p:last-child{font-size:9px}
 .stage{min-height:0}
 .pod-side-actions{gap:clamp(9px,1.8vh,20px)!important}
 .rail-group{gap:clamp(4px,.8vh,8px)}
 .device-mark,.device-footer{font-size:8px!important}
 .arcade-shell{max-height:calc(100dvh - 12px)}
 .arcade-stage canvas{max-height:55dvh}
 .arcade-prompt{padding:10px;gap:6px}
 .arcade-prompt h2{font-size:17px}
 .arcade-prompt p{font-size:11px}
 .arcade-controls button{font-size:9px}
 .thf-store-product img{width:82px;height:82px}
 .thf-store-product h2{font-size:15px}
}
@media(max-width:370px){.intro h1{font-size:13px}.arcade-top strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){.screen-content [data-choice]{transition:none!important}}

/* Runner countdown remains centered and easy to recognize. */
.arcade-countdown{font-size:clamp(48px,15vw,92px);font-weight:900;color:#ffffff;text-shadow:0 4px 0 #773f94,0 0 30px #e9a5ce;text-align:center;letter-spacing:.08em}
/* Ensure the internal device logo is never covered by the battery label. */
.status{position:relative}.status #screenHeading{position:absolute;left:50%;transform:translateX(-50%);max-width:43%;text-align:center;pointer-events:none;white-space:nowrap}.status .status-icons{margin-left:auto}
/* Video text controls remain navigable after wheel selection. */
.inline-video-actions button:focus-visible{outline:2px solid #f3aedb;outline-offset:2px}
