/* =========================================================================
   👑 FANTASTIC VISION LAB: AXP Socrates 視覺空間 — style.css (V1.0 Dual-Engine Release)
   🕒 最後優化日期與時間 (Last Optimized Timestamp)：2026-10-22 20:01 CST
   核心戰略與瑞士無塵光學實驗室升級重點 (V1.0 實體鍵盤 × 觸控螢幕雙棲元年初版)：
   1. [凡特錫色盤 100% 純化] 徹底拔除舊版殘留之 16 處刺眼螢光青 (#38bdf8) 與森林綠 (#10b981 / #0d9488 / #34d399)，全面換裝凡特錫藍 (#1E75BB / #2988D6 / #7CC2F5)・皇家深海藍 (#1A365D) 與皇家香檳金 (#B88E28 / #D4AF37)。
   2. [V1.0 鍵盤／觸控雙棲介面] 新增面板頂部「實體鍵盤 ／ 觸控螢幕」雙模切換器 (.input-mode-switcher)・舞台右上角懸浮快捷艙 (.arena-top-right-dock) 與右下角「消光暗室級虛擬十字方向舵 (.touch-dpad-container)」。
   3. [零重疊響應式幾何佈局] 當開啟觸控模式時，自動協調底部導引膠囊 (#socratic-insight-bar) 與右下角虛擬方向舵之空間配置，確保於 iPad 平板與 43"~55" 大螢幕 100% 零遮擋。
   4. [無邊框圓形消光暗室 #socrates-aperture-mask] 消除螢幕直角邊框暗示，全介面鎖定 tabular-nums 等寬防抖動與 100% 零頓號・零反引號。
   ========================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

input[type="text"], input[type="number"], select {
    user-select: text !important;
    -webkit-user-select: text !important;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #f8fafc;
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

#fv-socrates-app {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    overflow: hidden;
}

/* =========================================================
   左側：WebGL 視覺空間暗室主舞台 (100% 純黑無雜訊)
   ========================================================= */
#arena {
    flex: 1;
    position: relative;
    height: 100%;
    background-color: #000000;
    overflow: hidden;
    touch-action: none;
}

#webgl-container {
    width: 100%;
    height: 100%;
    display: block;
}

/* 無邊框圓形消光光圈遮罩 (消除螢幕矩形邊框對 SVV 垂直感知之參考暗示) */
#socrates-aperture-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 25;
    opacity: 0;
    transition: opacity 0.45s ease;
    background: radial-gradient(
        circle at 50% 50%,
        transparent 0%,
        transparent 37%,
        rgba(0, 0, 0, 0.92) 41%,
        #000000 45%,
        #000000 100%
    );
}

#socrates-aperture-mask.aperture-active {
    opacity: 1;
}

/* 左上角：視覺空間感知 HUD */
#hud {
    position: absolute;
    top: 16px;
    left: 18px;
    background: rgba(11, 21, 40, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-left: 4px solid #D4AF37;
    border-radius: 16px;
    padding: 13px 16px;
    min-width: 360px;
    z-index: 50;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: none;
    font-family: 'Montserrat', 'Noto Sans TC', monospace;
    font-variant-numeric: tabular-nums;
}

.hud-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 9px;
}

.hud-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(41, 136, 214, 0.42);
    padding: 3.5px 11px;
    border-radius: 20px;
    font-size: 11.5px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2988D6;
    box-shadow: 0 0 8px #2988D6;
    display: inline-block;
    animation: hudDotPulse 2.2s infinite ease-in-out;
}

@keyframes hudDotPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.25); opacity: 1; }
}

.hud-time-pill {
    font-size: 12px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.75);
    padding: 3.5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hud-time-pill strong {
    color: #D4AF37;
    font-weight: 800;
    margin-left: 4px;
}

.hud-mid-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.75fr;
    gap: 8px;
    margin-bottom: 9px;
}

.hud-metric-box {
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(51, 65, 85, 0.65);
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hud-metric-box small {
    font-size: 9px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.6px;
}

.hud-metric-box strong {
    font-size: 13.5px;
    font-weight: 900;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* 零防備感知探索進度槽與階段勳章 */
.hud-gamify-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 0;
    padding: 5px 10px;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(30, 117, 187, 0.32);
    border-radius: 9px;
}

.hud-rank-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hud-rank-label {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.8px;
}

#hud-rank-badge {
    font-size: 11.8px;
    font-weight: 900;
    color: #7CC2F5;
    letter-spacing: 0.4px;
    transition: color 0.3s ease;
}

.hud-energy-track {
    flex: 1;
    height: 6.5px;
    background: #0f172a;
    border-radius: 10px;
    border: 1px solid #334155;
    overflow: hidden;
    position: relative;
}

#hud-energy-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1E75BB 0%, #2988D6 55%, #D4AF37 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(41, 136, 214, 0.6);
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#dynamic-mode-tag {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
    font-size: 11.8px;
    font-weight: 800;
    color: #D4AF37;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* === 右上角舞台懸浮快捷艙 (收合面板 [E] 與 全螢幕 [Q]) === */
.arena-top-right-dock {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 55;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arena-dock-btn {
    background: rgba(11, 21, 40, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 117, 187, 0.55);
    color: #E2E8F0;
    padding: 7.5px 13px;
    border-radius: 20px;
    font-size: 11.8px;
    font-weight: 800;
    font-family: 'Noto Sans TC', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.arena-dock-btn:hover, .arena-dock-btn:active {
    background: linear-gradient(135deg, #1A365D 0%, #1E75BB 100%);
    border-color: #D4AF37;
    color: #FFF9DE;
    transform: translateY(-1px);
}

/* 底部中央：零防備視覺空間探索導引膠囊 */
#socratic-insight-bar {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 21, 40, 0.90);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(212, 175, 55, 0.52);
    border-radius: 16px;
    padding: 10px 20px;
    width: 86%;
    max-width: 680px;
    z-index: 50;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.68);
    transition: all 0.3s ease;
}

/* 當開啟觸控螢幕模式時，自動縮減底部導引膠囊寬度並微調位置，完美避開右下角虛擬方向舵 */
body.touch-mode-active #socratic-insight-bar {
    left: 18px;
    transform: none;
    width: calc(100% - 236px);
    max-width: 580px;
    text-align: left;
}

.insight-badge {
    display: inline-block;
    font-family: 'Montserrat', monospace;
    font-size: 9.8px;
    font-weight: 800;
    letter-spacing: 1.4px;
    color: #7CC2F5;
    background: rgba(30, 117, 187, 0.22);
    border: 1px solid rgba(124, 194, 245, 0.42);
    padding: 2px 11px;
    border-radius: 12px;
    margin-bottom: 5px;
}

#socratic-prompt-text {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.55;
    letter-spacing: 0.3px;
}

/* 左下角：腦幹 E-W 核瞳孔連動與迷走神經節律呼吸導引條 */
#vagal-breath-bar {
    position: absolute;
    bottom: 16px;
    left: 18px;
    background: rgba(11, 21, 40, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 117, 187, 0.45);
    border-radius: 30px;
    padding: 7.5px 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    z-index: 50;
    pointer-events: none;
}

#breath-indicator {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #2988D6;
    box-shadow: 0 0 10px rgba(41, 136, 214, 0.85);
    will-change: transform, background-color;
    transition: transform 0.15s linear, background-color 0.4s ease;
}

#breath-text {
    font-size: 12.2px;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.4px;
}

/* ==========================================================================
   ✨ V1.0 觸控螢幕專屬：右下角「消光暗室級虛擬十字方向舵 (Touch D-Pad HUD)」
   ========================================================================== */
.touch-dpad-container {
    position: absolute;
    bottom: 16px;
    right: 18px;
    z-index: 56;
    background: rgba(11, 21, 40, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(30, 117, 187, 0.52);
    border-top: 2px solid #B88E28;
    border-radius: 18px;
    padding: 9px 11px 11px 11px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.touch-mode-active .touch-dpad-container,
.touch-dpad-container.is-visible {
    display: flex;
}

.touch-dpad-header {
    width: 100%;
    text-align: center;
    border-bottom: 1px dashed rgba(124, 194, 245, 0.25);
    padding-bottom: 4px;
}

.touch-dpad-title {
    font-family: 'Montserrat', 'Noto Sans TC', monospace;
    font-size: 9.8px;
    font-weight: 800;
    color: #D4AF37;
    letter-spacing: 0.6px;
}

.touch-dpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 52px);
    grid-template-rows: repeat(3, 52px);
    gap: 6px;
    align-items: center;
    justify-items: center;
}

.dpad-empty {
    width: 52px;
    height: 52px;
    pointer-events: none;
}

.dpad-btn {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: rgba(26, 54, 93, 0.68);
    border: 1.5px solid rgba(124, 194, 245, 0.38);
    color: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
    touch-action: manipulation;
}

.dpad-btn:hover {
    background: rgba(30, 117, 187, 0.78);
    border-color: #D4AF37;
}

.dpad-btn:active,
.dpad-btn.dpad-pressed {
    background: linear-gradient(135deg, #1E75BB 0%, #2988D6 100%);
    border-color: #FFF9DE;
    color: #FFF9DE;
    transform: scale(0.92);
    box-shadow: 0 0 16px rgba(30, 117, 187, 0.8);
}

.dpad-btn.dpad-center {
    background: rgba(184, 142, 40, 0.26);
    border: 1.5px solid #D4AF37;
    color: #FFF9DE;
    border-radius: 50%;
    font-family: 'Montserrat', monospace;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.dpad-btn.dpad-center:active {
    background: #D4AF37;
    color: #090e1a;
}

/* =========================================================
   右側：凡特錫藍視覺空間控制面板
   ========================================================= */
.control-panel {
    width: 396px;
    min-width: 396px;
    height: 100vh;
    background: linear-gradient(180deg, #0B1528 0%, #132747 55%, #0B1528 100%);
    border-left: 1px solid rgba(184, 142, 40, 0.35);
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    overflow-y: auto;
    z-index: 60;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.68);
}

.control-panel::-webkit-scrollbar {
    width: 5px;
}
.control-panel::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.35);
    border-radius: 4px;
}

.panel-header {
    text-align: center;
    padding-bottom: 7px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}

.header-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 2px;
}

.brand-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2988D6;
    box-shadow: 0 0 8px #2988D6;
}

.panel-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #D4AF37;
}

.panel-header p {
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1.2px;
}

/* === V1.0 實體鍵盤 vs. 觸控螢幕 雙模切換器 === */
.input-mode-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(8, 13, 26, 0.78);
    border: 1px solid rgba(30, 117, 187, 0.45);
    padding: 3.5px;
    border-radius: 9px;
    margin-bottom: 8.5px;
}

.mode-switch-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 800;
    font-family: 'Noto Sans TC', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-switch-btn:hover {
    color: #ffffff;
}

.mode-switch-btn.active {
    background: linear-gradient(135deg, #1A365D 0%, #1E75BB 100%);
    border-color: #D4AF37;
    color: #FFF9DE;
    box-shadow: 0 3px 10px rgba(30, 117, 187, 0.38);
}

/* =========================================================
   亮點一：即時感知微觀雷達艙 (Live Micro-Telemetry Scope)
   ========================================================= */
.telemetry-scope-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(11, 21, 40, 0.96) 100%);
    border: 1px solid rgba(30, 117, 187, 0.45);
    border-left: 3.5px solid #1E75BB;
    border-radius: 12px;
    padding: 8.5px 12px;
    margin-bottom: 8.5px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(30, 117, 187, 0.08);
}

.scope-visual-box {
    width: 66px;
    height: 66px;
    flex-shrink: 0;
    background: radial-gradient(circle at 50% 50%, rgba(30, 117, 187, 0.18) 0%, rgba(2, 6, 23, 0.92) 75%);
    border-radius: 50%;
    border: 1px solid rgba(41, 136, 214, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scope-info-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.scope-tag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scope-live-badge {
    font-family: 'Montserrat', monospace;
    font-size: 9px;
    font-weight: 800;
    color: #7CC2F5;
    background: rgba(30, 117, 187, 0.22);
    border: 1px solid rgba(124, 194, 245, 0.4);
    padding: 1.5px 7px;
    border-radius: 10px;
    letter-spacing: 0.8px;
}

#scope-scale-badge {
    font-family: 'Montserrat', monospace;
    font-size: 9.5px;
    font-weight: 700;
    color: #D4AF37;
}

.scope-main-readout {
    font-size: 13.5px;
    font-weight: 900;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scope-sub-readout {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.control-section {
    background: rgba(19, 39, 71, 0.55);
    border: 1px solid rgba(51, 65, 85, 0.82);
    border-radius: 12px;
    padding: 9.5px 12px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.control-section h3 {
    font-size: 11.8px;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 7px;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}
.section-title-row h3 {
    margin-bottom: 0;
}

.ai-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.8px;
    font-weight: 700;
    color: #D4AF37;
    cursor: pointer;
}
.ai-switch-label input {
    accent-color: #D4AF37;
}

/* 主控按鈕群組樣式 */
.btn-main {
    width: 100%;
    padding: 9.5px 12px;
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.8px;
    color: #ffffff;
    background: linear-gradient(135deg, #1E75BB 0%, #1A365D 100%);
    border: 1px solid #2988D6;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 4px 14px rgba(30, 117, 187, 0.35);
    margin-bottom: 6px;
}

.btn-main:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.btn-main.active {
    background: linear-gradient(135deg, #B88E28 0%, #96711C 100%);
    border-color: #FFF9DE;
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(184, 142, 40, 0.45);
}

.sub-action-row {
    display: grid;
    grid-template-columns: 0.78fr 1fr 1.25fr;
    gap: 5px;
}

.btn-sub, .btn-report {
    padding: 6.5px 6px;
    font-size: 11.2px;
    font-weight: 800;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-sub {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
}
.btn-sub:hover {
    background: #334155;
    color: #ffffff;
}

.btn-report {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(184, 142, 40, 0.12) 100%);
    color: #FFF9DE;
    border: 1px solid rgba(212, 175, 55, 0.65);
}
.btn-report:hover {
    background: #D4AF37;
    color: #0f172a;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
}

/* =========================================================
   亮點二：2x2 活潑動態幾何魔方卡 (.bento-proto-grid)
   ========================================================= */
.bento-proto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 8px;
}

.proto-btn {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(9, 14, 26, 0.95) 100%);
    color: #cbd5e1;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 11px;
    padding: 8.5px 9px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.proto-btn:hover {
    border-color: #2988D6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 117, 187, 0.25);
}

.proto-btn.active-proto {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.82) 0%, rgba(30, 117, 187, 0.38) 100%);
    border: 1.5px solid #D4AF37;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.18), inset 0 0 15px rgba(30, 117, 187, 0.18);
}

.bento-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.bento-key-badge {
    background: #1e293b;
    color: #D4AF37;
    padding: 2.5px 7.5px;
    border-radius: 6px;
    font-family: 'Montserrat', monospace;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(212, 175, 55, 0.4);
    transition: all 0.2s ease;
}

.proto-btn.active-proto .bento-key-badge {
    background: #D4AF37;
    color: #090e1a;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.55);
}

.bento-mini-icon {
    color: #64748b;
    transition: transform 0.4s ease, color 0.3s ease;
}

.proto-btn:hover .bento-mini-icon {
    color: #7CC2F5;
    transform: rotate(18deg) scale(1.08);
}

.proto-btn.active-proto .bento-mini-icon {
    color: #D4AF37;
    animation: bentoIconFloat 4s infinite ease-in-out;
}

@keyframes bentoIconFloat {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(15deg) scale(1.1); }
}

/* 1-2-3 活潑膠囊進度燈 (.sub-pill) */
.submode-pills {
    display: flex;
    align-items: center;
    gap: 2.5px;
    background: rgba(2, 6, 23, 0.7);
    padding: 2px 3px;
    border-radius: 12px;
    border: 1px solid rgba(51, 65, 85, 0.65);
}

.sub-pill {
    font-family: 'Montserrat', monospace;
    font-size: 9px;
    font-weight: 800;
    color: #64748b;
    padding: 1.5px 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sub-pill:hover {
    color: #f8fafc;
}

.proto-btn.active-proto .sub-pill.active {
    background: #2988D6;
    color: #ffffff;
    transform: scale(1.06);
    box-shadow: 0 0 8px rgba(41, 136, 214, 0.65);
}

.proto-btn:not(.active-proto) .sub-pill.active {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.proto-btn-text {
    display: flex;
    flex-direction: column;
    gap: 1.5px;
}

.proto-btn-text span {
    font-size: 11.8px;
    font-weight: 800;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proto-btn-text small {
    font-size: 9.8px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proto-btn.active-proto .proto-btn-text small {
    color: #7CC2F5;
}

.stage-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-stage-action {
    width: 100%;
    background: rgba(212, 175, 55, 0.14);
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 7px;
    padding: 6.5px 10px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.4px;
}

.btn-stage-action:hover {
    background: #D4AF37;
    color: #0f172a;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

/* =========================================================
   亮點三：水晶空間旋律工作站 (.soundscape-dock)
   ========================================================= */
.soundscape-dock {
    background: linear-gradient(135deg, rgba(30, 117, 187, 0.20) 0%, rgba(15, 23, 42, 0.82) 100%);
    border-color: rgba(41, 136, 214, 0.42);
}

.btn-sound-pill {
    background: rgba(30, 117, 187, 0.25);
    color: #7CC2F5;
    border: 1px solid rgba(124, 194, 245, 0.5);
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 10.8px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sound-pill:hover {
    background: #1E75BB;
    color: #ffffff;
}

.btn-sound-pill.playing {
    background: linear-gradient(135deg, #B88E28 0%, #D4AF37 100%);
    border-color: #FFF9DE;
    color: #090e1a;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
}

/* 模組專屬控制群組與滑桿控制項 */
.module-ctrl-group {
    padding-bottom: 3px;
}

.input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6.5px;
    font-size: 11.2px;
    color: #cbd5e1;
    gap: 6px;
}

.input-row:last-child {
    margin-bottom: 0;
}

.input-row select, .input-row input[type="number"], .input-row input[type="text"] {
    background: #090e1a;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 4.5px 7px;
    font-size: 11.2px;
    font-weight: 700;
    width: 68%;
    outline: none;
    font-family: 'Noto Sans TC', 'Montserrat', sans-serif;
}

.input-row select:focus, .input-row input:focus {
    border-color: #2988D6;
}

.slider-group {
    margin-bottom: 6.5px;
}
.slider-group:last-child {
    margin-bottom: 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 10.8px;
    color: #94a3b8;
    margin-bottom: 3px;
}

.slider-header strong {
    color: #7CC2F5;
    font-family: 'Montserrat', monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

input[type="range"] {
    width: 100%;
    height: 5px;
    background: #090e1a;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    border: 1px solid #334155;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #D4AF37;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.18);
}

/* === 觸控平板 (iPad 10.9" / 12.9") 響應式微調 === */
@media (max-width: 1024px) {
    .control-panel {
        width: 345px;
        min-width: 345px;
        padding: 10px 12px;
    }
    #hud {
        min-width: 300px;
        padding: 10px 13px;
    }
    body.touch-mode-active #socratic-insight-bar {
        width: calc(100% - 215px);
        padding: 8px 14px;
    }
}
