/* Shared customer shell: one dock and consistent controls on every page. */
:root{--dock-bottom:max(4px,env(safe-area-inset-bottom,0px));--surface-soft:rgba(118,118,128,.12);--shell-safe-top:env(safe-area-inset-top,0px);--shell-safe-bottom:env(safe-area-inset-bottom,0px);--shell-header-top:max(10px,var(--shell-safe-top));--shell-header-height:58px;--shell-header-gap:14px;--shell-dock-height:58px;--shell-dock-space:calc(var(--shell-dock-height) + var(--dock-bottom))}
html{scroll-behavior:auto}body{overflow-x:clip}body:has(#site-navbar){padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
/* The fixed header and content share one safe-area-aware geometry (Safari/PWA). */
#site-header{top:var(--shell-header-top)!important;height:var(--shell-header-height)!important}
#main-content{padding-top:calc(var(--shell-header-top) + var(--shell-header-height) + var(--shell-header-gap))!important}
html[data-restored="true"] .page{animation:none!important}
#site-navbar{position:fixed!important;z-index:600;inset:auto 12px var(--dock-bottom) 12px!important;width:auto!important;max-width:420px!important;height:58px!important;min-height:0!important;margin:0 auto!important;padding:5px 10px!important;transform:none!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important;align-items:center!important;justify-items:center!important;border:1px solid var(--bord2)!important;border-radius:999px!important;background:rgba(26,27,34,.86)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 5px 22px rgba(0,0,0,.2)!important;backdrop-filter:blur(20px) saturate(150%)!important;-webkit-backdrop-filter:blur(20px) saturate(150%)!important}
#site-navbar::before,#site-navbar::after{display:none!important}
#site-navbar .nav-item,#site-navbar .nav-random{position:relative!important;display:grid!important;place-items:center!important;width:44px!important;min-width:0!important;max-width:100%!important;height:44px!important;min-height:0!important;padding:0!important;margin:0!important;flex:none!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--text3)!important;transform:none!important;box-shadow:none!important;transition:background .18s,color .18s!important}
#site-navbar .nav-item>i{position:static!important;display:grid!important;place-items:center!important;width:24px!important;height:24px!important;margin:0!important;padding:0!important;font-size:20px!important;line-height:1!important;color:inherit!important;transform:none!important;filter:none!important}
#site-navbar .nav-item:hover{background:var(--surface-soft)!important;color:var(--text)!important}
#site-navbar .nav-item.active{color:var(--text)!important;background:rgba(255,255,255,.1)!important}
#site-navbar .nav-item.nav-random,#site-navbar .nav-item.nav-random.active{background:linear-gradient(145deg,#5b94ff,#7363ee)!important;color:#fff!important}
#site-navbar .nav-random.active{box-shadow:0 0 0 2px rgba(158,181,255,.35)!important}
#site-navbar .nav-item:focus-visible{outline:2px solid var(--text2);outline-offset:2px}
html[data-theme="light"] #site-navbar{background:rgba(250,250,253,.9)!important;box-shadow:inset 0 1px 0 #fff,0 5px 22px rgba(30,40,60,.12)!important}
html[data-theme="light"] #site-navbar .nav-item:not(.nav-random){background:transparent!important;color:var(--text3)!important;border:0!important}
html[data-theme="light"] #site-navbar .nav-item:not(.nav-random).active{background:rgba(0,0,0,.065)!important;color:var(--text)!important}
body.dock-hidden #site-navbar{visibility:hidden;pointer-events:none}

/* Keep glass on a background sibling, never on the layer rasterising the logo/icons. */
:root{--shell-header-surface:rgba(19,20,27,.84);--shell-footer-surface:rgba(26,27,34,.9)}
html[data-theme="light"]{--shell-header-surface:rgba(248,248,252,.93);--shell-footer-surface:rgba(250,250,253,.94)}
#site-header,#site-navbar,html[data-theme="light"] #site-header,html[data-theme="light"] #site-navbar{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;isolation:isolate}
#site-header>.shell-glass,#site-navbar>.shell-glass{position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;backdrop-filter:blur(20px) saturate(150%);-webkit-backdrop-filter:blur(20px) saturate(150%)}
#site-header>.shell-glass{background:var(--shell-header-surface)}#site-navbar>.shell-glass{background:var(--shell-footer-surface)}
#site-header .header-logo,#site-header .header-actions{position:relative;z-index:1;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#site-header .header-brand-lockup,#site-header .header-brand-image{filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none!important;opacity:1!important;mix-blend-mode:normal}
#site-navbar>.nav-item:not(.nav-random),#site-navbar>.nav-item.nav-random{width:44px!important;height:44px!important;min-width:0!important;min-height:0!important;position:relative!important;transform:none!important}
#site-navbar .nav-item>.nav-icon{position:static!important;display:block!important;width:24px!important;height:24px!important;margin:0!important;transform:none!important;filter:none!important;flex-shrink:0;color:inherit}

/* Search popup: a single quiet surface, including its focused state. */
#searchPopup{max-height:min(78dvh,680px);overflow-y:auto}
#searchPopup .popup-hd{border:0;padding:18px 18px 6px}#searchPopup .search-wrap{padding:12px 16px}
#searchPopup .search-field{min-height:48px;border:1px solid var(--bord)!important;border-radius:16px;background:var(--surface-soft)!important;box-shadow:none!important}
#searchPopup .search-field:focus-within{border-color:var(--bord2)!important;box-shadow:inset 0 0 0 1px var(--bord)!important}
#searchPopup .search-field input{width:100%;min-width:0;min-height:44px;padding:0!important;border:0!important;outline:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;font-size:14px;color:var(--text)}
#searchPopup #searchResults{padding:0 16px 16px}
.search-popup-empty{grid-column:1/-1;padding:30px 12px;text-align:center;color:var(--text3);font-size:12px}
.search-popup-more{grid-column:1/-1;display:flex;justify-content:center;align-items:center;gap:9px;min-height:42px;background:var(--surface-soft);border:1px solid var(--bord);border-radius:14px;color:var(--text);font-size:12px}

/* Search workspace: search first, advanced options on demand. */
.search-page-head{position:sticky;top:max(8px,env(safe-area-inset-top,0px));width:calc(100% - 24px);max-width:1180px;margin:10px auto 0;padding:10px;border:1px solid var(--bord);border-radius:22px;background:var(--glass)!important;box-shadow:0 10px 30px rgba(0,0,0,.1)}
.search-page-row{gap:10px}.search-back{width:42px;height:42px;border-radius:50%;border-color:var(--bord);background:var(--surface-soft)}
.search-page-form{height:46px;min-width:0;border-color:transparent;border-radius:15px;background:var(--surface-soft);box-shadow:none}.search-page-form:focus-within{border-color:var(--bord2);box-shadow:none}
.search-page-form input{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;min-height:40px!important;font-size:14px}.search-page-form i{color:var(--text3)}
.search-submit{border-radius:50%;width:42px;padding:0;font-size:15px}.search-page-main{max-width:1180px;padding:30px 18px}
.search-intro{margin:0 0 22px}.search-intro .eyebrow{font-size:10px;letter-spacing:.14em;color:var(--text3);font-weight:700}.search-intro h1{font-size:clamp(27px,4vw,38px);font-weight:750;letter-spacing:-.04em;margin:5px 0}.search-intro p{color:var(--text3);font-size:13px;line-height:1.7}
.filter-panel{border-radius:22px;margin-bottom:24px;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.filter-heading{padding:15px 18px}.filter-heading strong{font-size:13px}.filter-heading small{font-size:11px}.filter-heading-icon{width:38px;height:38px;border-radius:12px;background:var(--surface-soft);border-color:var(--bord);color:var(--text2)}
.filters-body{padding:18px}.filter-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.filter-control{border-radius:12px;min-height:44px;font-size:12px;background:var(--surface-soft)!important;border:1px solid var(--bord)!important;color:var(--text)!important;box-shadow:none!important}.filter-control:focus{border-color:var(--bord2)!important;outline:0}.filter-field.wide{grid-column:auto}
.media-option{min-height:40px;border-radius:999px}.filter-label{font-size:11px;color:var(--text2)}
.search-summary{margin:24px 0 16px}.search-summary h1{font-size:19px}.search-summary p{font-size:12px}
.search-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:24px 16px}.search-card{border:0;border-radius:0;background:transparent;box-shadow:none}.search-card:hover{transform:translateY(-3px);box-shadow:none}
.search-poster{border-radius:18px;border:1px solid var(--bord)}.search-card-body{padding:10px 2px 0}.search-title{min-height:0;font-size:13px}.search-meta{font-size:10px;gap:6px}.search-kind,.search-rating{border-radius:999px;padding:5px 8px;line-height:1.2}
.search-skeleton{border:0;border-radius:18px;background:var(--surface-soft)}.company-results{background:var(--bg)!important;border-color:var(--bord2);box-shadow:var(--shadow)}.filter-actions{margin-top:20px}.reset-filters,.apply-filters,.load-more{border-radius:999px;min-height:42px}

/* Balanced profile cards and modal in both themes. */
.preference-row:last-child{border-bottom:0;padding-bottom:0}
.profiles-page{width:min(100% - 32px,1000px);min-height:calc(100svh - 90px);padding:24px 0 42px}
.profiles-top{padding:10px 14px;border:1px solid var(--bord);border-radius:20px;background:var(--glass)}.profiles-brand{height:36px}.profiles-brand img{max-height:32px}
.profiles-top-actions{display:flex;gap:8px;align-items:center}.profiles-back,.profiles-logout{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;color:var(--text2);background:var(--surface-soft);border:1px solid var(--bord)}
.profiles-intro{margin:clamp(40px,8vh,80px) 0 32px}.profiles-intro h1{font-size:clamp(27px,4vw,38px);font-weight:750;letter-spacing:-.04em}.profiles-intro p{font-size:13px;margin-top:9px;line-height:1.8}
.profiles-grid{width:100%;max-width:850px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px;justify-content:center}.profile-choice,.add-profile{min-width:0;max-width:210px;width:100%;justify-self:center}
.profile-main,.add-profile{min-height:218px;padding:26px 12px 22px;border:1px solid var(--bord);border-radius:26px;background:var(--surface-soft);gap:5px}.profile-choice.active .profile-main{background:rgba(92,123,231,.1);border-color:rgba(116,149,255,.35)}
.profiles-page .profile-avatar,.add-avatar{width:104px;height:104px;border-radius:30px;margin-bottom:12px;border:2px solid var(--bord);box-shadow:0 8px 24px rgba(0,0,0,.12)}.profile-choice.active .profile-avatar{border-color:#829bff;box-shadow:none}
.profile-edit{top:12px;left:12px;width:32px;height:32px;border-color:var(--bord2);background:var(--glass);color:var(--text)}.profiles-page .profile-name{font-size:15px}.profile-caption,.add-profile small{font-size:11px}.add-profile strong{font-size:14px}.add-avatar{background:transparent;border:1px dashed var(--bord2);color:var(--text2)}.active-mark{right:4px;bottom:4px;width:22px;height:22px;border-width:2px}
.profiles-note{font-size:11px;margin-top:26px}.profile-modal{z-index:2100;background:rgba(0,0,0,.48);padding:20px}.profile-dialog{width:min(100%,480px);padding:24px;border-radius:28px;max-height:calc(100dvh - 40px)}.profile-dialog-head h2{font-size:19px}.avatar-input-label{min-height:46px;font-size:12px;border-radius:14px}.preset-head strong{font-size:12px}.preset-head small{font-size:10px}.preset-grid{background:var(--surface-soft);border-radius:18px;gap:10px}.profile-dialog .form-input{border-color:var(--bord);background:var(--surface-soft);border-radius:14px;box-shadow:none}.profile-actions{margin-top:20px}.profile-save,.profile-delete{min-height:46px;border-radius:14px}

/* Content labels must not inherit button minimum heights. */
.genre-list,.d-genres{align-items:center!important}.genre-chip,.d-genre{display:inline-flex!important;align-items:center!important;align-self:flex-start;height:auto!important;min-height:0!important;padding:4px 9px!important;font-size:11px!important;line-height:1.35!important;border-radius:999px!important}
.pwa-install-card{padding:20px}.pwa-install-row{display:flex;align-items:center;gap:13px}.pwa-install-row img{width:48px;height:48px;border-radius:14px}.pwa-install-row h3{font-size:15px}.pwa-install-row p{font-size:12px;color:var(--text3);margin-top:3px}.pwa-install-card .btn-primary{margin-top:16px;min-height:44px;border-radius:14px}.pwa-install-status{font-size:11px;color:var(--text3);text-align:center;margin-top:10px}.pwa-banner{max-height:80dvh;overflow-y:auto;border-radius:28px!important}.pwa-help-steps{margin:16px 0;display:grid;gap:12px;text-align:start;font-size:13px;color:var(--text2)}.pwa-help-steps li{margin-inline-start:20px;padding-inline-start:5px}
@media(min-width:768px){:root{--shell-header-top:max(16px,var(--shell-safe-top));--shell-header-height:60px;--shell-header-gap:20px}#site-navbar{inset:auto 12px var(--dock-bottom) 12px!important;width:318px!important}}
/* Phone navigation is edge-to-edge. The home-indicator inset is INSIDE its surface. */
@media(max-width:767px),(max-width:1023px) and (orientation:landscape) and (hover:none) and (pointer:coarse){
  :root{--shell-header-top:0px;--shell-header-height:calc(58px + var(--shell-safe-top));--shell-header-gap:16px;--shell-dock-height:66px;--shell-dock-space:calc(var(--shell-dock-height) + var(--shell-safe-bottom))}
  #site-header{left:0!important;right:0!important;top:0!important;width:100%!important;max-width:none!important;transform:none!important;border-width:0 0 1px!important;border-radius:0 0 24px 24px!important;padding:var(--shell-safe-top) max(14px,env(safe-area-inset-right,0px)) 0 max(14px,env(safe-area-inset-left,0px))!important}
  #site-navbar{inset:auto 0 0 0!important;width:100%!important;max-width:none!important;height:var(--shell-dock-space)!important;margin:0!important;padding:9px max(12px,env(safe-area-inset-right,0px)) calc(9px + var(--shell-safe-bottom)) max(12px,env(safe-area-inset-left,0px))!important;border-width:1px 0 0!important;border-radius:24px 24px 0 0!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 -6px 24px rgba(0,0,0,.12)!important}
}
@media(max-width:767px){.search-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 12px}.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){#site-navbar{max-width:none!important}.search-page-main{padding:26px 16px 24px}.search-intro{margin-bottom:20px}.search-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px}.filter-grid{grid-template-columns:1fr}.search-poster{border-radius:16px}.search-title{font-size:12px}.search-meta{font-size:10px}.profiles-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.profile-main,.add-profile{min-height:196px;padding:23px 10px 18px}.profiles-page .profile-avatar,.add-avatar{width:88px;height:88px;border-radius:26px}.profile-edit{left:8px;top:8px;width:28px;height:28px}.profiles-intro{margin:40px 0 28px}.profiles-page .profile-name{font-size:14px}.profiles-intro p{max-width:285px;margin-inline:auto}.profile-dialog{padding:20px}.surprise-info{padding:20px}.surprise-desc{-webkit-line-clamp:2}}
.search-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}.search-card{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}.search-title{min-height:0!important}.search-card:hover{box-shadow:none!important}.search-poster{border-radius:18px!important}
.search-page-head .search-page-form input:focus{outline:0!important}.search-page-head .search-submit{min-height:0!important}
.profile-dialog .form-input:focus{outline:0!important;border-color:var(--bord2)!important;box-shadow:none!important}
.profiles-brand-lockup{display:block;position:relative;width:118px;height:34px}.profiles-brand-lockup .header-brand-image{width:100%;height:100%;max-height:none!important}html[data-theme="light"] .search-card{background:transparent!important}
#page-home>.section:nth-child(n+4){content-visibility:auto;contain-intrinsic-size:auto 360px}
.home-skeleton{padding:12px 16px}.home-hero-placeholder{height:clamp(300px,42vw,480px);border-radius:26px;background:var(--surface-soft);animation:shell-pulse 1.5s ease-in-out infinite alternate}.home-cards-placeholder{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-top:30px}.home-cards-placeholder span{display:block;aspect-ratio:2/3;border-radius:18px;background:var(--surface-soft)}@keyframes shell-pulse{to{opacity:.45}}@media(max-width:520px){.home-cards-placeholder{grid-template-columns:repeat(3,1fr)}.home-cards-placeholder span:nth-child(n+4){display:none}}
@media(max-width:767px){.search-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:520px){.search-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.install-dialog{width:min(100% - 32px,400px);margin:auto;padding:28px;color:var(--text);background:var(--bg);border:1px solid var(--bord2);border-radius:28px;box-shadow:var(--shadow);text-align:center}.install-dialog::backdrop{background:rgba(0,0,0,.55);backdrop-filter:blur(6px)}.install-dialog>img{border-radius:18px;margin:0 auto 16px}.install-dialog h2{font-size:22px;margin-bottom:6px}.install-dialog>p{font-size:12px;color:var(--text3)}
.account-app-tools{padding:14px!important}.account-tool-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.account-tool-button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:9px 10px;border:1px solid var(--bord);border-radius:14px;background:var(--surface-soft);color:var(--text);font-size:12px;font-weight:650;line-height:1.4}.account-tool-button i{font-size:16px;color:var(--blue3)}.account-tool-button:disabled{opacity:.6;cursor:default}.account-tools-status{margin:9px 2px 0;color:var(--text3);font-size:10px;line-height:1.5}.account-tools-disable{display:block;margin:7px auto 0;padding:3px 8px;color:var(--text3);font-size:10px}.account-tools-disable[hidden]{display:none}
