/* THF•POD 0.6.3: screen, runner, cart, accessible navigation fixes.
   Overrides previous layers without changing supplied artist or merchandise graphics. */
html,body{overscroll-behavior:none;max-width:100%;overflow-x:hidden}
.screen,.screen-app,.screen-content,.glass{min-width:0;max-width:100%;overflow-x:hidden!important}
.screen-content{touch-action:pan-y;overscroll-behavior-x:none;overflow-y:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.screen-content .custom-finish-preview,.screen-content .finish-field,.screen-content .finish-actions{min-width:0;max-width:100%}
.screen-content .finish-field{padding:0 12px;margin:12px 0;overflow:hidden}
.screen-content .finish-field input[type=range]{min-width:0;max-width:100%;display:block;box-sizing:border-box}
.screen-content .finish-adjust{grid-template-columns:repeat(4,minmax(0,1fr));max-width:100%}
.screen-content .finish-adjust button{min-width:0;padding:9px 0}
.screen-content .finish-actions{margin:9px 12px 13px;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}
.screen-content .custom-finish-preview{margin:8px 12px;width:calc(100% - 24px);min-height:92px}
.screen-content .screen-title{overflow-wrap:break-word;word-break:normal}
.screen-content input:not([type=range]),.screen-content select{font-size:16px!important;max-width:100%}
/* Strong selection contrast on EVERY wallpaper (Pearl uses black/dark text). */
.screen-content [data-choice].selected,.screen-content [data-choice].selected:hover{
  outline:2px solid #f8cfec!important;outline-offset:-2px!important;
  background:linear-gradient(112deg,#d89abc,#8b70d6)!important;border-color:#ffffff!important;
  color:#161326!important;box-shadow:inset 0 0 0 1px #554168aa,0 0 0 1px #3a2743a6!important;
}
.screen-content [data-choice].selected strong,.screen-content [data-choice].selected small{color:#161326!important}
.screen[data-text-tone=dark] .screen-content [data-choice].selected,.screen[data-wallpaper=pearl]:not(.has-custom-wallpaper) .screen-content [data-choice].selected{
  background:linear-gradient(112deg,#c07ea5,#8e79be)!important;outline-color:#3b204e!important;
  color:#100e17!important;box-shadow:inset 0 0 0 2px #30193f88!important
}
.screen-content .swatch.selected{outline:3px solid #f6eaf9!important;outline-offset:3px!important}
.screen-content .swatch.active.selected{outline-color:#3c2545!important}
/* Keep the central title and footer action centered despite optional status icons. */
.status{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)!important}
.status-icons{gap:7px!important;min-width:0}
.battery-text{margin-left:6px!important;flex-shrink:0}
.screen-bottom{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;gap:2px!important}
#bottomLeft{justify-self:start!important}#bottomMiddle{justify-self:center!important}#bottomRight{justify-self:end!important}
/* Video: shared controls with exact left-center-right placement and an inline warning. */
.inline-video-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:8px 10px!important}
.inline-video-actions button{width:100%;min-width:0;min-height:35px;font-size:clamp(8px,2.15vw,10px);padding:7px 2px!important;white-space:nowrap}
.inline-video-actions button:nth-child(2){font-weight:950;background:#b59bd3;color:#161224}
.video-error:not([hidden]){display:grid;gap:6px;margin:8px 10px 12px;padding:11px;background:#3e2338;border:1px solid #efadc4;color:#ffeaf4;border-radius:10px;font-size:11px;line-height:1.4}
.video-error[hidden]{display:none!important}
.video-error strong{font-size:10px;letter-spacing:.05em}
.screen[data-text-tone=dark] .video-error{color:#241421;background:#f0d3e2;border-color:#704764}
.inline-video-wrap iframe{width:100%;border:0;max-width:100%}
/* Cart is a scrollable THF•POD screen, not a fullscreen pseudo-checkout modal. */
.pod-cart-row{display:grid;grid-template-columns:58px minmax(0,1fr) 28px;align-items:center;gap:7px;margin:9px;padding:8px;background:#ffffff14;border:1px solid #ffffff38;border-radius:12px}
.pod-cart-row img{width:58px;height:70px;object-fit:contain;border-radius:8px;background:#ffffff22}
.pod-cart-row strong{display:block;font-size:10px;line-height:1.25}
.pod-cart-row small{display:block;font-size:9px;line-height:1.4;margin:4px 0;color:#d9cce4}
.pod-cart-row b{font-size:12px}
.pod-cart-row button{height:29px;min-width:28px;border:1px solid #ffffff77;border-radius:8px;background:#67445d;color:white;font-size:18px;cursor:pointer}
.pod-cart-total{display:flex;justify-content:space-between;gap:6px;margin:12px 9px;padding:12px 10px;border:1px solid #ffffff66;border-radius:10px;font-size:11px}
.pod-cart-total b{white-space:nowrap}
.screen[data-text-tone=dark] .pod-cart-row,.screen[data-text-tone=dark] .pod-cart-total{background:#fff9;color:#231f2a;border-color:#50435f}
.screen[data-text-tone=dark] .pod-cart-row small{color:#34313d}
.pod-add-toast{position:absolute;bottom:48px;left:50%;transform:translate(-50%,6px);z-index:55;min-width:60%;max-width:92%;padding:9px;background:#2d203b;color:#fff;text-align:center;border:1px solid #ebc3e1;border-radius:9px;font-size:11px;font-weight:800;pointer-events:none;opacity:0;transition:opacity .15s,transform .15s}
.pod-add-toast.visible{opacity:1;transform:translate(-50%,0)}
.merch-early-cart{display:block;width:100%;min-height:47px;margin:12px 0 18px;background:linear-gradient(110deg,#e8afce,#a58bd6)!important;color:#181124!important;border:1px solid #f4dbeb!important;cursor:pointer}
/* Avoid metadata and controls clipping in long product detail views. */
.merch-detail .merch-variation{min-width:0}
.merch-detail .merch-variation select{max-width:100%;min-width:0}
/* Runner menu state reachable using the full physical-style wheel, including text edges. */
.screen>.runner-overlay .runner-layer{overflow-y:auto!important;touch-action:pan-y!important;overscroll-behavior:contain!important;align-items:flex-start!important}
.screen>.runner-overlay .runner-panel{height:auto!important;min-height:0!important;flex-shrink:0!important;overflow:visible!important;max-height:none!important;margin:auto 0!important}
.screen>.runner-overlay .runner-layer .runner-panel button.runner-selected,
.screen>.runner-overlay .runner-layer .runner-panel input.runner-selected{outline:2px solid #ffb9df!important;outline-offset:2px!important;box-shadow:0 0 0 3px #5e446c!important}
.screen>.runner-overlay .runner-layer .runner-panel label:has(input.runner-selected){background:#b68ccb44;border-radius:6px}
/* Room for longer separate shell models, without inflating click wheel. */
.device.hybrid{width:calc(var(--device-width,400px) + 37px)!important;max-width:none!important}
.device.hybrid .screen{height:clamp(400px,56dvh,540px)!important}
.device.classic .screen{height:clamp(402px,54dvh,510px)!important}
.device.nano .screen{height:clamp(375px,54dvh,525px)!important}
.device .wheel{flex-shrink:0!important}
/* At mobile widths, the exterior never scrolls; only the internal screen and open dialogs do. */
@media(max-width:700px){
 html,body{height:100%;height:100dvh;overflow:hidden!important;position:relative}
 .layout{height:100dvh;min-height:0!important;padding:calc(env(safe-area-inset-top) + 5px) 7px calc(env(safe-area-inset-bottom) + 5px)!important;display:flex;flex-direction:column;overflow:hidden!important}
 .site-header{flex:none;justify-content:center}
 .intro{flex:none;margin:3px 0 2px!important}
 .intro h1{font-size:clamp(13px,4.5vw,21px)!important;white-space:nowrap;line-height:1.05;margin:3px 0!important;letter-spacing:-.055em}
 .intro>p:last-child{font-size:clamp(9px,2.5vw,11px)!important;line-height:1.1;margin:4px 0 0}
 .stage{flex:1 1 auto;min-height:0!important;height:auto!important;padding:2px 0!important;align-items:center!important;overflow:visible}
 .stage-extras,.hints,.footer{display:none!important}
 .device.hybrid{width:calc(var(--device-width,317px) + 37px)!important}
 .pod-side-actions{z-index:6}
 .signup-nudge{display:none!important}
 .modal-backdrop{padding:12px max(7px,env(safe-area-inset-left))!important}
 .modal{max-height:calc(100dvh - 28px)!important;overflow-y:auto}
}
@media(max-width:370px){
 .device.hybrid{width:calc(var(--device-width,315px) + 23px)!important}
 .screen-content .screen-title{font-size:17px}
 .status-icons{gap:4px!important}
 .battery-text{font-size:7px!important;margin-left:3px!important}
}
@media(prefers-reduced-motion:reduce){.pod-add-toast{transition:none}}
