/* Studio 工作區頁面（Crag、Wall、3D 牆、3D 場景）的版面：整頁一欄、內容自己捲，頁首、浮在畫面上的工具列。
   按鈕、輸入框、字級等元件在 shell.css（每個 Studio 頁面都載入）；這裡只放工作區才有的外框。 */
:root { --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); display: flex; flex-direction: column; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; transition: background-color .15s, color .15s, opacity .15s, scale .12s var(--ease); }
button:active:not(:disabled) { scale: .96; transition-duration: .06s; }   /* 按下縮一下用 scale 屬性，不用 transform：元素自己用 transform 定位（置中、圖釘）時才不會被蓋掉而跳位 */
button:disabled { opacity: .4; cursor: default; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* 頁首：麵包屑在左、頭像在右 */
#top { flex: none; display: flex; align-items: center; gap: 8px; min-height: 54px; padding: calc(8px + var(--safe-t)) 16px 8px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
#top .grow { flex: 1; }

/* 浮在畫面上的工具列：深色玻璃、細框、陰影；按鈕是方中帶圓 */
.tbar { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; padding: 5px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: var(--pop), inset 0 1px 0 rgba(255, 255, 255, .06); max-width: calc(100% - 136px); }
.tbar[hidden] { display: none; }
.tbar.list-bar { position: relative; left: auto; top: auto; transform: none; align-self: center; margin: 12px 12px 4px; flex: none; box-shadow: var(--sheen), 0 0 0 1px var(--line); background: var(--surface); }   /* 清單上方的工具列（Crag 路線清單、Wall 牆面）：跟著版面排，不浮在畫面上 */
.tbar .sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 4px; flex: none; }
.tbtn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--muted); }
.tbtn svg { width: 18px; height: 18px; }
.tbtn:hover:not(:disabled) { background: rgba(255, 255, 255, .06); color: var(--text); }
.tbtn[aria-pressed="true"], .tbtn[aria-pressed="true"]:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(212, 255, 79, .35), 0 0 16px -4px rgba(212, 255, 79, .5); }
.tbtn.primary, .tbtn.primary:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.tbtn.danger { color: var(--danger); }
@media (pointer: coarse) { .tbtn { width: 40px; height: 40px; } .tbtn svg { width: 20px; height: 20px; } }
