  * { box-sizing: border-box; margin: 0; padding: 0; user-select: none; font-family: 'Malgun Gothic', sans-serif; }
  body { background: #07090e; color: #fff; overflow: hidden; width: 100vw; height: 100vh; }
  #game-wrap { position: relative; width: 100vw; height: 100vh; overflow: hidden; }
  #three-container { width: 100%; height: 100%; display: block; }

  /* 공통 오버레이 모달 */
  .overlay { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center; background: rgba(10, 14, 23, 0.86); z-index: 30; padding: 25px; text-align: center; backdrop-filter: blur(4px); }
  .overlay.active { display: flex; }

  /* Scene 1: 고대 석판 로그인 */
  .slate-box { background: linear-gradient(145deg, #1e2436, #121622); border: 2px solid #5c7cfa; border-radius: 14px; padding: 28px; width: 440px; box-shadow: 0 0 35px rgba(92, 124, 250, 0.45); }
  .slate-box h1 { font-size: 24px; color: #a5b4fc; margin-bottom: 8px; text-shadow: 0 0 10px #5c7cfa; }
  .slate-box p { font-size: 13px; color: #94a3b8; margin-bottom: 18px; line-height: 1.5; }
  .input-group { margin-bottom: 12px; text-align: left; }
  .input-group label { display: block; font-size: 12px; color: #cbd5e1; margin-bottom: 4px; }
  .input-group input { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid #475569; background: #0f172a; color: #fff; font-size: 14px; outline: none; }
  /* 언어 고르기 (시작 화면 · 설정) */
  .lang-select { padding: 7px 10px; border-radius: 6px; border: 1px solid #475569; background: #0f172a; color: #fff; font-size: 13px; outline: none; cursor: pointer; }
  .input-group .lang-select { width: 100%; padding: 9px 12px; font-size: 14px; }
  .set-row .lang-select { flex: 1; }
  .btn-main { width: 100%; padding: 12px; background: linear-gradient(90deg, #4f46e5, #7c3aed); border: none; border-radius: 8px; color: #fff; font-size: 15px; font-weight: bold; cursor: pointer; margin-top: 6px; transition: 0.2s; }
  .btn-main:hover { filter: brightness(1.15); }
  .btn-sub { width: 100%; padding: 9px; background: #1e293b; border: 1px solid #38bdf8; border-radius: 8px; color: #38bdf8; font-size: 13px; font-weight: bold; cursor: pointer; margin-top: 8px; }
  .btn-sub:hover { background: #334155; }

  /* 상단 HUD */
  #hud { position: absolute; top: 0; left: 0; right: 0; padding: 16px 24px; display: none; justify-content: space-between; align-items: flex-start; pointer-events: none; z-index: 15; background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0) 110px); } /* 위쪽만 살짝 (예전엔 화면 위 절반을 어둡게 덮어 나무·하늘이 묻힘) */
  .bars { width: 270px; pointer-events: auto; }
  .bar-wrap { margin-bottom: 8px; }
  .bar-label { font-size: 12px; font-weight: bold; display: flex; justify-content: space-between; margin-bottom: 3px; text-shadow: 0 1px 3px #000; }
  .bar-bg { width: 100%; height: 15px; background: #1e293b; border: 1px solid #475569; border-radius: 8px; overflow: hidden; }
  .bar-fill { height: 100%; transition: width 0.15s; }
  #hp-fill { background: linear-gradient(90deg, #dc2626, #f87171); }
  #pw-fill { background: linear-gradient(90deg, #ca8a04, #fde047); }
  #hp-fill.low { animation: hp-blink 0.8s infinite; }
  @keyframes hp-blink { 50% { filter: brightness(1.8); opacity: 0.55; } }

  .timer-box { background: rgba(15, 23, 42, 0.88); border: 2px solid #ef4444; padding: 6px 20px; border-radius: 12px; text-align: center; box-shadow: 0 0 15px rgba(239,68,68,0.4); }
  .timer-title { font-size: 12px; color: #fca5a5; font-weight: bold; }
  #timer-val { font-size: 18px; font-weight: 900; color: #fff; font-family: monospace; }

  .right-hud { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: auto; }
  .gem-box { background: rgba(15, 23, 42, 0.88); border: 1px solid #38bdf8; padding: 7px 14px; border-radius: 8px; font-weight: bold; color: #38bdf8; font-size: 14px; }
  #weapon-badge { background: rgba(15, 23, 42, 0.88); border: 1px solid #a78bfa; padding: 5px 12px; border-radius: 6px; font-size: 12px; color: #ddd6fe; cursor: pointer; user-select: none; }
  #weapon-badge:hover { border-color: #c4b5fd; background: rgba(46, 16, 101, 0.9); }
  #weapon-badge .wb-key { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #4c1d95; color: #ede9fe; font-size: 10px; font-weight: 700; }
  /* 무기 바꾸기 목록 (js/world/weapon_swap.js) */
  #weapon-strip { display: none; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 4px; max-width: calc(100vw - 420px); overflow-x: auto; margin-right: 58px; padding: 6px; border-radius: 8px; background: rgba(15, 23, 42, 0.9); border: 1px solid #7c3aed; } /* 오른쪽 버튼 줄을 비켜서 한 줄로 */
  #weapon-strip.show { display: flex; }
  #weapon-strip .ws-item { display: flex; flex-direction: column; align-items: center; width: 54px; padding: 4px 2px; border-radius: 6px; border: 1px solid #334155; background: #1e293b; color: #e2e8f0; cursor: pointer; }
  #weapon-strip .ws-item span { font-size: 20px; line-height: 1.1; }
  #weapon-strip .ws-item small { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50px; }
  #weapon-strip .ws-item.on { border-color: #fbbf24; background: #422006; box-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
  #weapon-strip .ws-item:hover { border-color: #c4b5fd; }
  #weapon-strip .ws-hint { order: -1; width: 46px; font-size: 9px; line-height: 1.3; color: #a5b4fc; text-align: center; }
  #weapon-strip .ws-item { flex: 0 0 auto; }

  .glb-btn { background: linear-gradient(90deg, #059669, #10b981); border: 1px solid #6ee7b7; color: #fff; padding: 7px 13px; border-radius: 7px; font-size: 12px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
  .glb-btn:hover { filter: brightness(1.1); }

  /* 🎬 GLB 애니메이션 매핑 & 인스펙터 패널 */
  #anim-panel { position: absolute; top: 145px; right: 24px; width: 280px; background: rgba(15, 23, 42, 0.94); border: 1px solid #38bdf8; border-radius: 10px; padding: 14px; z-index: 25; display: none; box-shadow: 0 10px 25px rgba(0,0,0,0.7); }
  #anim-panel h4 { font-size: 13px; color: #38bdf8; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
  #anim-panel .anim-status { font-size: 11px; color: #a7f3d0; margin-bottom: 10px; line-height: 1.4; background: rgba(6, 78, 59, 0.5); padding: 6px 8px; border-radius: 6px; }
  .map-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; font-size: 12px; }
  .map-row label { color: #cbd5e1; font-weight: bold; width: 95px; }
  .map-row select { flex: 1; background: #0f172a; color: #fff; border: 1px solid #475569; border-radius: 5px; padding: 4px 6px; font-size: 11px; outline: none; }
  .clip-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #334155; }
  .clip-tag { background: #1e293b; border: 1px solid #475569; color: #e2e8f0; padding: 3px 7px; border-radius: 4px; font-size: 10px; cursor: pointer; }
  .clip-tag:hover { border-color: #fde047; color: #fde047; }

  /* 대사 자막 & 하단 조작 패드 */
  #dialogue-bar { position: absolute; bottom: 95px; left: 50%; transform: translateX(-50%); width: 78%; max-width: 820px; background: rgba(15, 23, 42, 0.92); border: 1px solid #64748b; border-radius: 10px; padding: 12px 20px; font-size: 14px; color: #f8fafc; z-index: 15; display: none; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,0.65); }
  #controls { position: absolute; bottom: 18px; left: 24px; right: 24px; display: none; justify-content: space-between; align-items: center; z-index: 18; pointer-events: none; }
  .d-pad, .act-pad { display: flex; gap: 8px; pointer-events: auto; }
  .d-pad button, .act-pad button { padding: 12px 18px; border-radius: 10px; border: 2px solid #475569; background: rgba(30, 41, 59, 0.88); color: #fff; font-weight: bold; font-size: 14px; cursor: pointer; }
  .act-pad button.btn-hand { background: rgba(220, 38, 38, 0.88); border-color: #f87171; }
  .act-pad button.btn-kick { background: rgba(37, 99, 235, 0.88); border-color: #60a5fa; }
  /* 걷기 · 달리기 · 점프 */
  .move-pad { display: flex; gap: 8px; pointer-events: auto; margin-left: auto; margin-right: 14px; }
  .move-pad button { padding: 8px 14px; border-radius: 10px; border: 2px solid #475569; background: rgba(30, 41, 59, 0.88); color: #fff; font-weight: bold; font-size: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; touch-action: none; user-select: none; }
  .move-pad button small { font-size: 10px; font-weight: 600; color: #cbd5e1; }
  .move-pad button.on { background: rgba(217, 119, 6, 0.9); border-color: #fbbf24; }
  .move-pad button.held { background: rgba(234, 88, 12, 0.95); border-color: #fdba74; transform: scale(0.96); }
  .move-pad button.btn-jump { background: rgba(5, 150, 105, 0.88); border-color: #34d399; }
  .move-pad button.btn-bigjump { background: rgba(124, 58, 237, 0.88); border-color: #a78bfa; }
  .move-pad button.btn-jump:active { transform: scale(0.94); }
  @media (max-width: 760px) {
    #controls { flex-wrap: wrap; gap: 8px; left: 10px; right: 10px; bottom: 10px; }
    .move-pad { margin: 0; }
    .d-pad button, .act-pad button, .move-pad button { padding: 9px 11px; font-size: 13px; }
    #compass { width: 210px; }
  }
  /* 일시정지 */
  #pause-overlay { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(2, 6, 23, 0.62); backdrop-filter: blur(3px); }
  #pause-overlay.show { display: flex; }
  .pause-box { width: min(360px, 88vw); background: rgba(28, 23, 16, 0.96); border: 2px solid #f5c84c; border-radius: 16px; padding: 22px 20px; text-align: center; color: #f3e6c4; box-shadow: 0 0 30px rgba(245, 200, 76, 0.3); }
  .pause-title { font-size: 24px; font-weight: 900; color: #f5c84c; margin-bottom: 8px; }
  .pause-box p { font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
  .pause-btn { display: block; width: 100%; margin-top: 8px; padding: 12px; border-radius: 10px; border: 1px solid #6b5326; background: #2b2216; color: #f3e6c4; font-weight: bold; font-size: 15px; cursor: pointer; }
  .pause-btn.main { background: linear-gradient(90deg, #b45309, #d97706); border-color: #fbbf24; color: #fff; }
  .pause-btn small { font-weight: 500; opacity: 0.8; }
  #btn-resume small { display: block; font-size: 11px; font-weight: 500; opacity: 0.85; }
  /* 방향 표시기 (나침반 띠): 가운데 = 바라보는 방향, 금빛 ▼ = 가야 할 곳 */
  #compass { position: relative; width: 300px; height: 30px; margin: 6px auto 0; overflow: hidden; border-radius: 8px; background: rgba(2, 6, 23, 0.65); border: 1px solid rgba(148, 163, 184, 0.4); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
  #compass .cp { position: absolute; top: 3px; transform: translateX(-50%); font-size: 12px; font-weight: 800; color: #e2e8f0; white-space: nowrap; }
  #compass .cp.main { color: #fff; font-size: 13px; }
  #compass .cp.n { color: #f87171; }
  #compass .tk { position: absolute; bottom: 0; width: 1px; height: 6px; background: rgba(226, 232, 240, 0.6); }
  #compass .goal { position: absolute; top: -2px; transform: translateX(-50%); color: #fbbf24; font-size: 14px; text-shadow: 0 0 6px #f59e0b; }
  #compass .center { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fbbf24; opacity: 0.85; }
  #compass-goal { font-size: 11px; color: #fde68a; margin-top: 3px; min-height: 14px; white-space: nowrap; }
  #compass-goal .arrow { display: inline-block; transition: transform 0.1s; }

  /* 튜토리얼 배너 */
  #tutorial-hud { position: absolute; top: 88px; left: 50%; transform: translateX(-50%); background: rgba(30, 58, 138, 0.94); border: 2px solid #60a5fa; padding: 12px 24px; border-radius: 10px; text-align: center; z-index: 20; display: none; }
  #tutorial-hud h3 { color: #93c5fd; font-size: 15px; margin-bottom: 4px; }
  #tutorial-hud p { font-size: 13px; color: #fff; }

  /* 선택지 이벤트 카드 */
  .choice-card { background: #1e293b; border: 2px solid #fbbf24; border-radius: 14px; padding: 24px; width: 520px; text-align: left; box-shadow: 0 15px 40px rgba(0,0,0,0.8); }
  .choice-card h2 { color: #fbbf24; font-size: 20px; margin-bottom: 10px; }
  .choice-card p { font-size: 14px; color: #e2e8f0; margin-bottom: 18px; line-height: 1.5; }
  .choice-btn { display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 10px; background: #0f172a; border: 1px solid #475569; border-radius: 8px; color: #fff; cursor: pointer; font-size: 13px; transition: 0.15s; }
  .choice-btn:hover:not(:disabled) { border-color: #fbbf24; background: #334155; }
  .choice-btn:disabled { opacity: 0.45; cursor: not-allowed; }
  .choice-btn.gold { border-color: #f59e0b; background: rgba(245, 158, 11, 0.18); color: #fde68a; font-weight: bold; }

  /* 메인 로비 */
  .lobby-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 580px; margin-top: 16px; }
  .lobby-card { background: #1e293b; border: 1px solid #475569; padding: 14px; border-radius: 10px; text-align: left; }
  .lobby-card h4 { color: #38bdf8; margin-bottom: 5px; font-size: 14px; }
  .lobby-card p { font-size: 12px; color: #94a3b8; margin-bottom: 10px; line-height: 1.4; }
  .lobby-card button { padding: 9px 12px; font-size: 12px; border-radius: 6px; border: none; cursor: pointer; font-weight: bold; width: 100%; }

  /* 3D 플로팅 텍스트 컨테이너 */
  #floating-layer { position: absolute; inset: 0; pointer-events: none; z-index: 12; overflow: hidden; }
  /* 화면 확대/축소 버튼 (모든 화면 위에 항상 표시) */
  #zoom-ctrl { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; background: rgba(15, 23, 42, 0.75); border: 1px solid #475569; border-radius: 12px; padding: 8px 6px; }
  #zoom-ctrl button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid #64748b; background: #1e293b; color: #fff; font-size: 20px; font-weight: bold; cursor: pointer; }
  #zoom-ctrl button:hover { background: #334155; }
  #zoom-ctrl button.small { font-size: 12px; height: 28px; width: 64px; }
  #zoom-ctrl button.preset.on { background: #4f46e5; border-color: #a5b4fc; }
  #zoom-ctrl button.on { background: #059669; border-color: #6ee7b7; }
  /* 미니맵 & 전체 지도 */
  #minimap-wrap { position: absolute; left: 16px; top: 150px; z-index: 16; display: none; cursor: pointer; }
  #minimap { display: block; width: 264px; height: 148px; border: 2px solid #64748b; border-radius: 10px; background: #0f172a; box-shadow: 0 4px 14px rgba(0,0,0,0.5); }
  #auto-status { margin-top: 4px; font-size: 12px; font-weight: bold; color: #fde047; text-shadow: 0 1px 3px #000; min-height: 16px; }
  #bigmap { position: absolute; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(2, 6, 23, 0.72); }
  #bigmap.open { display: flex; }
  .bigmap-box { position: relative; background: #0f172a; border: 2px solid #6366f1; border-radius: 14px; padding: 12px; max-width: 94vw; }
  .bigmap-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 14px; color: #e2e8f0; flex-wrap: wrap; }
  .bigmap-legend { font-size: 12px; color: #cbd5e1; flex: 1; }
  .bigmap-legend i { font-style: normal; }
  .bigmap-head button { background: #1e293b; color: #fff; border: 1px solid #64748b; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
  #bigmap-canvas { display: block; width: min(1100px, 90vw); height: auto; border-radius: 8px; }
  #bigmap-zoombtn { position: absolute; transform: translate(-50%, -50%); z-index: 2; display: none; background: rgba(15, 23, 42, 0.92); color: #fde047; border: 2px solid #fde047; border-radius: 10px; padding: 6px 14px; font: bold 14px 'Malgun Gothic', sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.6); text-align: center; line-height: 1.3; }
  #bigmap-zoombtn small { display: block; font-size: 11px; color: #fef3c7; font-weight: normal; }
  #bigmap-zoombtn:hover { background: #fde047; color: #0f172a; }
  #bigmap-zoombtn:hover small { color: #0f172a; }
  .bigmap-foot { font-size: 11px; color: #94a3b8; margin-top: 6px; text-align: right; }
  /* 기록자 루멘 말풍선 & 기록 */
  #lumen-talk { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); width: min(620px, 92vw); z-index: 40; display: none; gap: 12px; align-items: flex-start;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 82, 0.94)); border: 2px solid #7dd3fc; border-radius: 14px; padding: 12px 14px; box-shadow: 0 0 24px rgba(125, 211, 252, 0.45); cursor: pointer; }
  #lumen-talk.show { display: flex; }
  .lt-face { width: 46px; height: 46px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px;
    background: radial-gradient(circle, #fff7d6 0%, #9be7ff 45%, rgba(56, 189, 248, 0.15) 75%); box-shadow: 0 0 18px #9be7ff; animation: lt-glow 2s ease-in-out infinite; }
  @keyframes lt-glow { 50% { box-shadow: 0 0 30px #e0f7ff; transform: scale(1.06); } }
  .lt-body { flex: 1; }
  .lt-name { font-size: 13px; font-weight: bold; color: #7dd3fc; margin-bottom: 4px; }
  .lt-name span { color: #94a3b8; font-weight: normal; font-size: 11px; }
  #lumen-text { font-size: 15px; line-height: 1.55; color: #f1f5f9; min-height: 46px; }
  .lt-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11px; color: #94a3b8; }
  .lt-foot button { background: none; border: 1px solid #475569; color: #cbd5e1; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 11px; }
  #lumen-log { position: absolute; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(2, 6, 23, 0.72); }
  #lumen-log.open { display: flex; }
  .ll-box { width: min(560px, 92vw); max-height: 80vh; display: flex; flex-direction: column; background: #0f172a; border: 2px solid #7dd3fc; border-radius: 14px; padding: 14px; color: #e2e8f0; }
  .ll-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; margin-bottom: 8px; }
  .ll-head button { background: #1e293b; color: #fff; border: 1px solid #64748b; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
  #lumen-log-stats { font-size: 13px; color: #fde68a; margin-bottom: 8px; }
  #lumen-log-list { overflow-y: auto; font-size: 13px; line-height: 1.8; }
  #lumen-log-list .row { display: flex; gap: 10px; border-bottom: 1px solid #1e293b; }
  #lumen-log-list .row b { color: #7dd3fc; font-family: monospace; min-width: 44px; }
  .ll-foot { font-size: 11px; color: #94a3b8; margin-top: 8px; text-align: right; }
  #main-lobby-log { text-align: left; font-size: 12px; line-height: 1.7; color: #cbd5e1; max-height: 180px; overflow-y: auto; background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 8px 10px; margin: 8px 0 12px; }
  #zoom-ctrl .zoom-sep { width: 80%; height: 1px; background: #475569; margin: 2px 0; }
  #zoom-val { font-size: 11px; color: #cbd5e1; font-weight: bold; }
  .float-txt { position: absolute; font-weight: 900; font-size: 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.9); transform: translate(-50%, -50%); white-space: nowrap; }

  /* 이벤트 안내 (js/world/event_guide.js): 카드 · 작은 알림 · 목표 줄 */
  #event-card { position: absolute; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(2, 6, 23, 0.45); cursor: pointer; }
  #event-card.show { display: flex; animation: ec-in 0.25s ease-out; }
  @keyframes ec-in { from { opacity: 0; } to { opacity: 1; } }
  .ec-box { width: min(480px, calc(100vw - 32px)); margin-top: -12vh; background: linear-gradient(160deg, rgba(30, 20, 5, 0.97), rgba(15, 23, 42, 0.97)); border: 2px solid #fcd34d; border-radius: 16px; padding: 16px 20px 12px; color: #f8fafc; box-shadow: 0 0 34px rgba(252, 211, 77, 0.35); animation: ec-pop 0.3s ease-out; }
  @keyframes ec-pop { from { transform: scale(0.85); } to { transform: scale(1); } }
  .ec-tag { font-size: 12px; color: #fcd34d; font-weight: bold; letter-spacing: 1px; }
  .ec-title { font-size: 22px; font-weight: 900; margin: 4px 0 12px; display: flex; align-items: center; gap: 10px; }
  .ec-ic { font-size: 30px; }
  .ec-line { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); margin-bottom: 6px; }
  .ec-how { background: rgba(74, 222, 128, 0.13); border: 1px solid rgba(74, 222, 128, 0.45); font-weight: bold; }
  .ec-k { flex: none; min-width: 58px; font-size: 12px; color: #fde68a; padding-top: 2px; }
  .ec-how .ec-k { color: #86efac; }
  .ec-foot { text-align: right; font-size: 11px; color: #94a3b8; margin-top: 6px; }
  #event-toast { position: absolute; left: 50%; top: 210px; transform: translate(-50%, -8px); z-index: 41; max-width: calc(100vw - 32px); padding: 7px 14px; border-radius: 10px; background: rgba(30, 20, 5, 0.92); border: 1px solid #fcd34d; color: #fef3c7; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
  #event-toast.show { opacity: 1; transform: translate(-50%, 0); }
  #event-goal { position: absolute; left: 50%; top: 136px; transform: translateX(-50%); z-index: 16; display: none; flex-direction: column; align-items: center; gap: 4px; max-width: calc(100vw - 32px); pointer-events: none; }
  #event-goal.show { display: flex; }
  .eg-row { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;background: rgba(15, 23, 42, 0.86); border-left: 4px solid #fcd34d; border-radius: 8px; padding: 6px 10px; font-size: 13px; color: #f1f5f9; text-shadow: 0 1px 2px #000; }
  .eg-row b { color: #fde68a; }
  .eg-ic { margin-right: 6px; }
  .eg-sep { color: #64748b; margin: 0 6px; }

/* 온라인 감정 표현 (js/core/live.js) */
#live-emo { position: fixed; left: 12px; top: 338px; z-index: 31; display: none; font-family: "Malgun Gothic", sans-serif; }
#live-emo .live-emo-btn { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(253,230,138,.6); background: rgba(30,27,75,.82); color: #fef3c7; font: 800 13px "Malgun Gothic", sans-serif; cursor: pointer; }
#live-emo .live-emo-btn small { margin-left: 4px; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,.15); font-size: 11px; }
#live-emo .live-emo-btn:hover { background: rgba(67,56,202,.9); }
#live-emo .live-emo-list { display: none; margin-top: 6px; grid-template-columns: repeat(4, 64px); gap: 6px; padding: 8px; border-radius: 12px; background: rgba(15,23,42,.88); border: 1px solid rgba(125,211,252,.4); }
#live-emo.open .live-emo-list { display: grid; }
#live-emo .live-emo-list button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; font-size: 22px; cursor: pointer; }
#live-emo .live-emo-list button span { font-size: 11px; font-weight: 700; color: #e0f2fe; }
#live-emo .live-emo-list button:hover { background: rgba(253,230,138,.22); transform: translateY(-1px); }
#live-emo.cool .live-emo-list button, #live-emo.cool .live-emo-btn { opacity: .5; pointer-events: none; }

/* 로비에서 연 동작 고르기 창: 오른쪽의 거울 샘 창과 겹치지 않게 왼쪽에, 로비 창보다 위에, 길면 안에서 넘김 */
body.in-lobby #anim-panel { left: 16px; right: auto; top: 64px; z-index: 95; max-height: calc(100vh - 150px); overflow-y: auto; }

/* 내 노트북 전용 (js/core/dev_mode.js): localhost 가 아니면 GLB 불러오기 · 동작 고르기 숨김 */
html:not(.dev-host) .glb-btn, html:not(.dev-host) #anim-panel, html:not(.dev-host) .dev-only, html:not(.dev-host) #dev-maps-btn { display: none !important; }
#dev-maps-btn { position: fixed; left: 16px; bottom: 80px; z-index: 9990; padding: 6px 12px; border-radius: 8px; border: 1px solid #fbbf24; background: rgba(120, 53, 15, 0.9); color: #fde68a; font: 700 12px "Malgun Gothic", sans-serif; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
#dev-maps-btn:hover { filter: brightness(1.15); }
#dev-maps { position: fixed; left: 16px; bottom: 116px; z-index: 9991; width: 270px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 10px; border-radius: 10px; border: 1px solid #fbbf24; background: rgba(15, 23, 42, 0.96); box-shadow: 0 10px 25px rgba(0,0,0,0.7); }
#dev-maps h4 { color: #fde68a; font: 700 13px "Malgun Gothic", sans-serif; margin: 0 0 8px; }
#dev-maps h4 small { display: block; color: #94a3b8; font-weight: 400; font-size: 11px; margin-top: 2px; }
#dev-maps button { display: block; width: 100%; text-align: left; margin: 3px 0; padding: 6px 9px; border-radius: 6px; border: 1px solid #334155; background: #1e293b; color: #e2e8f0; font: 600 12px "Malgun Gothic", sans-serif; cursor: pointer; }
#dev-maps button:hover { background: #334155; }
#dev-maps button.on { border-color: #fbbf24; background: #78350f; }
#dev-maps button.home { margin-top: 8px; border-color: #10b981; color: #a7f3d0; }

/* 📖 관문 안내서 (js/core/gate_manual.js) */
#zoom-ctrl button.manual { height: 36px; font-size: 13px; background: #7c2d12; border-color: #fb923c; }
#zoom-ctrl button.manual:hover { background: #9a3412; }
#gm-panel { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.5); font: 14px/1.6 "Malgun Gothic", sans-serif; }
#gm-panel .gm-box { width: min(640px, 94vw); max-height: 88vh; display: flex; flex-direction: column; border-radius: 16px; background: rgba(17,24,39,.97); border: 1px solid #f59e0b; color: #f1f5f9; box-shadow: 0 12px 44px rgba(0,0,0,.6); }
#gm-panel .gm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px 10px; border-bottom: 1px solid #334155; font-size: 17px; }
#gm-panel .gm-x { border: 0; background: #334155; color: #fff; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 15px; flex: none; }
#gm-panel .gm-body { overflow-y: auto; padding: 6px 18px 12px; }
#gm-panel .gm-foot { padding: 8px 18px 12px; font-size: 12px; opacity: .65; border-top: 1px solid #334155; }
#gm-panel h4 { margin: 14px 0 6px; color: #fcd34d; font-size: 15px; }
#gm-panel ul { margin: 0; padding-left: 20px; } #gm-panel li { margin: 3px 0; }
#gm-panel .gm-intro { margin: 10px 0 6px; }
#gm-panel .gm-goal { padding: 8px 12px; border-radius: 10px; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.4); }
#gm-panel ol.gm-steps { list-style: none; margin: 0; padding: 0; }
#gm-panel ol.gm-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; margin: 2px 0; }
#gm-panel ol.gm-steps li .gm-chk { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #334155; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
#gm-panel ol.gm-steps li.done { opacity: .55; } #gm-panel ol.gm-steps li.done .gm-chk { background: transparent; }
#gm-panel ol.gm-steps li.now { background: rgba(245,158,11,.16); outline: 1px solid rgba(245,158,11,.5); } #gm-panel ol.gm-steps li.now .gm-chk { background: transparent; }
#gm-panel .gm-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
#gm-panel .gm-region { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid #334155; }
#gm-panel .gm-region.done { border-color: #22c55e; } #gm-panel .gm-rh { margin-bottom: 4px; } #gm-panel .gm-rh small { opacity: .7; }
#gm-panel .gm-badge { font-size: 12px; color: #86efac; } #gm-panel .gm-boss { margin-top: 4px; font-size: 13px; color: #fca5a5; }
#gm-panel details.gm-secret { margin: 14px 0 4px; padding: 8px 10px; border-radius: 10px; background: rgba(168,85,247,.1); border: 1px dashed #a855f7; }
#gm-panel details.gm-secret summary { cursor: pointer; color: #d8b4fe; font-weight: 700; }
