/* ============== 디자인 시스템 (인디고 / 미니멀) ============== */
:root {
  /* 메인 컬러 (인디고) */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-lighter: #e0e7ff;
  --primary-dark: #3730a3;

  /* 배경 */
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;
  --bg-muted: #f8fafc;

  /* 텍스트 */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --text-on-primary: #ffffff;

  /* 경계 */
  --border: #e5e7eb;
  --border-strong: #cbd5e1;
  --border-focus: #4f46e5;

  /* 상태 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --star: #eab308;

  /* 레이아웃 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --font: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
    'Pretendard', 'Noto Sans KR', 'Noto Sans SC', 'Segoe UI', sans-serif;

  --t-fast: 0.15s ease;
  --t: 0.2s ease;

  --header-h: 56px;
  --tabbar-h: 60px;
  --composer-h: 144px;

  /* iOS Safe Area (노치/홈 인디케이터) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* iOS Capacitor 키보드 높이 (keyboard-ios.js 가 설정, 기본 0) */
  --keyboard-h: 0px;
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-light: #1e1b4b;
    --primary-lighter: #312e81;

    --bg: #0a0e1a;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --bg-hover: #1e293b;
    --bg-active: #334155;
    --bg-muted: #1a1f2e;

    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-faint: #64748b;

    --border: #334155;
    --border-strong: #475569;
  }
}

/* ============== 글로벌 ============== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea {
  font-family: inherit;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--primary-lighter); color: var(--primary-dark); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }

/* ============== 앱 헤더 (모바일) ============== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 0.5px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* iOS 노치 / 다이나믹 아일랜드 영역만큼 background 늘려서 가려지지 않게 */
  padding-top: var(--safe-top);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
@media (prefers-color-scheme: dark) {
  .app-header { background: rgba(30, 41, 59, 0.85); }
}

.app-header-inner {
  max-width: 768px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.app-brand:hover { text-decoration: none; color: inherit; }

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.brand-text { min-width: 0; }
.brand-title { font-size: 15px; font-weight: 600; color: var(--text); }
.brand-room {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.app-header-actions { display: flex; gap: 4px; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent !important;
  color: var(--primary, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn.cta { background: transparent !important; color: var(--primary, #4f46e5); box-shadow: none; }
.icon-btn i {
  width: 24px;
  height: 24px;
  font-size: 24px;
}
.icon-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
  fill: currentColor;
}

/* ============== 데스크톱 사이드바 ============== */
.app-sidebar { display: none; }

@media (min-width: 768px) {
  .app-header { display: none !important; }
  .tabbar { display: none !important; }

  body { display: grid; grid-template-columns: 72px 240px 1fr; min-height: 100vh; }
  /* 폼 페이지는 그리드 사용 X (settings, login 등) */
  body.form-page { display: block; }
  .app-sidebar {
    display: grid;
    grid-template-columns: 72px 240px;
    grid-column: 1 / 3;
    grid-row: 1;
    background: var(--bg-card);
    border-right: 0.5px solid var(--border);
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .sidebar-rail {
    background: var(--bg-card);
    border-right: 0.5px solid var(--border);
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .brand-logo-rail {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--t-fast);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .brand-logo-rail img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    display: block;
  }
  .brand-logo-rail:hover { transform: scale(1.08); text-decoration: none; }

  .rail-btn {
    width: 56px;
    padding: 8px 6px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    transition: all var(--t-fast);
  }
  .rail-btn i { font-size: 22px; }
  .rail-btn:hover { background: var(--bg-hover); color: var(--text); }
  .rail-btn.active { background: var(--primary-light); color: var(--primary); }
  .rail-btn-bottom { margin-top: auto; }
  .rail-btn:disabled { opacity: 0.4; cursor: not-allowed; }

  .sidebar-panel {
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
  }

  .rooms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
  }
  .rooms-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .btn-new-room {
    background: var(--primary);
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background var(--t-fast);
  }
  .btn-new-room:hover { background: var(--primary-hover); }

  .rooms-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sidebar-user {
    margin-top: auto;
    padding-top: 14px;
    border-top: 0.5px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
  }
  .user-info { flex: 1; min-width: 0; }
  .user-name { font-size: 13px; font-weight: 500; color: var(--text); }
  .user-action {
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
  }
  .user-action:hover { color: var(--primary); }
}

/* 게스트일 때 강조: primary 버튼처럼 (전역 적용) */
.user-action.cta {
  display: inline-block !important;
  margin-top: 4px;
  padding: 6px 14px;
  background: var(--primary) !important;
  color: white !important;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background var(--t-fast);
}
.user-action.cta:hover {
  background: var(--primary-hover) !important;
  color: white !important;
  text-decoration: none;
}

/* 로그인 후 사이드바/드로어 하단 "로그아웃" 액션 */
.user-action.logout,
.drawer-user .user-action.logout {
  display: inline-block;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  border: 0.5px solid var(--border);
  margin-top: 4px;
}
.user-action.logout:hover,
.drawer-user .user-action.logout:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.25);
  text-decoration: none;
}

/* 모바일 헤더 사용자 아이콘 게스트 강조 — 통일성 위해 배경 제거됨 (아이콘 색만 강조에 사용 시 별도 룰) */
.icon-btn.cta:active { transform: scale(0.95); }

/* 채팅방 아이템 (사이드바 + 드로어 공통) */
.room-item {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--t-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.room-item:hover { background: var(--bg-hover); }
.room-item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
}
.room-item .room-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-item .room-actions {
  display: none;
  gap: 2px;
}
.room-item:hover .room-actions,
.room-item.active .room-actions { display: inline-flex; }
.room-actions button {
  width: 24px; height: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.room-actions button:hover { background: var(--bg-active); color: var(--text); }

/* ============== 메인 채팅 페이지 ============== */
.chat-page {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h) - var(--tabbar-h) - var(--safe-top) - var(--safe-bottom));
  min-height: calc(100dvh - var(--header-h) - var(--tabbar-h) - var(--safe-top) - var(--safe-bottom));
  padding-bottom: calc(var(--composer-h) + var(--tabbar-h) + var(--safe-bottom) + 20px);
}
/* 키보드 열렸을 땐 tabbar 가 숨어있으니 그만큼 padding 줄임.
   --keyboard-h 는 iOS Capacitor 가 보고하는 키보드 프레임(safe-bottom 포함)이므로
   여기에 --safe-bottom 을 다시 더하면 안 됨 (이중 카운트). */
body.keyboard-open .chat-page {
  padding-bottom: calc(var(--composer-h) + var(--keyboard-h) + 20px);
}
/* iOS Capacitor: keyboardWillShow 시 composer 를 키보드 위로 끌어올림.
   tabbar 는 가려도 무방 (chat.js 의 visualViewport 핸들러가 PC/웹에서 처리).
   --keyboard-h 는 이미 home-indicator 영역을 포함하므로 --safe-bottom 추가 금지. */
body.keyboard-open .composer {
  bottom: var(--keyboard-h);
}
body.keyboard-open .tabbar { display: none; }
@media (min-width: 768px) {
  .chat-page {
    max-width: none;
    margin: 0;
    min-height: 100vh;
    grid-column: 3;
    grid-row: 1;
    padding-bottom: 0;
    height: 100vh;
    overflow: hidden;
  }
  /* 채팅 리스트는 flex로 늘어남, 내부만 768px 가운데 */
  .chat-list {
    flex: 1;
    overflow-y: auto;
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
  }
  .usage-row,
  .composer-inner {
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
  }
}

/* 사용량 */
.usage-row {
  padding: 12px 16px 0;
  display: flex;
  justify-content: flex-end;
}
.usage-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* 채팅 리스트 */
.chat-list {
  flex: 1;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  margin: auto;
}
.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 22px;
  object-fit: contain;
  display: block;
}
.empty-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.empty-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.example-chip {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  cursor: pointer;
}
.example-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
/* 인트로 CTA (게스트 가입 유도) */
.empty-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}
.empty-cta-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.empty-cta-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  text-decoration: none;
  color: white;
}
.empty-cta-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
  text-align: center;
}

/* 메시지 */
.msg {
  display: flex;
  max-width: 100%;
  animation: fadein .25s ease;
}
.msg.user { justify-content: flex-end; }
.msg.assistant { justify-content: flex-start; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bubble-user {
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  max-width: 75%;
  font-size: 14.5px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.bubble-assistant {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  padding: 12px 14px;
  border-radius: 18px 18px 18px 4px;
  max-width: 85%;
  box-shadow: var(--shadow-sm);
}
.bubble-text, .bubble-assistant .translation {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}
.bubble-pinyin, .bubble-assistant .pinyin {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  word-break: break-word;
}
.bubble-note, .bubble-assistant .note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 0.5px dashed var(--border);
  font-style: italic;
}

.bubble-actions, .bubble-assistant .actions {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0.5px solid var(--bg-hover);
}
.bubble-actions button, .bubble-assistant .actions button, .action-btn {
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  background: transparent;
  border: none;
}
.bubble-actions button:hover,
.bubble-assistant .actions button:hover,
.action-btn:hover { color: var(--text); background: var(--bg-hover); }
.bubble-actions button.active,
.bubble-assistant .actions button.active,
.action-btn.active { color: var(--star); }
.bubble-actions button[disabled],
.action-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.bubble-actions button i,
.bubble-assistant .actions button i { font-size: 16px; }

/* Alternatives */
.alts {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 0.5px dashed var(--border);
}
.alt {
  background: var(--bg-input);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.alt:hover { background: var(--primary-light); color: var(--primary); }

/* Typing indicator */
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 18px 18px 18px 4px;
  align-items: center;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: typingDot 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ============== Composer (입력 영역) ============== */
.composer {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 0.5px solid var(--border);
  padding: 10px calc(16px + var(--safe-right)) 12px calc(16px + var(--safe-left));
  z-index: 40;
}
@media (min-width: 768px) {
  .composer {
    position: relative;
    bottom: 0;
    border-top: 0.5px solid var(--border);
    padding: 14px 22px;
  }
}

.composer-inner {
  max-width: 768px;
  margin: 0 auto;
}

.composer-input-wrap {
  background: var(--bg-input);
  border: 0.5px solid var(--border);
  border-radius: 22px;
  padding: 8px 8px 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color var(--t-fast);
  margin-bottom: 8px;
}
.composer-input-wrap:focus-within {
  border-color: var(--primary);
  background: var(--bg-card);
}

.composer textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  max-height: 96px;
  padding: 4px 0;
}
.composer textarea::placeholder { color: var(--text-faint); }
.composer textarea.recognizing {
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.05), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.composer-meta {
  display: flex;
  align-items: center;
}
.char-count {
  font-size: 11px;
  color: var(--text-faint);
}
.char-count.warning, .char-count.warn { color: var(--warning); }
.char-count.danger { color: var(--danger); }

.btn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.btn-send i { font-size: 18px; }
.btn-send:hover:not(:disabled) { background: var(--primary-hover); }
.btn-send:active:not(:disabled) { transform: scale(0.92); }
.btn-send:disabled {
  background: var(--bg-active);
  color: var(--text-faint);
  cursor: not-allowed;
}

/* 도구 버튼 (사진/음성) */
.composer-tools {
  display: flex;
  gap: 8px;
}
.tool-btn {
  flex: 1;
  background: var(--bg-input);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}
.tool-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.tool-btn:active { transform: scale(0.97); }
.tool-btn i {
  font-size: 18px;
  color: var(--primary);
}
.tool-btn.listening {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  animation: micPulse 1.2s ease infinite;
}
.tool-btn.listening i { color: white; }
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}
.tool-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.lang-pill {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 2px;
}
.tool-btn.listening .lang-pill {
  background: rgba(255,255,255,0.25);
  color: white;
}

/* ============== 모바일 하단 탭바 ============== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  background: var(--bg-card);
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  z-index: 50;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 500;
  transition: color var(--t-fast);
  padding: 6px 0;
  background: transparent;
  border: none;
  text-decoration: none;
}
.tab-item i { font-size: 22px; }
.tab-item.active { color: var(--primary); }
.tab-item:disabled { opacity: 0.4; }
.tab-item:hover:not(:disabled):not(.active) { color: var(--text-secondary); text-decoration: none; }

/* ============== 드로어 (모바일 채팅방 메뉴) ============== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.drawer.open { display: block; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  animation: fadeIn 0.2s ease;
}
.drawer-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  max-width: 80%;
  background: var(--bg-card);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideRight 0.25s ease;
  overflow-y: auto;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.drawer-header h2 { font-size: 16px; font-weight: 600; }
.drawer-user {
  margin-top: auto;
  padding-top: 14px;
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-user .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-lighter);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.drawer-user .user-info { flex: 1; min-width: 0; }
.drawer-user .user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.drawer-user .user-action {
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}
.drawer-user .user-action:hover { color: var(--primary); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@media (min-width: 768px) {
  .drawer { display: none !important; }
}

/* ============== 폼 페이지 (login, signup, settings, reset-password) ============== */
.form-page {
  min-height: 100vh;
  padding: calc(32px + var(--safe-top)) calc(16px + var(--safe-right)) calc(48px + var(--safe-bottom)) calc(16px + var(--safe-left));
  background: var(--bg);
}

.form-card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow);
}

.form-card .brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 16px;
}

.form-card h1 {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.form-card .subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: var(--bg-input);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  transition: all var(--t-fast);
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group .hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--t-fast);
  margin-top: 4px;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--bg-active);
  color: var(--text-faint);
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  transition: background var(--t-fast);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text); }

.btn-danger,
.btn-secondary-box {
  width: 100%;
  background: transparent;
  border: 0.5px solid var(--border);
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-top: 14px;
  transition: all var(--t-fast);
  cursor: pointer;
}
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.08); }

.btn-secondary-box { color: var(--text-secondary); }
.btn-secondary-box:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary-box:active { transform: scale(0.99); }

.form-foot {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.msg-box {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 14px;
  border: 0.5px solid;
}
.msg-box.error {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}
.msg-box.success {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}
.msg-box.info {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-lighter);
}
.msg-box.hidden { display: none; }

/* ============== 단어장 페이지 ============== */
.saved-page {
  max-width: 768px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: calc(var(--tabbar-h) + 32px);
  min-height: 100vh;
  background: var(--bg);
}
@media (min-width: 768px) {
  .saved-page {
    max-width: none;
    grid-column: 3;
    padding: 24px 32px;
  }
  .saved-page > * { max-width: 820px; margin-left: auto; margin-right: auto; }
}

.saved-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.saved-header h1 { font-size: 18px; font-weight: 600; }

.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar input {
  width: 100%;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px 10px 38px;
  font-size: 14px;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.search-bar .icon-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.saved-card, .saved-item {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast);
}
.saved-card:hover, .saved-item:hover { box-shadow: var(--shadow); }

.saved-source, .saved-item .src {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.saved-translation, .saved-item .tgt {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.saved-pinyin, .saved-item .py {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}
.saved-actions, .saved-item .row-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0.5px solid var(--bg-hover);
}
.saved-actions button, .saved-item .row-actions .action-btn {
  color: var(--text-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--t-fast);
  background: transparent;
  border: none;
}
.saved-actions button:hover, .saved-item .row-actions .action-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.saved-actions button i, .saved-item .row-actions .action-btn i { font-size: 14px; }
.saved-item .note-input {
  margin-top: 8px;
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-input);
  color: var(--text);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.saved-item .note-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ============== 사진 라벨 박스 (사진 대신 표시) ============== */
.bubble-photo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 0.5px solid var(--primary-lighter);
  padding: 8px 14px;
  border-radius: 18px 18px 4px 18px;
  font-size: 14px;
  font-weight: 500;
  max-width: 75%;
  line-height: 1.4;
}
.bubble-photo-label i.icon-camera {
  font-size: 16px;
  color: var(--primary);
  flex-shrink: 0;
}
@media (prefers-color-scheme: dark) {
  .bubble-photo-label {
    background: var(--primary-light);
    color: var(--primary-lighter);
    border-color: var(--primary-light);
  }
}

/* ============== OCR 메시지 ============== */
.bubble-image {
  padding: 6px !important;
  background: var(--bg-input) !important;
  border: 0.5px solid var(--border) !important;
  color: var(--text) !important;
  position: relative;
  max-width: 280px !important;
}
.bubble-image img {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.image-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.7);
  color: white;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
}

.bubble-ocr { max-width: 90%; }
.ocr-summary {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: 500;
}
.ocr-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ocr-item {
  padding: 8px 10px;
  background: var(--bg-input);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}
.ocr-original {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
  word-break: break-word;
}
.ocr-translated {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}
.ocr-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ============== 토스트 ============== */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--composer-h) + 20px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

.scroll-top {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--composer-h) + 20px);
  right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 15;
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
}
.scroll-top.show { display: inline-flex; }

/* ============== 게스트 안내 배너 (드로어/사이드바 내부) ============== */
.guest-banner {
  background: var(--bg-input);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.guest-banner a {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 12px;
}

/* ============== SVG 아이콘 (mask 방식) ============== */
[class^="icon-"], [class*=" icon-"] {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon-chats { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/></svg>"); }
.icon-star { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"); }
.icon-star-filled { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>"); }
.icon-school { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 10v6M2 10l10-5 10 5-10 5z'/><path d='M6 12v5c3 3 9 3 12 0v-5'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 10v6M2 10l10-5 10 5-10 5z'/><path d='M6 12v5c3 3 9 3 12 0v-5'/></svg>"); }
.icon-settings { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3'/><path d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3'/><path d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/></svg>"); }
.icon-user { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>"); }
.icon-plus { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='5' x2='12' y2='19'/><line x1='5' y1='12' x2='19' y2='12'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='5' x2='12' y2='19'/><line x1='5' y1='12' x2='19' y2='12'/></svg>"); }
.icon-x { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>"); }
.icon-camera { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/><circle cx='12' cy='13' r='4'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/><circle cx='12' cy='13' r='4'/></svg>"); }
.icon-mic { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/><path d='M19 10v2a7 7 0 0 1-14 0v-2'/><line x1='12' y1='19' x2='12' y2='23'/><line x1='8' y1='23' x2='16' y2='23'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/><path d='M19 10v2a7 7 0 0 1-14 0v-2'/><line x1='12' y1='19' x2='12' y2='23'/><line x1='8' y1='23' x2='16' y2='23'/></svg>"); }
.icon-arrow-up { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='19' x2='12' y2='5'/><polyline points='5 12 12 5 19 12'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='19' x2='12' y2='5'/><polyline points='5 12 12 5 19 12'/></svg>"); }
.icon-copy { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2' ry='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2' ry='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>"); }
.icon-refresh { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 4 1 10 7 10'/><polyline points='23 20 23 14 17 14'/><path d='M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 4 1 10 7 10'/><polyline points='23 20 23 14 17 14'/><path d='M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15'/></svg>"); }
.icon-volume { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/><path d='M15.54 8.46a5 5 0 0 1 0 7.07'/><path d='M19.07 4.93a10 10 0 0 1 0 14.14'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/><path d='M15.54 8.46a5 5 0 0 1 0 7.07'/><path d='M19.07 4.93a10 10 0 0 1 0 14.14'/></svg>"); }
.icon-trash { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 6 5 6 21 6'/><path d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 6 5 6 21 6'/><path d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/></svg>"); }
.icon-edit { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/><path d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/><path d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/></svg>"); }
.icon-search { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>"); }
.icon-arrow-left { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='19' y1='12' x2='5' y2='12'/><polyline points='12 19 5 12 12 5'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='19' y1='12' x2='5' y2='12'/><polyline points='12 19 5 12 12 5'/></svg>"); }
.icon-thumbs-down { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17'/></svg>"); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17'/></svg>"); }
