/* ==========================================================================
   Project Glance : Design System v3 — Apple Vision Pro Glassmorphism
   Spatial · Intuitive · Accessible
   ========================================================================== */

:root {
    /* ── Color Palette ── */
    --color-white:        #FFFFFF;
    --color-bg:           #0a0a0c;
    --color-primary:      #7B5CF0;
    --color-primary-deep: #2D2060;
    --color-dark-gray:    #333333;

    /* ── Derived Surface Tokens ── */
    --color-primary-tint:   rgba(123, 92, 240, 0.08);
    --color-primary-soft:   rgba(123, 92, 240, 0.15);
    --color-primary-hover:  rgba(123, 92, 240, 0.22);
    --color-primary-mid:    rgba(123, 92, 240, 0.32);
    --color-primary-border: rgba(123, 92, 240, 0.45);
    --color-primary-active: rgba(123, 92, 240, 0.52);
    --color-primary-glow:   rgba(123, 92, 240, 0.60);
    --color-primary-strong: rgba(123, 92, 240, 0.75);
    --color-primary-bright: rgba(123, 92, 240, 0.90);
    --color-surface:        rgba(20, 20, 22, 0.42);
    --color-surface-hover:  rgba(30, 30, 32, 0.62);
    --color-border:         rgba(255, 255, 255, 0.12);
    --color-border-bright:  rgba(255, 255, 255, 0.22);

    /* ── Dynamic Theme Tokens (JS applyThemeColor으로 덮어씀) ── */
    --accent-color:  #7B5CF0;
    --accent-glow:   0 0 20px rgba(123, 92, 240, 0.60);
    --bg-gradient:   radial-gradient(ellipse 55% 65% at 15% 65%, rgba(45,32,96,0.45) 0%, transparent 60%), radial-gradient(ellipse 40% 50% at 85% 15%, rgba(123,92,240,0.08) 0%, transparent 55%), radial-gradient(ellipse 70% 50% at 50% 100%, rgba(10,8,18,0.80) 0%, transparent 60%), radial-gradient(circle at 50% 50%, #14141a 0%, var(--color-bg) 100%);

    /* ── Vision Pro Glass Effect ── */
    --glass-bg:       rgba(20, 20, 22, 0.42);
    --glass-bg-hover: rgba(30, 30, 32, 0.62);
    --glass-border:   rgba(255, 255, 255, 0.15);
    --glass-blur:     blur(40px) saturate(150%);

    /* ── Typography ── */
    --font:      'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: 'Inter', ui-monospace, monospace;

    /* ── Spacing (4px base grid) ── */
    --s1:  4px;
    --s2:  8px;
    --s3:  12px;
    --s4:  16px;
    --s5:  20px;
    --s6:  24px;
    --s8:  32px;
    --s10: 40px;
    --s12: 48px;
    --s16: 64px;

    /* ── Border Radius (4px base grid) ── */
    --r-sm:   8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   24px;
    --r-2xl:  32px;
    --r-full: 9999px;

    /* ── Elevation Shadows ── */
    --shadow-sm: 0 8px 32px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.52);
    --shadow-lg: 0 24px 72px rgba(0, 0, 0, 0.64);

    /* ── Text ── */
    --text-primary:   rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.50);
    --text-tertiary:  rgba(255, 255, 255, 0.30);

    /* ── Transitions ── */
    --t-fast:   0.15s cubic-bezier(0.25, 1, 0.5, 1);
    --t-normal: 0.30s cubic-bezier(0.25, 1, 0.5, 1);
    --t-slow:   0.50s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    width: 100vw;
    height: 100vh;
    background-color: var(--color-bg);
    font-family: var(--font);
    overflow: hidden;
    color: var(--text-primary);
    perspective: 1200px;
}

/* ==========================================================================
   LAYER 1 — Background
   ========================================================================== */
.spatial-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.bg-gradient-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-gradient);
    z-index: 2;
    transition: background 0.8s ease;
}

/* ==========================================================================
   LAYER 2 — Spatial Container
   ========================================================================== */
.spatial-container {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

/* ── 2.1  Left Floating Nav Bar ── */
.left-floating-bar {
    position: absolute;
    left: var(--s10);
    display: flex;
    flex-direction: column;
    gap: var(--s5);
    padding: var(--s6) var(--s4);
    border-radius: var(--r-full);
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 32px rgba(0,0,0,0.30);
    transform: translateZ(20px);
    transition: box-shadow var(--t-normal);
}

.nav-item {
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.48);
    transition:
        background var(--t-normal),
        transform var(--t-normal),
        box-shadow var(--t-normal),
        color var(--t-normal);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5px;
    pointer-events: none;
    flex-shrink: 0;
}

.nav-item:hover,
.nav-item.spatial-hover {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.10), 0 4px 14px rgba(0,0,0,0.24);
    transform: scale(1.06) translateZ(8px);
    color: rgba(255, 255, 255, 0.88);
}

.nav-item.active {
    background: var(--color-primary-soft);
    border-radius: var(--r-md);
    box-shadow:
        inset 0 0 0 1px var(--color-primary-border),
        inset 1px 1px 0 rgba(255,255,255,0.10),
        0 0 18px var(--color-primary-hover);
    transform: scale(1.04) translateZ(8px);
    color: var(--color-primary);
}

.nav-item.spatial-active {
    transform: scale(0.93) translateZ(5px);
    transition-duration: 0.1s;
}

.nav-splitter {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.10);
}

/* ── 2.2  Center Card Grid ── */
.main-content-frame {
    display: flex;
    gap: var(--s8);
    width: 80%;
    max-width: 1100px;
    justify-content: center;
    transform-style: preserve-3d;
}

.spatial-card {
    flex: 1;
    height: 420px;
    border-radius: var(--r-2xl);
    position: relative;
    background: rgba(20, 20, 25, 0.40);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    border-left-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 24px 72px rgba(0,0,0,0.50);
    padding: var(--s10);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: translateZ(0px);
    transition:
        transform var(--t-slow),
        box-shadow var(--t-slow),
        border-color var(--t-slow);
    cursor: pointer;
}

#card-air-piano {
    background:
        radial-gradient(circle at 80% -15%, var(--color-primary-hover) 0%, transparent 52%),
        var(--glass-bg);
}

#card-sculptor {
    background:
        radial-gradient(circle at 80% -15%, rgba(45, 32, 96, 0.40) 0%, transparent 52%),
        var(--glass-bg);
}

.spatial-card:hover,
.spatial-card.spatial-hover {
    transform: translateZ(40px) scale(1.03);
    box-shadow:
        var(--shadow-lg),
        0 0 56px var(--color-primary-soft),
        inset 1px 1px 0 rgba(255,255,255,0.18),
        inset 0 1px 0 rgba(255,255,255,0.14);
    border-color: var(--color-primary-border);
}

.spatial-card:hover .card-icon,
.spatial-card.spatial-hover .card-icon {
    color: var(--color-primary);
}

.spatial-card.spatial-active,
.spatial-card:active {
    transform: translateZ(10px) scale(0.98) !important;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.06) !important;
    transition: transform 0.1s ease;
}

.card-content {
    transform: translateZ(30px);
    transition: transform var(--t-slow);
    width: 100%;
}

.card-icon {
    margin-bottom: var(--s6);
    color: rgba(255, 255, 255, 0.78);
    line-height: 0;
}

.card-icon svg {
    width: 52px;
    height: 52px;
    stroke-width: 1.2px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.38));
}

.spatial-card h2 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: var(--s3);
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.95);
}

.spatial-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: var(--s6);
    font-weight: 400;
}

.badge {
    display: inline-block;
    padding: var(--s2) var(--s4);
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
    font-size: 11px;
    font-weight: 500;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.60);
    letter-spacing: 0.5px;
}

/* ── 2.3  Bottom Dock ── */
.bottom-system-dock {
    position: absolute;
    bottom: var(--s10);
    display: flex;
    align-items: center;
    gap: var(--s6);
    padding: var(--s3) var(--s8);
    border-radius: var(--r-full);
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 32px rgba(0,0,0,0.30);
    transform: translateZ(15px);
}

.dock-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    padding: var(--s2) var(--s5);
    border-radius: var(--r-full);
    transition: all 0.3s ease;
}

.dock-btn.active,
.dock-btn:hover,
.dock-btn.spatial-hover {
    background: var(--color-primary-hover);
    box-shadow: 0 0 14px var(--color-primary-hover);
    color: #ffffff;
}

.dock-btn.spatial-active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.dock-splitter {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.12);
}

.dock-status-text {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* ==========================================================================
   LAYER 3 — Spatial Cursor (MediaPipe Index-Tip Tracker)
   ========================================================================== */
.spatial-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    margin-top: -14px;
    pointer-events: none !important;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate3d(400px, 300px, 100px);
    transition: transform 0.08s linear;
    opacity: 0;
}

.cursor-core {
    width: 7px;
    height: 7px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--color-primary-glow);
}

.cursor-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1.5px solid var(--color-primary-active);
    border-radius: 50%;
    transform: scale(1);
    transition: transform 0.2s, border-color 0.2s;
}

.spatial-cursor.pinched .cursor-ring {
    transform: scale(0.5);
    border-color: var(--color-primary);
}

/* ==========================================================================
   LAYER 4 — Tracking Monitor (Webcam + Skeleton)
   ========================================================================== */
/* 기타 / Monitor Tilt 스테이지에서 미니캠 완전 숨김 — 카메라 모션 인식 미사용 */
body.guitar-mode .tracking-monitor-container,
body.tilt-mode .tracking-monitor-container,
body.visor-mode .tracking-monitor-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.tracking-monitor-container {
    position: fixed;                 /* body 직계 자식 + fixed → 뷰포트 기준 우하단 고정 */
    right: var(--s10);
    bottom: var(--s10);
    width: 256px;
    height: 160px;
    pointer-events: none;
    z-index: 99999;                  /* photo-booth-overlay(99000)보다 높아 항상 위에 노출 */
    border-radius: var(--r-xl);
    overflow: hidden;
    background: rgba(10, 10, 14, 0.72);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.08);
}

#webcam {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    position: absolute;
    top: 0;
    left: 0;
}

#skeleton-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 101;
    transform: scaleX(-1);
}

.monitor-badge {
    position: absolute;
    top: var(--s3);
    left: var(--s3);
    background: rgba(0, 0, 0, 0.72);
    padding: 3px var(--s2);
    border-radius: var(--r-sm);
    font-size: 9px;
    font-weight: 700;
    color: #34c759;
    letter-spacing: 0.6px;
    z-index: 102;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ==========================================================================
   LAYER 5 — Spatial Room (shared shell)
   ========================================================================== */
.spatial-room {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    padding: 64px 80px var(--s10);
    gap: var(--s6);
    transform-style: preserve-3d;
}

/* ── Room Header — Vision Pro floating glass strip ── */
.room-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex-shrink: 0;
    transform: translateZ(20px);
    gap: var(--s5);
    /* Glass panel */
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    border-radius: var(--r-xl);
    padding: var(--s3) var(--s5);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), var(--shadow-sm);
}

/* 오른쪽 컬럼(토글/툴바)은 끝 정렬 */
.room-header > :last-child {
    justify-self: end;
}

/* ── Exit Button — Vision Pro pill shape ── */
.exit-btn {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    padding: var(--s2) var(--s5);
    border-radius: var(--r-full);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    white-space: nowrap;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.12);
    transition: all 0.3s ease;
}

.exit-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.5px;
    flex-shrink: 0;
}

.exit-btn:hover,
.exit-btn.spatial-hover {
    background: rgba(255, 59, 48, 0.14);
    border-color: rgba(255, 59, 48, 0.35);
    box-shadow: 0 0 18px rgba(255, 59, 48, 0.18), inset 0 1px 1px rgba(255,255,255,0.10);
    color: rgba(255, 255, 255, 0.95);
}

.exit-btn.spatial-active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.room-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s3);
    text-align: center;
    justify-self: center;
}

/* JS-controlled emoji in air piano room — hidden for Vision Pro aesthetic */
#instrument-emoji {
    display: none;
}

/* Lucide icon inside room title */
.room-icon {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    flex-shrink: 0;
}

.room-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5px;
}

.room-title h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.92);
}

/* ── Instrument Status Panel ── */
.instrument-status-panel {
    position: absolute;
    top: 148px;
    left: 80px;
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    padding: var(--s3) var(--s5);
    border-radius: var(--r-lg);
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 32px rgba(0,0,0,0.30);
    display: flex;
    flex-direction: column;
    gap: 5px;
    transform: translateZ(10px);
    line-height: 1.5;
}

.status-item {
    color: var(--text-secondary);
    font-weight: 500;
}

#inst-mode-text  { color: #34c759;  font-weight: 700; }
#bpm-text        { color: #ff9500;  font-weight: 700; }
#inst-action-text{ color: var(--text-secondary); font-weight: 500; }

/* .header-spacer — 그리드 3열 균형 유지용 빈 컬럼 */
.header-spacer {
    justify-self: end;
}

/* ── Air Piano Keyboard ── */
.virtual-keyboard-container {
    width: 100%;
    max-width: 1000px;
    margin: auto auto var(--s12) auto;
    display: flex;
    gap: var(--s3);
    justify-content: center;
    transform: rotateX(15deg) translateZ(40px);
    transform-style: preserve-3d;
}

.piano-key {
    flex: 1;
    height: 240px;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.22);
    border-radius: var(--r-lg);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: var(--s6);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.12);
    transition: all 0.12s ease;
    transform: translateZ(0px);
    cursor: pointer;
    /* GPU layer per key for smooth active-state transitions */
    will-change: transform, box-shadow;
}

.piano-key:hover,
.piano-key.spatial-hover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary-border);
    box-shadow:
        0 0 20px var(--color-primary-hover),
        inset 0 1px 1px rgba(255,255,255,0.14);
}

.piano-key.piano-active {
    background: var(--color-primary-mid) !important;
    border-color: var(--color-primary-strong) !important;
    box-shadow:
        0 0 20px var(--color-primary-glow),
        0 0 48px var(--color-primary-mid),
        inset 0 0 16px rgba(255, 255, 255, 0.18) !important;
    transform: translateZ(-20px) scale(0.97);
}

.key-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.65);
    pointer-events: none;
    letter-spacing: 0.2px;
}

/* ── Drum Set ── */
.circular-drum-set {
    position: relative;
    width: 900px;
    height: 560px;
    margin: 0 auto;
    transform: translateZ(30px);
}

.drum-pad {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(28, 28, 30, 0.60);
    border: 1px solid rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
    backdrop-filter: blur(32px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 13px;
    transition: all 0.1s ease;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.10);
}

.drum-pad:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 0 24px var(--color-primary-glow), inset 0 1px 0 rgba(255,255,255,0.14);
    transform: scale(1.05);
}

.crash     { top: 5%;    left: 5%;   border-color: rgba(255, 167, 38, 0.50); }
.ride      { top: 5%;    right: 5%;  border-color: rgba(255, 167, 38, 0.50); }
.tom-high  { top: 15%;   left: 30%;  border-color: rgba(64, 196, 255, 0.50); }
.tom-mid   { top: 15%;   right: 25%; border-color: rgba(24, 255, 255, 0.50); }
.hi-hat    { bottom: 35%; left: 2%; width: 120px; height: 120px; border-color: rgba(255, 214, 0, 0.50); }
.snare     { bottom: 8%;  left: 18%; border-color: rgba(255, 235, 59, 0.50); }
.floor-tom { bottom: 8%;  right: 15%; border-color: rgba(105, 240, 174, 0.50); }
.kick      { bottom: 0%; left: 50%; transform: translateX(-50%);
             width: 180px; height: 180px; border-color: rgba(255, 82, 82, 0.50); }

.drum-pad.hit {
    transform: scale(0.88) translateZ(-50px);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 56px rgba(255,255,255,0.70);
}

.kick.hit {
    transform: translateX(-50%) scale(0.88) translateZ(-50px);
}

/* ==========================================================================
   LAYER 5b — Sculptor Room
   ========================================================================== */
.sculptor-toolbar {
    display: flex;
    gap: var(--s1);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--s1);
    border-radius: var(--r-full);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font);
    font-weight: 600;
    padding: var(--s2) var(--s4);
    border-radius: var(--r-full);
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
}

.tool-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.5px;
    flex-shrink: 0;
}

.tool-btn.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    box-shadow:
        inset 0 0 0 1px var(--color-primary-border),
        inset 0 1px 1px rgba(255,255,255,0.10),
        0 0 14px var(--color-primary-hover);
}

.tool-btn:hover,
.tool-btn.spatial-hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.07);
}

.tool-btn.spatial-active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

#sculptor-canvas-container {
    position: relative;
    flex: 1;
    min-height: 0;
    border-radius: var(--r-2xl);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
}

#creative-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

#spatial-objects-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}

.spatial-voxel {
    position: absolute;
    width: 56px;
    height: 56px;
    background: var(--color-primary-hover);
    border: 2px solid var(--color-primary);
    border-radius: var(--r-md);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    cursor: grab;
    transition: transform 0.1s;
}

.spatial-voxel.is-grabbed {
    border-color: #34c759 !important;
    box-shadow: 0 0 32px rgba(52, 199, 89, 0.52) !important;
    transform: scale(1.15) translateZ(60px);
    cursor: grabbing;
}

.sculptor-status {
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--s4) var(--s6);
    letter-spacing: 0.4px;
    transform: translateZ(10px);
}

#sculptor-mode-text {
    color: var(--color-primary);
    font-weight: 700;
}

/* ── Drum Flash Animations ── */
.drum-flash-red    { animation: flash-red    0.15s ease-out; }
.drum-flash-yellow { animation: flash-yellow 0.15s ease-out; }
.drum-flash-gold   { animation: flash-gold   0.15s ease-out; }
.drum-flash-cyan   { animation: flash-cyan   0.15s ease-out; }
.drum-flash-orange { animation: flash-orange 0.15s ease-out; }

@keyframes flash-red    { 0% { background-color: rgba(255,  59,  48, 0.22); } 100% { background-color: transparent; } }
@keyframes flash-yellow { 0% { background-color: rgba(255, 235,  59, 0.18); } 100% { background-color: transparent; } }
@keyframes flash-gold   { 0% { background-color: rgba(255, 215,   0, 0.18); } 100% { background-color: transparent; } }
@keyframes flash-cyan   { 0% { background-color: rgba(  0, 199, 190, 0.18); } 100% { background-color: transparent; } }
@keyframes flash-orange { 0% { background-color: rgba(255, 149,   0, 0.22); } 100% { background-color: transparent; } }

/* ==========================================================================
   Tilt Synth View
   ========================================================================== */
.tilt-synth-container {
    width: 100%;
    max-width: 1100px;
    margin: auto auto var(--s10) auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotateX(12deg) translateZ(40px);
    transform-style: preserve-3d;
    height: 500px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--r-2xl);
    border: 1px solid var(--glass-border);
    border-top-color: var(--color-border-bright);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.10);
    padding: var(--s12);
    transition: all 0.3s ease;
}

.tilt-synth-container.active {
    border-color: rgba(0, 212, 170, 0.38);
    box-shadow: var(--shadow-lg), inset 0 0 36px rgba(0, 212, 170, 0.08), 0 0 48px rgba(0, 212, 170, 0.10);
}

.tilt-gauge {
    position: relative;
    width: 480px;
    height: 240px;
    overflow: hidden;
    margin-bottom: var(--s10);
    transform: translateZ(30px);
}

.gauge-bg {
    position: absolute;
    inset: 0;
    width: 480px;
    height: 240px;
    border-top-left-radius: 240px;
    border-top-right-radius: 240px;
    background: conic-gradient(from -90deg at 50% 100%, #00d4aa 0%, var(--color-primary) 90deg, #ff4466 180deg);
    -webkit-mask: radial-gradient(circle at 50% 100%, transparent 192px, black 192.5px);
    mask: radial-gradient(circle at 50% 100%, transparent 192px, black 192.5px);
    filter: drop-shadow(0 0 14px var(--color-primary-border));
}

.gauge-needle {
    position: absolute;
    bottom: 0;
    left: 237px;
    width: 6px;
    height: 216px;
    background: linear-gradient(to top, #ffffff, var(--color-primary));
    transform-origin: bottom center;
    transform: rotate(-90deg);
    border-radius: var(--r-sm);
    box-shadow: 0 0 14px var(--color-primary-glow), 0 0 4px white;
    transition: transform 0.08s ease-out;
}

.gauge-needle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: -7px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--color-primary);
    box-shadow: 0 0 12px var(--color-primary);
}

.tilt-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s10);
    transform: translateZ(40px);
    background: rgba(14, 14, 16, 0.72);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: var(--s5) var(--s10);
    border-radius: var(--r-xl);
    border: 1px solid var(--glass-border);
    border-top-color: var(--color-border-bright);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.08);
}

.tilt-note {
    font-size: 68px;
    font-weight: 800;
    font-family: var(--font);
    color: #ffffff;
    text-shadow: 0 0 32px var(--color-primary-glow), 0 0 10px var(--color-primary);
    width: 160px;
    text-align: center;
    letter-spacing: -2px;
    line-height: 1;
}

.tilt-freq,
.tilt-angle {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-secondary);
}

.tilt-freq span,
.tilt-angle span {
    font-size: 28px;
    color: #00d4aa;
    text-shadow: 0 0 16px rgba(0, 212, 170, 0.52);
    display: inline-block;
    min-width: 88px;
    text-align: right;
}

/* 틸트 각도 Pill — 게이지 위 실시간 피드백 */
.tilt-pill {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s2) var(--s6);
    background: rgba(20, 20, 25, 0.60);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255,255,255,0.10);
    margin-bottom: var(--s6);
    transform: translateZ(50px);
    transition: box-shadow 0.3s ease;
}

.tilt-pill i[data-lucide] {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.tilt-pill-label {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

.tilt-pill-val {
    font-family: var(--font-mono, monospace);
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    min-width: 60px;
    text-align: right;
}

/* ==========================================================================
   LAYER 0 — Boot Screen (GLANCE OS)
   ========================================================================== */
#booting-screen {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 12, 0.97);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
    backdrop-filter: blur(40px) saturate(120%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    /* CSS transition — boot-fade-out 클래스 추가 시 부드럽게 사라짐 */
    opacity: 1;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
}

#booting-screen.boot-fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    /* 살짝 위에서 내려오는 등장 애니메이션 */
    animation: bootContentIn 1.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes bootContentIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.boot-icon {
    color: rgba(255, 255, 255, 0.68);
    line-height: 0;
}

.boot-icon svg {
    width: 68px;
    height: 68px;
    stroke-width: 1.1px;
    filter: drop-shadow(0 0 28px rgba(255,255,255,0.14));
}

.boot-logo-text {
    font-family: var(--font);
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 13px;
    /* 마지막 letter-spacing 시각적 보정 — 텍스트가 왼쪽으로 쏠리는 느낌 방지 */
    padding-left: 13px;
    color: rgba(255, 255, 255, 0.80);
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 0 40px rgba(255,255,255,0.12);
}

.landing-logo {
    width: 240px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

/* ==========================================================================
   Top System Status Bar
   ========================================================================== */
.top-status-bar {
    position: fixed;
    top: var(--s4);
    right: var(--s6);
    display: flex;
    align-items: center;
    gap: var(--s6);
    padding: var(--s2) var(--s5);
    border-radius: var(--r-full);
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 32px rgba(0,0,0,0.30);
    z-index: 10000;
    pointer-events: none;
}

.tsb-left {
    display: flex;
    align-items: center;
}

.tsb-brand {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3.5px;
    color: var(--text-tertiary);
}

.tsb-right {
    display: flex;
    align-items: center;
    gap: var(--s4);
}

.tsb-icon-group {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.tsb-hand-dot,
.tsb-lid-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.80);
    box-shadow: 0 0 6px rgba(255,59,48,0.40);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.tsb-hand-dot.active {
    background: #34c759;
    box-shadow: 0 0 8px rgba(52,199,89,0.62);
}

.tsb-lid-dot.active {
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-strong);
}

/* ── TSB Camera Button ── */
.tsb-cam-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.60);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    pointer-events: auto;          /* top-status-bar의 pointer-events:none 오버라이드 */
    flex-shrink: 0;
}
.tsb-cam-btn svg {
    width: 13px;
    height: 13px;
    stroke-width: 2px;
}
.tsb-cam-btn:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-border);
    color: #fff;
    box-shadow: 0 0 14px var(--color-primary-glow);
    transform: scale(1.10);
}
.tsb-cam-btn:active {
    transform: scale(0.92);
}
.tsb-cam-btn.booth-open {
    background: var(--color-primary-active);
    border-color: var(--color-primary-border);
    color: #fff;
    box-shadow: 0 0 16px var(--color-primary-glow);
}

/* ==========================================================================
   Photo Booth Overlay
   ========================================================================== */
.photo-booth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99000;           /* tracking-monitor(99999) 아래 — 웹캠은 항상 위에 떠 있음 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.50);   /* 딤 처리 — 캡처 직전 JS로 제거 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.30s cubic-bezier(0.25, 1, 0.5, 1);
}
.photo-booth-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Backdrop — 투명 뷰파인더 모드 */
.pbo-backdrop { display: none; }

/* ── 뷰파인더 비네팅 ──────────────────────────────────────────────────── */
.photo-booth-overlay.is-open::before {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.50);
    pointer-events: none;
    z-index: 0;
}

/* ── 코너 브라켓 ⌜⌝⌞⌟ ────────────────────────────────────────────────── */
.pbo-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.30s ease 0.10s;
}
.photo-booth-overlay.is-open .pbo-corner { opacity: 1; }

.pbo-corner-tl { top: 16px;    left: 16px;
    border-top:    2px solid rgba(255, 255, 255, 0.82);
    border-left:   2px solid rgba(255, 255, 255, 0.82); }
.pbo-corner-tr { top: 16px;    right: 16px;
    border-top:    2px solid rgba(255, 255, 255, 0.82);
    border-right:  2px solid rgba(255, 255, 255, 0.82); }
.pbo-corner-bl { bottom: 16px; left: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.82);
    border-left:   2px solid rgba(255, 255, 255, 0.82); }
.pbo-corner-br { bottom: 16px; right: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.82);
    border-right:  2px solid rgba(255, 255, 255, 0.82); }

/* ── 닫기 버튼 — 우측 상단 ───────────────────────────────────────────── */
.pbo-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 14, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}
.pbo-close-btn:hover {
    background: rgba(255, 59, 48, 0.22);
    border-color: rgba(255, 59, 48, 0.45);
    color: #ff3b30;
}
.pbo-close-btn svg { width: 15px; height: 15px; stroke-width: 2.5px; }

/* ── 좌측 스티커 레일 ────────────────────────────────────────────────── */
.pbo-sticker-rail {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
    padding: 12px 8px;
    background: rgba(6, 6, 12, 0.78);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

/* ── 셔터 버튼 — 하단 중앙 ───────────────────────────────────────────── */
.pbo-shutter-btn {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 3px solid rgba(255, 255, 255, 0.82);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.15), 0 4px 16px rgba(0, 0, 0, 0.50);
}
.pbo-shutter-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 32px rgba(255, 255, 255, 0.28), 0 4px 16px rgba(0, 0, 0, 0.50);
    transform: translateX(-50%) scale(1.06);
}
.pbo-shutter-btn:active { transform: translateX(-50%) scale(0.92); }

.pbo-shutter-inner {
    display: block;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    transition: all 0.18s ease;
}
.pbo-shutter-btn:hover .pbo-shutter-inner { background: #fff; }
.pbo-shutter-btn:active .pbo-shutter-inner { width: 46px; height: 46px; }

/* ── 드래그 스티커 ──────────────────────────────────────────────────── */
.draggable-sticker {
    position: fixed;
    font-size: 3rem;
    line-height: 1;
    cursor: grab;
    user-select: none;
    z-index: 99500;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
    transition: transform 0.12s ease;
}
.draggable-sticker:hover { transform: scale(1.12); }

/* Preview Area */
.capture-preview {
    position: relative;
    flex: 1;
    min-height: 0;
    aspect-ratio: 16 / 9;
    max-height: 420px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: var(--r-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.capture-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s4);
    color: var(--text-tertiary);
    user-select: none;
    pointer-events: none;
}
.capture-placeholder-icon {
    width: 40px;
    height: 40px;
    opacity: 0.30;
}
.capture-placeholder span {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.capture-preview img.captured-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Watermark logo overlay */
.pbo-logo-overlay {
    position: absolute;
    bottom: 16px;
    right: 16px;
    pointer-events: none;
}
.pbo-watermark {
    width: 80px;
    height: auto;
    opacity: 0.72;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

/* Controls section */
.pbo-controls {
    display: flex;
    flex-direction: column;
    gap: var(--s4);
    flex-shrink: 0;
}
.pbo-control-row {
    display: flex;
    align-items: center;
    gap: var(--s4);
    padding: var(--s4) var(--s5);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--r-lg);
}
.pbo-control-label {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    flex-shrink: 0;
    min-width: 44px;
}

/* Sticker buttons */
.pbo-sticker-list {
    display: flex;
    gap: var(--s2);
    flex-wrap: wrap;
}
.pbo-sticker-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1;
}
.pbo-sticker-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    transform: scale(1.12);
}
.pbo-sticker-btn.active {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-border);
    box-shadow: 0 0 12px var(--color-primary-glow);
    transform: scale(1.08);
}

/* Action row */
.pbo-action-row {
    justify-content: flex-end;
    gap: var(--s3);
    background: transparent;
    border-color: transparent;
    padding-inline: 0;
}
.pbo-option-btn,
.pbo-capture-btn,
.pbo-download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    padding: var(--s3) var(--s5);
    border-radius: var(--r-full);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.20s ease;
    white-space: nowrap;
}
.pbo-option-btn svg,
.pbo-capture-btn svg,
.pbo-download-btn svg { width: 14px; height: 14px; stroke-width: 2px; }

.pbo-option-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.55);
}
.pbo-option-btn.active {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-border);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 12px var(--color-primary-glow);
}
.pbo-option-btn:hover { background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.80); }

.pbo-capture-btn {
    background: linear-gradient(135deg, var(--color-primary-mid), var(--color-primary-deep));
    border: 1px solid var(--color-primary-border);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px var(--color-primary-hover);
}
.pbo-capture-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--color-primary-hover), 0 0 20px var(--color-primary-glow);
}
.pbo-capture-btn:active { transform: scale(0.96); }

.pbo-download-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.55);
}
.pbo-download-btn:not([disabled]):hover {
    background: rgba(52, 199, 89, 0.15);
    border-color: rgba(52, 199, 89, 0.35);
    color: #34c759;
    box-shadow: 0 0 14px rgba(52, 199, 89, 0.25);
}
.pbo-download-btn[disabled] { opacity: 0.35; cursor: not-allowed; }

/* ==========================================================================
   Piano Game Mode Switcher
   ========================================================================== */
.piano-game-mode-bar {
    position: absolute;
    top: 132px;
    left: 50%;
    transform: translateX(-50%) translateZ(25px);
    z-index: 8;
    display: none;
}

.piano-game-mode-bar.visible {
    display: flex;
}

.pgm-switcher {
    display: flex;
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    border-radius: var(--r-full);
    padding: var(--s1);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 32px rgba(0,0,0,0.30);
    gap: 2px;
}

.pgm-btn {
    min-width: 160px;
    padding: var(--s3) var(--s8);
    border: none;
    border-radius: var(--r-full);
    background: transparent;
    color: rgba(255, 255, 255, 0.50);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
}

.pgm-btn svg {
    width: 13px;
    height: 13px;
    stroke-width: 1.5px;
    flex-shrink: 0;
}

.pgm-btn.active {
    background: linear-gradient(135deg,
        var(--color-primary-mid),
        var(--color-primary-deep));
    color: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 4px 16px var(--color-primary-hover),
        inset 0 1px 0 rgba(255,255,255,0.12);
}

.pgm-btn:hover:not(.active) {
    color: rgba(255,255,255,0.82);
    background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Rhythm Game Song Selection Overlay
   ========================================================================== */
.song-selection-overlay {
    position: absolute;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.song-cards-container {
    display: flex;
    gap: 30px;
}

.song-card {
    background: rgba(50, 50, 65, 0.9);
    border: 1px solid rgba(123, 92, 240, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(123, 92, 240, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    border-radius: var(--r-xl);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Hitbox expansion */
    position: relative;
}

.song-card::before {
    content: "";
    position: absolute;
    inset: -30px;
    z-index: -1;
}

.song-card:hover {
    background: rgba(123, 92, 240, 0.25);
    border-color: rgba(123, 92, 240, 1);
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 50px rgba(123, 92, 240, 0.6), inset 0 0 20px rgba(123, 92, 240, 0.4);
}

.song-icon {
    width: 48px;
    height: 48px;
    color: #7B5CF0;
    transition: color 0.3s ease;
}

.song-card:hover .song-icon {
    color: #fff;
    filter: drop-shadow(0 0 10px #7B5CF0);
}

.song-title {
    font-size: var(--fs-title-3);
    font-weight: 600;
    color: #E2E2E9;
    letter-spacing: -0.01em;
}

.song-card:nth-child(2) {
    border-color: rgba(0, 212, 170, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 212, 170, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.song-card:nth-child(2):hover {
    background: rgba(0, 212, 170, 0.25);
    border-color: rgba(0, 212, 170, 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 50px rgba(0, 212, 170, 0.6), inset 0 0 20px rgba(0, 212, 170, 0.4);
}
.song-card:nth-child(2) .song-icon { color: #00D4AA; }
.song-card:nth-child(2):hover .song-icon { color: #fff; filter: drop-shadow(0 0 10px #00D4AA); }

.song-card:nth-child(3) {
    border-color: rgba(255, 159, 10, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 159, 10, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.song-card:nth-child(3):hover {
    background: rgba(255, 159, 10, 0.25);
    border-color: rgba(255, 159, 10, 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 50px rgba(255, 159, 10, 0.6), inset 0 0 20px rgba(255, 159, 10, 0.4);
}
.song-card:nth-child(3) .song-icon { color: #FF9F0A; }
.song-card:nth-child(3):hover .song-icon { color: #fff; filter: drop-shadow(0 0 10px #FF9F0A); }

/* ==========================================================================
   Rhythm Game Overlay
   ========================================================================== */
.rhythm-game-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    /* GPU compositor layer — prevents re-compositing entire page on each frame */
    will-change: transform;
    transform: translateZ(0);
    contain: layout;
}

#rhythm-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Force canvas onto its own GPU layer for 60fps rasterization */
    will-change: contents;
    transform: translateZ(0);
}

/* HUD panels kept in DOM for JS; hidden for minimal aesthetic */
.rhythm-hud {
    display: none;
}

.rhud-label,
.rhud-value,
.rhythm-hud-panel {
    /* DOM-only — not rendered */
}

.judgment-perfect {
    color: #ffffff;
    text-shadow: 0 0 24px var(--color-primary), 0 0 48px var(--color-primary-active);
}
.judgment-great {
    color: #c4b5fd;
    text-shadow: 0 0 24px var(--color-primary-glow);
}
.judgment-good {
    color: #a78bfa;
    text-shadow: 0 0 22px rgba(167, 139, 250, 0.58);
}
.judgment-miss {
    color: #ff3b30;
    text-shadow: 0 0 14px rgba(255,59,48,0.42);
}

/* ==========================================================================
   Rhythm Judgment — fixed position to escape 3D stacking context
   ========================================================================== */
.rhythm-judgment {
    position: fixed;
    left: 50%;
    bottom: 22vh;
    transform: translateX(-50%) translateY(0) scale(1);
    font-size: 26px;
    font-weight: 900;
    font-family: var(--font);
    letter-spacing: 3px;
    opacity: 0;
    pointer-events: none;
    /* 99999 — above every 3D translateZ layer. body-root placement also ensures
       this element is fully outside preserve-3d stacking contexts. */
    z-index: 99999;
    isolation: isolate;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    text-shadow: 0 0 28px currentColor;
    white-space: nowrap;
    will-change: opacity, transform;
}

/* ==========================================================================
   Rhythm Countdown Overlay
   ========================================================================== */
.rhythm-countdown {
    position: fixed;
    inset: 0;
    /* body-root placement + z-index 99998 ensures this is above all 3D layers */
    z-index: 99998;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    background: rgba(10, 10, 12, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
}

#countdown-number {
    font-size: 180px;
    font-weight: 900;
    font-family: var(--font);
    color: var(--color-primary);
    letter-spacing: -6px;
    line-height: 1;
    text-shadow:
        0 0 100px var(--color-primary-glow),
        0 0 40px var(--color-primary);
    animation: countdown-pop 0.92s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes countdown-pop {
    0%   { transform: scale(1.6); opacity: 0; }
    20%  { transform: scale(0.95); opacity: 1; }
    60%  { transform: scale(1.0); opacity: 1; }
    100% { transform: scale(0.6); opacity: 0; }
}

/* ==========================================================================
   App Launcher — Clock-position Hex Grid Home Screen
   ========================================================================== */

/* ── Left Pill Nav ── */
/* ── 따봉 포커스 오버레이: body 직계 자식 → transform 컨텍스트 밖 ── */
.focus-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;          /* nav(999)보다 한 단계 아래 */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.nav-focus-active .focus-overlay,
body.nav-focus-active > .focus-overlay {
    opacity: 1;
}

/* ── 좌측 네비게이션 바: body 직계 → fixed + z-index 999 ── */
.left-pill-nav {
    position: fixed;       /* spatial-container 밖으로 꺼냈으므로 fixed로 뷰포트 기준 고정 */
    left: var(--s10);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    padding: var(--s5) var(--s3);
    border-radius: var(--r-full);
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 32px rgba(0,0,0,0.30);
    z-index: 999;          /* focus-overlay(998) 위 → 항상 선명하게 떠 있음 */
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* ══════════════════════════════════════════════════════════════════════════
   data-view 선언형 라우팅 — JS가 display를 절대 건드리지 않는 유일한 진실
   ══════════════════════════════════════════════════════════════════════════ */

/* 기본: spatial-container와 모든 room 숨김 */
.spatial-container { display: none; }
.spatial-room       { display: none; }

/* ── HOME ── 홈 컨테이너 노출 + nav 철벽 고정 */
body[data-view="home"] .spatial-container {
    display: flex;
}
body[data-view="home"] .left-pill-nav {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ── 비-HOME ── nav 완전 차단 (JS 오버라이딩 불가) */
body:not([data-view="home"]) .left-pill-nav {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ── 각 뷰별 room 노출 ── */
body[data-view="instrument"]  #air-instrument-room { display: flex; }
body[data-view="sculptor"]    #sculptor-room        { display: flex; }
body[data-view="calibration"] #calibration-room     { display: flex; }
body[data-view="guitar"]      #guitar-room          { display: flex; }
body[data-view="settings"]    #settings-room        { display: flex; }
body[data-view="terminal"]    #terminal-room        { display: flex; }
body[data-view="visor"]       #visor-room           { display: flex; }

/* ── 따봉 포커스 모드: 오버레이가 어두우니 brightness()로 역보정 + 글로우 강화 ── */
.nav-focus-active .left-pill-nav {
    background: rgba(255, 255, 255, 0.18);
    /* 오버레이(z-index 998)의 어두운 픽셀을 샘플하므로 brightness(280%)로 역보정 */
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(280%);
    backdrop-filter:         blur(40px) saturate(200%) brightness(280%);
    border-color: rgba(255, 255, 255, 0.30);
    border-top-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.35),
        0 0 0 1px var(--color-primary-border),
        0 0 40px rgba(123, 92, 240, 0.50),
        0 0 80px rgba(123, 92, 240, 0.22);
}

.pill-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.45);
    transition: all var(--t-normal);
}

.pill-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5px;
    pointer-events: none;
}

/* ── Active: 보라색 네온 하이라이트 ── */
.pill-item.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    box-shadow:
        inset 0 0 0 1px var(--color-primary-border),
        0 0 16px var(--color-primary-hover),
        0 0 32px var(--color-primary-glow);
}

/* ── 따봉 포커스: 모든 아이콘 색상 강제 밝힘 ── */
.nav-focus-active .pill-item {
    color: rgba(255, 255, 255, 0.80);
}

/* ── 따봉 포커스 중 active 아이템 추가 강조 ── */
.nav-focus-active .pill-item.active {
    color: var(--color-primary);
    box-shadow:
        inset 0 0 0 1px var(--color-primary-border),
        0 0 24px var(--color-primary-glow),
        0 0 60px rgba(123, 92, 240, 0.40);
    transform: scale(1.1);
}

.pill-item:hover,
.pill-item.spatial-hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
}

/* ── App Launcher Container ── */
.app-launcher {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

/* ── App Icon Button (base) ── */
.app-icon-btn {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0;          /* hidden until launcher-ready triggers animation */
}

/* Clock-position layout — ring radius 158px */
/* sin/cos values: 11→(-0.5,-0.866) 1→(0.5,-0.866) 9→(-1,0) 3→(1,0) 7→(-0.5,0.866) 5→(0.5,0.866) */
.app-pos-center { transform: translate(0,       0);        }
.app-pos-11     { transform: translate(-79px,  -137px);    }
.app-pos-1      { transform: translate( 79px,  -137px);    }
.app-pos-9      { transform: translate(-158px,   0);       }
.app-pos-3      { transform: translate( 158px,   0);       }
.app-pos-7      { transform: translate(-79px,   137px);    }
.app-pos-5      { transform: translate( 79px,   137px);    }

/* ── Glass Icon Disc ── */
.app-icon-glass {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.055);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    /* 1.5× border density */
    border: 1.5px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        inset 0 1.5px 2px rgba(255, 255, 255, 0.28),
        inset 0 0 32px rgba(255, 255, 255, 0.06),
        0 16px 52px rgba(0, 0, 0, 0.52),
        0 0 0 0.5px rgba(255, 255, 255, 0.08);
    transition: all var(--t-normal);
}

.app-icon-glass svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.5px;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
    transition: color var(--t-normal);
}

/* ── Center Calibration button — interactive, special hover ── */
.app-center-calib {
    cursor: pointer;
}

.app-pos-center .app-icon-glass {
    width: 110px;
    height: 110px;
    background: var(--color-primary-soft);
    border: 1.5px solid var(--color-primary-active);
    box-shadow:
        inset 0 1.5px 2px rgba(255, 255, 255, 0.28),
        inset 0 0 40px var(--color-primary-soft),
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 48px var(--color-primary-hover);
    animation: centerPulse 3.8s ease-in-out infinite;
}

.app-pos-center .app-icon-glass svg {
    width: 36px;
    height: 36px;
    color: var(--color-primary);
    stroke-width: 1.3px;
}

@keyframes centerPulse {
    0%, 100% { box-shadow:
        inset 0 1.5px 2px rgba(255,255,255,0.28),
        inset 0 0 40px var(--color-primary-soft),
        0 20px 60px rgba(0,0,0,0.55),
        0 0 48px var(--color-primary-hover); }
    50%       { box-shadow:
        inset 0 1.5px 2px rgba(255,255,255,0.28),
        inset 0 0 50px var(--color-primary-hover),
        0 20px 60px rgba(0,0,0,0.55),
        0 0 72px var(--color-primary-border); }
}

/* ── Hover / spatial-hover (1.5× glow) ── */
.app-icon-btn:not(.app-locked):hover .app-icon-glass,
.app-icon-btn:not(.app-locked).spatial-hover .app-icon-glass {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-strong);
    box-shadow:
        inset 0 1.5px 2px rgba(255, 255, 255, 0.28),
        inset 0 0 40px var(--color-primary-hover),
        0 0 54px var(--color-primary-glow),
        0 0 90px var(--color-primary-hover),
        0 16px 52px rgba(0, 0, 0, 0.52);
    transform: scale(1.10);
}

.app-icon-btn:not(.app-locked):hover .app-icon-glass svg,
.app-icon-btn:not(.app-locked).spatial-hover .app-icon-glass svg {
    color: rgba(255, 255, 255, 0.98);
}

/* ── Dwell charging ring ── */
.app-icon-btn.dwell-active .app-icon-glass {
    animation: dwellCharge 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dwellCharge {
    0%   { border-color: var(--color-primary-strong);
           box-shadow:
               inset 0 1.5px 2px rgba(255,255,255,0.28),
               inset 0 0 40px var(--color-primary-hover),
               0 0 54px var(--color-primary-glow),
               0 16px 52px rgba(0,0,0,0.52); }
    100% { border-color: var(--color-primary);
           transform: scale(1.13);
           box-shadow:
               inset 0 1.5px 2px rgba(255,255,255,0.35),
               inset 0 0 56px var(--color-primary-border),
               0 0 80px var(--color-primary-bright),
               0 0 120px var(--color-primary-border),
               0 16px 52px rgba(0,0,0,0.52); }
}

/* ── Press feedback ── */
.app-icon-btn.spatial-active .app-icon-glass {
    transform: scale(0.90) !important;
    transition-duration: 0.09s;
}

/* ── Tooltip (replaces always-visible label) ── */
.app-icon-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(12, 12, 18, 0.90);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.24);
    border-radius: 9px;
    padding: 5px 13px;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.90);
    letter-spacing: 0.35px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 50;
    box-shadow: 0 6px 24px rgba(0,0,0,0.40);
}

.app-icon-btn:not(.app-locked):hover::after,
.app-icon-btn:not(.app-locked).spatial-hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Locked slots ── */
.app-locked {
    opacity: 0.22;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Staggered pop-in entrance (triggered by .launcher-ready class) ── */
@keyframes iconPopIn {
    /* translateY(+24px)에서 위로 부상하며 등장 — scale + blur 조합으로 애플 수준 연출 */
    0%   { opacity: 0; transform: translate(var(--tx), calc(var(--ty) + 24px)) scale(0.62); filter: blur(10px); }
    60%  { opacity: 1; filter: blur(0); }
    80%  { transform: translate(var(--tx), calc(var(--ty) - 3px)) scale(1.05); }
    100% { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1); filter: blur(0); }
}

/* Each position defines its own --tx/--ty to keep transform in sync */
.app-pos-center { --tx:   0px; --ty:    0px; }
.app-pos-11     { --tx: -79px; --ty: -137px; }
.app-pos-1      { --tx:  79px; --ty: -137px; }
.app-pos-9      { --tx:-158px; --ty:    0px; }
.app-pos-3      { --tx: 158px; --ty:    0px; }
.app-pos-7      { --tx: -79px; --ty:  137px; }
.app-pos-5      { --tx:  79px; --ty:  137px; }

.launcher-ready .app-icon-btn {
    animation: iconPopIn 0.62s cubic-bezier(0.34, 1.48, 0.64, 1) forwards;
}
/* Stagger: center first, then ripple outward */
.launcher-ready .app-pos-center { animation-delay: 0.05s; }
.launcher-ready .app-pos-11,
.launcher-ready .app-pos-1      { animation-delay: 0.20s; }
.launcher-ready .app-pos-9,
.launcher-ready .app-pos-3      { animation-delay: 0.34s; }
.launcher-ready .app-pos-7,
.launcher-ready .app-pos-5      { animation-delay: 0.48s; }

/* ── Home screen fade transitions ── */
@keyframes homeFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes homeFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.home-fade-out { animation: homeFadeOut 0.28s ease forwards; pointer-events: none; }
.home-fade-in  { animation: homeFadeIn  0.38s ease forwards; }

/* ==========================================================================
   Calibration Room
   ========================================================================== */
.calib-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.calib-panel {
    width: 520px;
    background: rgba(18, 18, 24, 0.58);
    -webkit-backdrop-filter: blur(52px) saturate(160%);
    backdrop-filter: blur(52px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.26);
    border-radius: var(--r-2xl);
    padding: 48px 48px 42px;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.18),
        0 32px 80px rgba(0, 0, 0, 0.65),
        0 0 48px var(--color-primary-tint);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    transform: translateZ(30px);
}

/* ── Step Indicator ── */
.calib-steps {
    display: flex;
    align-items: center;
    width: 180px;
}

.calib-step-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.calib-step-dot span {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.40);
    transition: color 0.45s ease;
}

.calib-step-dot.active {
    border-color: var(--color-primary);
    background: var(--color-primary-hover);
    box-shadow: 0 0 22px var(--color-primary-border);
}

.calib-step-dot.active span { color: var(--color-primary); }

.calib-step-dot.done {
    border-color: rgba(52, 199, 89, 0.75);
    background: rgba(52, 199, 89, 0.14);
    box-shadow: 0 0 18px rgba(52, 199, 89, 0.32);
}

.calib-step-dot.done span { color: #34c759; }

.calib-step-track {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.10);
    position: relative;
    overflow: hidden;
    border-radius: var(--r-full);
}

.calib-step-track-fill {
    position: absolute;
    left: 0; top: 0; height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-active));
    transition: width 0.5s ease;
}

/* ── Phase Icon ── */
.calib-icon-wrap {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    border: 1.5px solid var(--color-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.15),
        0 0 36px var(--color-primary-hover);
    animation: calibIconPulse 2.4s ease-in-out infinite;
    transition: all 0.4s ease;
}

.calib-icon-wrap svg {
    width: 34px;
    height: 34px;
    stroke-width: 1.35px;
    color: rgba(255, 255, 255, 0.82);
}

@keyframes calibIconPulse {
    0%, 100% { box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 0 36px var(--color-primary-hover); }
    50%       { box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 0 56px var(--color-primary-active); }
}

.calib-icon-wrap.phase-done {
    border-color: rgba(52, 199, 89, 0.70);
    background: rgba(52, 199, 89, 0.12);
    animation: none;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 0 40px rgba(52,199,89,0.40);
}

.calib-icon-wrap.phase-done svg { color: #34c759; }

/* ── Radar Pulse (hand detected) ── */
.calib-icon-wrap {
    position: relative;
}

.calib-icon-wrap.hand-detected::before,
.calib-icon-wrap.hand-detected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1.5px solid var(--color-primary-active);
    width: 84px;
    height: 84px;
    animation: radarPulse 2s ease-out infinite;
    pointer-events: none;
}

.calib-icon-wrap.hand-detected::after {
    animation-delay: 1s;
}

@keyframes radarPulse {
    0%   { width: 84px;  height: 84px;  opacity: 0.70; }
    100% { width: 168px; height: 168px; opacity: 0; }
}

/* ── Texts ── */
.calib-title {
    font-size: 21px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    letter-spacing: -0.3px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.calib-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.50);
    margin: 0;
    text-align: center;
    line-height: 1.70;
    max-width: 360px;
}

/* ── Progress Bar ── */
.calib-progress-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calib-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: var(--r-full);
    overflow: hidden;
}

.calib-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary) 0%, #a78bfa 100%);
    border-radius: var(--r-full);
    transition: width 0.12s linear;
    box-shadow: 0 0 14px var(--color-primary-strong);
}

.calib-progress-fill.done {
    background: linear-gradient(90deg, #34c759 0%, #86efac 100%);
    box-shadow: 0 0 14px rgba(52, 199, 89, 0.60);
}

.calib-progress-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.36);
    letter-spacing: 0.4px;
    text-align: center;
    transition: color 0.4s ease;
    min-height: 16px;
}

/* ==========================================================================
   Swipe Back Flash — 좌측 엣지 보라색 글로우 피드백
   ========================================================================== */
#swipe-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 140px;
    height: 100%;
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
    background: linear-gradient(
        90deg,
        var(--color-primary-glow) 0%,
        var(--color-primary-hover) 60%,
        transparent 100%
    );
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-right: 1px solid var(--color-primary-mid);
}

#swipe-flash.swipe-flash-ready {
    animation: swipeFlashReadyAnim 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#swipe-flash.swipe-flash-active {
    animation: swipeFlashAnim 0.70s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes swipeFlashReadyAnim {
    0%   { opacity: 0;    transform: translateX(-22px); }
    28%  { opacity: 0.46; transform: translateX(0); }
    100% { opacity: 0.28; transform: translateX(0); }
}

@keyframes swipeFlashAnim {
    0%   { opacity: 0;   transform: translateX(-28px); }
    18%  { opacity: 1;   transform: translateX(0); }
    65%  { opacity: 0.9; transform: translateX(0); }
    100% { opacity: 0;   transform: translateX(0); }
}

/* ==========================================================================
   Hand Status Pills
   ========================================================================== */
.hand-status-bar {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 9000;
    pointer-events: none;
}

.hand-status-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px 7px 12px;
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.10),
        0 4px 20px rgba(0, 0, 0, 0.40);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.hand-status-pill.active {
    border-color: var(--color-primary-border);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.14),
        0 0 18px var(--color-primary-hover),
        0 4px 20px rgba(0, 0, 0, 0.40);
}

.hand-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.20);
    transition: background 0.35s ease, box-shadow 0.35s ease;
    flex-shrink: 0;
}

.hand-status-pill.active .hand-status-dot {
    background: var(--color-primary);
    box-shadow: 0 0 6px var(--color-primary-bright), 0 0 14px var(--color-primary-active);
}

.hand-status-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
    color: rgba(255, 255, 255, 0.28);
    transition: color 0.35s ease, text-shadow 0.35s ease;
    white-space: nowrap;
}

.hand-status-pill.active .hand-status-label {
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary-strong);
}

/* ==========================================================================
   Air Guitar Stage
   ========================================================================== */
#guitar-room {
    padding: 48px 48px 32px;
}

/* ── Large webcam stage ── */
.guitar-stage {
    flex: 1;
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: rgba(8, 8, 12, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.08),
        0 24px 72px rgba(0, 0, 0, 0.64);
}

.guitar-webcam-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    border-radius: 32px;
}

/* ── Strum flash — horizontal sweep on stroke ── */
.guitar-strum-flash {
    position: absolute;
    inset: 0;
    border-radius: 32px;
    pointer-events: none;
    opacity: 0;
}

.guitar-strum-flash.strum-active {
    animation: strumFlash 0.30s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes strumFlash {
    0%   { opacity: 0;    box-shadow: inset 0 0 0    0   transparent; }
    25%  { opacity: 1;    box-shadow: inset 0 0 80px 12px var(--color-primary-active); }
    100% { opacity: 0;    box-shadow: inset 0 0 0    0   transparent; }
}

/* ── Chord Grid Panel — hologram glass float ── */
.guitar-landmark-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 32px;
    z-index: 8;
}

/* ── Guitar Left-Hand Pinch Cursor ── */
#guitar-pinch-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    margin-left: -17px;
    margin-top: -17px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9600;
    background: var(--color-primary-soft);
    border: 2px solid var(--color-primary-bright);
    box-shadow:
        0 0 14px var(--color-primary-strong),
        0 0 32px var(--color-primary-hover),
        inset 0 0 8px  var(--color-primary-hover);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.05s linear;
}
#guitar-pinch-cursor.pinch-active {
    background: var(--color-primary-mid);
    border-color: var(--color-primary);
    box-shadow:
        0 0 22px var(--color-primary-bright),
        0 0 52px var(--color-primary-active),
        inset 0 0 14px var(--color-primary-border);
    transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) scale(0.72);
}

.chord-grid-panel {
    position: absolute;
    top: 60%;
    left: 40px;
    transform: translateY(-50%);
    background: rgba(12, 12, 18, 0.56);
    -webkit-backdrop-filter: blur(20px) saturate(165%);
    backdrop-filter: blur(20px) saturate(165%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top-color: rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    padding: 14px 18px 20px;
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.10),
        0 0 0 1px var(--color-primary-tint),
        0 20px 56px rgba(0, 0, 0, 0.60);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(1020px, calc(100vw - 80px));
}

.chord-grid-label {
    font-family: var(--font);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.2px;
    color: rgba(255, 255, 255, 0.24);
    text-align: center;
    text-transform: uppercase;
    margin: 0;
}

.chord-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 7px;
}

.chord-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    min-height: 82px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top-color: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    cursor: pointer;
    gap: 4px;
    transition: background 0.20s ease, border-color 0.20s ease, box-shadow 0.20s ease;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.06);
    min-width: 0;
}

.chord-cell:hover,
.chord-cell.spatial-hover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary-border);
}

.chord-cell.chord-selected {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-strong);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.18),
        0 0 18px var(--color-primary-active),
        0 0 36px var(--color-primary-hover);
}

/* ── Strum hit flash ── */
.chord-cell.chord-hit {
    background: var(--color-primary-mid) !important;
    border-color: var(--color-primary-bright) !important;
    box-shadow:
        inset 0 0 16px var(--color-primary-border),
        0 0 24px var(--color-primary-strong),
        0 0 52px var(--color-primary-mid) !important;
    transition: none !important;
}

/* ── Empty / spacer cell ── */
.chord-cell-empty {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}

.chord-name {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1;
    white-space: nowrap;
    transition: color 0.20s ease, text-shadow 0.20s ease;
}

.chord-cell.chord-selected .chord-name {
    color: #a78bfa;
    text-shadow: 0 0 12px var(--color-primary-bright);
}

.chord-sub {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.28);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Guitar Status Bar ── */
.guitar-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 9px 24px;
    background: rgba(20, 20, 25, 0.42);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top-color: rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.08);
    flex-shrink: 0;
    width: fit-content;
    align-self: center;
}

.guitar-status-item {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, 0.28);
    text-transform: uppercase;
}

.guitar-status-item span {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    margin-left: 6px;
}

/* ==========================================================================
   Rhythm Game Result Panel (Game Clear)
   ========================================================================== */
.rhythm-result-panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    pointer-events: all;
}

.rrp-glass {
    background: rgba(16, 14, 26, 0.78);
    -webkit-backdrop-filter: blur(40px) saturate(160%);
    backdrop-filter: blur(40px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.12),
        0 0 0 1px var(--color-primary-soft),
        0 32px 80px rgba(0, 0, 0, 0.64),
        0 0 60px var(--color-primary-soft);
    border-radius: 32px;
    padding: 52px 64px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 360px;
    animation: rrpPopIn 0.50s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rrpPopIn {
    0%   { opacity: 0; transform: scale(0.78) translateY(28px); }
    100% { opacity: 1; transform: scale(1.00) translateY(0);    }
}

.rrp-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 5px;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 4px;
    text-shadow: 0 0 18px var(--color-primary-glow);
}

.rrp-score-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

.rrp-score {
    font-size: 76px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1;
    letter-spacing: -3px;
    text-shadow: 0 0 48px var(--color-primary-active);
    margin: 6px 0 4px;
}

.rrp-stats {
    display: flex;
    gap: 40px;
    margin: 10px 0 18px;
    padding: 16px 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.rrp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.rrp-stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.30);
    text-transform: uppercase;
}

.rrp-stat-val {
    font-size: 34px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1;
}

.rrp-stat-miss .rrp-stat-val {
    color: #ff3b30;
    text-shadow: 0 0 14px rgba(255, 59, 48, 0.40);
}

.rrp-buttons {
    display: flex;
    gap: 10px;
}

.rrp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 9999px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.rrp-btn i {
    width: 14px;
    height: 14px;
}

.rrp-btn-primary {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-active);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 18px var(--color-primary-hover);
}

.rrp-btn-primary:hover {
    background: var(--color-primary-active);
    border-color: var(--color-primary);
    box-shadow: 0 0 32px var(--color-primary-active);
    transform: translateY(-2px);
}

.rrp-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.55);
}

.rrp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
}

/* ==========================================================================
   Sculptor Shape Auto-Correction — Pop-In Animation
   ========================================================================== */
.shape-pop-in {
    transform-box: fill-box;
    transform-origin: center;
    animation: shapePopIn 0.40s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes shapePopIn {
    0%   { transform: scale(0.40); opacity: 0;   }
    55%  { transform: scale(1.08); opacity: 1;   }
    100% { transform: scale(1.00); opacity: 1;   }
}

/* ==========================================================================
   Settings Room — visionOS 2-Column Split Layout
   ========================================================================== */

.settings-room {
    flex-direction: column;
    background: transparent;
}

.settings-body {
    display: flex;
    gap: var(--s6);
    padding: var(--s6) var(--s8);
    height: calc(100% - 72px);
    overflow: hidden;
}

/* ── 좌측 사이드바 ── */
.settings-nav {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--r-2xl);
    border: 1px solid var(--glass-border);
    border-top-color: var(--color-border-bright);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: var(--s4);
    transform: translateZ(20px);
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s4);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all var(--t-normal);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.settings-nav-item i[data-lucide] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: color var(--t-normal);
}

.settings-nav-item:hover {
    background: var(--color-primary-hover);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: var(--color-primary-active);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--color-primary-glow), inset 0 1px 0 rgba(255,255,255,0.12);
}

.settings-nav-item.active i[data-lucide] {
    color: var(--color-primary);
    filter: drop-shadow(0 0 6px var(--color-primary-glow));
}

.settings-nav-divider {
    height: 1px;
    background: var(--glass-border);
    margin: var(--s2) 0;
}

.settings-nav-meta {
    margin-top: auto;
    padding: var(--s3) var(--s4);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-version {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
}

.settings-nav-build {
    font-family: var(--font);
    font-size: 11px;
    color: rgba(255,255,255,0.18);
}

/* ── 우측 콘텐츠 영역 ── */
.settings-content {
    flex: 1;
    min-width: 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--r-2xl);
    border: 1px solid var(--glass-border);
    border-top-color: var(--color-border-bright);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: var(--s8);
    overflow-y: auto;
    transform: translateZ(10px);
    scrollbar-width: none;
}

.settings-content::-webkit-scrollbar { display: none; }

/* ── 섹션 공통 ── */
.settings-section {
    animation: none;
}

.section-fade-in {
    animation: sectionFade 0.30s ease forwards;
}

@keyframes sectionFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.settings-section-header {
    display: flex;
    align-items: flex-start;
    gap: var(--s4);
    margin-bottom: var(--s8);
    padding-bottom: var(--s6);
    border-bottom: 1px solid var(--glass-border);
}

.settings-section-header > i[data-lucide] {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
    margin-top: 2px;
}

.settings-section-title {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--s1);
}

.settings-section-desc {
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── ❶ 컬러 칩 ── */
.color-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s4);
}

.color-chip {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s5);
    background: rgba(255,255,255,0.05);
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.10);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.color-chip:hover {
    border-color: rgba(255,255,255,0.24);
    background: rgba(255,255,255,0.10);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.36);
}

.color-chip.active {
    border-color: rgba(255,255,255,0.40);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 20px rgba(255,255,255,0.10), 0 4px 16px rgba(0,0,0,0.40);
}

.chip-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 10px currentColor;
}

.chip-label {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.chip-check {
    width: 14px;
    height: 14px;
    color: var(--text-primary);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.color-chip.active .chip-check {
    opacity: 1;
    transform: scale(1);
}

/* ── ❷ 슬라이더 ── */
.settings-slider-row {
    margin-bottom: var(--s8);
    background: rgba(255,255,255,0.04);
    border-radius: var(--r-lg);
    border: 1px solid rgba(255,255,255,0.06);
    padding: var(--s5) var(--s6);
}

.slider-row-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--s4);
}

.settings-slider-label {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.settings-slider-val {
    font-family: var(--font-mono, monospace);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    filter: drop-shadow(0 0 6px var(--color-primary-glow));
}

.settings-slider-wrap {
    display: flex;
    align-items: center;
    gap: var(--s3);
}

.settings-slider-min,
.settings-slider-max {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    white-space: nowrap;
    width: 58px;
}

.settings-slider-max { text-align: right; }

.settings-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.12);
    outline: none;
    cursor: pointer;
}

.settings-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 12px var(--color-primary-glow), 0 2px 8px rgba(0,0,0,0.50);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid rgba(255,255,255,0.30);
}

.settings-range::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 0 20px var(--color-primary-glow), 0 4px 12px rgba(0,0,0,0.50);
}

.settings-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 12px var(--color-primary-glow);
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.30);
}

/* ── ❸ 토글 스위치 ── */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s4) var(--s6);
    margin-bottom: var(--s3);
    background: rgba(255,255,255,0.04);
    border-radius: var(--r-lg);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s ease;
}

.settings-toggle-row:hover {
    background: rgba(255,255,255,0.07);
}

.settings-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.settings-toggle-label {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.settings-toggle-desc {
    font-family: var(--font);
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-pill-toggle {
    width: 50px;
    height: 28px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    flex-shrink: 0;
}

.settings-pill-toggle.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 16px var(--color-primary-glow);
}

.pill-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.70);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.40);
}

.settings-pill-toggle.active .pill-toggle-knob {
    left: 25px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.30);
}

/* ── Settings: spatial-hover / spatial-active 피드백 ── */
.settings-nav-item.spatial-hover {
    background: var(--color-primary-hover);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--color-primary-border), 0 0 14px var(--color-primary-glow);
    transform: translateX(3px);
}

.settings-nav-item.spatial-active {
    background: var(--color-primary-active);
    transform: translateX(1px) scale(0.98);
}

.color-chip.spatial-hover {
    border-color: rgba(255,255,255,0.42);
    background: rgba(255,255,255,0.14);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 28px rgba(0,0,0,0.40), 0 0 18px var(--color-primary-glow);
}

.color-chip.spatial-active {
    transform: translateY(-1px) scale(0.97);
}

.settings-pill-toggle.spatial-hover {
    box-shadow: 0 0 0 2px var(--color-primary-border), 0 0 18px var(--color-primary-glow);
    transform: scale(1.10);
}

.settings-pill-toggle.spatial-active {
    transform: scale(0.95);
}

.settings-toggle-row:has(.settings-pill-toggle.spatial-hover) {
    background: rgba(255,255,255,0.07);
}

/* ==========================================================================
   System Terminal Stage
   ========================================================================== */
#terminal-room {
    flex-direction: column;
    overflow: hidden;
}

.terminal-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s8);
}

.terminal-panel {
    width: min(940px, calc(100vw - 96px));
    height: min(560px, calc(100vh - 180px));
    background: rgba(8, 10, 8, 0.94);
    -webkit-backdrop-filter: blur(48px) saturate(160%);
    backdrop-filter: blur(48px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.20);
    border-radius: var(--r-2xl);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.07),
        0 32px 80px rgba(0, 0, 0, 0.72),
        0 0 80px var(--color-primary-tint);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateZ(20px);
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: var(--s4);
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(14, 16, 14, 0.85);
    flex-shrink: 0;
}

.term-dots {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.term-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-dots span:nth-child(1) { background: #ff5f57; box-shadow: 0 0 6px rgba(255,95,87,0.50); }
.term-dots span:nth-child(2) { background: #febc2e; box-shadow: 0 0 6px rgba(254,188,46,0.50); }
.term-dots span:nth-child(3) { background: #28c840; box-shadow: 0 0 6px rgba(40,200,64,0.50); }

.term-title {
    font-family: 'Courier New', 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
    flex: 1;
    text-align: center;
    margin-right: 54px;
}

.terminal-body {
    flex: 1;
    padding: 26px 32px 20px;
    font-family: 'Courier New', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13.5px;
    line-height: 2.1;
    overflow-y: auto;
    scrollbar-width: none;
    color: rgba(255, 255, 255, 0.65);
}

.terminal-body::-webkit-scrollbar { display: none; }

.term-prompt {
    display: block;
    color: rgba(255, 255, 255, 0.25);
    font-size: 12.5px;
    margin-bottom: 14px;
    line-height: 1.8;
    white-space: pre;
}

.term-user  { color: var(--color-primary); filter: drop-shadow(0 0 5px var(--color-primary-glow)); }
.term-path  { color: rgba(48, 209, 88, 0.80); }
.term-cmd   { color: rgba(255, 255, 255, 0.55); }

.term-line {
    display: block;
    white-space: pre;
    min-height: 1.8em;
}

.term-key {
    color: var(--color-primary);
    font-weight: bold;
    letter-spacing: 0.3px;
    filter: drop-shadow(0 0 4px var(--color-primary-glow));
}

.term-sep {
    color: rgba(255, 255, 255, 0.20);
}

.term-val {
    color: rgba(255, 255, 255, 0.80);
}

.term-val-ok {
    color: #30d158;
    filter: drop-shadow(0 0 5px rgba(48, 209, 88, 0.55));
}

.term-val-warn {
    color: #ff9f0a;
    filter: drop-shadow(0 0 5px rgba(255, 159, 10, 0.55));
}

.term-val-off {
    color: rgba(255, 255, 255, 0.28);
}

.term-val-accent {
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px var(--color-primary-glow));
}

.term-divider {
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 10px 0;
}

.term-cursor-line {
    margin-top: 4px;
    display: block;
    white-space: pre;
    font-size: 13.5px;
    line-height: 2.1;
    color: rgba(255, 255, 255, 0.25);
}

.term-prompt-inline {
    font-family: 'Courier New', 'JetBrains Mono', monospace;
    font-size: 12.5px;
}

.term-cursor {
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
    animation: termCursorBlink 1.1s step-end infinite;
}

@keyframes termCursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.term-line.term-flash {
    animation: termLineFlash 0.35s ease forwards;
}

@keyframes termLineFlash {
    0%   { color: var(--color-primary); filter: brightness(1.6) drop-shadow(0 0 10px var(--color-primary-glow)); }
    100% { color: inherit; filter: none; }
}

/* ==========================================================================
   👓 Glance Visor — AR Smart Glasses Stage
   ========================================================================== */

.visor-room {
    flex-direction: column;
}

.visor-stage {
    position: relative;
    flex: 1;
    width: 100%;
    overflow: hidden;
    border-radius: var(--r-2xl);
    background: transparent;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-primary-border);
}

.visor-webcam {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    border-radius: inherit;
}

.visor-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: inherit;
    transform: scaleX(-1);
    z-index: 4;
}

.visor-hint {
    position: absolute;
    bottom: var(--s6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s5);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-full);
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: opacity var(--t-slow);
    z-index: 10;
}

.visor-hint.hint-hidden {
    opacity: 0;
    pointer-events: none;
}

.visor-hint b {
    color: var(--color-primary);
    font-weight: 600;
}

/* ── Visor Mesh Segmented Control ── */
.mesh-segment-container {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 500;
    display: flex;
    background: rgba(20, 20, 25, 0.55);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.22);
    border-radius: var(--r-full);
    padding: 4px;
    gap: 2px;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    user-select: none;
}

.mesh-option {
    padding: 8px 22px;
    border-radius: var(--r-full);
    background: transparent;
    color: rgba(255, 255, 255, 0.46);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mesh-option.active {
    background: linear-gradient(135deg,
        var(--color-primary-mid),
        var(--color-primary-deep));
    color: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 4px 16px var(--color-primary-hover),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.mesh-option:hover:not(.active) {
    color: rgba(255, 255, 255, 0.80);
    background: rgba(255, 255, 255, 0.07);
}

.mesh-option.spatial-hover:not(.active) {
    color: rgba(255, 255, 255, 0.90);
    background: rgba(255, 255, 255, 0.10);
    transform: scale(1.04);
}

.mesh-option.spatial-hover.active {
    box-shadow:
        0 0 0 2px var(--color-primary-border),
        0 0 20px var(--color-primary-glow),
        0 4px 16px var(--color-primary-hover),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transform: scale(1.04);
}

.mesh-option.spatial-active {
    transform: scale(0.94);
    opacity: 0.80;
}

/* HUD badge in room header */
.visor-hud {
    display: flex;
    align-items: center;
    gap: var(--s4);
    padding: 6px var(--s4);
    background: rgba(20, 20, 22, 0.65);
    border: 1px solid var(--color-primary-border);
    border-radius: var(--r-full);
    backdrop-filter: blur(16px);
}

.visor-hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.visor-hud-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.visor-hud-val {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--color-primary);
    filter: drop-shadow(0 0 6px var(--color-primary-glow));
    min-width: 36px;
    text-align: center;
    letter-spacing: 0.04em;
}

.visor-hud-val.val-on {
    color: #30D158;
    filter: drop-shadow(0 0 6px rgba(48, 209, 88, 0.55));
}

.visor-hud-val.val-off {
    color: rgba(255, 255, 255, 0.28);
    filter: none;
}

.visor-hud-sep {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, 0.10);
    flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────────────────
   1. 대화면 반응형 스케일업 (Responsive Layout)
   ──────────────────────────────────────────────────────────────────────── */

:root {
    --responsive-scale: 1;
}

@media (min-width: 1440px) {
    :root {
        --responsive-scale: 1.25;
    }
}

@media (min-width: 1920px) {
    :root {
        --responsive-scale: 1.5;
    }
}

.app-launcher {
    width: calc(500px * var(--responsive-scale));
    height: calc(500px * var(--responsive-scale));
    --app-radius: calc(158px * var(--responsive-scale));
    --app-radius-half: calc(79px * var(--responsive-scale));
    --app-radius-sin: calc(137px * var(--responsive-scale));
}

.app-pos-center { transform: translate(0, 0); }
.app-pos-11     { transform: translate(calc(-1 * var(--app-radius-half)), calc(-1 * var(--app-radius-sin))); }
.app-pos-1      { transform: translate(var(--app-radius-half), calc(-1 * var(--app-radius-sin))); }
.app-pos-9      { transform: translate(calc(-1 * var(--app-radius)), 0); }
.app-pos-3      { transform: translate(var(--app-radius), 0); }
.app-pos-7      { transform: translate(calc(-1 * var(--app-radius-half)), var(--app-radius-sin)); }
.app-pos-5      { transform: translate(var(--app-radius-half), var(--app-radius-sin)); }

.app-pos-center { --tx: 0px; --ty: 0px; }
.app-pos-11     { --tx: calc(-1 * var(--app-radius-half)); --ty: calc(-1 * var(--app-radius-sin)); }
.app-pos-1      { --tx: var(--app-radius-half); --ty: calc(-1 * var(--app-radius-sin)); }
.app-pos-9      { --tx: calc(-1 * var(--app-radius)); --ty: 0px; }
.app-pos-3      { --tx: var(--app-radius); --ty: 0px; }
.app-pos-7      { --tx: calc(-1 * var(--app-radius-half)); --ty: var(--app-radius-sin); }
.app-pos-5      { --tx: var(--app-radius-half); --ty: var(--app-radius-sin); }

.app-icon-glass {
    width: clamp(90px, 6vw, 135px);
    height: clamp(90px, 6vw, 135px);
}

.app-icon-glass svg {
    width: clamp(30px, 2vw, 45px);
    height: clamp(30px, 2vw, 45px);
}

.app-pos-center .app-icon-glass {
    width: clamp(110px, 7.5vw, 165px);
    height: clamp(110px, 7.5vw, 165px);
}

.app-pos-center .app-icon-glass svg {
    width: clamp(36px, 2.5vw, 54px);
    height: clamp(36px, 2.5vw, 54px);
}

.left-pill-nav {
    padding: clamp(20px, 1.5vw, 30px) clamp(12px, 1vw, 18px);
}

.pill-item {
    width: clamp(44px, 3vw, 66px);
    height: clamp(44px, 3vw, 66px);
}

.pill-item svg {
    width: clamp(20px, 1.5vw, 30px);
    height: clamp(20px, 1.5vw, 30px);
}

.spatial-room {
    padding: clamp(64px, 5vw, 96px) clamp(80px, 6vw, 120px) var(--s10);
}

/* 모달 창 스케일업 (버그 유발 클래스 제거) */
.calib-panel {
    transform: scale(var(--responsive-scale));
    transform-origin: center;
}

/* ────────────────────────────────────────────────────────────────────────
   2. 조작 접근성 향상: 투명 힛박스(Hitbox) 확대
   3. 공간 컴퓨팅 호버(Hover) 피드백 강화
   ──────────────────────────────────────────────────────────────────────── */

/* Hitbox ::before pseudo element (최소 64x64px 보장 및 1.5~2배 확장) */
.app-icon-btn::before,
.pill-item::before,
.pbo-close-btn::before,
.pbo-sticker-btn::before,
.exit-btn::before,
.dock-btn::before,
.tool-btn::before,
.tsb-cam-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 64px;
    min-height: 64px;
    width: 200%;
    height: 200%;
    z-index: 10;
    cursor: pointer;
}

/* Ensure static parents have relative positioning so absolute children stay contained */
.pill-item, .pbo-sticker-btn, .exit-btn, .dock-btn, .tool-btn, .tsb-cam-btn {
    position: relative;
}

/* Global hover feedback */
.pill-item, .pbo-close-btn, .pbo-sticker-btn, .exit-btn, .dock-btn, .tool-btn, .tsb-cam-btn {
    transition: all 0.2s ease;
}

/* Scale up and add neon glow on hover */
.pill-item:hover, .pill-item.spatial-hover,
.pbo-close-btn:hover, .pbo-close-btn.spatial-hover,
.pbo-sticker-btn:hover, .pbo-sticker-btn.spatial-hover,
.exit-btn:hover, .exit-btn.spatial-hover,
.dock-btn:hover, .dock-btn.spatial-hover,
.tool-btn:hover, .tool-btn.spatial-hover,
.tsb-cam-btn:hover, .tsb-cam-btn.spatial-hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--color-primary-glow), inset 0 0 10px var(--color-primary-soft) !important;
}

/* app-icon-btn 의 경우 이미 hover 효과가 잘 들어가 있으나, 네온 글로우 강도를 높임 */
.app-icon-btn:hover .app-icon-glass,
.app-icon-btn.spatial-hover .app-icon-glass {
    transform: scale(1.15) !important;
    box-shadow: 0 0 30px var(--color-primary-glow), 0 0 60px var(--color-primary-strong), inset 0 0 15px var(--color-primary-active) !important;
}

/* ────────────────────────────────────────────────────────────────────────
   4. 세팅 화면 반응형 레이아웃 픽스 (강제 일체형 Wrapper)
   ──────────────────────────────────────────────────────────────────────── */
.settings-wrapper {
    width: 90vw;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--s6);
}

.settings-room .room-header {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.settings-body {
    width: 100%;
    box-sizing: border-box;
    min-height: 60vh;
    margin: 0;
    display: flex;
    gap: 30px;
}
.settings-nav {
    flex: 0 0 200px;
}
.settings-content {
    flex: 1;
    padding: var(--s8) var(--s10);
}

/* ────────────────────────────────────────────────────────────────────────
   5. 최초 진입 튜토리얼 UI (Tutorial Overlay)
   ──────────────────────────────────────────────────────────────────────── */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: opacity 0.5s ease;
}

.tutorial-modal {
    background: rgba(20, 20, 25, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.3);
    border-radius: var(--r-2xl);
    padding: var(--s10) var(--s12);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 640px;
    width: 90%;
    color: var(--text-primary);
}

.tutorial-modal h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--s8);
    background: linear-gradient(135deg, #fff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tutorial-gestures {
    display: flex;
    flex-direction: column;
    gap: var(--s6);
    margin-bottom: var(--s10);
    width: 100%;
}

.gesture-item {
    display: flex;
    align-items: center;
    gap: var(--s5);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--s4) var(--s6);
    border-radius: var(--r-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gesture-icon {
    font-size: 32px;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.2));
}

.gesture-text strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary-bright);
    margin-bottom: 4px;
}

.gesture-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tutorial-start-btn {
    background: var(--color-primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: var(--s4) var(--s10);
    border: none;
    border-radius: var(--r-full);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px var(--color-primary-glow), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.tutorial-start-btn:hover {
    transform: scale(1.05);
    background: var(--color-primary-strong);
    box-shadow: 0 0 30px var(--color-primary-bright), inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* ────────────────────────────────────────────────────────────────────────
   6. 개별 앱 미니 가이드 (Mini Guide Toast)
   ──────────────────────────────────────────────────────────────────────── */
.mini-guide-toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    background: rgba(15, 15, 20, 0.85);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--color-primary-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    border-radius: var(--r-xl);
    padding: var(--s4) var(--s5) 20px var(--s5);
    display: flex;
    align-items: flex-start;
    gap: var(--s4);
    max-width: 400px;
    height: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.mini-guide-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mini-guide-icon {
    font-size: 24px;
}

.mini-guide-content {
    flex: 1;
}

.mini-guide-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-bright);
    margin-bottom: 2px;
}

.mini-guide-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.mini-guide-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--s1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.mini-guide-close:hover {
    color: var(--text-primary);
}

.mini-guide-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}
