/* All rules require the web-only capability gate. Shared mobile CSS is untouched. */
body.desktop-web{--desktop-left:240px;--desktop-right:0px;--desktop-footer:96px;display:flex;flex-direction:column}
body.desktop-web.desktop-right-open{--desktop-right:370px}
body.desktop-web.desktop-left-closed{--desktop-left:0px}
body.desktop-web>header{height:54px;min-height:54px;padding:0 380px 0 14px!important;gap:12px;border-bottom:1px solid #293e4d;background:#0d1b28}
body.desktop-web header .eyebrow{display:block;font-size:9px;letter-spacing:1px}
body.desktop-web header h1{font-size:18px;margin:0}
body.desktop-web #landscapeControls{display:flex;position:absolute;top:6px;right:10px;gap:6px}
body.desktop-web button{min-height:38px}
body.desktop-web #landscapeControls button{min-height:40px}
body.desktop-web #desktopModels{position:absolute;top:54px;bottom:0;left:0;width:240px;overflow:auto;padding:14px 10px 70px;background:#101f2df2;border-right:1px solid #324858;z-index:10;overscroll-behavior:contain}
body.desktop-web #desktopModels h2{font-size:13px;color:#aac7d4;margin:0 6px 12px}
body.desktop-web #modelChoices{display:flex;flex-direction:column;gap:7px;margin:0}
body.desktop-web #modelChoices button{white-space:normal;min-height:42px;font-size:13px}
body.desktop-web.desktop-left-closed #desktopModels{display:none}
body.desktop-web #sky{width:auto;margin-left:var(--desktop-left);margin-right:var(--desktop-right);min-width:0;min-height:0;flex:1;overflow:hidden}
body.desktop-web #sky #canvas,body.desktop-web.geological #sky #canvas{inset:0 0 var(--desktop-footer)}
body.desktop-web #desktopTimeline{position:absolute;left:0;right:0;bottom:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;padding:8px 12px;background:#0e1f2eea;border-top:1px solid #334c5c;z-index:7;max-height:38%;overflow:auto;overscroll-behavior:contain}
body.desktop-web #desktopTimeline>[hidden]{display:none!important}
body.desktop-web #desktopTimeline #quickPlayback,body.desktop-web #desktopTimeline #quickSpeedControl,body.desktop-web #desktopTimeline #circulationQuick,body.desktop-web #desktopTimeline #climateQuick,body.desktop-web #desktopTimeline #viewFooter{position:static;inset:auto;max-width:none;width:auto;margin:0;padding:0;background:none;border:0;min-height:0;visibility:visible}
body.desktop-web #desktopTimeline #quickPlayback{display:flex;gap:6px;flex:0 0 auto}
body.desktop-web #desktopTimeline #quickPlayback #now,body.desktop-web #desktopTimeline #quickPlayback #play{flex:none}
body.desktop-web #desktopTimeline #quickSpeedControl{flex:1 1 180px;max-width:320px;height:auto;padding:0}
body.desktop-web #desktopTimeline #viewFooter{flex:1 1 280px;pointer-events:auto}
body.desktop-web #desktopTimeline #viewActions{width:auto;max-width:none;justify-content:flex-end;margin:0 0 4px}
body.desktop-web #desktopTimeline .globe-caption{padding:0}
body.desktop-web #desktopTimeline #clock{font-size:12px}
body.desktop-web #desktopTimeline #climateQuick{display:flex;flex:1 1 100%;gap:8px;align-items:center}
body.desktop-web #climateTimelineQuick{flex:1;min-width:280px}
body.desktop-web #climateTimeSlider{flex:1;width:auto;min-width:120px}
body.desktop-web #historyQuick{max-width:none;margin:0;padding:6px 10px}
body.desktop-web #historyQuick #historyHierarchy{display:block;font-size:10px}
body.desktop-web #historyQuick #historyCurrent{font-size:13px}
body.desktop-web #periodTimeline{scrollbar-width:thin}
body.desktop-web #panel,body.desktop-web.geological #panel{position:fixed;top:54px;right:0;bottom:0;width:370px;max-height:none;border-radius:0;border:0;border-left:1px solid #405663;transform:none;transition:none;display:flex;background:#101f2df5;z-index:20}
body.desktop-web:not(.desktop-settings) #panel{display:none!important}
body.desktop-web.desktop-settings:not(.focus-view) #panel{display:flex!important;visibility:visible;opacity:1;pointer-events:auto}
body.desktop-web #controls{min-height:0;overflow:auto;padding:0 16px 18px}
body.desktop-web #panel.folded #controls{display:block}
body.desktop-web #foldHint{display:none}
body.desktop-web #sky>:is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard){position:fixed;inset:54px 0 0 auto;width:370px;max-width:370px;max-height:calc(100dvh - 54px);margin:0;padding:16px;border:0;border-left:1px solid #405663;border-radius:0;background:#101f2df5;overflow:auto;overscroll-behavior:contain;box-shadow:none;z-index:21}
body.desktop-web :is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard)>.place-heading{cursor:grab;touch-action:none;user-select:none}
body.desktop-web :is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard)>.place-heading:active,body.desktop-web #encyclopediaDetail>.encyclopedia-tabs{cursor:grab;touch-action:none;user-select:none}
body.desktop-web #encyclopediaDetail[open]{position:fixed;margin:0;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);z-index:60}
body.desktop-web #encyclopediaDetail>.encyclopedia-tabs{cursor:grab}
body.desktop-web.desktop-info-hidden #sky>:is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard,#encyclopediaPage){display:none!important}
body.desktop-web #layerHandle{position:fixed;top:auto;bottom:16px;left:14px;width:210px;height:40px;min-height:40px;writing-mode:horizontal-tb;transform:none;border-radius:9px;z-index:12}
body.desktop-web.desktop-left-closed #layerHandle{left:8px;width:88px;bottom:calc(var(--desktop-footer) + 12px)}
body.desktop-web #layerDrawer{position:fixed;top:100px;bottom:66px;left:0;right:auto;width:240px;max-width:none;max-height:none;border-radius:0;background:#101f2dfc;z-index:13}
body.desktop-web #systemScaleQuick{max-width:min(820px,calc(100% - 16px))}
body.desktop-web #climateLegend{top:54px;max-height:calc(100% - var(--desktop-footer) - 64px)}
body.desktop-web.encyclopedia-active #sky>:not(#encyclopediaPage):not(#landscapeControls){visibility:visible;pointer-events:auto}
body.desktop-web.encyclopedia-active #openSettings{display:block}
body.desktop-web #encyclopediaPage{position:fixed;inset:54px 0 0 auto;width:370px;padding:16px;border-left:1px solid #405663}
body.desktop-web .encyclopedia-list{grid-template-columns:1fr}
body.desktop-web #encyclopediaDetail{width:min(800px,calc(100vw - 80px));max-height:calc(100dvh - 40px)}
body.desktop-web.focus-view{--desktop-left:0px;--desktop-right:0px}
body.desktop-web.focus-view #desktopModels,body.desktop-web.focus-view #layerHandle,body.desktop-web.focus-view #layerDrawer,body.desktop-web.focus-view #desktopInfo,body.desktop-web.focus-view #desktopHelp,body.desktop-web.focus-view #sky>:is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard,#encyclopediaPage){display:none!important}
body.desktop-web.focus-view #sky{margin:0}
body.desktop-web.focus-view #landscapeControls{top:6px;right:10px}
body.desktop-web #desktopShortcuts{width:min(620px,calc(100vw - 40px));background:#10212f;color:#dfebf4;border:1px solid #51717d;border-radius:12px;padding:20px;line-height:1.7}
body.desktop-web #desktopShortcuts::backdrop{background:#020a12b0}
@media(min-width:1800px){body.desktop-web.desktop-right-open{--desktop-right:400px}body.desktop-web #panel,body.desktop-web.geological #panel,body.desktop-web #sky>:is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard),body.desktop-web #encyclopediaPage{width:400px;max-width:400px}}
@media(max-width:1250px){body.desktop-web{--desktop-left:220px}body.desktop-web #desktopModels,body.desktop-web #layerDrawer{width:220px}body.desktop-web #layerHandle{width:192px}body.desktop-web.desktop-right-open{--desktop-right:340px}body.desktop-web #panel,body.desktop-web.geological #panel,body.desktop-web #sky>:is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard),body.desktop-web #encyclopediaPage{width:340px;max-width:340px}}

body.desktop-web #desktopLabelHover{position:absolute;inset:0;pointer-events:none!important;z-index:4}
body.desktop-web canvas.desktop-object-hover{cursor:pointer}
body.desktop-web canvas.desktop-panning{cursor:grabbing}

body.desktop-web #desktopClimateHover{position:fixed;z-index:24;max-width:min(310px,calc(100vw - 16px));padding:10px 12px;background:#102632f5;color:#e5f5f1;border:1px solid #57998f;border-radius:9px;box-shadow:0 6px 20px #0005;line-height:1.35}
body.desktop-web #desktopClimateHover[hidden]{display:none}
body.desktop-web #desktopClimateHover strong,body.desktop-web #desktopClimateHover small{display:block}
body.desktop-web #desktopClimateHover strong{font-size:13px}
body.desktop-web #desktopClimateHover small{font-size:11px;color:#b2d0d3;margin-top:4px}
body.desktop-web #desktopClimateHover button{margin-top:7px;min-height:34px;padding:5px 9px;color:#c4fff0}
body.desktop-web.desktop-climate-tabs #sky>:is(#place,#referenceCard,#circulationCard){display:none!important}
body.desktop-web #desktopClimatePanel{position:fixed;inset:54px 0 0 auto;width:var(--desktop-right);max-width:400px;overflow:auto;padding:14px 16px;border-left:1px solid #405663;background:#101f2df5;z-index:21;overscroll-behavior:contain}
body.desktop-web #desktopClimatePanel[hidden],body.desktop-web.desktop-info-hidden #desktopClimatePanel,body.desktop-web.focus-view #desktopClimatePanel{display:none!important}
body.desktop-web #desktopClimatePanel>header{position:static!important;height:auto;min-height:0;padding:0!important;border:0;display:flex;justify-content:space-between;background:none;margin-bottom:10px}
body.desktop-web #desktopClimatePanel>header h2{font-size:16px;margin:0}
body.desktop-web #desktopClimatePanel [role=tablist]{display:flex;gap:5px;margin:0 0 16px}
body.desktop-web #desktopClimatePanel [role=tab]{flex:1;min-width:0;font-size:12px;padding:7px}
body.desktop-web #desktopClimatePanel [aria-selected=true]{background:#276963;border-color:#89d9c7;color:#effffb}
body.desktop-web #desktopClimatePanel [role=tabpanel][hidden]{display:none}
body.desktop-web #desktopClimatePanel .desktop-climate-card-copy{display:block;position:static;inset:auto;width:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:none;box-shadow:none;overflow:visible}
body.desktop-web #desktopClimatePanel svg.climate-chart{width:100%;height:auto}
body.desktop-web #desktopClimatePanel [role=tabpanel]{line-height:1.55}

/* One reader surface. Inline positions belong only to cards shown on the model;
   the shared encyclopedia temporarily borrows those same DOM nodes. */
body.desktop-web #sky>:is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard){background:#10212f}
body.desktop-web #encyclopediaDetail[open]{inset:70px 16px auto auto;width:min(520px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 86px);padding:16px;background:#10212f;opacity:1;isolation:isolate;border:1px solid #51717d;box-shadow:0 12px 40px #0008;overflow:auto;scrollbar-gutter:stable}
body.desktop-web #encyclopediaDetail::backdrop{background:#020a1247}
body.desktop-web #encyclopediaDetail :is(#referenceCard,#circulationCard,#profileCard,#tectonicCard,#periodCard,#periodGroupInfo){position:static!important;inset:auto!important;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;min-height:0!important;margin:0!important;padding:0!important;transform:none!important;overflow:visible!important;background:#10212f!important;opacity:1!important;box-shadow:none!important;border:0!important;border-radius:0!important}
body.desktop-web #encyclopediaDetail .place-heading{position:static!important;inset:auto!important;padding:0;margin:0 0 12px;background:#10212f;cursor:default;touch-action:auto;user-select:text}
body.desktop-web #encyclopediaDetail .place-heading>button{display:none}
body.desktop-web #encyclopediaDetail>.encyclopedia-tabs{display:flex;align-items:center;gap:8px;top:-16px;margin:-16px -16px 14px;padding:12px 16px;background:#10212f;border-bottom:1px solid #405663;z-index:10;min-height:62px}
.desktop-reader-title,.desktop-reader-grip{display:none}
body.desktop-web .desktop-reader-title{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650;font-size:14px}
body.desktop-web #encyclopediaDetail>.encyclopedia-model-link{position:static;margin:0 0 16px}
body.desktop-web #encyclopediaDetail h2{line-height:1.35;overflow-wrap:anywhere}
body.desktop-web #encyclopediaDetail :is(p,#referenceWhat,#referenceWhy){line-height:1.65;overflow-wrap:anywhere}
body.desktop-web:has(#encyclopediaDetail[open]) #sky>:is(#place,#referenceCard,#circulationCard,#tectonicCard,#profileCard,#periodCard,#desktopClimatePanel){visibility:hidden!important;pointer-events:none!important}

body.desktop-web .desktop-reader-grip{display:block;flex:none;color:#a8d8d0;font-size:11px;white-space:nowrap}
body.desktop-web #encyclopediaDetail>.encyclopedia-tabs:active{cursor:grabbing}

body.desktop-web #encyclopediaDetail #periodGroupInfo>button:first-child{display:none}
