/* Night Observatory • the cool shell is independent of the active planet.
   Photo, track, sphere textures and all interactive text are separate layers. */
:root {
  color-scheme:dark;
  --void:#040a14;--space:#060d19;--haze:#0e1827;--bg:var(--space);--bg2:var(--haze);
  --screen:#060d19;--panel-new:#101b2a;--paper:#f0f4fa;--text:var(--paper);--muted:#a9b8c9;--quiet:#99aabe;
  --card:#0b1421;--card2:#122032;--glass-line:#a6c4e427;--line:#a6c4e421;--border:#a6c4e421;
  --glass-bg:linear-gradient(155deg,#101b2b,#0a121e);--glass-hi:inset 0 1px 0 #dcecff0a;
  --violet:#7c97e4;--violet-lt:#bfd8fa;--purple:#8996ce;--cyan:#8fd5ff;--lav:#bbd5f3;
  --accent:#88c8fb;--accent2:#83cefc;--border-glow:#8cd8ff6b;
  --grad:linear-gradient(112deg,#5b68bb,#446eaf 54%,#357ba4);--grad-hot:linear-gradient(112deg,#6a78c7,#347cac);
  --grad-text:linear-gradient(102deg,#f5f9ff 0%,#e4effc 45%,#87d9f5 100%);
  --rail:clamp(180px,12.27vw,236px);--shadow:0 18px 48px #01040a66;
}
body,body:is([data-scene=youtube],[data-scene=shorts]) {background:#050c17}
body::before,body::after {display:none;animation:none}
body[data-scene=home] {background:radial-gradient(ellipse at 80% 7%,#070f1d 0%,transparent 42%),linear-gradient(116deg,#040a13 15%,#060d19 77%,#040a14)}
body[data-scene=home] main#app {padding-inline:clamp(18px,1.58vw,32px);padding-top:clamp(16px,1.28vw,25px)}
::selection {background:#517697;color:#fff}
:focus-visible {outline:2px solid #a2d9ff;outline-offset:3px}

/* No backdrop sampling from the animated stage into the account controls. */
.topbar,body:is([data-scene=youtube],[data-scene=shorts]) .topbar {
  background:#060d19;border-bottom:1px solid #a0bad51b;box-shadow:none;
  -webkit-backdrop-filter:none;backdrop-filter:none;isolation:isolate;
}
.logo .mark {color:#c1dafa;filter:drop-shadow(0 0 6px #80c5ff33)}
.logo:hover .mark {color:#dcf2ff;filter:drop-shadow(0 0 7px #8fd1ff50)}
.topbar .searchbox input {background:#050c16;border-color:#a4bdd626;color:#f0f4fb;box-shadow:inset 0 1px 2px #0002}
.topbar .searchbox input::placeholder {color:#8e9cb0}
.topbar .searchbox input:focus {border-color:#82bee49c;background:#0b1420;box-shadow:0 0 0 2px #87c5ff1f}
.topbar .btn.primary,body:is([data-scene=youtube],[data-scene=shorts]) .topbar #searchBtn,.topbar .btn.primary:hover {
  color:#fff;background:linear-gradient(112deg,#6978c9 0%,#456eac 51%,#3791b4 100%);
  border:1px solid #a2cdff52;box-shadow:inset -4px 0 9px #96dfff42,inset 1px 1px 4px #c8ceff21,0 2px 13px #74b3ff24;
}
.topbar .icon-btn {background:#152031;color:#e0edfd;border-color:#adc8e42b;box-shadow:inset 0 1px 0 #e2f1ff09}
.topbar .icon-btn:hover {background:#1a2a3c;border-color:#aac9e45c;box-shadow:none}
.nb-trace-rim {--trace-color:#a1dfff;--trace-tail:#829ddd;filter:drop-shadow(0 0 2px #b4e4ffab) drop-shadow(0 0 4px #77b5f98a)}
.orb-open .nb-trace-rim {--trace-color:#8fe0ff;--trace-tail:#629edc;filter:drop-shadow(0 0 2px #c3eeff) drop-shadow(0 0 6px #73bdffc4)}
.rail-section-label,.rail-extra h4 {font:600 9px/1.35 var(--font-body);letter-spacing:.15em;color:#98aabd}
.rail-section-label.second,.rail-extra,.rail-end {border-color:#a3bdd51a}
.rail-sub .nm {color:#e1e9f4}.rail-sub .nm i,.rail-end {color:#96a6b9}
.bottomnav {background:#08111e;border-color:#96b0cc24;backdrop-filter:none}
.bottomnav a {color:#aab9cd}.bottomnav a.active {color:#a0daff}
@media(min-width:981px){
  .topbar {padding-block:clamp(10px,.71vw,14px)}
  .topbar .logo {font-size:clamp(18px,1.20vw,22px)}.topbar .mark {width:clamp(24px,1.65vw,30px);height:clamp(24px,1.65vw,30px)}
  body[data-scene=home] .searchbox {max-width:clamp(280px,20vw,384px)}
  .topbar .searchbox input {padding:7px 15px}.topbar #searchBtn {align-self:center;min-width:34px;width:34px;height:34px;padding:0;display:grid;place-items:center}
  .topbar .icon-btn {height:34px;width:34px;border-radius:12px}
  .topbar #authBtn {min-height:34px;padding:6px 13px;font-size:13px}
  .rail {padding:17px 11px}.rail-section-label {margin-inline:11px}
  .rail-extra,.rail-end {margin-inline:11px}.rail-sub {gap:8px;padding:5px 0}.rail-sub img {width:27px;height:27px}
  .rail-sub .nm {font-size:clamp(12px,.73vw,14px)}.rail-sub .nm i {font-size:10.5px}
  .rail .topnav a .i {width:17px;height:17px}
  .rail,body:is([data-scene=youtube],[data-scene=shorts]) .rail {background:linear-gradient(155deg,#070e19,#0a1220);border-color:#a0b5cf1a;-webkit-backdrop-filter:none;backdrop-filter:none}
  .rail .topnav a {color:#ccd6e3;font-size:clamp(12.5px,.78vw,14px);line-height:1.4;padding:7.4px 11px;gap:10px;border-radius:10px;border:1px solid transparent;box-shadow:none}
  .rail .topnav a:hover {background:#111c2b;color:#fff;border-color:transparent;box-shadow:none}
  .rail .topnav a::before {left:-11px;width:2px;background:#8cdeff;box-shadow:0 0 7px #83cfff55}
  .rail .topnav a:hover:not(.active)::before {height:0}
  .rail .topnav a.active,body:is([data-scene=shorts],[data-scene=youtube]) .rail .topnav a.active {color:#f4f8ff;background:#142133;border:1px solid #adcbe208;box-shadow:none}
  .rail .topnav a.active::before,body:is([data-scene=shorts],[data-scene=youtube]) .rail .topnav a.active::before {display:block;height:51%}
  .rail .topnav a.active .i,body:is([data-scene=shorts],[data-scene=youtube]) .rail .topnav a.active .i {color:#e4f3ff}
}
@media(max-width:700px){body[data-scene=home] main#app {padding:12px 12px 88px}}

/* Editorial covers, each caption + duration still describes the real destination. */
.home-discover {container-type:inline-size;margin-top:calc(2 * var(--recs-head-gap))}
.home-shelf-head {margin-bottom:var(--recs-head-gap);min-height:38px}
.home-shelf-head h2,#homeStream>h2 {color:#f1f5f9;letter-spacing:-.052em}
.home-shelf-head h2 {font-size:clamp(22px,1.50vw,30px)}
.home-filter select {width:clamp(156px,16cqi,192px);min-height:36px;text-overflow:ellipsis;background:#0a121f;color:#dce7f4;border-color:#b3cce127;border-radius:10px;box-shadow:inset 0 1px 0 #eaf4ff06}
.home-filter select:hover {border-color:#b7d1e954}.home-filter .i {color:#c9d8ea}
/* A half-filled last row keeps the same track width as a full one, even
   after filtering. Scrolling home shelves use those exact same columns. */
#homeFeed {container:home-feed / inline-size;--recs-head-gap:16px;--home-cols:5;--home-gap:clamp(10px,.85vw,16px)}
.obs-grid {display:grid;grid-template-columns:repeat(var(--home-cols),minmax(0,1fr));grid-auto-rows:1fr;align-items:stretch;gap:var(--home-gap)}
#homeStream>.row,#homeStream .an-home-row {gap:var(--home-gap)}
#homeStream>.row>.card,#homeStream .an-home-card {min-width:0;flex:0 0 calc((100% - (var(--home-cols) - 1) * var(--home-gap)) / var(--home-cols))}
#homeStream .card-thumb-wrap {height:auto;aspect-ratio:16 / 9;flex:none}
.obs-card {position:relative;min-width:0;display:flex;flex-direction:column;border:1px solid #b2c9e01c;border-radius:clamp(12px,.95vw,17px);background:linear-gradient(145deg,#0b1421,#080f1b 81%);box-shadow:inset 0 1px 0 #cfe5fa04;transition:border-color .18s,background-color .18s}
.obs-watch {display:block;min-width:0;text-decoration:none;border-radius:inherit;color:#f1f5fa}
.obs-watch:hover {color:white}
.obs-image {position:relative;isolation:isolate;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:calc(clamp(12px,.95vw,17px) - 1px);background:#111c2a}
.obs-image img {width:100%;height:100%;display:block;object-fit:cover;transition:transform .28s ease-out}
.obs-image::after {content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 0 0 1px #c9e6ff0b;background:linear-gradient(0deg,#0108142b,transparent 36%)}
.obs-duration {position:absolute;z-index:1;right:8px;bottom:8px;display:block;color:#f6f9ff;background:#030812e3;border:1px solid #c6deff24;border-radius:999px;padding:3px 7px;font:650 11px/1.2 var(--font-body);font-variant-numeric:tabular-nums;letter-spacing:.01em}
.obs-watch h3 {min-block-size:2.64em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font:650 clamp(14px,.86vw,16px)/1.32 var(--font-body);letter-spacing:-.021em;margin:clamp(9px,.72vw,13px) 12px 0;color:inherit;text-wrap:pretty}
.obs-byline {min-width:0;display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:auto;padding:3px 8px 7px 12px;min-height:37px;color:#96aabe;font:500 clamp(12px,.79vw,14px)/1.35 var(--font-body)}
.obs-byline>a {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:29px;min-height:29px;color:#94d5ff;text-decoration:none;min-width:0}
.obs-byline>a:hover {color:#d8f0ff;text-decoration:underline;text-underline-offset:.17em}
.obs-more {display:grid;place-items:center;flex:none;min-width:29px;height:29px;margin:0;padding:0;border:0;border-radius:8px;background:transparent;color:#8ea5bc;cursor:pointer}
.obs-more .i {width:17px;height:17px}
.obs-more:hover,.obs-more:focus-visible {color:#e4f3ff;background:#1b2a3c}
@media(hover:hover){.obs-card:hover,.obs-card:focus-within {border-color:#9dc5ed79}.obs-more {opacity:0;transition:opacity .15s}.obs-card:hover .obs-more,.obs-card:focus-within .obs-more {opacity:1}}
@media(hover:none){.obs-more {min-width:38px;height:36px}.obs-byline>a {min-height:36px;line-height:36px}}
@container home-feed (max-width:939px){
  .obs-grid,.row,.an-home-row {--home-cols:3}
}
@container home-feed (max-width:630px){
  .obs-grid,.row,.an-home-row {--home-cols:2}
  .home-discover,#homeStream {--recs-head-gap:12px}
  .home-shelf-head {gap:7px}.home-shelf-head h2 {font-size:clamp(18px,5.7cqi,25px)}.home-filter select {font-size:12px;width:136px;text-overflow:ellipsis}
  .obs-watch h3 {margin:9px 9px 0;font-size:14px}.obs-byline {padding:2px 4px 5px 9px;font-size:12px;min-height:34px}
}
@container home-feed (max-width:335px){
  .home-shelf-head {display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .home-filter,.home-filter select {width:100%}
}
@media(pointer:coarse){.home-filter select {min-height:44px}}
/* A single 170ms opacity entrance, not a movement of the tracks. No delay,
   no outgoing overlay intercepting clicks, no competing hover transforms. */
html[data-effects="full"] #homeResults>.obs-arrive {animation:obs-filter-in 170ms cubic-bezier(.2,.65,.3,1)}
@keyframes obs-filter-in {from {opacity:.1} to {opacity:1}}
.obs-empty {grid-column:1 / -1;padding:25px;border:1px solid var(--line);border-radius:16px;color:var(--muted);background:#0a1421}.obs-empty b {color:#ecf4fc}.obs-empty p {margin:6px 0 14px}

/* Quiet continuation of the same shell below the fold and in service views. */
#homeStream>h2 {font:650 clamp(19px,1.40vw,27px)/1.24 var(--font-display);margin:clamp(30px,2.65vw,51px) 0 14px}
#homeStream>h2:first-child {margin-block-start:calc(2 * var(--recs-head-gap))}
#homeStream>h2 .i {color:#bbd2e7;width:.75em;height:.75em}
.card,.poster,.panel,.stat,.chat,.explain,.modal-card {border-color:var(--glass-line);background:var(--glass-bg);-webkit-backdrop-filter:none;backdrop-filter:none}
#homeStream>.row>.card {border-radius:14px;box-shadow:none;background:#0a121f;border-color:#aec7e228}
#homeStream>.row .title {color:#e8f0fa}#homeStream>.row>.card:hover {border-color:#9abbd066;box-shadow:none}
#homeStream>.row .card-badge {background:#08101edb;color:#dbe8f6;border-color:#adc9e02f}
.gate-card,.friends-bar,.yt-pop {background-color:#101927;border-color:#a6c4df28}
.obs-note {color:#eaf2fb;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;padding:clamp(19px,2.25vw,30px);border:1px solid #b4d5ed40;border-radius:20px;background:linear-gradient(145deg,#152337,#0b1421 77%);box-shadow:0 24px 85px #0009}
.obs-note::backdrop {background:#020610bb}
.obs-note-head {display:flex;align-items:center;justify-content:space-between;gap:10px}.obs-note-head>span {display:flex;align-items:center;gap:7px;color:#b2d5ef;font:600 10px/1.3 var(--font-body);letter-spacing:.14em}.obs-note-head .i {width:17px;height:17px}.obs-note-head .icon-btn {width:34px;height:34px;background:#101c2c;color:#dfebf8;border-color:var(--line)}
.obs-note h2 {font:650 23px/1.24 var(--font-display);letter-spacing:-.048em;margin:17px 0 9px}.obs-note-film {font:600 16px/1.45 var(--font-body);color:#e2ecf7;margin:0 0 11px}.obs-note ul {margin:0;padding-left:18px;color:#b7c8db;font:400 14px/1.5 var(--font-body)}.obs-note li+li {margin-top:5px}
.obs-art-credit {color:#9aafc4;font:400 12px/1.45 var(--font-body);margin:14px 0 0}
.obs-note-actions .btn[aria-busy=true] {cursor:progress}.obs-note-actions {display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.obs-note-actions .btn {color:#ecf5ff;background:#18293c;border:1px solid #a4c3e13a;min-height:39px}.obs-note-actions .btn[aria-pressed=true] {background:#233c52;color:#c0e7ff}.obs-note-actions .i {width:16px;height:16px}
@media(forced-colors:active){.hero-orbit,.obs-card,.obs-note,.rail .topnav a.active {border:1px solid CanvasText}.hero-orbit .orb-open {color:LinkText;border-color:LinkText}.obs-duration {color:CanvasText;background:Canvas}.obs-byline>a {color:LinkText}}
