@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

/* ==========================================================================
   빠르게 붙여넣기 (빠붙) - 프리미엄 모던 UI 스타일시트
   (Modern Glassmorphism, Smooth Micro-interactions & Responsive Layout)
   ========================================================================== */

:root {
  --primary: #246bfe;
  --primary-hover: #1a56db;
  --primary-light: #eef4ff;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #246bfe 100%);
  --accent: #20e0b2;
  --accent-hover: #17c49b;
  --accent-light: #e6faf5;
  --accent-gradient: linear-gradient(135deg, #34d399 0%, #20e0b2 100%);
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.88);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -3px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 20px rgba(36, 107, 254, 0.25);
  
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* 📐 8pt / 4pt Spacing Scale Tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
}

/* 🎨 2D Doodle Icon & 3D Character Utilities */
.doodle-icon {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.btn:hover .doodle-icon,
.tab-btn:hover .doodle-icon,
.quick-tool-btn:hover .doodle-icon {
  transform: scale(1.12);
}

.char-float {
  animation: charFloatAnim 3.5s ease-in-out infinite alternate;
}

@keyframes charFloatAnim {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.char-bounce {
  animation: charBounceAnim 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes charBounceAnim {
  0% { transform: scale(0.8) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ==========================================================================
   Header (모던 글래스모피즘 헤더)
   ========================================================================== */
.app-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all var(--transition-normal);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.5px;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-fast);
}

.logo:hover .logo-img {
  transform: scale(1.04);
}

.logo-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-header-guide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  background: #f8fafc;
  color: var(--primary);
  border: 1.5px solid #c7d2fe;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-header-guide:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(241, 245, 249, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: all var(--transition-normal);
}

.status-badge.connected {
  background: rgba(236, 253, 245, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #065f46;
  border-color: rgba(167, 243, 208, 0.9);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-badge.connected .status-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-glow 2s infinite;
}

/* 헤더 우측 액션 영역 & ⚙️ 설정 드롭다운 팝오버 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.btn-header-settings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-header-settings:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12), inset 0 1px 1px #ffffff;
  transform: translateY(-2px);
}

.btn-header-settings:active {
  transform: scale(0.96) translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.settings-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12), inset 0 1px 1px #ffffff;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: slide-down 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-popover.show {
  display: flex;
}

.popover-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ❓ 물음표 도움말 뱃지 & 툴팁 */
.info-help-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
  transition: all var(--transition-fast);
}

.info-help-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.info-help-btn .tooltip-text {
  visibility: hidden;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  text-align: left;
  word-break: keep-all;
}

.info-help-btn:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   글래스모피즘 클립보드 안내 배너
   ========================================================================== */
.clipboard-perm-banner {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 12px 20px;
  background: rgba(238, 242, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(199, 210, 254, 0.8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.clipboard-banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #312e81;
}

.clipboard-banner-pill {
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  font-weight: 700;
  color: var(--primary);
}

/* ==========================================================================
   PC View Layout (2-Column 모던 레이아웃)
   ========================================================================== */
.pc-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px 48px;
  display: grid;
  grid-template-columns: clamp(280px, 28vw, 340px) 1fr;
  gap: clamp(16px, 2vw, 24px);
}

@media (max-width: 992px) {
  .pc-container {
    grid-template-columns: 1fr;
    padding: 16px 14px 40px;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .pc-container {
    padding: 12px 10px 32px;
    gap: 12px;
  }
}

.sidebar-card, .main-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 2.5vw, 24px);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  min-width: 0; /* flex/grid overflow 방어 */
}

.sidebar-card:hover, .main-card:hover {
  box-shadow: var(--shadow-lg);
}

/* QR 영역 */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-wrapper {
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid #e0e7ff;
  margin: 16px 0 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 210px;
  min-height: 210px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.06);
  position: relative;
}

.room-code-badge {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: all;
}

.room-code-badge:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.room-code-badge:active {
  transform: scale(0.96);
}

#btn-copy-link.copied {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
  color: #059669 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

/* 초고속 Wi-Fi LAN 가속 뱃지 */
.lan-boost-card {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: #14532d;
  line-height: 1.45;
  text-align: left;
}

.lan-boost-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #166534;
  margin-bottom: 3px;
  font-size: 0.85rem;
}

.instruction-list {
  width: 100%;
  text-align: left;
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.instruction-list li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* 보안 & 신뢰도 미니 카드 */
.security-card {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.security-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  font-size: 0.86rem;
}

.security-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-muted);
  line-height: 1.4;
}

.security-item strong {
  color: var(--text-main);
}

/* ==========================================================================
   PC 메인 프리뷰 작업대 (Main Workspace)
   ========================================================================== */
.latest-image-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 20px;
  text-align: center;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  background: #f8fafc;
  transition: all var(--transition-normal);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  opacity: 0.8;
  animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.image-preview-container {
  position: relative;
  background: #090d16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  max-height: 540px;
  box-shadow: var(--shadow-lg);
  border: 2px solid #1e293b;
  transition: all 0.3s ease;
}

/* 🌈 무지개 LED 마법 편집 모드 애니메이션 */
.image-preview-container.editing-mode {
  animation: rainbow-led 2.5s linear infinite;
}

/* 📱 크롭 모드 시 안전 여백(Safe Padding) 축소 애니메이션 (상하단 메뉴바 완벽 회피) */
.image-preview-container .main-preview-img {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}

.image-preview-container.crop-editing-mode .main-preview-img {
  transform: scale(0.68);
}

@keyframes rainbow-led {
  0% { border-color: #6366f1; box-shadow: 0 0 25px rgba(99, 102, 241, 0.6); }
  33% { border-color: #ec4899; box-shadow: 0 0 25px rgba(236, 72, 153, 0.6); }
  66% { border-color: #10b981; box-shadow: 0 0 25px rgba(16, 185, 129, 0.6); }
  100% { border-color: #6366f1; box-shadow: 0 0 25px rgba(99, 102, 241, 0.6); }
}

/* 🪄 라이브 클립보드 뷰어 온디맨드 플로팅 퀵 메뉴바 (퓨어 화이트 리퀴드 글래스모피즘 & 호버 슬라이드업 아일랜드) */
.floating-quick-toolbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(226, 232, 240, 0.85), 0 4px 14px rgba(99, 102, 241, 0.08);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease, box-shadow 0.2s ease;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.floating-quick-toolbar::-webkit-scrollbar {
  display: none;
}

/* 뷰어 영역 호버 시 쫀득하게 솟아오르는 슬라이드업 */
.image-preview-container:hover .floating-quick-toolbar,
.floating-quick-toolbar:hover,
.floating-quick-toolbar.always-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* 뷰어 호버 시 하단 가이드 툴팁은 부드럽게 페이드아웃 */
.image-preview-container:hover .drag-tooltip {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  pointer-events: none;
}

/* 🎨 편집 모드(모자이크, 크롭, 올가미) 시 캔버스 작업을 방해하지 않도록 완전 숨김 */
.image-preview-container.editing-mode .floating-quick-toolbar,
.image-preview-container.crop-editing-mode .floating-quick-toolbar {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(16px) !important;
}

/* ==========================================================================
   📱 iOS 사진 에디터 스타일 마법 편집 레이아웃 (Dark Minimalist)
   ========================================================================== */

/* 1. 상단 액션 헤더 (취소 / 되돌리기 / 모드명 / 완료) */
.ios-edit-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  animation: slide-down 0.25s ease-out;
}

.ios-edit-header.show {
  display: flex;
}

.ios-btn-pill {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.ios-btn-cancel {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.ios-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ios-btn-undo {
  background: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  margin-left: 8px;
  transition: all var(--transition-fast);
}

.ios-btn-undo:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.ios-btn-undo:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ios-edit-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.ios-btn-done {
  background: #f59e0b; /* iOS 에디터 스타일 골드 옐로우 */
  color: #000000;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.ios-btn-done:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

/* 2. 하단 옵션 서브 바 (모자이크 강도 / 크롭 비율 등) */
.ios-edit-subbar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 30;
  animation: slide-up 0.25s ease-out;
}

.ios-edit-subbar.show {
  display: flex;
}

.subbar-segmented {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px;
  border-radius: var(--radius-full);
  gap: 3px;
}

.subbar-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.subbar-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 오버레이 캔버스 */
.editor-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  display: none;
  cursor: crosshair;
}

.quick-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: #334155;
  border: none;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.quick-tool-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.quick-tool-btn:active {
  transform: scale(0.95);
}

/* 1클릭 복사 강조 버튼 (산뜻한 그라디언트 & 쫀득한 햅틱) */
.quick-tool-btn.quick-tool-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  padding: 6px 14px;
}

.quick-tool-btn.quick-tool-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.quick-tool-btn.quick-tool-btn-primary:active {
  transform: scale(0.95);
}

.quick-tool-btn.active {
  background: #e0e7ff;
  border: 1px solid #6366f1;
  color: #4338ca;
}

.tool-divider {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 3px;
}

/* 🎛️ 사이드바 미니 토글 스위치 */
.settings-toggle-card {
  margin-top: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 600;
}

.switch-label {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 22px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .switch-slider {
  background-color: var(--primary);
}

input:checked + .switch-slider:before {
  transform: translateX(16px);
}

/* 썸네일 다중 선택 체크박스 */
.history-check-box {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all var(--transition-fast);
}

.history-item:hover .history-check-box,
.history-check-box.checked {
  display: flex;
}

.history-check-box.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.history-check-box.checked::after {
  content: "✓";
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.main-preview-img {
  max-width: 100%;
  max-height: 540px;
  object-fit: contain;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.main-preview-img:hover {
  transform: scale(1.01);
}

.drag-tooltip {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #334155;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.8);
  pointer-events: none;
  animation: bounce-subtle 2.4s ease-in-out infinite;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 액션 버튼 바 */
.action-bar {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: scale(0.97) translateY(0);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-md);
}

.btn-outline:active {
  transform: scale(0.97) translateY(0);
}

/* 수신 히스토리 섹션 */
.history-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.history-item {
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #f1f5f9;
  position: relative;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.history-item:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 20px rgba(36, 107, 254, 0.16);
  border-color: rgba(99, 102, 241, 0.45);
}

.history-item:active {
  transform: scale(0.96) translateY(0);
}

.history-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25), 0 4px 12px rgba(79, 70, 229, 0.2);
}

.history-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Mobile View (아이폰/갤럭시 네이티브 감성 모바일 UI)
   ========================================================================== */
.mobile-body {
  background-color: #f1f5f9;
  display: flex;
  justify-content: center;
}

.mobile-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
  position: relative;
  padding-bottom: 100px;
}

.mobile-tabs-wrapper {
  padding: 12px 16px;
  background: #ffffff;
}

.mobile-segment-control {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
  padding: 12px 16px;
  flex: 1;
}

.tab-content.active {
  display: block;
}

/* 사진 불러오기 카드 */
.gallery-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border: 2px dashed #c7d2fe;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 16px;
}

.gallery-action-card:active {
  transform: scale(0.98);
  background: #e0e7ff;
}

/* 바둑판 그리드 (3열 인스타그램 스타일) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.gallery-tile {
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.gallery-tile:active {
  transform: scale(0.95);
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 전송 중 / 완료 상태 뱃지 */
.gallery-tile.sending::after {
  content: "🚀 전송 중";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-tile.sent::after {
  content: "✓ 전송됨";
  position: absolute;
  inset: 0;
  background: rgba(5, 150, 105, 0.7);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 하단 플로팅 일괄 전송 바 */
.floating-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

/* ==========================================================================
   📸 카메라 뷰파인더 & 글래스모피즘 셔터 UI (Pro Glass Shutter)
   ========================================================================== */
.camera-viewfinder-card {
  position: relative;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  padding: 40px 24px 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(15, 23, 42, 0.02);
  overflow: hidden;
}

/* 뷰파인더 4모서리 포커스 브래킷 */
.vf-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  border-style: solid;
  pointer-events: none;
  opacity: 0.85;
}
.vf-corner-tl { top: 16px; left: 16px; border-width: 2.5px 0 0 2.5px; border-top-left-radius: 6px; }
.vf-corner-tr { top: 16px; right: 16px; border-width: 2.5px 2.5px 0 0; border-top-right-radius: 6px; }
.vf-corner-bl { bottom: 16px; left: 16px; border-width: 0 0 2.5px 2.5px; border-bottom-left-radius: 6px; }
.vf-corner-br { bottom: 16px; right: 16px; border-width: 0 2.5px 2.5px 0; border-bottom-right-radius: 6px; }

/* 🌟 미니멀 모던 셔터 렌즈 버튼 (Apple/Leica Minimalist Shutter) */
.shutter-lens-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
}

/* 외곽 정적 링 */
.shutter-outer-frame {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 3px solid rgba(36, 107, 254, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: rgba(238, 244, 255, 0.5);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.shutter-outer-frame:hover {
  border-color: var(--primary);
}

/* 메인 셔터 버튼 코어 */
.camera-shutter-trigger {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 8px 20px -2px rgba(36, 107, 254, 0.35);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.camera-shutter-trigger:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 24px -2px rgba(36, 107, 254, 0.45);
}

.camera-shutter-trigger:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(36, 107, 254, 0.3);
}

.shutter-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.camera-shutter-trigger:hover .shutter-icon-wrap {
  transform: scale(1.1);
}

.shutter-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 카메라 정보 뱃지 및 설명 */
.camera-info-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.camera-feature-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.camera-chip {
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* ==========================================================================
   🤖 인앱 플로팅 챗봇 가이드 위젯 (Floating Chatbot Widget)
   ========================================================================== */
.floating-chatbot-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px 6px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.35), 0 4px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.floating-chatbot-trigger:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 30px -5px rgba(99, 102, 241, 0.45), 0 6px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.floating-chatbot-trigger:active {
  transform: scale(0.96);
}

.chatbot-trigger-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2ff;
  border: 2px solid var(--primary);
  object-fit: contain;
  padding: 2px;
  animation: avatar-breathe 2.4s ease-in-out infinite;
}

@keyframes avatar-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.4)); }
}

.chatbot-trigger-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.chatbot-trigger-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatbot-trigger-sub {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
}

/* 💡 메인 뷰어 2x2 퀵 가이드 그리드 카드 */
.main-guide-box {
  background: rgba(99, 102, 241, 0.04);
  border: 1.5px solid rgba(99, 102, 241, 0.16);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.main-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.main-guide-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.main-guide-card-btn {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-align: left;
}

.main-guide-card-btn:hover {
  border-color: var(--primary);
  background: #f8faff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -3px rgba(99, 102, 241, 0.18);
}

.main-guide-card-btn:active {
  transform: scale(0.98);
}

.main-guide-card-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.main-guide-card-text {
  display: flex;
  flex-direction: column;
}

.main-guide-card-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
}

.main-guide-card-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

/* 챗봇 모달 오버레이 (최상단 모달 레이어) */
.inapp-chatbot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.inapp-chatbot-overlay.show {
  display: flex;
  opacity: 1;
}

/* 챗봇 카드 (PC: 우하단 팝업 / 모바일: 바텀시트) */
.inapp-chatbot-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10001;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.inapp-chatbot-overlay.show .inapp-chatbot-card {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* 챗봇 열렸을 때 하단 플로팅 버튼 가림 방지 */
body.chatbot-open .btn-floating-quick-dock,
body.chatbot-open #btn-scroll-top-dock {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 모바일 전용 바텀시트 스타일 */
@media (max-width: 640px) {
  .floating-chatbot-trigger {
    bottom: 84px; /* 하단 전송바와 겹치지 않게 위로 배치 */
    right: 16px;
    padding: 4px 10px 4px 6px;
  }
  .chatbot-trigger-avatar {
    width: 32px;
    height: 32px;
  }
  .chatbot-trigger-title {
    font-size: 0.8rem;
  }
  .chatbot-trigger-sub {
    display: none;
  }

  .inapp-chatbot-card {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 84vh;
    max-height: 84vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }

  .inapp-chatbot-overlay.show .inapp-chatbot-card {
    transform: translateY(0);
  }
}

/* 챗봇 헤더 */
.inapp-chatbot-header {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inapp-chatbot-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inapp-chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2ff;
  border: 2px solid var(--primary);
  padding: 2px;
  object-fit: contain;
}

.inapp-chatbot-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.inapp-chatbot-badge {
  font-size: 0.72rem;
  color: #10b981;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inapp-chatbot-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.inapp-chatbot-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.inapp-chatbot-close:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* 챗봇 대화 바디 */
.inapp-chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  scroll-behavior: smooth;
}

/* 말풍선 공통 */
.chatbot-bubble-bot {
  max-width: 86%;
  background: #ffffff;
  padding: 12px 15px;
  border-radius: 4px 18px 18px 18px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  word-break: keep-all;
}

.chatbot-bubble-user {
  align-self: flex-end;
  max-width: 80%;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 18px 4px 18px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  word-break: keep-all;
}

/* 챗봇 퀵 칩 푸터 */
.inapp-chatbot-footer {
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inapp-chatbot-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px 2px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.inapp-chatbot-chips::-webkit-scrollbar {
  height: 4px;
}

.inapp-chatbot-chips::-webkit-scrollbar-track {
  background: transparent;
}

.inapp-chatbot-chips::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.inapp-chatbot-chips::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.inapp-chip-btn {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.inapp-chip-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
}

.inapp-chip-btn:active {
  transform: scale(0.96);
}

.inapp-chip-btn.highlight {
  background: #eef2ff;
  border-color: #818cf8;
  color: var(--primary);
}

/* 🎯 접근성: 키보드 사용자를 위한 모던 포커스 링 */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible,
.tab-btn:focus-visible,
.quick-tool-btn:focus-visible,
.inapp-chip-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.35) !important;
}

/* 🔢 1-2-3단계 순서 뱃지 */
.step-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ⌨️ 단축키 안내 모달 스타일 */
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}

.shortcut-row:last-child {
  border-bottom: none;
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shortcut-key-badge {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-bottom: 2.5px solid #94a3b8;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", monospace;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.shortcut-key-badge:hover {
  transform: translateY(-1.5px);
  border-bottom-width: 3px;
  border-color: #64748b;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.shortcut-key-badge:active {
  transform: translateY(1.5px);
  border-bottom-width: 1px;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}

/* ❓ 도움말 터치 타겟 확장 */
.info-help-btn {
  position: relative;
}
.info-help-btn::after {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
}

/* ==========================================================================
   토스트 알림 (Toast UI - 완벽한 1줄 중앙 정렬 캡슐)
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  width: max-content;
  max-width: 92vw;
  line-height: 1.2;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
}

.toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   PRO 배지 & OCR / PRO 모달 스타일
   ========================================================================== */
.pro-crown-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 9999px;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.25);
  letter-spacing: 0.5px;
}

.ocr-modal-overlay.show,
.pro-modal-overlay.show {
  display: flex !important;
}

.ocr-modal-card,
.pro-modal-card {
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   📌 PiP 버튼 활성화 & 📱 미니 독(Mini Dock) 550px 이하 반응형 최적화
   ========================================================================== */
.btn-header-settings.active,
.quick-tool-btn.active {
  background: #e0e7ff !important;
  border-color: #6366f1 !important;
  color: #4338ca !important;
}

@media (max-width: 550px) {
  /* 상단 거대 배너 및 사이드바 설명들을 컴팩트하게 접어 사진 작업 영역을 최상단으로 끌어올림 */
  .clipboard-perm-banner {
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.75rem;
  }
  .clipboard-perm-banner button {
    display: none; /* 공간 절약 */
  }
  .pc-guide-card,
  .security-notice-card {
    display: none; /* 분할 창 작업 시 사진에 집중하도록 설명 카드 숨김 */
  }
  .image-preview-container {
    min-height: 280px;
    max-height: 380px;
  }
  .floating-quick-toolbar {
    bottom: 12px;
    padding: 4px 8px;
    gap: 3px;
    max-width: 96%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .floating-quick-toolbar::-webkit-scrollbar {
    display: none;
  }
  .quick-tool-btn {
    padding: 5px 8px;
    font-size: 0.72rem;
    gap: 4px;
  }
  .tool-divider {
    height: 14px;
    margin: 0 2px;
  }
}

/* 📜 법적 약관 및 안내 모달 오버레이 활성화 */
.legal-modal-overlay.show,
.confirm-modal-overlay.show,
.pro-modal-overlay.show {
  display: flex !important;
}

/* 📜 법적 고지 3대 탭 스타일 */
.legal-tab-btn {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.legal-tab-btn:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.legal-tab-btn.active {
  color: #246BFE;
  background: #ffffff;
  border-color: #e2e8f0;
  border-bottom: 2px solid #ffffff;
  margin-bottom: -1px;
}

.legal-tab-pane {
  display: none;
  animation: fadeInPane 0.2s ease-in-out;
}

.legal-tab-pane.active {
  display: block;
}

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

/* ==========================================================================
   빠붙 모바일 차세대 UI: 상단 퀵 전송 독 & 하단 스크롤형 온보딩 히어로
   (White Glassmorphism & Spatial Haptic Micro-interactions)
   - AI 다크/네온 블루 완전 배제 및 순수 화이트 테마 계승
   - iOS/macOS 정갈한 글래스모피즘 및 햅틱 스프링 토큰 적용
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 상단 퀵 전송 독 (Top Quick Action Dock)
   -------------------------------------------------------------------------- */
.top-quick-dock {
  padding: 8px 16px 14px 16px;
  background: #ffffff;
  position: relative;
  z-index: 20;
}

.dock-glass-capsule {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  padding: 14px 16px;
  transition: all 0.25s ease;
}

.dock-state-view {
  display: none;
}

.dock-state-view.active {
  display: block;
}

/* 상단 상태 헤더 행 */
.dock-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dock-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.pulse-dot.status-waiting {
  background-color: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  animation: pulseWaiting 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.pulse-dot.status-connected {
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulseConnected 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulseWaiting {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

@keyframes pulseConnected {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.dock-status-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.01em;
}

.dock-help-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.dock-help-tooltip:hover {
  color: #1e293b;
  background: #f1f5f9;
}

/* 6자리 핀코드 퀵 입력 폼 */
.dock-pin-form {
  margin: 0 0 10px 0;
}

.dock-input-wrapper {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px 6px 4px 12px;
  transition: all 0.2s ease;
}

.dock-input-wrapper:focus-within {
  border-color: #246bfe;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.12);
}

.dock-pin-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  outline: none;
  font-family: inherit;
}

.dock-pin-input::placeholder {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: #94a3b8;
}

.btn-dock-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, #3b82f6 0%, #246bfe 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(36, 107, 254, 0.25);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
}

.btn-dock-join:hover {
  box-shadow: 0 4px 12px rgba(36, 107, 254, 0.35);
}

.btn-dock-join:active {
  transform: scale(0.96);
}

/* OR 구분선 */
.dock-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.dock-divider-line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.dock-divider-text {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
}

/* Google 내 PC 바로 연결 버튼 */
.btn-dock-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  min-height: 44px; /* Apple HIG 권장 최소 터치 타겟 */
}

.btn-dock-google:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.btn-dock-google:active {
  transform: scale(0.96);
}

.google-icon {
  flex-shrink: 0;
}

.btn-dock-google-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.badge-dock-pro {
  font-size: 0.68rem;
  font-weight: 800;
  color: #246bfe;
  background: #eef4ff;
  border: 1px solid #c7d2fe;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* [상태 2] 연결 완료 뷰 */
.dock-connected-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dock-conn-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.dock-connected-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #0f172a;
}

.dock-room-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dock-room-pill {
  font-size: 0.78rem;
  font-weight: 800;
  color: #246bfe;
  background: #eef4ff;
  border: 1px solid #dbeafe;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.dock-lan-chip {
  font-size: 0.74rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 6px;
}

.dock-conn-actions {
  flex-shrink: 0;
}

.btn-dock-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.18s ease;
}

.btn-dock-sub:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-dock-sub:active {
  transform: scale(0.96);
}

/* PRO 프로필 바 */
.dock-pro-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.dock-user-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
}

.dock-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

.badge-pro-pill {
  font-size: 0.68rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 1px 7px;
  border-radius: 9999px;
}

.btn-dock-logout {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-dock-logout:hover {
  color: #ef4444;
  text-decoration: underline;
}

.dock-guide-caption {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 10px;
  line-height: 1.45;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.transmitter-workspace {
  display: block;
  animation: fadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. 하단 스크롤형 온보딩 히어로 (Rich Onboarding Hero)
   -------------------------------------------------------------------------- */
.onboarding-hero-container {
  padding: 24px 16px 48px 16px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hero-section {
  display: flex;
  flex-direction: column;
}

/* 비전 카드 */
.hero-vision-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg, 20px);
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

.hero-badge-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef4ff;
  border: 1px solid #c7d2fe;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #246bfe;
  margin: 0 auto 14px auto;
  box-shadow: 0 1px 3px rgba(36, 107, 254, 0.08);
}

.hero-main-title {
  font-size: 1.38rem;
  font-weight: 900;
  line-height: 1.36;
  color: #0f172a;
  margin-bottom: 10px;
  letter-spacing: -0.025em;
}

.hero-title-highlight {
  color: #246bfe;
  background: linear-gradient(135deg, #246bfe 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 0.86rem;
  line-height: 1.58;
  color: #64748b;
  margin-bottom: 20px;
}

.hero-subtitle strong {
  color: #1e293b;
  font-weight: 700;
}

.hero-subtitle kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.76rem;
  font-family: ui-monospace, monospace;
  color: #334155;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* 0.05초 비주얼 플로우 다이어그램 */
.hero-flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 12px;
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.04);
}

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

.flow-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.flow-node:hover .flow-icon-circle {
  transform: scale(1.08);
}

.bg-blue-soft {
  background: #eef4ff;
  border: 1px solid #dbeafe;
}

.bg-emerald-soft {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.flow-node-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.flow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  min-width: 68px;
}

.flow-beam-line {
  width: 100%;
  height: 3px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  position: relative;
  overflow: hidden;
}

.flow-beam-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 40%;
  height: 100%;
  background: #ffffff;
  opacity: 0.85;
  animation: flowBeamAnim 1.8s infinite linear;
}

@keyframes flowBeamAnim {
  0% { left: -50%; }
  100% { left: 110%; }
}

.flow-speed-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #2563eb;
  background: #dbeafe;
  padding: 2px 7px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. 3초 퀵 가이드 (Quick Guide)
   -------------------------------------------------------------------------- */
.guide-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 4px;
}

.section-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 9999px;
  background: #eef4ff;
  color: #246bfe;
  border: 1px solid #dbeafe;
  margin-bottom: 6px;
}

.section-badge.badge-accent {
  background: #e6faf5;
  color: #0d9488;
  border-color: #99f6e4;
}

.section-badge.badge-green {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.section-heading {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.015em;
}

.section-desc {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.46;
}

.step-card-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, border-color 0.18s ease;
}

.step-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.step-badge-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #246bfe 100%);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(36, 107, 254, 0.3);
}

.step-card-content {
  flex: 1;
}

.step-icon-wrap {
  display: none;
}

.step-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.step-text {
  font-size: 0.82rem;
  line-height: 1.52;
  color: #64748b;
  margin: 0;
}

.step-text strong {
  color: #1e293b;
}

.step-text kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 0.74rem;
  font-family: ui-monospace, monospace;
  color: #334155;
}

/* --------------------------------------------------------------------------
   4. 실무 킬러 유즈케이스 (Killer Use Cases)
   -------------------------------------------------------------------------- */
.usecase-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.usecase-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, border-color 0.18s ease;
}

.usecase-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.usecase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.usecase-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.bg-blue-subtle {
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.bg-purple-subtle {
  background: #faf5ff;
  border: 1px solid #f3e8ff;
}

.bg-emerald-subtle {
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}

.bg-amber-subtle {
  background: #fffbeb;
  border: 1px solid #fef3c7;
}

.usecase-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  display: inline-block;
}

.tag-blue {
  color: #2563eb;
  background: #dbeafe;
}

.tag-purple {
  color: #7c3aed;
  background: #ede9fe;
}

.tag-emerald {
  color: #059669;
  background: #d1fae5;
}

.tag-amber {
  color: #d97706;
  background: #fef3c7;
}

.usecase-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.32;
  margin: 0;
}

.usecase-card-desc {
  font-size: 0.8rem;
  line-height: 1.54;
  color: #64748b;
  margin: 0;
}

.usecase-card-desc kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 0.74rem;
  font-family: ui-monospace, monospace;
  color: #334155;
}

/* --------------------------------------------------------------------------
   5. Zero-Storage 안심 보안 (Zero-Storage Security)
   -------------------------------------------------------------------------- */
.security-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.security-pillars-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.pillar-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.pillar-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar-info {
  flex: 1;
}

.pillar-info h5 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px 0;
}

.pillar-info p {
  font-size: 0.78rem;
  line-height: 1.48;
  color: #64748b;
  margin: 0;
}

.pillar-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 6px 0;
}

.security-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.sec-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

/* --------------------------------------------------------------------------
   6. 마스코트 치어업 & 플로팅 퀵 복귀 버튼
   -------------------------------------------------------------------------- */
.hero-cheerup-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #eef4ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 16px 18px;
  margin-top: 4px;
}

.char-cheerup-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.cheerup-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cheerup-text-wrap strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.cheerup-text-wrap span {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
}

/* 플로팅 퀵 복귀 버튼 (화면 하단 고정, 스크롤 감지 노출) */
.btn-floating-quick-dock {
  position: fixed;
  bottom: 24px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(36, 107, 254, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  padding: 12px 22px;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 8px 24px -4px rgba(36, 107, 254, 0.42), 0 4px 8px -2px rgba(36, 107, 254, 0.2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease, background-color 0.18s ease;
}

.btn-floating-quick-dock.visible,
.btn-floating-quick-dock.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.btn-floating-quick-dock:hover {
  background: #1a56db;
  box-shadow: 0 10px 28px -4px rgba(36, 107, 254, 0.52);
}

.btn-floating-quick-dock:active {
  transform: translateX(-50%) scale(0.96);
}

/* ==========================================================================
   📐 2026 Senior Designer Responsive & Adaptive Breakpoint System
   (320px Ultra-Compact Mobile ~ 4K Ultra-Wide Precision Geometry)
   ========================================================================== */

/* 1. 극소형 스마트폰 (320px ~ 375px: iPhone SE 1/2/3, Galaxy Z Flip 커버 등) */
@media (max-width: 375px) {
  /* 상단 퀵 독 */
  .top-quick-dock {
    padding: 6px 10px 10px 10px;
  }

  .dock-glass-capsule {
    padding: 12px 12px;
    border-radius: 16px;
  }

  .btn-dock-google {
    padding: 8px 10px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn-dock-google-text {
    font-size: 0.8rem;
  }

  .badge-dock-pro {
    font-size: 0.62rem;
    padding: 1px 6px;
  }

  .dock-pin-input {
    font-size: 0.88rem;
    letter-spacing: 1px;
  }

  .btn-dock-join {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .dock-connected-title {
    font-size: 0.86rem;
  }

  .dock-room-pill {
    font-size: 0.72rem;
    padding: 2px 6px;
  }

  .dock-lan-chip {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  /* 온보딩 히어로 */
  .onboarding-hero-container {
    padding: 18px 10px 36px 10px;
    gap: 24px;
  }

  .hero-vision-card {
    padding: 18px 12px;
    border-radius: 16px;
  }

  .hero-main-title {
    font-size: 1.18rem;
    line-height: 1.34;
  }

  .hero-subtitle {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  /* 플로우 다이어그램 */
  .hero-flow-diagram {
    padding: 10px 6px;
    gap: 6px;
  }

  .flow-icon-circle {
    width: 40px;
    height: 40px;
  }

  .flow-icon-circle img {
    width: 20px;
    height: 20px;
  }

  .flow-connector {
    min-width: 44px;
  }

  .flow-speed-tag {
    font-size: 0.62rem;
    padding: 1px 5px;
  }

  .flow-node-label {
    font-size: 0.72rem;
  }

  /* 카드 공통 */
  .section-heading {
    font-size: 1.08rem;
  }

  .section-desc {
    font-size: 0.76rem;
  }

  .step-card {
    padding: 12px 10px;
    gap: 10px;
    border-radius: 12px;
  }

  .step-badge-num {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  .step-title {
    font-size: 0.88rem;
  }

  .step-text {
    font-size: 0.78rem;
  }

  .usecase-card {
    padding: 12px 10px;
    border-radius: 12px;
  }

  .usecase-icon-box {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .usecase-card-title {
    font-size: 0.88rem;
  }

  .usecase-card-desc {
    font-size: 0.78rem;
  }

  .security-pillars-card {
    padding: 12px 12px;
    border-radius: 14px;
  }

  .pillar-icon {
    width: 30px;
    height: 30px;
  }

  .pillar-info h5 {
    font-size: 0.82rem;
  }

  .pillar-info p {
    font-size: 0.74rem;
  }

  .btn-floating-quick-dock {
    padding: 10px 18px;
    font-size: 0.82rem;
  }
}

/* 2. 태블릿 및 소형 랩탑 PC 뷰 (768px ~ 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .app-header {
    padding: 10px 16px;
  }

  .header-actions {
    gap: 6px;
  }

  .btn-header-settings {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .btn-google-login {
    padding: 6px 11px;
    font-size: 0.78rem;
  }

  .btn-google-login .login-full-text {
    display: none !important;
  }

  .btn-google-login .login-short-text {
    display: inline !important;
  }

  .status-badge {
    padding: 5px 10px;
    font-size: 0.76rem;
  }

  .quick-tool-btn {
    padding: 5px 9px;
    font-size: 0.76rem;
  }
}

/* 3. 모바일 화면에서 PC 뷰 열었을 때 (max-width: 767px) */
@media (max-width: 767px) {
  .app-header {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-actions {
    gap: 6px;
    flex-wrap: wrap;
  }

  .btn-google-login .login-full-text {
    display: none !important;
  }

  .btn-google-login .login-short-text {
    display: inline !important;
  }

  .logo-img {
    height: 30px;
  }

  .logo-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  .btn-header-settings span,
  #btn-header-pip span,
  #btn-header-shortcuts span {
    font-size: 0.75rem;
  }

  .floating-quick-toolbar {
    bottom: 12px;
    padding: 4px 6px;
    gap: 2px;
  }

  .quick-tool-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .quick-tool-btn .doodle-icon {
    width: 13px;
    height: 13px;
  }

  .action-bar {
    flex-direction: column;
    gap: 8px;
  }

  .action-bar .btn {
    width: 100%;
  }

  .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
  }
}

