.space-nav.quiet-scene-links{display:flex;gap:0;padding:0;margin:10px 0 0;flex-wrap:wrap}
.space-nav.quiet-scene-links a{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:4px 0;border:0;border-radius:4px;background:none;color:#b8adb8;font:400 13px/1.5 'DM Sans',sans-serif;text-decoration:none}
.space-nav.quiet-scene-links a:hover{color:#eee9e4;background:none;text-decoration:underline;text-underline-offset:4px}
.space-nav.quiet-scene-links a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.space-nav.quiet-scene-links a[hidden]{display:none}
.lounge-settings>.quiet-scene-links{margin:-18px 0 22px}
body[data-space=lounge] .space-layout{padding:16px 20px 20px;max-width:none}
body[data-space=lounge] .calm-scene .ambient-clock{left:30px;top:100px}
body[data-space=lounge] .calm-scene.sleeping .scene-caption,body[data-space=lounge] .calm-scene.sleeping .ambient-clock{opacity:1}
@media(max-width:800px){body[data-space=lounge] .calm-scene{height:65svh;min-height:360px}.space-nav.quiet-scene-links a{min-height:44px}}
body[data-space=lounge] .calm-scene:is(:fullscreen,.immersive){height:100dvh;min-height:0}
body[data-space=lounge] .relax-header{height:72px;padding:0 28px}
body[data-space=lounge] .relax-header .brand{font-size:29px}
@media(max-width:600px){body[data-space=lounge] .relax-header{padding:0 20px}body[data-space=lounge] .relax-header .brand{font-size:23px}body[data-space=lounge] .header-whisper{display:none}}

/* Shared, quiet scene navigation directly above each scene's controls. */
.space-nav.scene-switch{display:flex;gap:6px;margin:0 0 24px;padding:4px;border:1px solid #ffffff12;border-radius:10px;background:#ffffff03;flex-wrap:nowrap}
.space-nav.scene-switch a{flex:1;display:flex;align-items:center;justify-content:center;min-height:40px;padding:6px 10px;border:0;border-radius:7px;background:transparent;color:#aaa3ac;font:400 13px/1.4 'DM Sans',sans-serif;text-decoration:none;white-space:nowrap}
.space-nav.scene-switch a[aria-current=page]{background:#ffffff0c;color:#ece5df;box-shadow:inset 0 0 0 1px #ffffff0b}
.space-nav.scene-switch a:hover{background:#ffffff10;color:#fff}
.space-nav.scene-switch a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.lounge-settings>.scene-switch{margin-top:-10px}
@media(max-width:800px){.space-nav.scene-switch a{min-height:44px}}

/* Both destinations keep the same viewport geometry, including the scrollbar gutter. */
html.router-host{scrollbar-gutter:stable}
body[data-space=lounge] .space-layout{max-width:none;margin:0;padding:16px 20px 20px}
body[data-space=lounge] .calm-scene{height:var(--room-height);min-height:0;max-height:none}
body[data-space=lounge] .lounge-settings{height:var(--room-height);min-height:0;overflow:auto;scrollbar-width:thin;overflow-anchor:none;border-radius:20px}
@media(min-width:1600px){body[data-space=lounge] .space-layout{max-width:2240px;margin-inline:auto;padding:20px 28px 24px}}
@media(max-width:800px){body{--room-height:max(500px,70svh)}body[data-space=lounge] .lounge-settings{height:auto;max-height:78svh}}
@media(max-width:700px){body[data-space=lounge] .space-layout{padding:10px}body[data-space=lounge] .relax-header{height:64px;padding:0 20px}}
body[data-space=lounge] .calm-scene:is(:fullscreen,.immersive){height:100dvh;min-height:0}
.relax-frame.leaving{opacity:0;pointer-events:none}

/* Identical settings shell, headings and first controls in both destinations. */
body[data-space=lounge] #settings-dock .lounge-settings{height:auto;max-height:none;overflow:visible;padding:24px;border:0;border-radius:0;background:transparent}
#settings-dock .panel-heading{height:65px;min-height:65px;margin:-10px 0 24px;padding:14px 0;box-sizing:border-box}
#settings-dock .panel-heading h2{font:400 22px/1.3 'DM Sans',sans-serif;letter-spacing:0;margin:0}
#settings-dock .heading-spacer{display:block;width:37px;height:37px}
#settings-dock .scene-switch{margin:0 0 24px;min-height:50px}
#settings-dock .select-setting,#settings-dock .shared-clock-setting{margin:0 0 24px}
#settings-dock .select-setting>label,#settings-dock .shared-clock-setting>label{display:block;margin:0 0 10px;font-size:14px;line-height:20px;color:#e0dce3}
#settings-dock select{padding:11px 8px;line-height:20px;border-radius:9px;background:#232229;color:#f5f3f2;border:1px solid #ffffff20}
body[data-space=lounge] #settings-dock{height:var(--room-height);min-height:0;overflow:auto;scrollbar-width:thin}
@media(max-width:800px){body[data-space=lounge] #settings-dock{height:auto;max-height:78svh}}
/* A destination gets the same viewport width as the host, not a second scrollbar deduction. */
.relax-frame{width:100vw;max-width:none}

/* Switching scenes must never change the host document's scroll geometry. */
html,html.router-host{overflow-y:scroll;scrollbar-gutter:stable;overflow-x:hidden}
body.router-host{overflow:visible}
.relax-frame.parked{visibility:hidden;pointer-events:none;opacity:0}
.relax-frame{width:100vw;height:100dvh;transition:opacity .7s ease;transform:none}
#settings-dock{scrollbar-gutter:stable}

/* A single fixed menu header and a separately scrolling control area. */
body #settings-dock,body[data-space=lounge] #settings-dock{overflow:hidden;scrollbar-gutter:auto}
body #settings-dock>aside,body[data-space=lounge] #settings-dock>.lounge-settings{display:flex;flex-direction:column;height:100%;max-height:none;min-height:0;padding:0;overflow:hidden}
body #settings-dock .settings-top{flex:0 0 164px;box-sizing:border-box;padding:24px 24px 0;background:var(--panel);z-index:6}
body #settings-dock .settings-top .panel-heading{position:static;top:auto;height:51px;min-height:51px;margin:0 0 15px;padding:0;display:flex;align-items:center}
body #settings-dock .settings-top .scene-switch{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;box-sizing:border-box;height:50px;min-height:50px;margin:0;padding:4px}
body #settings-dock .scene-switch a{min-width:0;min-height:40px;height:40px;padding:6px 8px}
body #settings-dock .settings-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-gutter:stable;padding:0 24px 24px;overscroll-behavior:contain}
@media(max-width:800px){body #settings-dock,body[data-space=lounge] #settings-dock{height:78svh;max-height:78svh;min-height:0}body #settings-dock .settings-top{flex-basis:168px}body #settings-dock .settings-top .scene-switch{height:54px}body #settings-dock .scene-switch a{height:44px;min-height:44px}}

/* Both pages now use main > workspace > scene + settings-dock. */
body .relaxation-page{box-sizing:border-box;width:100%;max-width:none;margin:0;padding:16px 20px 20px}
body .relaxation-page>.workspace{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start;min-width:0}
body .relaxation-page>.workspace>*{min-width:0}
body .relaxation-page>.workspace.menu-hidden{grid-template-columns:minmax(0,1fr)}
@media(min-width:1600px){body .relaxation-page{max-width:2240px;margin-inline:auto;padding:20px 28px 24px}}
@media(min-width:2200px){body .relaxation-page>.workspace{grid-template-columns:minmax(0,1fr) 360px;gap:24px}body .relaxation-page>.workspace.menu-hidden{grid-template-columns:minmax(0,1fr)}}
@media(min-width:801px) and (max-width:1050px){body .relaxation-page>.workspace{grid-template-columns:minmax(0,1fr) 305px;gap:14px}body .relaxation-page>.workspace.menu-hidden{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){body .relaxation-page>.workspace{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){body .relaxation-page{padding:10px}}
/* Retain the lounge controls' spacing without the old, separate page layout. */
.lounge-settings .settings-body>label,.lounge-settings #lounge-decor-control>label{display:block;margin:20px 0 10px;font-size:14px}
.lounge-settings .settings-body .check{display:flex;align-items:center;gap:8px}
.lounge-settings .settings-body output{float:right;font-size:12px;color:#b1a9b9}
body #stage:is(:fullscreen,.immersive),body #scene:is(:fullscreen,.immersive){height:100dvh!important;width:100%!important}
/* The three places share the same compact navigation. */
body #settings-dock .settings-top .scene-switch{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
body #settings-dock .scene-switch a{font-size:12px;padding-inline:3px}
body[data-scene=sunset] .settings-body>.setting{margin-top:26px}
body[data-scene=sunset] .calm-scene .scene-caption{left:26px;top:24px}
body[data-scene=sunset] .calm-scene .now-playing.visualizer-active:not([hidden]){display:flex;position:absolute;top:24px;right:80px;width:27%;max-width:320px;text-align:right;z-index:4}
@media(max-width:700px){body[data-scene=sunset] .calm-scene .scene-caption{left:20px;top:18px}}
/* Four readable destinations, with identical geometry in every scene. */
body #settings-dock .settings-top{flex-basis:210px}
body #settings-dock .settings-top .scene-switch{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,40px);gap:6px;height:96px;min-height:96px}
body #settings-dock .scene-switch a{font-size:14px;letter-spacing:normal;padding-inline:8px}
@media(max-width:800px){body #settings-dock .settings-top{flex-basis:218px}body #settings-dock .settings-top .scene-switch{grid-template-rows:repeat(2,44px);height:104px;min-height:104px}}
body[data-scene=milky-way] .calm-scene .scene-caption{left:26px;top:24px}
body[data-scene=milky-way] .settings-body>.setting{margin:26px 0}
body[data-scene=milky-way] .calm-scene .now-playing.visualizer-active:not([hidden]){display:flex;position:absolute;top:24px;right:80px;width:27%;max-width:320px;text-align:right;z-index:4}
@media(max-width:700px){body[data-scene=milky-way] .calm-scene .scene-caption{left:20px;top:18px}}
