/* ==============================================
 * Eldoria Skeletal Editor v3 - 전체 스타일
 * 테마 변수 / 토스트 / 온보딩 / 패널 / 모바일 대응
 * ============================================== */

/* ---------- CSS 변수 (테마) ---------- */
:root {
  --bg: #0f1117;
  --bgPanel: #171a22;
  --bgItem: #202531;
  --border: #313642;
  --text: #f2f2f2;
  --textMuted: #bbbbbb;
  --accent: #355cff;
  --accentHover: #5a78ff;
  --danger: #7b2d2d;
  --bone: #ffbf4d;
  --boneSelected: #ffef82;
  --ikTarget: #55d66a;
  --ikSelected: #8cff9a;
  --font-scale: 1;
  --header-height: 52px;
}

/* ---------- 리셋 / 기본 ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
               "Malgun Gothic", "Noto Sans KR", Arial, sans-serif;
  font-size: calc(13px * var(--font-scale));
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; font-size: inherit; }

/* ---------- 레이아웃 ---------- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

header {
  height: var(--header-height);
  background: var(--bgPanel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  flex-shrink: 0;
}

header h1 {
  font-size: calc(15px * var(--font-scale));
  margin: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bgItem);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover { background: var(--border); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.main {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

.panel {
  width: 280px;
  background: var(--bgPanel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px;
  flex-shrink: 0;
}

.panel.right { border-right: none; border-left: 1px solid var(--border); }

.canvas-wrap {
  flex: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

canvas {
  background: #0a0c12;
  border-radius: 4px;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

[data-theme="light"] canvas { background: #e6eaf2; }
[data-theme="highContrast"] canvas { background: #000; }

/* ---------- 패널 섹션 ---------- */
.panel h2 {
  font-size: calc(13px * var(--font-scale));
  margin: 12px 0 6px;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.panel h3 {
  font-size: calc(12px * var(--font-scale));
  margin: 8px 0 4px;
  color: var(--textMuted);
}

.panel h2:first-child { margin-top: 0; }

.list {
  max-height: 150px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 8px;
}

.item {
  background: var(--bgItem);
  padding: 6px 8px;
  margin: 2px 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: calc(12px * var(--font-scale));
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}

.item:hover { background: var(--border); }
.item.selected { background: var(--accent); border-color: var(--accentHover); }
.item small {
  display: block;
  color: var(--textMuted);
  font-size: calc(10px * var(--font-scale));
  margin-top: 2px;
}

.item.selected small { color: rgba(255, 255, 255, 0.85); }

.hint {
  color: var(--textMuted);
  font-size: calc(11px * var(--font-scale));
  padding: 6px 4px;
  font-style: italic;
}

.stat {
  background: var(--bgItem);
  padding: 6px;
  border-radius: 4px;
  font-size: calc(11px * var(--font-scale));
  white-space: pre-wrap;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ---------- 버튼 ---------- */
button {
  width: 100%;
  padding: 10px 8px;
  background: var(--bgItem);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  margin: 3px 0;
  font-size: calc(12px * var(--font-scale));
  transition: background .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}

button:hover { background: var(--border); }
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accentHover); color: #fff; }
button.primary:hover { background: var(--accentHover); }
button.danger { background: var(--danger); border-color: #a04545; color: #fff; }

input[type="text"], select {
  width: 100%;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 3px 0;
  font-size: calc(12px * var(--font-scale));
}

input[type="file"] {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  margin: 3px 0;
}

label.field {
  display: block;
  font-size: calc(11px * var(--font-scale));
  color: var(--textMuted);
  margin-top: 6px;
}

/* ---------- 정보 박스 ---------- */
#info {
  background: var(--bgItem);
  padding: 8px;
  border-radius: 4px;
  font-size: calc(11px * var(--font-scale));
  white-space: pre-wrap;
  line-height: 1.55;
  min-height: 40px;
  border: 1px solid var(--border);
}

/* ---------- 모바일 패널 토글 ---------- */
.panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 70;
}

.panel-backdrop.show { display: block; }

@media (max-width: 780px) {
  header h1 { font-size: calc(13px * var(--font-scale)); }

  .panel {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    width: 80vw;
    max-width: 320px;
    z-index: 80;
    transition: transform .25s ease;
  }

  .panel.left { left: 0; transform: translateX(-105%); }
  .panel.right { right: 0; transform: translateX(105%); }
  .panel.left.open { transform: translateX(0); }
  .panel.right.open { transform: translateX(0); }
}

@media (min-width: 781px) {
  .icon-btn.mobile-only { display: none; }
  .panel-backdrop { display: none !important; }
}

/* ---------- 모달 (cutout) ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  padding: 12px;
  overflow-y: auto;
}

.modal-content {
  background: var(--bgPanel);
  border-radius: 8px;
  padding: 14px;
  max-width: 1100px;
  margin: 12px auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-header h2 {
  margin: 0;
  font-size: calc(16px * var(--font-scale));
  color: var(--accent);
}

.cutout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#cutoutCanvas {
  background: #15171c;
  border: 1px solid var(--border);
  width: 100%;
  height: auto;
  max-height: 600px;
}

#generatedPartsList,
#candidateThumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  max-height: 600px;
  overflow-y: auto;
}

@media (max-width: 780px) {
  .cutout-grid { grid-template-columns: 1fr; }
}

/* ---------- 토스트 알림 ---------- */
#toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
}

.toast {
  background: var(--bgPanel);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  font-size: calc(13px * var(--font-scale));
  min-width: 200px;
  max-width: 360px;
  opacity: 0;
  transform: translateX(120%);
  transition: opacity .22s, transform .22s;
  white-space: pre-wrap;
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast.hide { opacity: 0; transform: translateX(120%); }

.toast-info { border-left: 4px solid #4a90ff; }
.toast-success { border-left: 4px solid #2ecc71; }
.toast-warn { border-left: 4px solid #f5a623; }
.toast-error { border-left: 4px solid #e74c3c; }
.toast-loading { display: flex; align-items: center; gap: 10px; border-left: 4px solid var(--accent); }

.toast-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast-confirm { border-left: 4px solid var(--accent); }
.toast-msg { margin-bottom: 8px; }
.toast-btns { display: flex; gap: 8px; }
.toast-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bgItem);
  color: var(--text);
  cursor: pointer;
  font-size: calc(12px * var(--font-scale));
  width: auto;
  margin: 0;
}
.toast-btn-yes { background: var(--accent); border-color: var(--accentHover); color: #fff; }
.toast-btn-no:hover { background: var(--border); }

@media (max-width: 780px) {
  #toast-container { right: 8px; left: 8px; bottom: 8px; }
  .toast { max-width: none; min-width: 0; }
}

/* ---------- 온보딩 ---------- */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.onboarding-card {
  background: var(--bgPanel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}

.onboarding-progress .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background .2s;
}

.onboarding-progress .dot.active { background: var(--accent); }

.onboarding-title {
  font-size: calc(18px * var(--font-scale));
  margin: 0 0 8px;
  color: var(--text);
}

.onboarding-desc {
  color: var(--textMuted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.onboarding-actions {
  display: flex;
  gap: 8px;
}

.onboarding-skip { background: transparent; }
.onboarding-next.primary { background: var(--accent); color: #fff; }

/* ---------- 설치 토스트 ---------- */
#installToast {
  position: fixed;
  bottom: 16px;
  left: 16px;
  background: var(--bgPanel);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 150;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#installToast button { width: auto; margin: 0; padding: 6px 10px; }

@media (max-width: 780px) {
  #installToast { left: 8px; right: 8px; }
}

/* ---------- 설정 패널 ---------- */
.settings-panel {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: 280px;
  max-width: 90vw;
  background: var(--bgPanel);
  border: 1px solid var(--border);
  border-radius: 0 0 0 12px;
  padding: 16px;
  z-index: 90;
  display: none;
  box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.4);
}

.settings-panel.open { display: block; }

.settings-group {
  margin-bottom: 14px;
}

.settings-group h3 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: calc(12px * var(--font-scale));
}

.settings-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-row label {
  flex: 1;
  min-width: 70px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bgItem);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: calc(12px * var(--font-scale));
}

.settings-row input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

.settings-row label:has(input:checked) {
  background: var(--accent);
  border-color: var(--accentHover);
  color: #fff;
}

.folder-status {
  background: var(--bgItem);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: calc(12px * var(--font-scale));
  color: var(--textMuted);
  word-break: break-all;
}

.folder-status b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Export Studio ---------- */

.export-section {
  background: var(--bgItem);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.export-section summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: calc(13px * var(--font-scale));
  user-select: none;
  background: var(--bgPanel);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.export-section summary::-webkit-details-marker { display: none; }

.export-section summary::after {
  content: '▼';
  font-size: 11px;
  color: var(--textMuted);
  transition: transform .2s;
}

.export-section[open] summary::after {
  transform: rotate(180deg);
}

.export-section summary:hover {
  background: var(--border);
}

.export-body {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.export-row button {
  width: auto;
  margin: 0;
}

.export-hint {
  color: var(--textMuted);
  font-size: calc(11px * var(--font-scale));
  font-style: italic;
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: calc(11px * var(--font-scale));
  color: var(--textMuted);
}

.field-inline input[type="number"] {
  width: 70px;
  padding: 4px 6px;
  margin: 0;
}

.field-inline input[type="range"] {
  margin: 0;
}

.field-inline input[type="checkbox"] {
  margin: 0 4px 0 0;
}

@media (max-width: 780px) {
  .export-row { flex-direction: column; align-items: stretch; }
  .export-row button { width: 100%; }
  .field-inline { width: 100%; justify-content: space-between; }
}

/* ---------- 접근성: 포커스 ---------- */
button:focus-visible,
input:focus-visible,
select:focus-visible,
.icon-btn:focus-visible,
.item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 접근성: prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 스크롤바 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--textMuted); }

/* ---------- v3.3 신규 스타일 ---------- */

/* 스플래시 */
#splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .3s;
}
#splash.fade { opacity: 0; pointer-events: none; }
.splash-card { text-align: center; }
.splash-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
.splash-text { color: var(--textMuted); font-size: 13px; }

/* 타임라인 */
.timeline {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.timeline-empty {
  color: var(--textMuted);
  font-size: 11px;
  font-style: italic;
  padding: 8px;
  text-align: center;
}
.tl-group {
  margin-bottom: 8px;
}
.tl-label {
  font-size: calc(11px * var(--font-scale));
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 3px;
}
.tl-track {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  background: var(--bgItem);
  padding: 4px;
  border-radius: 4px;
}
.tl-frame {
  width: 32px;
  height: 32px;
  background: var(--bgPanel);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  font-size: 10px;
  color: var(--textMuted);
  transition: background .15s;
}
.tl-frame:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accentHover);
}
.tl-frame.dragging { opacity: 0.4; cursor: grabbing; }
.tl-frame.dragover {
  border-color: var(--accent);
  border-width: 2px;
  background: var(--accentHover);
}
.tl-num { font-weight: 600; }

/* 트리뷰 (본) */
.bone-row {
  cursor: pointer;
  margin: 1px 0;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--bgItem);
}
.tree-toggle:hover { color: var(--accent) !important; }

/* 분석 리포트 */
.modal-content .item small {
  display: block;
  margin-top: 2px;
}

/* 백업 리스트 */
.backup-item {
  cursor: pointer;
}
.backup-item:hover {
  background: var(--accent);
  color: #fff;
}

/* ==============================================
 * v3.4 신규 스타일
 * ============================================== */

/* 단축키 도움말 모달 */
.shortcut-help-overlay,
.palette-overlay,
.blend-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.shortcut-help-modal,
.palette-modal,
.blend-modal {
  background: #1a1f2e;
  color: #e8eef9;
  border-radius: 12px;
  width: min(700px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid #2a3142;
}

.shortcut-help-header,
.palette-header,
.blend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #2a3142;
}

.shortcut-help-header h2,
.palette-header h2,
.blend-header h2 {
  margin: 0;
  font-size: 18px;
}

.shortcut-help-close,
.palette-close,
.blend-close {
  background: transparent;
  border: none;
  color: #6b7891;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.shortcut-help-close:hover,
.palette-close:hover,
.blend-close:hover {
  background: #2a3142;
  color: #e8eef9;
}

.shortcut-help-body,
.palette-body,
.blend-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.shortcut-help-footer,
.palette-footer,
.blend-footer {
  padding: 12px 20px;
  border-top: 1px solid #2a3142;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shortcut-category {
  margin-bottom: 16px;
}

.shortcut-category h3 {
  margin: 0 0 8px 0;
  font-size: 13px;
  text-transform: uppercase;
  color: #6b7891;
  letter-spacing: 0.05em;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #2a3142;
}

.shortcut-label {
  font-size: 14px;
}

.shortcut-key {
  background: #0f1117;
  border: 1px solid #3a4458;
  color: #e8eef9;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  cursor: pointer;
  min-width: 80px;
  text-align: center;
}

.shortcut-key:hover {
  background: #2a3142;
  border-color: #5a8fff;
}

.shortcut-key.custom {
  border-color: #4ade80;
  color: #4ade80;
}

.shortcut-key.listening {
  background: #5a8fff;
  color: #fff;
  border-color: #5a8fff;
  animation: pulse 1s infinite;
}

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

/* 컬러 팔레트 */
.palette-row {
  margin-bottom: 14px;
}

.palette-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.palette-name {
  font-weight: 600;
  font-size: 14px;
}

.palette-name small {
  color: #6b7891;
  font-weight: normal;
  margin-left: 6px;
}

.palette-del {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.palette-del:hover {
  background: #ef4444;
  color: #fff;
}

.palette-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.palette-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #2a3142;
  cursor: pointer;
  transition: transform 0.1s;
}

.palette-swatch:hover {
  transform: scale(1.15);
  border-color: #5a8fff;
}

/* 모션 블렌딩 */
.blend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.blend-row label {
  min-width: 120px;
  font-size: 14px;
}

.blend-row select,
.blend-row input[type="range"] {
  flex: 1;
}

.blend-weight-val {
  min-width: 50px;
  text-align: right;
  font-family: monospace;
  color: #5a8fff;
}

.blend-preview {
  margin-top: 8px;
  padding: 10px;
  background: #0f1117;
  border-radius: 6px;
  font-size: 12px;
  color: #6b7891;
  text-align: center;
}

/* 잠긴 본 표시 (canvas overlay - JS에서 처리) */
.bone-locked-indicator {
  display: inline-block;
  margin-left: 4px;
  color: #f97316;
  font-size: 11px;
}

/* ==============================================
 * v3.5 신규 스타일
 * ============================================== */

/* 디버그 FAB */
.debug-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a1f2e;
  color: #e8eef9;
  border: 1px solid #3a4458;
  font-size: 18px;
  cursor: pointer;
  z-index: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.15s, background 0.15s;
}
.debug-fab:hover {
  transform: scale(1.1);
  background: #2a3142;
}

/* 디버그 패널 */
.debug-panel {
  position: fixed;
  right: 16px;
  bottom: 70px;
  width: min(420px, 92vw);
  max-height: 70vh;
  background: #161a26;
  border: 1px solid #2a3142;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  z-index: 850;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-size: 13px;
  color: #e8eef9;
}
.debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #2a3142;
  font-weight: 600;
}
.debug-header button {
  background: transparent;
  border: none;
  color: #6b7891;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: 4px;
  border-radius: 4px;
}
.debug-header button:hover { background: #2a3142; color: #e8eef9; }
.debug-tabs {
  display: flex;
  border-bottom: 1px solid #2a3142;
}
.debug-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #6b7891;
  padding: 8px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 2px solid transparent;
}
.debug-tab.active {
  color: #5a8fff;
  border-bottom-color: #5a8fff;
}
.debug-tab:hover:not(.active) { background: #1a1f2e; color: #e8eef9; }
.debug-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.debug-pane { display: none; }
.debug-pane.active { display: block; }
.debug-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #2a3142;
  font-size: 12px;
}
.debug-stat-val { font-family: monospace; color: #e8eef9; }
.debug-stat-val.good { color: #4ade80; }
.debug-stat-val.warn { color: #f59e0b; }
.debug-stat-val.bad { color: #ef4444; }
.debug-empty { padding: 24px; text-align: center; color: #6b7891; }
.debug-error {
  padding: 8px;
  margin-bottom: 8px;
  background: #1a1f2e;
  border-left: 3px solid #ef4444;
  border-radius: 4px;
  font-size: 11px;
}
.debug-error-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.debug-error-type { color: #ef4444; font-weight: 600; }
.debug-error-time { color: #6b7891; font-size: 10px; }
.debug-error-msg { color: #e8eef9; word-break: break-word; }
.debug-error pre {
  font-size: 10px;
  color: #6b7891;
  overflow-x: auto;
  padding: 6px;
  background: #0f1117;
  border-radius: 3px;
  margin-top: 4px;
}
.debug-test-cat { margin-bottom: 12px; }
.debug-test-cat h4 {
  font-size: 11px;
  color: #6b7891;
  text-transform: uppercase;
  margin: 0 0 4px 0;
  display: flex;
  justify-content: space-between;
}
.debug-test-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 6px;
  padding: 4px;
  font-size: 11px;
  align-items: center;
}
.debug-test-row small { grid-column: 2; color: #6b7891; font-size: 10px; }
.debug-test-pass .debug-test-icon { color: #4ade80; }
.debug-test-fail .debug-test-icon { color: #ef4444; }
.debug-test-warn .debug-test-icon { color: #f59e0b; }
.debug-pane pre {
  font-size: 10px;
  background: #0f1117;
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
  color: #e8eef9;
  max-height: 400px;
  overflow-y: auto;
}

/* 빈 상태 UI */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  pointer-events: auto;
}
.empty-state-card {
  background: #1a1f2e;
  border: 1px solid #2a3142;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.empty-state-icon { font-size: 56px; margin-bottom: 12px; }
.empty-state-card h2 { margin: 0 0 6px 0; color: #e8eef9; font-size: 22px; }
.empty-state-card p { color: #6b7891; margin: 0 0 24px 0; }
.empty-state-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}
.empty-state-actions button {
  padding: 12px 16px;
  background: #2a3142;
  color: #e8eef9;
  border: 1px solid #3a4458;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.empty-state-actions button:hover {
  background: #3a4458;
  border-color: #5a8fff;
}
.empty-state-actions button.big {
  font-size: 16px;
  padding: 16px 18px;
  background: #5a8fff;
  border-color: #5a8fff;
  color: #fff;
  font-weight: 600;
}
.empty-state-actions button.big:hover {
  background: #4a7fef;
}
.empty-state-tips { color: #6b7891; font-size: 12px; }
.empty-state-tips kbd {
  background: #0f1117;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
  border: 1px solid #3a4458;
}

/* 컨텍스트 메뉴 */
.context-menu {
  position: fixed;
  background: #1a1f2e;
  border: 1px solid #2a3142;
  border-radius: 8px;
  padding: 4px;
  min-width: 200px;
  z-index: 900;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.context-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  background: transparent;
  color: #e8eef9;
  border: none;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.context-item:hover { background: #2a3142; }
.context-item.danger { color: #ef4444; }
.context-item.danger:hover { background: #2a1a1a; }
.context-item kbd {
  font-size: 10px;
  background: #0f1117;
  padding: 2px 5px;
  border-radius: 3px;
  color: #6b7891;
  font-family: monospace;
}
.context-divider {
  height: 1px;
  background: #2a3142;
  margin: 4px 0;
}

/* 온보딩 v2 */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 950;
  pointer-events: none;
}
.onboarding-spotlight {
  position: absolute;
  border: 3px solid #5a8fff;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.6);
  pointer-events: none;
  transition: all 0.3s ease;
  display: none;
}
.onboarding-card {
  position: fixed;
  background: #1a1f2e;
  border: 1px solid #5a8fff;
  border-radius: 12px;
  padding: 20px;
  width: 320px;
  pointer-events: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  color: #e8eef9;
}
.onboarding-card.center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.onboarding-progress {
  font-size: 11px;
  color: #6b7891;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.onboarding-title {
  font-size: 16px;
  margin: 0 0 8px 0;
}
.onboarding-body {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px 0;
  color: #c9d1e0;
}
.onboarding-body kbd {
  background: #0f1117;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
  border: 1px solid #3a4458;
}
.onboarding-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.onboarding-skip {
  background: transparent;
  border: none;
  color: #6b7891;
  font-size: 12px;
  cursor: pointer;
}
.onboarding-skip:hover { color: #e8eef9; }
.onboarding-nav { display: flex; gap: 8px; }
.onboarding-nav button {
  padding: 6px 14px;
  background: #2a3142;
  border: 1px solid #3a4458;
  color: #e8eef9;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.onboarding-nav button.primary {
  background: #5a8fff;
  border-color: #5a8fff;
  color: #fff;
}
.onboarding-nav button:hover { background: #3a4458; }
.onboarding-nav button.primary:hover { background: #4a7fef; }

/* ==============================================
 * v3.6 - 라이트 테마 보강
 * ============================================== */
[data-theme="light"] {
  background: #f4f6fa;
  color: #1a1f2e;
}

[data-theme="light"] body,
[data-theme="light"] main {
  background: #f4f6fa;
  color: #1a1f2e;
}

[data-theme="light"] .panel,
[data-theme="light"] aside,
[data-theme="light"] header {
  background: #fff;
  color: #1a1f2e;
  border-color: #d1d5db;
}

[data-theme="light"] button {
  background: #f4f6fa;
  color: #1a1f2e;
  border-color: #d1d5db;
}

[data-theme="light"] button:hover {
  background: #e5e7eb;
}

[data-theme="light"] button.primary {
  background: #5a8fff;
  color: #fff;
  border-color: #5a8fff;
}

[data-theme="light"] button.danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #fff;
  color: #1a1f2e;
  border-color: #d1d5db;
}

/* 라이트 테마 모달 */
[data-theme="light"] .modal-content,
[data-theme="light"] .shortcut-help-modal,
[data-theme="light"] .palette-modal,
[data-theme="light"] .blend-modal {
  background: #fff;
  color: #1a1f2e;
  border-color: #d1d5db;
}

[data-theme="light"] .empty-state {
  background: rgba(244, 246, 250, 0.85);
}

[data-theme="light"] .empty-state-card {
  background: #fff;
  border-color: #d1d5db;
}

[data-theme="light"] .debug-panel,
[data-theme="light"] .context-menu,
[data-theme="light"] .onboarding-card {
  background: #fff;
  color: #1a1f2e;
  border-color: #d1d5db;
}

[data-theme="light"] .debug-fab {
  background: #fff;
  color: #1a1f2e;
  border-color: #d1d5db;
}

[data-theme="light"] .debug-stat-row {
  border-color: #e5e7eb;
}

[data-theme="light"] .debug-empty,
[data-theme="light"] .palette-name small,
[data-theme="light"] .onboarding-progress {
  color: #6b7891;
}

[data-theme="light"] .item,
[data-theme="light"] .bone-row,
[data-theme="light"] .part-row {
  background: #f9fafb;
  color: #1a1f2e;
  border-color: #e5e7eb;
}

[data-theme="light"] .toast {
  background: #fff;
  color: #1a1f2e;
  border: 1px solid #d1d5db;
}

[data-theme="light"] .toast-success { border-color: #4ade80; }
[data-theme="light"] .toast-error { border-color: #ef4444; }
[data-theme="light"] .toast-warn { border-color: #f59e0b; }

/* 스크린리더 전용 (보이지 않음) */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* PWA 설치 버튼 */
.install-pwa-btn {
  position: fixed;
  right: 16px;
  bottom: 70px;
  padding: 10px 16px;
  background: #5a8fff;
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  z-index: 800;
  box-shadow: 0 4px 12px rgba(90, 143, 255, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.install-pwa-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(90, 143, 255, 0.5);
}

/* 디버그 FAB가 있을 때는 옆으로 이동 */
.install-pwa-btn { bottom: 70px; right: 70px; }

/* 오프라인 배너 */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.offline-banner.offline {
  background: #f59e0b;
  color: #1a1f2e;
}

.offline-banner.online {
  background: #4ade80;
  color: #0f1117;
}

/* 메시 변형 핸들 */
.mesh-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #5a8fff;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: grab;
  transform: translate(-50%, -50%);
  z-index: 100;
}
.mesh-handle:active { cursor: grabbing; }
.mesh-handle.corner { background: #f59e0b; }

/* 플러그인 모달 */
.plugin-list-item {
  padding: 12px;
  border: 1px solid #2a3142;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plugin-list-item.enabled {
  border-color: #4ade80;
}

.plugin-meta {
  font-size: 11px;
  color: #6b7891;
  margin-top: 4px;
}

.plugin-actions {
  display: flex;
  gap: 6px;
}

.plugin-actions button {
  padding: 4px 10px;
  font-size: 11px;
}

/* 도움말 페이지 */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.help-modal {
  background: #1a1f2e;
  color: #e8eef9;
  border-radius: 12px;
  width: min(800px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border: 1px solid #2a3142;
}
.help-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #2a3142;
}
.help-header h2 { margin: 0; font-size: 16px; }
.help-search {
  flex: 1;
  background: #0f1117;
  border: 1px solid #3a4458;
  color: #e8eef9;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.help-close {
  background: transparent;
  border: none;
  color: #6b7891;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}
.help-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.help-category { margin-bottom: 20px; }
.help-category h3 {
  font-size: 13px;
  text-transform: uppercase;
  color: #5a8fff;
  margin: 0 0 8px 0;
}
.help-item {
  padding: 10px 12px;
  background: #0f1117;
  border-radius: 6px;
  margin-bottom: 6px;
}
.help-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.help-item-title {
  font-weight: 600;
  color: #e8eef9;
  font-size: 14px;
}
.help-item-desc {
  color: #c9d1e0;
  font-size: 12px;
  line-height: 1.5;
}
.help-item kbd {
  background: #2a3142;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
  border: 1px solid #3a4458;
}
.help-footer {
  padding: 10px 20px;
  border-top: 1px solid #2a3142;
  font-size: 11px;
  color: #6b7891;
}
.help-footer code {
  background: #0f1117;
  padding: 2px 6px;
  border-radius: 3px;
}
.help-empty { padding: 40px; text-align: center; color: #6b7891; }

/* ==============================================
 * v3.7 - 디테일 튜토리얼 스타일
 * ============================================== */

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 970;
  pointer-events: none;
  animation: tutorial-fade-in 0.3s ease;
}

.tutorial-overlay.fading {
  animation: tutorial-fade-out 0.3s ease forwards;
}

@keyframes tutorial-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tutorial-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* 스포트라이트 - 어두운 배경에 구멍 뚫기 효과 */
.tutorial-spotlight {
  position: absolute;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.7),
    0 0 0 3px #5a8fff,
    0 0 30px rgba(90, 143, 255, 0.5);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  animation: tutorial-pulse 2s ease-in-out infinite;
}

@keyframes tutorial-pulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.7), 0 0 0 3px #5a8fff, 0 0 30px rgba(90, 143, 255, 0.5); }
  50% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.7), 0 0 0 3px #5a8fff, 0 0 50px rgba(90, 143, 255, 0.8); }
}

/* 카드 */
.tutorial-card {
  position: fixed;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: linear-gradient(180deg, #1a1f2e 0%, #161a26 100%);
  border: 1px solid #5a8fff;
  border-radius: 14px;
  padding: 22px;
  pointer-events: auto;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(90, 143, 255, 0.2);
  color: #e8eef9;
  overflow-y: auto;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutorial-card.center {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
}

/* 진행도 바 */
.tutorial-progress-bar {
  height: 4px;
  background: #2a3142;
  border-radius: 2px;
  overflow: hidden;
  margin: -12px -12px 8px -12px;
}

.tutorial-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5a8fff 0%, #4ade80 100%);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.tutorial-progress-text {
  font-size: 11px;
  color: #6b7891;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* 제목 */
.tutorial-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #fff;
  line-height: 1.3;
}

/* 본문 */
.tutorial-body {
  font-size: 13px;
  line-height: 1.6;
  color: #c9d1e0;
  margin-bottom: 12px;
}

.tutorial-body b {
  color: #fff;
  font-weight: 600;
}

.tutorial-body kbd {
  background: #0f1117;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  border: 1px solid #3a4458;
  color: #e8eef9;
  box-shadow: 0 2px 0 #0a0c12;
}

.tutorial-body small {
  color: #6b7891;
  font-size: 11px;
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #2a3142;
}

/* 힌트 (대기 중 표시) */
.tutorial-hint {
  background: rgba(90, 143, 255, 0.12);
  border-left: 3px solid #5a8fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: #c9d1e0;
  margin-bottom: 12px;
  animation: tutorial-hint-pulse 2s ease-in-out infinite;
}

@keyframes tutorial-hint-pulse {
  0%, 100% { background: rgba(90, 143, 255, 0.12); }
  50% { background: rgba(90, 143, 255, 0.22); }
}

/* 액션 버튼 */
.tutorial-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.tutorial-skip {
  background: transparent;
  border: none;
  color: #6b7891;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  text-decoration: underline;
}

.tutorial-skip:hover {
  color: #e8eef9;
  background: #2a3142;
}

.tutorial-nav {
  display: flex;
  gap: 8px;
}

.tutorial-nav button {
  padding: 8px 16px;
  background: #2a3142;
  border: 1px solid #3a4458;
  color: #e8eef9;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.tutorial-nav button:hover {
  background: #3a4458;
  border-color: #5a8fff;
  transform: translateY(-1px);
}

.tutorial-nav button.primary {
  background: linear-gradient(135deg, #5a8fff 0%, #4a7fef 100%);
  border-color: #5a8fff;
  color: #fff;
  box-shadow: 0 2px 8px rgba(90, 143, 255, 0.4);
}

.tutorial-nav button.primary:hover {
  background: linear-gradient(135deg, #4a7fef 0%, #3a6fdf 100%);
  box-shadow: 0 4px 12px rgba(90, 143, 255, 0.6);
}

.tutorial-nav button.disabled-look {
  opacity: 0.4;
  cursor: wait;
  background: #2a3142;
  color: #6b7891;
  border-color: #2a3142;
  box-shadow: none;
}

.tutorial-nav button.disabled-look:hover {
  background: #2a3142;
  transform: none;
}

/* 모바일 */
@media (max-width: 700px) {
  .tutorial-card {
    width: calc(100vw - 24px);
    padding: 18px;
    font-size: 14px;
  }
  .tutorial-card:not(.center) {
    /* 모바일은 항상 하단 고정 */
    left: 12px !important;
    right: 12px;
    bottom: 12px !important;
    top: auto !important;
    transform: none !important;
    max-height: 60vh;
  }
  .tutorial-spotlight {
    /* 모바일에서는 펄스 약하게 */
    animation: none;
  }
  .tutorial-title { font-size: 16px; }
  .tutorial-body { font-size: 13px; }
}

/* 라이트 테마 */
[data-theme="light"] .tutorial-card {
  background: linear-gradient(180deg, #fff 0%, #f4f6fa 100%);
  color: #1a1f2e;
  border-color: #5a8fff;
}

[data-theme="light"] .tutorial-title { color: #1a1f2e; }
[data-theme="light"] .tutorial-body { color: #2a3142; }
[data-theme="light"] .tutorial-body b { color: #1a1f2e; }
[data-theme="light"] .tutorial-body small {
  color: #6b7891;
  border-top-color: #e5e7eb;
}
[data-theme="light"] .tutorial-body kbd {
  background: #f4f6fa;
  color: #1a1f2e;
  border-color: #d1d5db;
  box-shadow: 0 2px 0 #d1d5db;
}
[data-theme="light"] .tutorial-progress-bar { background: #e5e7eb; }
[data-theme="light"] .tutorial-progress-text { color: #6b7891; }
[data-theme="light"] .tutorial-nav button {
  background: #fff;
  color: #1a1f2e;
  border-color: #d1d5db;
}
[data-theme="light"] .tutorial-nav button:hover { background: #f4f6fa; }
[data-theme="light"] .tutorial-skip { color: #6b7891; }
[data-theme="light"] .tutorial-skip:hover { background: #f4f6fa; color: #1a1f2e; }

/* 환영 배너 (튜토리얼 시작 전) */
.tutorial-welcome-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #5a8fff 0%, #4ade80 100%);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(90, 143, 255, 0.4);
  z-index: 800;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  animation: tutorial-welcome-slide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

@keyframes tutorial-welcome-slide {
  from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.tutorial-welcome-banner:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 32px rgba(90, 143, 255, 0.5);
}

.tutorial-welcome-banner .close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  margin-left: 6px;
}

.tutorial-welcome-banner .close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}
