/* Glassmorphism 主題版面修正（nginx 以 sub_filter 插入 <link>，主題更新不受影響）
   改這個檔就好，不用重載 nginx；瀏覽器每次都會重新驗證。
   只作用在主題頁（有 .app-shell / .home-view），不影響 /admin/。 */

/* 768–1099px：縮小地球，避免被首頁工具列蓋住 */
@media (min-width:768px) and (max-width:1099.98px){
.home-view div.aspect-square.max-w-md:has(.earth-globe-canvas){max-width:13rem!important;translate:0 0!important;transform:none!important}
}

@media (min-width:1100px){
/* 1) 整體等比例放大填滿螢幕：左右各留 32px，高度剛好一屏。
      49.2rem ≈ 兩台節點時整頁高度（頁首＋內容＋頁尾），節點變多才會需要捲動；矮螢幕最小縮到 14px。 */
html:has(.app-shell){font-size:max(14px,min(calc((100vw - 64px) / 80),calc(100vh / 49.2)))}
.app-header-content,.app-shell .max-w-\[1280px\]{max-width:calc(100vw - 64px)!important}

/* 2) 不用捲動：頁首、主內容、頁尾剛好一屏，頁尾貼底（主題原本把主內容設成至少一屏高） */
#app:has(.app-shell){display:flex;flex-direction:column;min-height:100vh}
.app-shell{flex:1 0 auto;display:flex;flex-direction:column}
.app-shell>main.app-main{min-height:0!important;flex:1 0 auto}

/* 3) 左欄統計＋節點卡片，右欄大地球（約頁寬 42%；上限 38.5rem，讓左欄放得下兩張卡片） */
.home-view:has(.earth-globe-canvas){--g:min(42vw,38.5rem)}
.home-view:has(.earth-globe-canvas)>div.grid-cols-12{grid-template-columns:minmax(0,1fr) var(--g)!important;column-gap:1rem!important}
.home-view:has(.earth-globe-canvas)>div.grid-cols-12>*{grid-column:1/2!important;grid-row:1!important}
.home-view>div.grid-cols-12>div.aspect-square:has(.earth-globe-canvas){grid-column:2/3!important;width:var(--g)!important;max-width:none!important;margin:0!important;translate:0 0!important;transform:none!important;align-self:start}
.home-view:has(.earth-globe-canvas)>.node-info{margin-right:calc(var(--g) + 1rem);min-height:calc(var(--g) - 10rem)}
.home-view .node-info div.grid[class*="minmax(300px"]{grid-template-columns:repeat(auto-fill,minmax(18.75rem,1fr))!important}

/* 4) 工具列在地球正下方置中；「● 在線數」放在「全部區域」後面。
      工具列總寬 20rem = 全部區域 9rem + 在線數 3rem + 三顆按鈕 2rem×3 + 間距 0.5rem×4 */
.home-view:has(.earth-globe-canvas)>.node-info div.search{position:absolute;left:100%;top:calc(var(--g) - 12.75rem);width:var(--g);max-width:none;margin:0!important;justify-content:flex-start;padding-left:calc((var(--g) - 20rem) / 2)}
.home-view:has(.earth-globe-canvas)>.node-info div.search>button:first-child{width:9rem!important;margin-right:3.5rem}
.home-view>div.grid-cols-12>div.aspect-square:has(.earth-globe-canvas)>div.absolute.left-0.pointer-events-none{top:calc(var(--g) + .75rem)!important;left:calc((var(--g) - 20rem) / 2 + 9.5rem)!important;width:3rem;height:2rem;justify-content:center;font-size:.75rem!important;border-radius:.375rem!important;padding:0!important}
}
