/* App shell (shell.js): top bar that follows the window width, the launcher, the profile menu,
   the one-screen safety card and the parked-only lock. Loaded after style.css, so these rules
   win where the two overlap.

   Sizes (also on <html data-size>): full > 1180px, compact 861-1180 (the car's side panel is
   open), tight 641-860, phone <= 640. */

/* ---- Top bar: a grid, so nothing can overlap ------------------------------------------------ */
#topbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "back logo mid me" "tabs tabs tabs tabs";
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  padding: 12px 24px;
}
#nav-back { grid-area: back; }
#nav-home { grid-area: logo; }
#search-form, #app-title { grid-area: mid; }
#nav-profile { grid-area: me; justify-self: end; }
#sections { grid-area: tabs; }
#nav-account { display: none !important; }

#app-title { font-size: 28px; font-weight: 750; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app-title:empty { display: none; }

/* What shows where */
body[data-app="launcher"] #search-form, body[data-app="launcher"] #sections,
body[data-app="launcher"] #app-title { display: none; }
body[data-app="launcher"] #topbar { background: transparent; border-bottom-color: transparent; }
body:not([data-app="yt"]) #search-form, body:not([data-app="yt"]) #sections { display: none; }
body[data-app="yt"] #app-title { display: none; }
body[data-app="yt"] #nav-profile, body:not([data-app="yt"]) #nav-profile { grid-column: 4; }
body:not([data-app="yt"]) #topbar { grid-template-areas: "back logo mid me"; }
body:not([data-app="yt"]) #topbar { row-gap: 0; }

/* Search: icon inside, no overlapping button when the window is narrow */
#search { padding-right: 130px; }
.search-go { right: 7px; }
.search-icon { z-index: 1; }

/* Profile chip */
#nav-profile { min-height: 60px; }
.pf-dot { width: 44px; height: 44px; }

/* YouTube's section bar: fade where it scrolls */
#sections { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 36px; }

html[data-size="compact"] #topbar { padding: 10px 18px; column-gap: 12px; }
html[data-size="compact"] .search-go { display: none; }
html[data-size="compact"] #search { padding-right: 22px; min-height: 58px; font-size: 21px; }
html[data-size="compact"] #topbar button { min-height: 58px; }
html[data-size="compact"] #topbar .logo img { height: 40px; }
html[data-size="compact"] .section-btn { min-height: 48px; padding: 0 20px; font-size: 18px; }
html[data-size="compact"] .pf-name { font-size: 17px; }
html[data-size="compact"] #page { padding-left: 20px; padding-right: 20px; }
html[data-size="compact"] #app-title { font-size: 24px; }

html[data-size="tight"] #topbar { padding: 8px 14px; column-gap: 10px; }
html[data-size="tight"] .search-go { display: none; }
html[data-size="tight"] #search { padding: 0 16px 0 52px; min-height: 52px; font-size: 19px; }
html[data-size="tight"] .search-icon { left: 18px; font-size: 22px; }
html[data-size="tight"] #topbar button { min-height: 52px; }
html[data-size="tight"] #topbar .logo { padding: 0 2px; }
html[data-size="tight"] #topbar .logo img { height: 34px; }
html[data-size="tight"] .pf-name { display: none; }
html[data-size="tight"] #nav-profile { padding: 0 6px; min-height: 52px; }
html[data-size="tight"] .pf-dot { width: 40px; height: 40px; font-size: 18px; }
html[data-size="tight"] .section-btn { min-height: 44px; padding: 0 18px; font-size: 17px; }
html[data-size="tight"] #page { padding-left: 16px; padding-right: 16px; }
html[data-size="tight"] #app-title { font-size: 21px; }
html[data-size="tight"] #nav-back { min-width: 44px; }

html[data-size="phone"] #topbar { padding: 8px 12px; column-gap: 8px; }
html[data-size="phone"] #app-title { font-size: 18px; }

/* ---- Launcher ------------------------------------------------------------------------------------ */
body[data-app="launcher"] #browse {
  background:
    radial-gradient(70% 60% at 12% -10%, rgba(0, 169, 240, 0.16), transparent 62%),
    radial-gradient(60% 50% at 100% 0%, rgba(120, 90, 255, 0.10), transparent 60%),
    var(--bg);
}
.launcher { max-width: 1280px; margin: 0 auto; padding: 4px 4px 60px; }
.l-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 10px 0 26px; flex-wrap: wrap; }
.l-top .home-strip { margin: 0; flex: none; gap: 22px; }
.l-hello h1 { margin: 0; font-size: clamp(30px, 4.2vw, 50px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.l-top .hs-clock { font-size: 34px; }
.l-top .hs-date { margin-top: 4px; font-size: 16px; }
.l-top .hs-weather { background: rgba(255, 255, 255, 0.06); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); }

.l-ico {
  position: relative; flex: none; width: 76px; height: 76px; display: grid; place-items: center; color: #fff; border-radius: 22px;
  background: linear-gradient(158deg, hsl(var(--h) 78% 62%), hsl(var(--h) 72% 40%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 -10px 18px rgba(0, 0, 0, 0.16), 0 10px 26px hsl(var(--h) 80% 30% / 0.45);
}
.l-ico svg { width: 42px; height: 42px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }

.l-heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.l-hero {
  position: relative; overflow: hidden; display: flex !important; flex-direction: column; align-items: flex-start !important; justify-content: space-between !important;
  gap: 26px; min-height: 236px; padding: 24px !important; text-align: left; font-weight: 400; border-radius: 30px;
  background:
    radial-gradient(120% 120% at 0% 0%, hsl(var(--h) 70% 34% / 0.75), transparent 62%),
    linear-gradient(180deg, #1a1d24, #13151b);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: l-in 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1), box-shadow 0.2s;
}
.l-hero:active { transform: scale(0.975); background: radial-gradient(120% 120% at 0% 0%, hsl(var(--h) 70% 38% / 0.85), transparent 62%), linear-gradient(180deg, #1a1d24, #13151b); }
.l-hero-art { position: absolute; right: -34px; bottom: -40px; width: 230px; height: 230px; color: hsl(var(--h) 80% 70%); opacity: 0.11; pointer-events: none; }
.l-hero-art svg { width: 100%; height: 100%; stroke-width: 1.2; }
.l-hero-txt { position: relative; display: flex; flex-direction: column; gap: 4px; }
.l-hero-txt b { font-size: 31px; font-weight: 800; letter-spacing: -0.02em; }
.l-hero-txt small { font-size: 18px; color: #aeb6c1; }

.l-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; margin-top: 34px; }
.l-app {
  position: relative; display: flex !important; flex-direction: column; align-items: center; gap: 12px; min-height: 0 !important; padding: 16px 6px 14px !important;
  background: transparent !important; border-color: transparent !important; font-weight: 600; border-radius: 24px;
  animation: l-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.l-app .l-ico { width: 88px; height: 88px; border-radius: 26px; transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1); }
.l-app .l-ico svg { width: 46px; height: 46px; }
.l-app:active { transform: none; background: transparent !important; }
.l-app:active .l-ico { transform: scale(0.9); }
.l-name { font-size: 18px; font-weight: 600; color: #e6eaee; text-align: center; line-height: 1.2; }
@keyframes l-in { from { opacity: 0; transform: translateY(22px) scale(0.97); } to { opacity: 1; transform: none; } }

/* Parked-only: truly greyed out and untappable while the car isn't parked */
.l-lock { display: none; }
body.drive-locked .parked-only { opacity: 0.4; filter: grayscale(1); }
body.drive-locked .l-app.parked-only .l-lock {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.72);
}
.l-lock svg { width: 14px; height: 14px; }
.l-lock i { font-style: normal; }
body.drive-locked .app-tile.parked-only { position: relative; pointer-events: none; }
body.drive-locked .app-tile.parked-only::after {
  content: "Parked only"; position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.72);
}
body.drive-locked .app-tile.parked-only * { pointer-events: none; }
body.drive-locked .theater-form { opacity: 0.4; pointer-events: none; filter: grayscale(1); }
body.drive-locked .l-app.parked-only { cursor: not-allowed; }

html[data-size="compact"] .l-heroes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
html[data-size="compact"] .l-hero { min-height: 190px; padding: 18px !important; border-radius: 26px; gap: 18px; }
html[data-size="compact"] .l-hero .l-ico { width: 64px; height: 64px; border-radius: 19px; }
html[data-size="compact"] .l-hero .l-ico svg { width: 36px; height: 36px; }
html[data-size="compact"] .l-hero-txt b { font-size: 24px; }
html[data-size="compact"] .l-hero-txt small { font-size: 15px; }
html[data-size="compact"] .l-hero-art { width: 170px; height: 170px; right: -30px; bottom: -34px; }
html[data-size="compact"] .l-apps { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); margin-top: 24px; }
html[data-size="compact"] .l-app .l-ico { width: 78px; height: 78px; border-radius: 23px; }
html[data-size="tight"] .l-heroes, html[data-size="phone"] .l-heroes { grid-template-columns: 1fr; gap: 10px; }
html[data-size="tight"] .l-hero, html[data-size="phone"] .l-hero { flex-direction: row; align-items: center !important; justify-content: flex-start !important; min-height: 0; gap: 18px; padding: 16px 18px !important; border-radius: 24px; }
html[data-size="tight"] .l-hero .l-ico, html[data-size="phone"] .l-hero .l-ico { width: 62px; height: 62px; border-radius: 18px; }
html[data-size="tight"] .l-hero .l-ico svg, html[data-size="phone"] .l-hero .l-ico svg { width: 34px; height: 34px; }
html[data-size="tight"] .l-hero-txt b, html[data-size="phone"] .l-hero-txt b { font-size: 22px; }
html[data-size="tight"] .l-hero-txt small, html[data-size="phone"] .l-hero-txt small { font-size: 15px; }
html[data-size="tight"] .l-hero-art, html[data-size="phone"] .l-hero-art { width: 130px; height: 130px; right: -16px; bottom: -22px; }
html[data-size="tight"] .l-apps, html[data-size="phone"] .l-apps { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 18px; }
html[data-size="tight"] .l-app .l-ico, html[data-size="phone"] .l-app .l-ico { width: 68px; height: 68px; border-radius: 20px; }
html[data-size="tight"] .l-app .l-ico svg, html[data-size="phone"] .l-app .l-ico svg { width: 36px; height: 36px; }
html[data-size="tight"] .l-name, html[data-size="phone"] .l-name { font-size: 15px; }
html[data-size="tight"] .l-top .hs-clock, html[data-size="phone"] .l-top .hs-clock { font-size: 26px; }
html[data-size="phone"] .l-top .hs-weather { display: none; }

/* ---- Profile menu ----------------------------------------------------------------------------------- */
#pmenu {
  position: fixed; z-index: 62; width: min(360px, calc(100vw - 20px)); padding: 10px; border-radius: 26px;
  background: rgba(26, 29, 36, 0.94); border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: pm-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1); transform-origin: top right;
}
#pmenu.leaving { animation: pm-out 0.16s ease-in forwards; }
@keyframes pm-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes pm-out { to { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.pm-head { display: flex; align-items: center; gap: 14px; padding: 10px 10px 14px; }
.pm-dot { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font-size: 23px; font-weight: 800; color: #fff; }
.pm-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-who b { font-size: 21px; font-weight: 750; }
.pm-who small, .pm-yt-text small, .pm-row small { font-size: 14px; color: var(--muted); }
.pm-yt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin-bottom: 6px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); }
.pm-yt-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pm-yt-ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; color: #fff; border-radius: 12px; background: linear-gradient(158deg, hsl(355 78% 62%), hsl(355 72% 42%)); }
.pm-yt-ico svg { width: 24px; height: 24px; }
.pm-yt-text { display: flex; flex-direction: column; min-width: 0; }
.pm-yt-text b { font-size: 18px; }
.pm-yt-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-btn { flex: none; min-height: 46px !important; padding: 0 18px !important; font-size: 16px !important; border-radius: 999px !important; background: var(--accent) !important; color: #fff; border: 0 !important; }
.pm-row { width: 100%; display: flex !important; flex-direction: column; align-items: flex-start !important; justify-content: center; gap: 2px; min-height: 64px !important; padding: 10px 16px !important; text-align: left; border-radius: 16px !important; background: transparent !important; border-color: transparent !important; font-weight: 400; }
.pm-row b { font-size: 18px; font-weight: 650; }
.pm-row:active { background: rgba(255, 255, 255, 0.08) !important; }
.pm-lock { margin: 0; }

/* ---- Safety: one screen, whatever its size --------------------------------------------------------- */
#safety { padding: clamp(8px, 2.2dvh, 24px); }
.safety-card { width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; padding: clamp(14px, 2.6dvh, 28px) clamp(16px, 2.4vw, 30px); border-radius: 24px; overflow: hidden; }
.safety-head { flex: none; gap: clamp(12px, 1.6vw, 20px); margin-bottom: clamp(8px, 1.8dvh, 18px); }
.safety-shield { width: clamp(44px, 8dvh, 70px); height: clamp(44px, 8dvh, 70px); font-size: clamp(24px, 4.4dvh, 38px); border-radius: 18px; }
.safety-kicker { font-size: clamp(11px, 1.6dvh, 14px); }
.safety-head h2 { margin: 2px 0; font-size: clamp(20px, 3.8dvh, 30px); }
.safety-head p { font-size: clamp(13px, 2.1dvh, 18px); }
.safety-grid { flex: 0 1 auto; min-height: 0; overflow-y: auto; gap: clamp(8px, 1.5dvh, 14px); grid-template-columns: 1fr 1fr; }
.safety-item { gap: clamp(10px, 1.2vw, 14px); padding: clamp(10px, 1.9dvh, 18px); border-radius: 16px; }
.safety-item b { margin-bottom: 4px; font-size: clamp(15px, 2.5dvh, 19px); }
.safety-item span { font-size: clamp(12.5px, 2dvh, 15.5px); line-height: 1.4; }
.safety-icon { width: clamp(36px, 6.2dvh, 50px); height: clamp(36px, 6.2dvh, 50px); font-size: clamp(20px, 3.4dvh, 26px); border-radius: 13px; }
.safety-buttons { flex: none; margin-top: clamp(10px, 2dvh, 20px); gap: 12px; }
.safety-buttons button { min-height: clamp(46px, 8dvh, 64px); min-width: 160px; font-size: clamp(17px, 2.8dvh, 22px); }
@media (max-width: 560px) { .safety-grid { grid-template-columns: 1fr; } .safety-buttons button { min-width: 0; flex: 1; } }

/* ---- Pages inside apps: tidier headings ------------------------------------------------------------ */
body:not([data-app="yt"]):not([data-app="launcher"]) .section-title:first-child { margin-top: 20px; }

.pf-dot { flex: none; }
#nav-profile { flex: none; }

/* ---- One look for the pages inside the apps (Radio, TV, Weather, Games, Theater...) ------------ */
:root { --card: linear-gradient(180deg, #1b1e25, #15171c); --hair: rgba(255, 255, 255, 0.08); }
.section-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.app-group { margin: 30px 4px 12px; font-size: 14px; letter-spacing: 0.09em; color: #7f8896; }
.media-note { font-size: 15px; color: #7f8896; }

/* Tiles: Radio, TV, Twitch, Theater, favorites */
.media-tile, .app-tile {
  background: var(--card); border: 1px solid var(--hair); border-radius: 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1), box-shadow 0.18s;
}
.media-tile:active, .app-tile:active { transform: scale(0.96); background: var(--card); }
.media-art { border-radius: 16px; background: rgba(255, 255, 255, 0.06); }
.media-name { font-size: 17px; font-weight: 650; }
.app-tile img, .app-letter { border-radius: 18px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
.app-tile img { background: #fff; }

/* Chips and inputs */
.chips { gap: 8px; padding: 8px 0 6px; }
.chip-btn { min-height: 46px; padding: 0 20px; font-size: 16px; font-weight: 650; color: #cfd5dd; background: rgba(255, 255, 255, 0.07); border: 0; }
.chip-btn.on { color: #fff; background: var(--accent); box-shadow: 0 6px 18px rgba(0, 169, 240, 0.35); }
.media-search input, .media-select, .theater-form input, .maps-bar input {
  min-height: 54px; border-radius: 999px; padding: 0 22px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--hair); outline: none;
}
.media-search input:focus, .theater-form input:focus { border-color: var(--accent); background: rgba(255, 255, 255, 0.1); }
.theater-form .primary, .media-search .primary { border-radius: 999px; }

/* Weather, Camp & Rest, Help, lists */
.wx-now, .wx-days, .wx-hour, .help-box, .mylists {
  background: var(--card); border: 1px solid var(--hair); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}
.wx-now { border-radius: 30px; padding: 30px; background: radial-gradient(120% 140% at 0% 0%, rgba(0, 169, 240, 0.22), transparent 60%), var(--card); }
.wx-hour { border-radius: 20px; }
.wx-days { border-radius: 24px; }
.help-box { border-radius: 24px; }
.scene-tile { border-radius: 26px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08); transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1); }
.scene-tile:active { transform: scale(0.97); }
.mylists { padding: 8px 20px; border-radius: 20px; }

/* YouTube cards: the same softness */
.card .thumb { border-radius: 18px; }
.signin-tip, .account { border-radius: 24px; }
.page-message { color: #8a93a0; }
#app-title { display: none !important; } /* each page already has its own heading */

/* ---- Motion: one set of curves, GPU-only movement, lighter paint on the car ---------------------- */
:root { --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1); }
html { touch-action: manipulation; } /* no tap delay */
button { transition: transform 0.16s var(--ease-out), background-color 0.16s ease, opacity 0.2s ease; }
button:active { transition-duration: 0.06s; }
#page.fade-in { animation: page-in 0.42s var(--ease-out) both; }
@keyframes page-in { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
body.watching #stage { animation: fadein 0.28s ease-out; }
.card { transition: transform 0.18s var(--ease-out); }
.card, .media-tile { content-visibility: auto; contain-intrinsic-size: auto 290px; } /* long grids scroll lighter */
.l-hero { transition: transform 0.22s var(--ease-out); }
.media-tile, .app-tile, .scene-tile { transition: transform 0.2s var(--ease-out); }
.l-hero, .l-app, .l-ico, .nv-panel, #pmenu, .who-p { will-change: transform; }
.l-hero:active, .media-tile:active, .app-tile:active, .scene-tile:active, .card:active { transition-duration: 0.07s; }
.zoom-thumb { box-shadow: none; }
.chip-btn, .section-btn { transition: background-color 0.2s ease, color 0.2s ease, transform 0.16s var(--ease-out); }

/* The car's graphics chip is weak: no live blur behind panels there (solid panels instead) */
body.is-tesla * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.is-tesla #pmenu { background: rgba(26, 29, 36, 0.99); }
body.is-tesla .nv { --g: rgba(255, 255, 255, 0.97); }
body.is-tesla .nv.night { --g: rgba(24, 27, 33, 0.97); }
body.is-tesla #who, body.is-tesla #pin { background: radial-gradient(ellipse at 50% 30%, rgba(0, 169, 240, 0.18), transparent 60%), rgba(5, 6, 8, 0.97); }
body.is-tesla .who-card.chosen .who-p:not(.picked) { filter: none; }
@media (prefers-reduced-motion: reduce) { .l-hero, .l-app, #page.fade-in { animation-duration: 0.01s !important; } }

/* ---- Twitch and Kick: each app in its own site colours ------------------------------------------ */
body[data-app="twitch"] #browse { background: radial-gradient(70% 45% at 50% -8%, rgba(145, 70, 255, 0.25), transparent 65%), #0e0e10; }
body[data-app="kick"] #browse { background: radial-gradient(70% 45% at 50% -8%, rgba(83, 252, 24, 0.16), transparent 65%), #0b0e0b; }
.ss { --brand: #9146ff; --brand-ink: #fff; --panel: #18181b; --panel-2: #26262c; --hairline: rgba(255, 255, 255, 0.09); }
.ss-kick { --brand: #53fc18; --brand-ink: #0b0e0b; --panel: #14181a; --panel-2: #20262a; }
.ss-head { display: flex; align-items: center; gap: 18px; margin: 14px 0 6px; flex-wrap: wrap; }
.ss-logo { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.ss-logo img { height: 44px; display: block; }
.ss-mark { width: 44px; height: 44px; border-radius: 13px; background: var(--brand); box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 40%, transparent); position: relative; }
.ss-mark::after { content: ""; position: absolute; inset: 13px 11px; border-radius: 4px; background: var(--brand-ink); opacity: 0.9; }
.ss-kick .ss-mark::after { inset: 10px; border-radius: 0; clip-path: polygon(0 0, 35% 0, 35% 38%, 70% 0, 100% 0, 58% 50%, 100% 100%, 70% 100%, 35% 62%, 35% 100%, 0 100%); }
.ss-word { font-size: 34px; letter-spacing: -0.03em; color: var(--brand); font-weight: 800; }
.ss-twitch .ss-word { font-weight: 700; }
.ss-kick .ss-word { font-weight: 900; letter-spacing: 0.02em; }
.ss-search { display: flex; gap: 10px; flex: 0 1 460px; min-width: 0; }
.ss-search input { flex: 1; min-width: 0; min-height: 54px; padding: 0 20px; font: inherit; font-size: 18px; color: var(--text); background: var(--panel-2); border: 2px solid transparent; border-radius: 12px; outline: none; }
.ss-search input:focus { border-color: var(--brand); }
.ss-go { min-height: 54px; padding: 0 24px; font-size: 17px; font-weight: 700; color: var(--brand-ink); background: var(--brand); border: 0; border-radius: 12px; }
.ss-tabs { display: flex; gap: 6px; margin: 16px 0 4px; border-bottom: 1px solid var(--hairline); }
.ss-tab { min-height: 52px; padding: 0 20px; font-size: 18px; font-weight: 650; color: #adadb8; background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; }
.ss-tab.on { color: var(--text); border-bottom-color: var(--brand); }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px 16px; margin-top: 16px; }
.ss-card { position: relative; display: flex !important; flex-direction: column; align-items: stretch !important; justify-content: flex-start !important; gap: 10px; padding: 0 !important; min-height: 0 !important; text-align: left; font-weight: 400; background: transparent !important; border: 0 !important; border-radius: 10px; }
.ss-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; transition: transform 0.18s var(--ease-out), box-shadow 0.18s; }
.ss-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-card:active .ss-thumb { transform: scale(0.97); box-shadow: 0 0 0 3px var(--brand); }
.ss-initial { font-size: 54px; font-weight: 800; color: #6b6b78; }
.ss-live { position: absolute; left: 8px; top: 8px; padding: 2px 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; color: #fff; background: #e91916; border-radius: 4px; }
.ss-viewers { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; font-size: 14px; font-weight: 650; color: #fff; background: rgba(0, 0, 0, 0.7); border-radius: 4px; }
.ss-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 2px; }
.ss-info b { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-about { font-size: 15px; color: #dedee3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.ss-cat { font-size: 14px; color: #adadb8; }
.ss .star { top: 8px; right: 8px; width: 40px; height: 40px; font-size: 20px; }
html[data-size="tight"] .ss-grid, html[data-size="phone"] .ss-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 12px; }
html[data-size="tight"] .ss-search, html[data-size="phone"] .ss-search { flex-basis: 100%; }
html[data-size="tight"] .ss-word { font-size: 28px; }

.ss-note { margin: 28px 2px 0; font-size: 13px; color: #7f8896; }

/* Shelf: a bigger handle to grab, no live blur while it moves, video dims a little as it rises */
.shelf-grip { height: 7px; margin-bottom: 6px; box-shadow: 0 0 0 18px transparent; }
.shelf-head { padding-top: 10px; }
#stage.shelf-dragging { cursor: grabbing; }
#shelf { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(rgba(8, 9, 12, 0.5), rgba(8, 9, 12, 0.88)); }

/* Weather line icons, memory cards, lock badge, bigger stars */
.wx-icon svg, .hs-icon svg, .wx-hicon svg { width: 1em; height: 1em; display: block; margin: 0 auto; }
.wx-icon { color: #cbd5e1; } .wx-k-sun { color: #fbbf24 !important; } .wx-k-partly { color: #fcd34d !important; } .wx-k-rain, .wx-k-drizzle { color: #60a5fa !important; }
.wx-k-snow { color: #bae6fd !important; } .wx-k-storm { color: #c4b5fd !important; } .wx-k-fog, .wx-k-cloud { color: #cbd5e1 !important; }
.hs-icon { font-size: 30px; display: grid; place-items: center; }
.mem-card.up svg { width: 56%; height: 56%; color: hsl(var(--h, 200) 85% 68%); }
.who-lock svg { width: 60%; height: 60%; }
.who-dot svg { display: block; }
.kids-allow.on { color: #86efac; }
.star { width: 48px !important; height: 48px !important; }
.app-tile .star, .media-tile .star { width: 48px !important; height: 48px !important; top: 6px !important; right: 6px !important; }

/* Play-next button on video cards */
.qbtn { position: absolute; top: 10px; left: 10px; z-index: 2; width: 48px; height: 48px; min-height: 0; min-width: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(10, 11, 14, 0.62); color: #fff; font-size: 24px; }
.qbtn svg { width: 1em; height: 1em; }
.card:not(.video) .qbtn { display: none; }

/* Chapters */
#seek-marks { position: absolute; top: 0; bottom: 0; pointer-events: none; }
#seek-marks i { position: absolute; top: 50%; width: 3px; height: 14px; margin: -7px 0 0 -1px; border-radius: 2px; background: rgba(255, 255, 255, 0.75); }
.bar.bottom { position: relative; }
#chapter-pill { position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%); max-width: 80%; padding: 8px 18px; font-size: 18px; font-weight: 650; border-radius: 999px; color: #fff; background: rgba(10, 11, 14, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* Search suggestions */
#suggest { position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% + 8px); padding: 8px; border-radius: 22px; background: #1d2027; border: 1px solid var(--hair); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }
#suggest button { width: 100%; justify-content: flex-start; min-height: 56px; padding: 0 18px; font-size: 20px; font-weight: 500; text-align: left; border: 0; border-radius: 14px; background: transparent; }
#suggest button:active { background: rgba(255, 255, 255, 0.08); }
#search-form { position: relative; }

/* Loading placeholders for Radio, TV, Twitch and Kick */
.media-tile.skel { min-height: 190px; pointer-events: none; background: linear-gradient(100deg, #15171c 30%, #20232b 50%, #15171c 70%); background-size: 200% 100%; animation: skel 1.4s linear infinite; border-color: transparent; box-shadow: none; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.ss-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; margin-top: 16px; }
.ss-cat-card { display: flex !important; flex-direction: column; align-items: flex-start !important; justify-content: flex-start !important; gap: 4px; padding: 0 !important; min-height: 0 !important; text-align: left; font-weight: 400; background: transparent !important; border: 0 !important; }
.ss-cat-art { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 10px; background: var(--panel-2); margin-bottom: 6px; transition: transform 0.18s var(--ease-out); }
.ss-cat-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-cat-card:active .ss-cat-art { transform: scale(0.96); }
.ss-cat-card b { font-size: 16px; font-weight: 700; line-height: 1.2; }
.ss-cat-card span { font-size: 14px; color: #adadb8; }
.ss-back { min-height: 48px; margin-top: 14px; padding: 0 20px; font-size: 17px; font-weight: 650; border-radius: 999px; background: var(--panel-2); border: 0; }

/* Mini player */
#mini-close, #mini-btn { display: none; }
#mini-btn { font-size: 30px; }
body.watching #mini-btn { display: inline-flex; }
body.mini #stage {
  visibility: visible !important; position: fixed; inset: auto 18px 18px auto; width: min(400px, 46vw); height: calc(min(400px, 46vw) * 9 / 16);
  z-index: 40; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); cursor: pointer;
  animation: mini-in 0.35s var(--ease-out);
}
@keyframes mini-in { from { opacity: 0; transform: translate3d(0, 24px, 0) scale(0.92); } to { opacity: 1; transform: none; } }
body.mini #controls, body.mini #load-back, body.mini #load-bar, body.mini #load-step, body.mini #shelf, body.mini #settings, body.mini #stats, body.mini #notice { display: none !important; }
body.mini #mini-close { display: grid; place-items: center; position: absolute; top: 8px; right: 8px; z-index: 5; width: 44px; height: 44px; min-height: 0; min-width: 0; padding: 0; font-size: 22px; border-radius: 50%; border: 0; background: rgba(10, 11, 14, 0.7); }
body.mini #mini-close svg { width: 1em; height: 1em; }
body.mini #page { padding-bottom: 260px; }
body.mini #stage { transition: none; }
.swatch { min-width: 0 !important; width: 52px; height: 52px; flex: none; aspect-ratio: 1 / 1; }
