/* ───────── 熊好讀 v3 網頁版 shell：把 demo 的「手機框」換成真的視窗 ─────────
   只管最外面那一層（多大、放哪裡）和載入中的樣子；畫面裡的東西都在 gen/app.css 和各頁自己的樣式。 */
html,body{height:100%;overflow:hidden;overscroll-behavior:none;background:var(--bg)}
body{display:block;padding:0}
/* 手機：整個視窗就是 App，沒有框 */
.stage{width:100%;height:100vh;height:100dvh;max-height:none;border-radius:0;border:0}
.nav{bottom:calc(12px + env(safe-area-inset-bottom,0px))}
/* 600～767（大手機、小窗）：還是手機版，放一欄在中間，不拉寬。768 以上是平板／電腦版，見 desktop/frame.css */
@media (min-width:600px) and (max-width:767px) and (min-height:480px){
  html,body{background:#06081A}
  body{display:grid;place-items:center}
  .stage{width:412px;height:min(880px,calc(100dvh - 32px));border-radius:36px;border:1px solid rgba(255,255,255,.08)}
}
/* 左邊導覽列只有電腦版才顯示（desktop/frame.css） */
#side{display:none}
/* 載入中：三個點 */
#v3-boot{position:absolute;inset:0;z-index:99;display:grid;place-items:center;background:var(--bg);color:var(--sub);font:500 15px/1.9 var(--ui);text-align:center;padding:32px}
#v3-boot code{display:inline-block;margin-top:6px;padding:6px 10px;border-radius:8px;background:var(--surface);color:var(--key);font:700 13px/1.4 ui-monospace,Consolas,monospace}
.v3-wait{display:flex;gap:8px}
.v3-wait i{width:10px;height:10px;border-radius:50%;background:var(--sub);animation:v3-wait 1s infinite both}
.v3-wait i:nth-child(2){animation-delay:.15s}.v3-wait i:nth-child(3){animation-delay:.3s}
@keyframes v3-wait{0%,70%,100%{opacity:.25;transform:none}35%{opacity:1;transform:translateY(-5px)}}
.v3-retry{width:auto;padding:0 26px;margin-top:6px}
@media (prefers-reduced-motion:reduce){.v3-wait i{animation:none;opacity:.6}}
/* 管理員面板 button (admin-button.js): admin accounts only, top right over the stage */
#admin-open{position:fixed;z-index:60;top:calc(10px + env(safe-area-inset-top,0px));right:10px;width:40px;height:40px;display:grid;place-items:center;border-radius:14px;background:var(--surface2);color:var(--sub);box-shadow:inset 0 -3px 0 rgba(0,0,0,.22);transition:color .16s,background-color .16s,transform .15s}
#admin-open:hover{color:var(--ink);background:var(--surface3)}
#admin-open:active{transform:translateY(2px)}
#admin-open svg{width:20px;height:20px}
/* a phone: the top right belongs to the coins and the chest; the panel is a computer's job (open /admin/) */
@media (max-width:767px){#admin-open{display:none}}
