/* 完整演奏、音色設計、示範與創作共用的第一層導覽。 */
.gx-integrated { --workspace-nav-h: 46px; }
.gx-integrated .app { height:calc(100dvh - var(--workspace-nav-h)); }
.gx-workspace-nav { height:var(--workspace-nav-h); display:flex; align-items:center; gap:6px; padding:0 16px; background:linear-gradient(180deg,#121724,#0a0e18); border-bottom:1px solid #263148; position:relative; z-index:25; }
.gx-workspace-brand { display:flex; align-items:baseline; gap:7px; margin-right:18px; padding:0; border:0; background:transparent; cursor:pointer; color:#defaff; font-size:16px; font-weight:700; letter-spacing:.12em; white-space:nowrap; }
.gx-workspace-brand small { color:#a3b2d0; font:10px var(--font-mono); letter-spacing:0; }
.gx-workspace-tab { min-height:34px; padding:6px 15px; display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; border-radius:7px; background:transparent; color:#abb7d5; cursor:pointer; font-size:12px; font-weight:600; white-space:nowrap; }
.gx-workspace-tab:hover { background:#1b263b; color:#f0f6ff; }
.gx-workspace-tab.is-active { color:#8bf1ff; border-color:#3a627a; background:linear-gradient(180deg,#263d52,#182a3d); box-shadow:inset 0 1px 0 #84d9f52e,0 3px 8px #0004; }
.gx-workspace-hint { margin-left:auto; color:#95a4c4; font-size:11px; }
.gx-creation-host { position:fixed; inset:var(--workspace-nav-h) 0 0; background:#07080d; z-index:20; }
.gx-creation-frame { border:0; display:block; width:100%; height:100%; background:#07080d; }
.gx-workspace-loading { position:absolute; inset:20% 0 auto; text-align:center; color:#b9cae8; pointer-events:none; }
.gx-track-session { display:flex; align-items:center; flex-wrap:wrap; gap:9px 16px; padding:13px 17px; margin-bottom:12px; background:linear-gradient(120deg,#183449,#22213e); border:1px solid #527489; border-radius:12px; }
.gx-track-session>strong { color:#9bf0fc; font-size:14px; }
.gx-track-session>span { color:#c7d1e8; font-size:12px; }
.gx-track-session>div { display:flex; gap:8px; margin-left:auto; }
.gx-track-session button { border:1px solid #60829b; border-radius:7px; padding:8px 13px; background:#253d54; cursor:pointer; }
.gx-track-session button:first-child { color:#092433; background:#8ce6f4; border-color:#a4edf8; font-weight:700; }
@media(max-width:760px) {
  .gx-workspace-nav { padding-inline:7px; gap:3px; }
  .gx-workspace-brand,.gx-workspace-hint { display:none; }
  .gx-workspace-tab { flex:1; padding:7px 5px; font-size:11px; gap:5px; }
  .gx-track-session { padding:11px; }
  .gx-track-session>div { margin-left:0; }
}
@media(max-width:360px) { .gx-workspace-tab .ic-wrap { display:none; } }

/* 原有品牌與四軌按鈕由整合層移至導覽；音色選擇使用釋出的寬度。 */
.gx-workspace-brand { margin-right:10px; }
.gx-workspace-brand .logo { display:flex; }
.gx-workspace-brand .logo__mark { width:25px; height:25px; }
.gx-workspace-brand .logo__word { font-size:15px; }
.gx-workspace-brand .logo__version { font-size:10px; }
.gx-workspace-nav>.st-back { height:auto; min-width:0; }
.gx-integrated .topbar .tb-center { flex:1 1 360px; }
.gx-integrated .topbar .pn { flex:1 1 280px; max-width:460px; }
.gx-integrated .topbar .pn__main { flex:1 1 240px; width:auto; max-width:none; }

/* 聲景維持單次操作；舞臺高度扣除外層導覽，保留原版編輯區可用空間。 */
.gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play:not(.nothing) { min-height:calc(clamp(280px,38vh,400px) - var(--workspace-nav-h)); padding-top:14px; }
.gx-integrated .play__meta { display:flex; }
.gx-integrated:not(.guangxi-immersive) .play__meta { flex-wrap:wrap; min-height:40px; }
.gx-integrated:not(.guangxi-immersive) .play__meta>.gx-scene-controls { position:static; margin-left:auto; gap:4px; padding:3px; flex-shrink:0; }
.gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__side { padding-top:0; }
.gx-integrated.guangxi-immersive .play__info { position:static; }
.gx-integrated.guangxi-immersive .play__meta>.gx-scene-controls { top:22px; right:27px; }
@media(min-width:1100px) {
  /* 示波與頻譜使用標題右下的留白，讓 XY 保有完整垂直操作範圍。 */
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__side { display:block; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__xy { height:100%; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__minis { position:absolute; top:76px; right:calc(clamp(240px,24vw,330px) + 28px); width:260px; height:62px; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__name,
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__desc,
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__tags { max-width:calc(100% - 276px); }
}
@media(max-height:940px) and (min-width:900px) {
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play:not(.nothing) { min-height:0; }
}
@media(max-width:1100px) {
  .gx-workspace-hint { font-size:10px; }
  .gx-workspace-brand { margin-right:3px; }
}
@media(max-width:899px) {
  .gx-integrated .topbar .pn { max-width:none; min-width:0; }
  .gx-integrated .topbar .pn__main { flex:1 1 auto; min-width:0; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play:not(.nothing) { min-height:0; padding-top:8px; }
  .gx-integrated:not(.guangxi-immersive) .play__meta { gap:4px; margin-bottom:4px; }
  .gx-integrated:not(.guangxi-immersive) .play__meta>.gx-scene-controls { gap:2px; padding:0; }
  .gx-integrated:not(.guangxi-immersive) .play__left { gap:6px; }
  .gx-integrated:not(.guangxi-immersive) .play__macros { padding-top:8px; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__side { padding-top:0; }
}

/* 手機直向把四個巨集排成同一列，讓 XY 與琴鍵可以一起演奏。 */
.macro__precise { display:none; }
@media(max-width:599px) and (min-height:601px) {
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play { --hero-k:60px; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__macros {
    grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:32px 4px 8px;
  }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .macro .ac-knob__label { max-width:100%; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .macro .ac-knob--xl { gap:4px; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .play__xy .ac-xy { aspect-ratio:16/9; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .macro .ac-knob__value { display:none; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .macro__precise { display:flex; align-items:center; justify-content:center; gap:2px; color:#b5c8e7; font:12px var(--font-mono); }
  .gx-integrated .macro__precise input { width:48px; min-height:30px; padding:3px 2px; text-align:center; background:#0b1426; border:1px solid #49647b; border-radius:5px; color:#e8f7ff; font:inherit; appearance:textfield; }
  .gx-integrated .macro__precise input::-webkit-inner-spin-button { appearance:none; }
  .gx-integrated .macro__precise input:focus-visible { outline:2px solid #8bf1ff; outline-offset:1px; }
  .gx-integrated:not(.guangxi-immersive):not(.play-collapsed) .macro__n {
    top:-28px; left:50%; transform:translateX(-50%); min-width:40px; min-height:28px;
  }
  .gx-integrated .macro:nth-child(-n+2) .macro__targets { left:0; transform:none; }
  .gx-integrated .macro:nth-child(n+3) .macro__targets { left:auto; right:0; transform:none; }
}

/* 主工作區採同一組明確作用中與鍵盤焦點提示。 */
.gx-workspace-tab.is-active { box-shadow:inset 0 -2px 0 #8bf1ff,inset 0 1px 0 #84d9f52e; }
.gx-workspace-tab:focus-visible,.gx-workspace-brand:focus-visible,.gx-track-session button:focus-visible { outline:2px solid #8bf1ff; outline-offset:2px; }
.gx-track-session>strong { flex-basis:100%; }
.gx-track-session>div { flex-wrap:wrap; }
.gx-compare-dialog { width:min(520px,calc(100vw - 24px)); }
.gx-compare-panel { display:grid; gap:16px; }
.gx-compare-track { color:#c7d1e8; margin:0; }
.gx-compare-choices { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.gx-compare-choice { min-height:52px; padding:10px; border:1px solid #60829b; border-radius:8px; background:#17273c; color:#d6e4f4; cursor:pointer; font:600 14px var(--font-ui); }
.gx-compare-choice[aria-pressed="true"] { color:#092433; background:#8ce6f4; border-color:#a4edf8; box-shadow:inset 0 -3px 0 #327b8c; }
.gx-compare-choice:focus-visible { outline:2px solid #f0f7ff; outline-offset:3px; }
.gx-compare-status { margin:0; min-height:24px; color:#a8f4e6; font-weight:600; }
.gx-compare-help { color:#bdcbe1; font-size:12px; line-height:1.65; margin:0; }
@media(max-width:760px) {
  .gx-track-session>div { width:100%; }
  .gx-track-session button { flex:1 1 auto; min-height:40px; padding-inline:8px; white-space:nowrap; }
}
