/* Selection layout only. Brand fonts, colours, header, buttons, pills and
   return control come from the same stylesheets as the other public pages. */
#vp-portal[data-page=live-now] .selection-main{max-width:1200px;margin:0 auto;padding:0 40px 80px}
#vp-portal .selection-intro{display:flex;align-items:center;justify-content:space-between;gap:32px;padding:48px 0 40px}
#vp-portal .selection-intro h1{margin:0 0 24px}
#vp-portal .selection-intro p{margin:0}
#vp-portal .selection-action{gap:12px;min-height:44px;padding:12px 18px;font-size:14px;line-height:1.4;white-space:nowrap;text-decoration:none;flex-shrink:0;cursor:pointer}
#vp-portal .toolbar{display:flex;align-items:flex-end;justify-content:flex-start;gap:32px;border-bottom:1px solid var(--vp-border)}
#vp-portal .tabs{display:flex;align-items:stretch;gap:32px;flex-shrink:0}
#vp-portal .selection-tab{display:flex;align-items:center;justify-content:center;min-height:52px;padding:10px 0 14px;border:0;border-bottom:4px solid transparent;border-radius:0;background:none;color:var(--vp-muted);font-size:16px;font-weight:400;line-height:1.4;white-space:nowrap;cursor:pointer}
#vp-portal .selection-tab[aria-pressed=true]{border-bottom-color:var(--vp-accent);color:var(--vp-accent)}
#vp-portal .selection-tab:hover{color:var(--vp-text)}
#vp-portal .selection-tab[aria-pressed=true]:hover{color:var(--vp-accent)}
#vp-portal .selection-search{display:flex;align-items:center;gap:10px;width:320px;max-width:100%;min-width:0;height:52px;margin:0;padding:10px 0 18px;position:relative;border:0;border-radius:0;background:none;color:var(--vp-muted)}
#vp-portal .selection-search>svg{flex:none}
#vp-portal .selection-search:has(input:focus-visible){outline:none}
#vp-portal .selection-search::after{content:"";position:absolute;left:26px;bottom:0;width:min(var(--search-line-width,190px),calc(100% - 26px));height:4px;background:var(--vp-accent);opacity:0;pointer-events:none}
#vp-portal .selection-search:focus-within::after{opacity:1}
#vp-portal .selection-search input{width:100%;min-width:0;padding:0;border:0;background:none;color:var(--vp-text);font-size:14px;line-height:1.4}
#vp-portal .selection-search input::placeholder{color:var(--vp-muted);opacity:1}
#vp-portal .selection-search input:focus{outline:none}
#vp-portal .count{margin:18px 0 24px;color:var(--vp-muted);font-size:13px;line-height:1.5}
#vp-portal .grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 24px}
#vp-portal .card{position:relative;min-width:0}
#vp-portal .picture{position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:6px;background:var(--vp-surface);outline:1px solid transparent;outline-offset:0}
#vp-portal .card.playing .picture{outline-color:var(--vp-accent)}
#vp-portal .card .cover{position:absolute;inset:0;display:block;width:100%;height:100%;padding:0;border:0;border-radius:6px;background:none;cursor:pointer}
#vp-portal .card .cover img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
#vp-portal .picture iframe{position:absolute;inset:0;width:100%;height:100%;border:0;z-index:1;opacity:0;transition:opacity .3s ease;pointer-events:none}
#vp-portal .picture iframe.ready{opacity:1;pointer-events:auto}
#vp-portal .card .caption{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:24px;margin:6px 0 2px}
#vp-portal .model-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--vp-text);font-size:16px;line-height:1.3;font-weight:400;text-decoration:none}
#vp-portal .card .status{display:block;color:var(--vp-muted);font-size:12px;line-height:1.5}
#vp-portal .dot{color:var(--vp-accent);margin-right:6px;font-size:9px}
#vp-portal .room-link{flex-shrink:0;color:var(--vp-accent);font-size:13px;line-height:1.5;font-weight:300;text-decoration:none;white-space:nowrap}
#vp-portal .preview-icon{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);width:34px;height:34px;border:0;border-radius:50%;background:#17171699;pointer-events:none}
#vp-portal .preview-icon::before{content:"";position:absolute;left:14px;top:11px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:8px solid var(--vp-text)}
#vp-portal .card.playing .preview-icon{visibility:hidden}
#vp-portal .selection-pagination{display:flex;justify-content:center;margin-top:32px}
#vp-portal .selection-pagination:has(>#more[hidden]){display:none}
#vp-portal .more{margin:0}
#vp-portal .tv-tab{position:fixed;right:0;top:var(--selection-tv-top,112px);visibility:hidden;z-index:41;display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 17px;background:var(--vp-surface);border:1px solid #d2829b66;border-radius:5px;color:var(--vp-text);font-size:14px;font-weight:400;line-height:1.4;cursor:pointer}
#vp-portal .tv-tab span{color:var(--vp-accent)}
#vp-portal .tv-tab:hover{border-color:var(--vp-accent)}
#vp-portal #tv-drawer{position:fixed;z-index:42;top:var(--selection-tv-top,112px);bottom:auto;right:0;width:560px;max-width:calc(100vw - 24px);max-height:calc(100vh - var(--selection-tv-top,112px) - 12px);max-height:calc(100dvh - var(--selection-tv-top,112px) - 12px);margin:0;padding:13px 16px 16px;overflow:auto;background:var(--vp-surface);border:1px solid var(--vp-border);border-right:0;border-radius:6px 0 0 6px;box-shadow:-15px 15px 60px #0007;transform:translateX(calc(100% + 30px));visibility:hidden;transition:transform .25s ease,visibility .25s}
#vp-portal #tv-drawer.visible{transform:translateX(0);visibility:visible}
#vp-portal .tv-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
#vp-portal .tv-heading h2{font-size:24px;font-weight:300;line-height:1.3;letter-spacing:.01em;margin:0}
#vp-portal .tv-close{position:relative;flex-shrink:0;width:28px;height:28px;padding:0;border:0;background:none;color:var(--vp-text);cursor:pointer}
#vp-portal .tv-close::before,#vp-portal .tv-close::after{content:"";position:absolute;left:50%;top:50%;width:15px;height:1.5px;background:currentColor;transform:translate(-50%,-50%) rotate(45deg)}
#vp-portal .tv-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
#vp-portal .tv-intro{font-size:13px;font-weight:300;line-height:1.6;color:var(--vp-muted);margin:5px 0 12px}
#vp-portal .tv-screen{position:relative;aspect-ratio:16/9;background:var(--vp-bg);border-radius:6px;overflow:hidden;display:grid;place-items:center}
#vp-portal .tv-screen iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
#vp-portal .tv-gate{text-align:center;padding:15px}
#vp-portal .tv-gate p{margin:0 0 15px;font-size:13px;color:var(--vp-muted)}
#vp-portal .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:850px){
 #vp-portal .card.playing .caption{padding-right:0}
 #vp-portal .card.playing .room-link{position:absolute;right:0;bottom:0;font-size:12px}
 #vp-portal .card.playing .status{font-size:11px}
 #vp-portal #tv-drawer{padding:13px 16px 16px;width:400px}
}
@media(max-width:760px){
 #vp-portal .selection-action{max-width:100%;white-space:normal}
 #vp-portal .model-name{font-size:15px}
 #vp-portal .grid{grid-template-columns:minmax(0,1fr);gap:24px}
}
@media(max-width:640px){
 #vp-portal[data-page=live-now] .selection-main{padding:0 24px 48px}
 #vp-portal .selection-intro{padding:36px 0 32px}
 #vp-portal .toolbar{gap:12px;flex-wrap:wrap}
 #vp-portal .selection-search{flex:1 0 100%;width:100%;min-width:0;margin-top:4px}
 #vp-portal .selection-search input{font-size:16px}
 #vp-portal .tabs{gap:28px}
}
@media(prefers-reduced-motion:reduce){#vp-portal .picture iframe,#vp-portal #tv-drawer{transition:none}}
/* Paint the pagination action in its finished silver state. Its container
   intentionally has no opacity entrance, so silver cannot fade through black.
   Preserve the shared button finish and hover effects. */
#vp-portal #more.vp-visit{background-color:var(--vp-bg);backdrop-filter:none;-webkit-backdrop-filter:none;transition-property:transform,border-color,box-shadow}

#vp-portal .selection-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:24px}
#vp-portal .selection-intro>div{grid-column:1;grid-row:1}
@media(max-width:760px){
 #vp-portal .selection-intro{grid-template-columns:minmax(0,1fr);gap:24px}
 #vp-portal .selection-intro h1{font-size:32px}
 #vp-portal .card.playing .room-link{position:static;font-size:13px}
 #vp-portal .card.playing .status{font-size:12px}
 #vp-portal .card{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto}
 #vp-portal .card .picture{grid-column:1;grid-row:1}
 #vp-portal .card .caption{grid-column:1;grid-row:2;min-height:24px}
 #vp-portal .card .model-name{line-height:24px}
 #vp-portal .card .status{grid-column:1;grid-row:3}
 /* Keep the pictograms small, with separate 44px targets below the photo. */
 #vp-portal[data-page=live-now] .card>.connected-toy,
 #vp-portal[data-page=live-now] .card>.recorded-show{grid-column:1 / 2;grid-row:2 / 3;width:44px;height:44px;right:-10px;top:18px;bottom:auto;transform:translateY(-50%);touch-action:manipulation}
 #vp-portal[data-page=live-now] .card>.connected-toy::before{inset:0}
 #vp-portal[data-page=live-now] .card.has-recorded-show.has-connected-toy>.recorded-show{right:34px}
 #vp-portal[data-page=live-now] .card.has-connected-toy .caption,
 #vp-portal[data-page=live-now] .card.has-recorded-show .caption{padding-right:44px}
 #vp-portal[data-page=live-now] .card.has-recorded-show.has-connected-toy .caption{padding-right:88px}
}




/* Larger invisible touch target; preserve the size of the close cross. */
#vp-portal .tv-close{width:44px;height:44px;margin:-8px;touch-action:manipulation}
#vp-portal .selection-search:focus-within::after{opacity:1}
#vp-portal .selection-pagination[hidden]{display:none}
#vp-portal .tv-gate .room-link{display:inline-flex;margin-top:14px}


/* Account access is secondary, in the intro flow; TV remains a separate tab. */
#vp-portal .selection-account{display:inline-flex;align-items:center;justify-content:center;justify-self:end;border:1px solid #d2829b66;border-radius:5px;background:var(--vp-bg);color:var(--vp-accent);font-weight:400;box-shadow:0 4px 20px #0003;transition:border-color .2s ease}
@media(hover:hover){html:not(.touch-input) #vp-portal .selection-account:hover{border-color:var(--vp-accent)}}
#vp-portal .selection-account:is(:focus-visible,.is-tap-feedback){border-color:var(--vp-accent)}
#vp-portal .selection-account:focus-visible{outline:2px solid var(--vp-accent);outline-offset:4px}
@media(max-width:760px){#vp-portal .selection-intro{grid-template-columns:minmax(0,1fr)}#vp-portal .selection-account{grid-column:1;grid-row:2;justify-self:end}}
@media(prefers-reduced-motion:reduce){#vp-portal .selection-account{transition:none}}

/* Account stays in the intro; the compact TV tab floats without a reserved slot. */
#vp-portal .selection-actions{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:stretch;justify-self:end;align-self:start;gap:16px;width:max-content;max-width:100%;margin:0;padding:0}
#vp-portal .tv-tab{box-sizing:border-box;width:64px;min-width:64px;height:44px;min-height:44px;gap:6px;padding:0;justify-content:center;border-right:0;border-radius:5px 0 0 5px}
#vp-portal .tv-tab__play{display:block;flex:0 0 14px;width:14px;height:14px}
#vp-portal .tv-tab[data-positioned]{visibility:visible}
@media(max-width:760px){#vp-portal .selection-intro{row-gap:16px}#vp-portal .selection-actions{grid-column:1;grid-row:2;justify-self:start}#vp-portal .selection-account{justify-self:start}}

/* Short landscape screens need room for the actual player, not just its header.
   Both tab and panel move together; width also respects the available height. */
@media(max-height:600px){
 #vp-portal .tv-tab,#vp-portal #tv-drawer{top:12px}
 #vp-portal #tv-drawer{box-sizing:border-box;width:min(560px,calc((100vh - 124px) * 16 / 9 + 32px));width:min(560px,calc((100dvh - 124px) * 16 / 9 + 32px));max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
}
