/* static/css/components.css — src/components/ui/* Tailwind 클래스를 손으로 포팅 */

/* ─── Button (src/components/ui/Button.tsx) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 150ms ease-out;
  user-select: none;
  font-size: 14px;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.98); }

.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled)   { background: var(--accent-hover); }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost     { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled)     { background: var(--surface-2); color: var(--text-primary); }
.btn-danger    { background: var(--error); color: #fff; }
.btn-danger:hover:not(:disabled)    { opacity: 0.9; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-md { height: 40px; padding: 0 16px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-spinner {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Input (src/components/ui/Input.tsx) ─── */
.input-group { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.input-label { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.input-wrap { position: relative; }
.input {
  width: 100%; height: 40px; padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  outline: none;
  transition: all 150ms ease;
}
.input::placeholder { color: var(--text-secondary); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled { opacity: 0.5; cursor: not-allowed; }
.input.has-error { border-color: var(--error); }
.input.has-success { border-color: var(--success); }
.input.has-right-el { padding-right: 88px; }
.input-right-el { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; }
.input-hint { font-size: 12px; color: var(--text-secondary); }
.input-hint.error { color: var(--error); }
.input-hint.success { color: var(--success); }

/* ─── Card ─── */
.card { border-radius: var(--radius-lg); padding: 24px; }

/* ─── Header ─── */
.site-header {
  position: sticky; top: 0; z-index: 40; width: 100%;
  height: var(--header-height);
}
.site-header-inner {
  height: 100%; display: flex; align-items: center; gap: 16px;
}
.header-hamburger {
  display: none;
  padding: 8px; border-radius: var(--radius-md); border: none; background: transparent;
  color: var(--text-secondary); cursor: pointer;
}
.header-hamburger:hover { background: var(--surface-2); }
.header-nav { display: none; align-items: center; gap: 2px; flex: 1; margin-left: 16px; }
.header-nav-link {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  font-size: 14px; font-weight: 500; border-radius: var(--radius-md);
  color: var(--text-primary); transition: color 150ms ease;
}
.header-nav-link:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-pricing-btn {
  display: none; align-items: center; gap: 6px; padding: 8px 16px; margin-right: 4px;
  font-size: 14px; font-weight: 600; border-radius: 9999px; color: #fff; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  transition: box-shadow 200ms ease;
}
.header-pricing-btn:hover { box-shadow: 0 8px 20px rgba(124,58,237,0.35); }
@media (min-width: 1024px) {
  .header-hamburger { display: none; }
  .header-nav { display: flex; }
  .header-pricing-btn { display: inline-flex; }
}
@media (max-width: 1023px) {
  .header-hamburger { display: inline-flex; }
  /* 로그인/회원가입은 모바일 드로어(drawer-foot)에 동일 기능이 이미 있다 — 헤더에
     남겨두면 사용량·언어 토글과 폭을 다퉈 "로그인" 세 글자가 세로로 쪼개질 만큼
     좁아진다(390px 실측 확인). 드로어로 위임하고 헤더에서는 숨긴다. */
  .header-auth-link { display: none; }
}

.logo-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 18px; color: var(--text-primary); }
.logo-tool { color: var(--accent); }

/* ─── Footer ─── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0; margin-top: 64px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }

/* ─── Dropzone ─── */
.dropzone {
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
}
.dropzone-icon { margin: 0 auto 16px; color: var(--accent); }
.dropzone-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.dropzone-desc { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }
.dropzone input[type="file"] { display: none; }

/* ─── File queue ─── */
.queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-sm);
  margin-top: 8px;
}
.queue-item-name { flex: 1; font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item-meta { font-size: 12px; color: var(--text-secondary); }
.queue-progress-track { width: 100%; height: 4px; background: var(--surface-2); border-radius: 9999px; overflow: hidden; margin-top: 6px; }
.queue-progress-bar { height: 100%; background: var(--accent); }

/* ─── Toast ─── */
.toast-stack { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast {
  min-width: 240px; max-width: 360px; padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--text-primary);
  animation: slide-up 200ms ease-out;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-info { border-left: 3px solid var(--accent); }

/* ─── Select ─── */
.select {
  height: 40px; padding: 0 12px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); color: var(--text-primary); font-size: 14px;
}

/* ─── Utility layout helpers ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.w-full { width: 100%; }
.max-w-sm { max-width: 384px; margin-inline: auto; }
.hidden { display: none !important; }

.page-section { padding: 64px 0; }

/* ─── User menu dropdown ─── */
.user-menu { position: relative; }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px;
  background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 6px; display: flex; flex-direction: column; z-index: 50;
  animation: slide-down 150ms ease-out;
}
.user-menu-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; background: none;
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text-primary); cursor: pointer;
}
.user-menu-item:hover { background: var(--surface-2); }
.user-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* ─── Admin menu (src/components/admin/AdminMenu.tsx) ─── */
.admin-menu-trigger {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: none; cursor: pointer;
  border-radius: 999px; color: #fff; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}
.admin-menu-label { display: none; }
@media (min-width: 640px) { .admin-menu-label { display: inline; } }
.admin-menu-chevron { opacity: 0.85; }
.admin-menu-panel { min-width: 240px; }
.admin-menu-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 4px;
  font-size: 13px; font-weight: 600; color: var(--accent);
}
.admin-menu-item { display: flex; align-items: center; gap: 10px; }
.admin-menu-item svg { color: var(--accent); flex-shrink: 0; }
.admin-menu-item-text { display: flex; flex-direction: column; }
.admin-menu-item-main { font-size: 13px; color: var(--text-primary); }
.admin-menu-item-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

.drawer-label-admin { display: flex; align-items: center; gap: 5px; color: var(--accent); }
.drawer-item-admin svg { color: var(--accent); }

/* ─── Modal (src/components/ui/Modal.tsx) ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(30,27,75,0.35);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-panel {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 24px; width: 100%; max-width: 420px; animation: slide-down 200ms ease-out;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }

/* ─── 업로드 미리보기 모달 (components/uploadQueue.js) ─── */
.upload-preview-panel { max-width: 640px; text-align: center; }
.upload-preview-img { display: block; max-width: 100%; max-height: 65vh; margin: 0 auto; border-radius: 12px; }
.upload-preview-file {
  width: 96px; height: 96px; margin: 0 auto; border-radius: 16px; background: var(--accent-soft); color: var(--accent);
  align-items: center; justify-content: center; font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
}
.upload-preview-meta { margin-top: 12px; font-size: 12.5px; color: var(--text-secondary); word-break: break-all; }
.upload-preview-close { width: 100%; margin-top: 16px; }

/* ─── 대기열 목록 팝업 (components/uploadQueue.js) ─── */
.upload-queuelist-panel { position: relative; max-width: 440px; max-height: 80vh; overflow-y: auto; text-align: left; }
.upload-queuelist-panel .modal-title { padding-right: 32px; margin-bottom: 0; }
.upload-queuelist-divider { height: 1px; background: var(--border); margin: 12px 0 14px; }
.upload-queuelist-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition-property: background-color, color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.upload-queuelist-close:hover { background: var(--surface-2); color: var(--text-primary); }

/* ─── EU 쿠키 배너 (src/components/consent/EUCookieBanner.tsx) ─── */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--surface); box-shadow: var(--shadow-lg); padding: 16px; }
.cookie-banner-inner { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cookie-banner-text { display: flex; align-items: flex-start; gap: 10px; flex: 1; }
.cookie-banner-icon { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.cookie-banner-text p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.cookie-banner-text a { color: var(--accent); }
.cookie-banner-text a:hover { text-decoration: underline; }
.cookie-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
@media (min-width: 640px) {
  .cookie-banner-inner { flex-direction: row; align-items: center; }
}

/* ─── 재동의 모달 (src/components/consent/ReconsentModal.tsx) — X 없음, 동의/거부만 ─── */
.reconsent-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.reconsent-panel { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 24px; }
.reconsent-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.reconsent-icon { width: 40px; height: 40px; border-radius: 12px; background: #ffedd5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reconsent-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.reconsent-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.reconsent-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.reconsent-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.reconsent-item-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.reconsent-item-ver { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.reconsent-item-link { font-size: 11px; color: var(--accent); flex-shrink: 0; }
.reconsent-item-link:hover { text-decoration: underline; }
.reconsent-notice { font-size: 11px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }

/* ─── Help center (src/components/help/HelpClient.tsx) ─── */
.help-hero { text-align: center; }
.help-hero-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; background: var(--accent-soft); padding: 4px 12px; font-size: 12px; font-weight: 500; color: var(--accent); }
.help-hero-title { margin-top: 16px; font-size: 32px; font-weight: 800; letter-spacing: -0.01em; background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.help-hero-desc { margin: 12px auto 0; max-width: 560px; font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.help-search-wrap { max-width: 560px; margin: 28px auto 0; position: relative; }
.help-search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.help-search-wrap input { padding-left: 38px; }
.help-quicklinks-title { margin-bottom: 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.help-quicklinks { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .help-quicklinks { grid-template-columns: 1fr 1fr; } }
.help-quicklink { display: flex; align-items: flex-start; gap: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); padding: 16px; transition: all 150ms ease; }
.help-quicklink:hover { box-shadow: var(--shadow-md); }
.help-quicklink-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.help-quicklink-title { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.help-quicklink-desc { display: block; margin-top: 2px; font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.help-faq-title { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.help-cat-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.help-cat-chip { border-radius: 9999px; padding: 6px 14px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); cursor: pointer; }
.help-cat-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.help-faq-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.help-faq-empty { border-radius: 16px; border: 1px dashed var(--border); background: var(--surface); padding: 32px; text-align: center; font-size: 13px; color: var(--text-secondary); }
.help-faq-item { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.help-faq-q { display: flex; width: 100%; align-items: center; gap: 12px; padding: 16px 20px; text-align: left; background: none; border: none; cursor: pointer; }
.help-faq-cat { border-radius: 6px; background: var(--surface-2); padding: 2px 8px; font-size: 10px; font-weight: 500; color: var(--text-secondary); flex-shrink: 0; }
.help-faq-q-text { flex: 1; font-size: 14px; font-weight: 500; color: var(--text-primary); }
.help-faq-chevron { flex-shrink: 0; color: var(--text-secondary); transition: transform 200ms ease; }
.help-faq-item.open .help-faq-chevron { transform: rotate(180deg); }
.help-faq-a { display: none; padding: 0 20px 16px 68px; font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.help-faq-item.open .help-faq-a { display: block; }
.help-contact-card { border-radius: 24px; border: 1px solid var(--border); background: var(--surface); padding: 24px; }
.help-contact-head { display: flex; align-items: flex-start; gap: 12px; }
.help-contact-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.help-contact-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.help-contact-desc { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }
.help-contact-form { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.help-contact-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .help-contact-grid { grid-template-columns: 1fr 1fr; } }
.help-contact-sent { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; border-radius: 16px; border: 1px solid #a7f3d0; background: #ecfdf5; padding: 28px; text-align: center; }
.help-contact-sent p { font-size: 13px; font-weight: 500; color: #065f46; }
.help-contact-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ─── 마이페이지 탭 레이아웃 (src/app/[locale]/mypage/layout.tsx) ─── */
.mypage-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 24px 0 32px; overflow-x: auto; }
.mypage-tab { padding: 10px 16px; font-size: 14px; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-secondary); }
.mypage-tab:hover { color: var(--text-primary); }
.mypage-tab.active { border-color: var(--accent); color: var(--accent); }
.mypage-content { max-width: 768px; }

/* ─── Empty state (src/components/ui/EmptyState.tsx) ─── */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 24px; text-align: center; }
.empty-state-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.empty-state-desc { font-size: 13px; color: var(--text-secondary); max-width: 320px; }

/* ─── 마이페이지: history 테이블 ─── */
.mypage-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { .mypage-toolbar { flex-direction: row; } }
.mypage-search-wrap { position: relative; flex: 1; }
.mypage-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.mypage-search-wrap input { padding-left: 34px; height: 36px; }
.mypage-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mypage-filter-chip { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); cursor: pointer; }
.mypage-filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mypage-history-table { width: 100%; border-collapse: collapse; font-size: 13px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.mypage-history-table th { background: var(--surface-2); color: var(--text-secondary); font-weight: 500; text-align: left; padding: 10px 14px; font-size: 12px; }
.mypage-history-table td { padding: 10px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.mypage-history-table tr:hover td { background: var(--surface-2); }
.mypage-history-file { font-weight: 500; color: var(--text-primary); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mypage-history-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.mypage-status-ok { color: var(--success); }
.mypage-status-err { color: var(--error); }

/* ─── Badge (src/components/ui/Badge.tsx) ─── */
.badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 500; line-height: 1.6; white-space: nowrap;
}
.badge-default { background: var(--surface-2); color: var(--text-secondary); }
.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-error   { background: #fee2e2; color: #b91c1c; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }

/* ─── Tooltip (src/components/ui/Tooltip.tsx) — 순수 CSS, data-tooltip 속성 기반 ─── */
.tooltip-trigger { position: relative; display: inline-flex; }
.tooltip-trigger::after {
  content: attr(data-tooltip); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(4px); background: var(--text-primary); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.4; white-space: nowrap; padding: 6px 10px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); pointer-events: none;
  opacity: 0; transition: opacity 150ms ease-out, transform 150ms ease-out; z-index: 60;
}
.tooltip-trigger:hover::after, .tooltip-trigger:focus-visible::after {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ─── 마이페이지: 즐겨찾기/프리셋 카드 ─── */
.mypage-fav-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mypage-fav-chip { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.mypage-fav-chip:hover { border-color: var(--accent); }
.mypage-fav-ext { font-size: 13px; font-weight: 700; color: var(--text-primary); text-transform: uppercase; }
.mypage-fav-remove { padding: 2px; border: none; background: none; color: var(--text-secondary); cursor: pointer; border-radius: 6px; }
.mypage-fav-remove:hover { color: var(--error); background: var(--surface-2); }
.mypage-fav-add-form { display: flex; gap: 8px; align-items: center; margin-top: 20px; padding: 14px; border-radius: 12px; border: 1px dashed var(--border); flex-wrap: wrap; }
.mypage-preset-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-top: 8px; }
.mypage-preset-date { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ─── 마이페이지: 설정 ─── */
.settings-section { margin-top: 32px; }
.settings-section:first-child { margin-top: 0; }
.settings-section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; }
.settings-divider { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 28px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-toggle { position: relative; width: 40px; height: 22px; border-radius: 9999px; border: none; cursor: pointer; background: var(--surface-2); flex-shrink: 0; }
.settings-toggle.on { background: var(--accent); }
.settings-toggle-dot { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 9999px; background: #fff; box-shadow: var(--shadow-sm); transition: transform 150ms ease; }
.settings-toggle.on .settings-toggle-dot { transform: translateX(18px); }
.consent-record { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; }
.consent-record-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.consent-record-status { display: flex; align-items: center; gap: 6px; }
.consent-record-status.agreed { color: #059669; }
.consent-record-status.outdated { color: #d97706; }
.consent-record-status.none { color: var(--text-secondary); }
.consent-record-link { color: var(--accent); font-size: 11px; }
.settings-danger-title { font-size: 14px; font-weight: 600; color: var(--error); margin-bottom: 4px; }

/* ─── CCPA 링크 ─── */
.ccpa-link { font-size: 12px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; }
.ccpa-link:hover { color: var(--text-primary); }

/* ─── Consent block (회원가입 전체동의, src/components/auth/SignupAgreements.tsx) ─── */
.consent-block { border-top: 1px solid var(--border); padding-top: 16px; }
.consent-master { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; user-select: none; }
.consent-master span { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.consent-divider { height: 1px; background: var(--border); margin: 8px 0; }
.consent-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.consent-label { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-primary); cursor: pointer; user-select: none; }
.consent-badge { flex-shrink: 0; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.consent-badge.required { color: var(--accent); background: var(--accent-soft); }
.consent-badge.optional { color: var(--text-secondary); background: var(--surface-2); }
.consent-view { flex-shrink: 0; font-size: 12px; color: var(--text-secondary); }
.consent-view:hover { color: var(--accent); text-decoration: underline; }

/* ─── Password rule checklist ─── */
.pw-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.pw-rule { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.pw-rule.ok { color: #16a34a; }

/* ─── Mega menu (src/components/layout/MegaMenu.tsx) ─── */
.mega { position: relative; height: 100%; display: flex; align-items: center; }
.mega-trigger { background: none; border: none; cursor: pointer; font-family: inherit; }
.mega-chevron { margin-left: 2px; transition: transform 200ms ease; }
.mega.mega-open .mega-chevron { transform: rotate(180deg); }
.mega.mega-open > .mega-trigger { color: var(--accent); }
.mega-panel {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 6px; z-index: 50; display: none;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 16px;
}
.mega.mega-open .mega-panel { display: block; animation: mega-slide-down 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.mega-panel-convert { width: 620px; max-width: calc(100vw - 48px); }
.mega-panel-compress { width: 300px; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.mega-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  font-size: 14px; color: var(--text-primary); transition: background 100ms ease;
}
.mega-item:hover { background: var(--surface-2); }
.mega-item svg { color: var(--accent); flex-shrink: 0; }
.mega-item-stack { align-items: flex-start; }
.mega-item-stack > span { display: flex; flex-direction: column; }
.mega-item-main { font-size: 14px; }
.mega-item-sub { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.mega-label { padding: 4px 12px 6px; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.mega-divider { height: 1px; background: var(--border); margin: 8px 4px; }
.compress-rotator { display: inline-flex; align-items: center; gap: 0.28em; }
.compress-rotator-word { display: inline-block; min-width: 2.8em; text-align: right; transition: opacity 250ms ease; }

/* ─── 히어로 셸(src/components/home/HeroSection.tsx) ───
   타이틀·서브카피·업로드 카드는 sample_final.html 디자인을 그대로 이식
   (폰트·색·그림자·hover 포함). 변환(홈+카테고리 9종)뿐 아니라 압축 5개
   페이지도 동일한 .hero/.hero-title/.hero-sub/.hero-card 셸을 공유한다 —
   카드 안쪽(드롭존 다음 슬롯)만 도구별로 다르다: 변환 계열은 전부
   #conversion-picker(from→to 확장자 선택, 변환하기 전까지 항상 유지),
   압축은 곧바로 .hero-cta(같은 확장자를 유지한 채 압축 실행). */
.hero { position: relative; overflow: hidden; padding: 80px 0; }
.hero-aurora { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-family: 'Plus Jakarta Sans Variable', var(--font-pretendard), var(--font-inter), sans-serif;
  font-size: clamp(38px, 6vw, 60px); font-weight: 800; line-height: 1.14; letter-spacing: -0.02em;
  margin-bottom: 20px; color: var(--text-primary);
}
.hero-title-line { display: block; }
.hero-title-em {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-hover) 60%, #8b5cf6 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(15px, 1.6vw, 17px); color: #3730a3; line-height: 1.75; font-weight: 400;
  max-width: 640px; margin: 0 auto 48px;
}
.hero-card {
  max-width: 800px; margin: 0 auto 30px; border-radius: 26px; padding: 34px; position: relative;
  box-shadow: 0 0 0 1px rgba(124,58,237,.07), 0 2px 6px rgba(76,29,149,.05),
    0 14px 32px rgba(76,29,149,.14), 0 36px 72px rgba(76,29,149,.16);
}

/* 히어로 드롭존 — .hero-card #dropzone으로 스코프. 홈·압축 5개 페이지 전부
   동일한 id="dropzone"을 쓰지만 페이지당 1개뿐이라 id 단독 셀렉터도 안전하나,
   .hero-card 밖(예: 미래에 추가될 다른 드롭존)까지 새지 않도록 명시적으로 스코프한다. */
.hero-card #dropzone { border-radius: 18px; padding: 46px 24px; margin-bottom: 18px; }
.hero-card #dropzone .dropzone-icon {
  width: auto; height: auto; border-radius: 0; background: none; margin: 0 auto 14px;
  color: var(--accent-hover); animation: hero-dropzone-float 3s ease-in-out infinite;
}
.hero-card #dropzone .dropzone-icon svg { display: block; width: 38px; height: 38px; margin: 0 auto; }
.hero-card #dropzone .dropzone-title { font-family: 'Plus Jakarta Sans Variable', var(--font-pretendard), sans-serif; font-size: 15px; font-weight: 700; }
.hero-card #dropzone .dropzone-desc { font-size: 13px; }
@keyframes hero-dropzone-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-card #dropzone .dropzone-icon { animation: none; }
}

/* 히어로 "변환하기" 버튼(.cvt, sample_final.html) */
.hero-cta {
  width: 100%; margin-top: 13px; padding: 15px; border: none; border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 9px; box-shadow: 0 4px 16px rgba(124,58,237,.30);
  transition: background 0.25s, box-shadow 0.25s;
}
.hero-cta:hover { background: linear-gradient(135deg, var(--accent-hover), #4c1d95); box-shadow: 0 6px 24px rgba(124,58,237,.44); }

/* ─── 업로드 대기열 + 실행 버튼 (components/uploadQueue.js) — 드롭존 하단, 좌:대기열/우:버튼 50:50 ─── */
/* align-items: flex-start — 큐에 파일이 쌓여 대기열 패널이 커져도 버튼 높이는 절대 영향받지 않는다 */
.upload-queue-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; }
.upload-queue-panel {
  flex: 1 1 50%; min-width: 0; min-height: 50px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 6px;
}
/* 파일이 1개 이상이면 클릭해서 대기열 팝업을 여는 실제 인터랙션 대상이 된다 — hover 허용 */
.upload-queue-panel-clickable { cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.upload-queue-panel-clickable:hover { background: var(--surface-2); border-color: var(--accent); }
.upload-queue-empty {
  margin: 0; padding: 10px 8px; text-align: center; font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.upload-queue-list { display: flex; flex-direction: column; gap: 4px; }
.upload-queue-item { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; transition: background 0.15s; }
.upload-queue-item:hover { background: var(--surface-2); }
.upload-queue-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.upload-queue-thumb-badge {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 700; letter-spacing: 0.01em;
}
.upload-queue-item-body { flex: 1; min-width: 0; }
.upload-queue-item-name { font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-queue-item-meta { font-size: 11px; color: var(--text-secondary); }
/* 시각적 크기(24px)는 유지하되 ::before로 히트 영역만 40px까지 넓힌다(make-interfaces-feel-better). */
.upload-queue-item-remove { position: relative; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; border: none; background: transparent; color: var(--text-secondary); font-size: 16px; line-height: 1; cursor: pointer; }
.upload-queue-item-remove::before { content: ""; position: absolute; inset: -8px; }
.upload-queue-item-remove:hover { background: var(--surface); color: var(--error); }
.upload-queue-btn {
  flex: 1 1 50%; min-height: 50px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 14px; padding: 0 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(124,58,237,.30);
  transition: background 0.25s, box-shadow 0.25s;
}
.upload-queue-btn:hover:not(:disabled) { background: linear-gradient(135deg, var(--accent-hover), #4c1d95); box-shadow: 0 6px 24px rgba(124,58,237,.44); }
.upload-queue-btn:disabled { opacity: 0.6; cursor: not-allowed; }
@media (max-width: 480px) {
  .upload-queue-row { flex-direction: column; }
  .upload-queue-panel, .upload-queue-btn { flex: 1 1 auto; }
  .upload-queue-btn { padding: 13px 16px; }
}

/* ─── Tool hub grid ─── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
/* 클릭형 카드(허브의 링크 카드)만 hover 허용 — 배경 역할 glass-card는 hover 없음 */
.tool-card { display: block; transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s; }
.tool-card:hover { background: #fefefe; box-shadow: var(--shadow-md); }
.tool-card-title { font-weight: 600; color: var(--text-primary); }
.tool-card-exts { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.tool-card-soon { font-size: 12px; color: #f97316; margin-top: 4px; }

/* ─── Coming soon (준비 중, src/components/converter/ComingSoonPage.tsx) ─── */
.coming-soon { padding: 64px 24px; }
.coming-soon-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.coming-soon-icon { width: 64px; height: 64px; border-radius: var(--radius-xl); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.coming-soon-title { font-size: 28px; font-weight: 700; }
.coming-soon-desc { color: var(--text-secondary); }
.coming-soon-exts { font-size: 13px; color: var(--text-secondary); }
.coming-soon-info { padding: 16px; border-radius: var(--radius-lg); background: var(--surface-2); font-size: 14px; color: var(--text-secondary); max-width: 420px; }

/* ─── Footer (원본 파리티) ─── */
.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer-brand { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.footer-brand:hover { opacity: 0.75; }

/* ─── Mobile drawer (애니메이션 슬라이드 + 섹션) ─── */
.mobile-drawer-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(30, 27, 75, 0.35);
  opacity: 0; pointer-events: none; transition: opacity 250ms ease;
}
.mobile-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-drawer {
  position: absolute; left: 0; top: 0; bottom: 0; width: 82vw; max-width: 300px;
  background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(-100%); transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-drawer-overlay.open .mobile-drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.drawer-close { padding: 6px; border: none; background: none; border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; }
.drawer-close:hover { background: var(--surface-2); }
.drawer-nav { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.drawer-label { padding: 12px 8px 2px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.drawer-item { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: var(--radius-md); font-size: 14px; color: var(--text-primary); border: none; background: none; width: 100%; text-align: left; cursor: pointer; }
.drawer-item:hover { background: var(--surface-2); }
.drawer-item svg { color: var(--accent); flex-shrink: 0; }
.drawer-item-danger { color: var(--error); }
.drawer-item-danger:hover { background: #fef2f2; }
.drawer-pricing { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid rgba(124, 58, 237, 0.2); width: 100%; text-align: left; cursor: pointer; margin-bottom: 8px; }
.drawer-pricing:hover { border-color: rgba(124, 58, 237, 0.5); }
.drawer-pricing svg { color: var(--accent); flex-shrink: 0; }
.drawer-pricing > span { flex: 1; display: flex; flex-direction: column; }
.drawer-pricing-title { font-size: 14px; font-weight: 600; color: var(--accent); }
.drawer-pricing-sub { font-size: 11px; color: rgba(124, 58, 237, 0.7); margin-top: 2px; }
.drawer-foot { padding: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

/* ─── Usage counter gauge (src/components/converter/UsageLimitBanner.tsx) ─── */
.usage-counter { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 14px; }
.usage-gauge { display: flex; align-items: center; gap: 6px; }
.usage-gauge-label { font-size: 11px; font-weight: 500; color: var(--text-secondary); flex-shrink: 0; }
.usage-gauge-track { position: relative; height: 6px; width: 48px; border-radius: 9999px; background: var(--surface-2); overflow: hidden; }
.usage-gauge-bar { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: 9999px; background: var(--accent); transition: width 500ms ease-out; }
.usage-gauge-bar.unlimited { background: color-mix(in srgb, var(--accent) 25%, transparent); width: 100% !important; }
.usage-gauge-bar.full { background: #f97316; }
.usage-gauge-bar.unavailable { background: color-mix(in srgb, var(--text-secondary) 40%, transparent); }
.usage-gauge-count { font-size: 11px; color: var(--text-secondary); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.usage-gauge-count.full { color: #f97316; font-weight: 600; }

/* ─── special 도구 공용 레이아웃(파일 순서 목록·옵션 칩) ─── */
.tool-file-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-top: 8px; }
.tool-file-order { display: flex; flex-direction: column; gap: 2px; }
.tool-file-order button { padding: 1px; border: none; background: none; color: var(--text-secondary); cursor: pointer; font-size: 11px; line-height: 1; }
.tool-file-order button:hover:not(:disabled) { color: var(--text-primary); }
.tool-file-order button:disabled { opacity: 0.3; cursor: not-allowed; }
.tool-file-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-file-meta { font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }
.tool-file-remove { padding: 4px; border: none; background: none; color: var(--text-secondary); cursor: pointer; border-radius: 6px; }
.tool-file-remove:hover { color: var(--error); background: var(--surface-2); }
.tool-option-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-option-chip { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font-size: 14px; cursor: pointer; transition: all 150ms ease; }
.tool-option-chip:hover { border-color: var(--accent); }
.tool-option-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tool-simple-dropzone { border-radius: 16px; padding: 40px 24px; text-align: center; cursor: pointer; background: var(--lilac-100); transition: background 150ms ease; }
.tool-simple-dropzone:hover, .tool-simple-dropzone.glass-dropzone-active { background: var(--lilac-200); }
.tool-simple-dropzone-icon { width: 48px; height: 48px; border-radius: 9999px; background: var(--surface-2); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }

/* ─── Compare slider (전후 비교, react-compare-slider 대체) ─── */
.compare-slider { position: relative; width: 100%; max-height: 400px; overflow: hidden; user-select: none; touch-action: none; background: var(--surface-2); }
.compare-slider-img { display: block; width: 100%; height: 100%; max-height: 400px; object-fit: contain; pointer-events: none; }
.compare-slider-before-wrap { position: absolute; inset: 0; }
.compare-slider-handle { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); cursor: ew-resize; transform: translateX(-50%); }
.compare-slider-grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 9999px; background: #fff; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; }
.compare-slider-grip::before { content: "◂▸"; font-size: 11px; color: var(--text-secondary); letter-spacing: -2px; }

/* ─── compress/force 전용 ─── */
/* 원래 이 자리는 인라인 style="border:...; padding:20px"만 걸린 무명 div였고
   .rounded-xl은 정의가 없는(포팅 과정에서 남은 Tailwind 잔재) 죽은 클래스라 모서리가
   전혀 둥글지 않았다 — 카드 계열(.ic-card/.tool-empty)과 맞춰 16px로 통일한다. */
.force-panel { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 22px; }
/* 가로만 기준으로 폭을 줄이던 이전 방식은 세로로 긴 이미지의 높이가 max-height를
   넘어 아래쪽이 잘려 보였다 — JS(drawPreview)가 가로·세로를 함께 박스에 맞춰 축소하므로
   래퍼는 그 결과를 여백과 함께 가운데 정렬만 하면 된다. */
.force-preview-wrap { position: relative; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; padding: 16px; min-height: 200px; }
.force-preview-wrap canvas { display: block; border-radius: 8px; }
.force-preview-badge { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; }
.force-preview-badge.kept { background: color-mix(in srgb, var(--success) 80%, transparent); }
/* 이전엔 라벨+입력 행까지 이 컨테이너 안에 있어서 top:0 버블이 "목표 용량" 글자 위로
   떠 보였다 — 이제 트랙 바로 위 여백(padding-top)에만 버블이 앉도록 슬라이더 부분만
   감싼다. */
.force-slider-row { position: relative; padding-top: 24px; margin-top: 4px; }
.force-slider-bubble { position: absolute; top: 0; transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; transition: left 75ms ease-out; }
.force-slider-track { width: 100%; height: 8px; cursor: pointer; appearance: none; border-radius: 9999px; background: var(--surface-2); accent-color: var(--accent); }
.force-slider-minmax { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-top: 4px; font-variant-numeric: tabular-nums; }
.force-info-box { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); }
.force-result-table { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); border-collapse: collapse; font-size: 14px; }
.force-result-table th, .force-result-table td { padding: 10px 14px; text-align: left; }
.force-result-table thead th { background: var(--surface-2); color: var(--text-secondary); font-weight: 500; font-size: 13px; }
.force-result-table tbody tr { border-top: 1px solid var(--border); }
.force-result-table td.saved-cell { display: flex; align-items: center; gap: 10px; }
.force-result-bar-track { flex: 1; max-width: 180px; height: 8px; border-radius: 9999px; background: var(--border); overflow: hidden; }
.force-result-bar { height: 100%; background: var(--success); }

/* ─── 헤더 사용량 배지 (components/usageBadge.js) — 항상 노출, 클릭 시 4종 게이지 팝오버 ─── */
.usage-toggle { position: relative; }
.usage-toggle-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--radius-md);
  border: none; background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 150ms ease;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.usage-toggle-btn:hover { color: var(--text-primary); background: var(--surface-2); }
.usage-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 14px; z-index: 50; animation: slide-down 150ms ease-out;
}
.usage-panel-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.usage-panel .usage-counter { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; }
.usage-panel .usage-gauge { width: 100%; justify-content: space-between; }
/* 라벨 폭을 가장 긴 "강제 압축" 기준으로 고정한다 — 안 그러면 라벨 글자 수만큼 flex:1인
   트랙(게이지) 길이가 행마다 달라진다("영상"/"기타"/GIF는 길고 강제 압축만 짧아짐). */
.usage-panel .usage-gauge-label { width: 56px; flex-shrink: 0; }
.usage-panel .usage-gauge-track { flex: 1; margin: 0 8px; }
/* count("0/10" 등)도 자릿수만큼 폭이 달라 트랙 길이에 영향을 줬다 — 가장 넓은 값(4자리)
   기준으로 고정폭+우측정렬하면 라벨과 함께 트랙 길이가 완전히 일치한다. */
.usage-panel .usage-gauge-count { width: 32px; text-align: right; }

/* ─── Language toggle (src/components/layout/LanguageToggle.tsx) ─── */
.lang-toggle { position: relative; }
.lang-toggle-btn { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--radius-md); border: none; background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 150ms ease; }
.lang-toggle-btn:hover { color: var(--text-primary); background: var(--surface-2); }
.lang-current { font-size: 12px; font-weight: 600; text-transform: uppercase; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 120px; background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; animation: slide-down 150ms ease-out; }
.lang-item { display: block; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-primary); }
.lang-item:hover { background: var(--surface-2); }
.lang-item.active { color: var(--accent); font-weight: 600; }

/* ─── ConversionPicker (src/components/home/ConversionPicker.tsx) ───
   sample_final.html의 .sel/.arr-c 디자인 그대로 이식(단일 진실 공급원 —
   이 블록이 .cpicker-* 의 유일한 정의처. 다른 곳에서 재정의하지 말 것). */
.cpicker { display: flex; align-items: center; justify-content: center; gap: 11px; flex-wrap: wrap; margin-top: 0; }
.cpicker-field { position: relative; flex: 1; min-width: 190px; }
.cpicker-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; padding: 14px 18px; border-radius: 13px; border: none; background: #f8f7ff; color: #374151; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 150ms ease; }
.cpicker-btn:hover:not(:disabled) { background: var(--lilac-100); }
.cpicker-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cpicker-btn.cpicker-btn-active { background: var(--accent-soft); color: var(--accent); }
.cpicker-btn.cpicker-btn-empty { color: var(--text-secondary); }
.cpicker-btn.cpicker-btn-required { box-shadow: 0 0 0 2px var(--error); animation: cpicker-shake 500ms ease; }
@keyframes cpicker-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.cpicker-btn-left { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.cpicker-btn-left > svg:first-child { color: var(--accent-hover); flex-shrink: 0; }
.cpicker-val { text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpicker-btn svg.cpicker-chev { transition: transform 150ms ease; flex-shrink: 0; color: var(--text-secondary); }
.cpicker-btn.open svg.cpicker-chev { transform: rotate(180deg); }
.cpicker-arrow {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.36); display: flex; align-items: center; justify-content: center;
}
/* fixed 포털로 body에 직접 붙는다(.hero의 overflow:hidden에 잘리지 않도록) —
   top/left/bottom은 conversionPicker.js가 버튼 위치 기준으로 매 오픈마다 계산해 인라인으로 지정. */
.cpicker-popup { position: fixed; z-index: 50; width: 340px; max-width: calc(100vw - 32px); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); animation: slide-down 150ms ease-out; }
.cpicker-popup.flip-up { animation: slide-up 150ms ease-out; }
.cpicker-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.cpicker-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; color: var(--text-primary); }
.cpicker-body { display: flex; height: 240px; }
.cpicker-cats { width: 112px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 0; }
.cpicker-cat { display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 500; border: none; background: none; color: var(--text-secondary); cursor: pointer; }
.cpicker-cat:hover { color: var(--text-primary); }
.cpicker-cat.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cpicker-chips { flex: 1; padding: 12px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.cpicker-chip { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); cursor: pointer; transition: all 100ms ease; }
.cpicker-chip:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.cpicker-chip:active { transform: scale(0.95); }
.cpicker-empty { width: 100%; text-align: center; align-self: center; font-size: 12px; color: var(--text-secondary); }

/* ─── Inline converter (src/components/home/HomeInlineConverter.tsx) ─── */
/* hero-card(흰색 큰 컨테이너) 안에 중첩되는 작업 영역이라 배경을 surface-2로 살짝
   구분한다 — 부모와 같은 흰색(surface)이면 경계가 안 보인다. */
.ic-card { margin: 16px 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); overflow: hidden; animation: fade-in 200ms ease-out; text-align: left; }
.ic-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.ic-count { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ic-count-done { color: var(--success); }
.ic-head-actions { display: flex; align-items: center; gap: 8px; }
.ic-add { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; }
.ic-add:hover { background: var(--surface-2); }
.ic-reset { padding: 6px 8px; border-radius: 8px; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 18px; line-height: 1; }
.ic-reset:hover { background: var(--surface-2); color: var(--text-primary); }
/* 항목이 많아도 카드 내부 스크롤을 만들지 않는다 — 카드 자체가 늘어나고 페이지 전체가
   스크롤된다(이전엔 max-height+overflow-y:auto로 카드 안에 별도 스크롤이 생겼었다). */
.ic-rows { }
.ic-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.ic-row:last-child { border-bottom: none; }
.ic-row-thumb { flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; overflow: hidden; background: var(--border); }
.ic-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic-row-thumb-badge {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 9.5px; font-weight: 700; letter-spacing: 0.01em;
}
.ic-row-done { background: rgba(16, 185, 129, 0.05); }
.ic-row-error { background: rgba(239, 68, 68, 0.05); }
.ic-row-running { background: var(--accent-soft); }
.ic-row-info { flex: 1; min-width: 0; }
.ic-row-name { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-row-meta { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.ic-row-err { font-size: 12px; color: var(--error); margin-top: 2px; }
.ic-row-unsupported { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ic-progress { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.ic-track { flex: 1; height: 4px; border-radius: 9999px; background: var(--border); overflow: hidden; }
.ic-bar { height: 100%; background: var(--accent); transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1); }
.ic-pct { font-size: 12px; color: var(--accent); width: 34px; text-align: right; }
.ic-gif-opts { display: flex; gap: 4px; flex-shrink: 0; }
.ic-gif-opt.select { height: 28px; padding: 0 8px; font-size: 11px; min-width: 0; }
.ic-gif-opt.input { height: 28px; padding: 0 8px; font-size: 11px; min-width: 0; width: 88px; }
.ic-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ic-btn { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; border: none; cursor: pointer; }
.ic-btn-convert { background: var(--accent); color: #fff; }
.ic-btn-convert:hover:not(:disabled) { background: var(--accent-hover); }
.ic-btn-convert:disabled { opacity: 0.4; cursor: not-allowed; }
.ic-btn-done { display: inline-flex; align-items: center; gap: 4px; background: var(--success); color: #fff; }
.ic-btn-done:hover { opacity: 0.9; }
.ic-btn-retry { border: 1px solid var(--border); background: transparent; color: var(--text-primary); }
.ic-btn-retry:hover { background: var(--surface-2); }
.ic-icon-btn { width: 28px; height: 28px; border-radius: 8px; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 15px; line-height: 1; }
.ic-icon-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.ic-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--border); }
.ic-ttl { font-size: 12px; color: var(--text-secondary); }
.ic-complete { font-size: 14px; font-weight: 500; color: var(--success); }
.ic-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.7s linear infinite; display: inline-block; }
.ic-row-note { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ─── PDF 스마트 묶음(이미지 여러 장 → PDF 1개, inlineConverter.js) ───
   ic-card(surface-2) 안에 다시 흰 박스(surface)로 감싸 "카드 안 카드" 위계를 준다. */
.ic-bundle { margin: 12px 20px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ic-card-spacious .ic-bundle { margin: 16px 28px; }
.ic-bundle-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ic-bundle-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ic-bundle-list { display: flex; flex-direction: column; gap: 4px; }
.ic-bundle-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; background: var(--surface-2); transition: background-color 150ms, opacity 150ms; }
.ic-bundle-row-dragging { opacity: 0; }
/* 드래그 중 커서를 따라다니는 비주얼 — 실제 .ic-bundle-row를 그대로 복제한 것이라
   배경·패딩·손잡이·썸네일·파일명 등 카드 모습 자체는 기본 .ic-bundle-row 스타일을
   그대로 물려받고, 여기서는 "떠서 커서를 따라다니는" 특성만 얹는다. */
.ic-bundle-row-ghost {
  position: fixed; top: 0; left: 0; z-index: 1000; pointer-events: none;
  box-shadow: var(--shadow-lg); will-change: transform;
}
.ic-bundle-handle { flex-shrink: 0; width: 24px; padding: 8px 0; text-align: center; color: var(--text-secondary); cursor: grab; font-size: 14px; line-height: 1; touch-action: none; }
.ic-bundle-handle:hover { color: var(--text-primary); }
.ic-bundle-handle:active { cursor: grabbing; }
.ic-bundle-exclude-btn { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ic-bundle-exclude-btn:hover { background: var(--surface-2); color: var(--error); }
.ic-bundle-thumb { flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; overflow: hidden; background: var(--border); cursor: pointer; }
.ic-bundle-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic-bundle-name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── 묶음 썸네일 확대 미리보기 모달 (inlineConverter.js) ─── */
.ic-preview-panel { position: relative; max-width: 480px; text-align: center; }
.ic-preview-panel .modal-title { padding-right: 32px; margin-bottom: 0; text-align: left; word-break: break-all; }
.ic-preview-divider { height: 1px; background: var(--border); margin: 12px 0 14px; }
.ic-preview-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition-property: background-color, color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.ic-preview-close:hover { background: var(--surface-2); color: var(--text-primary); }
.ic-preview-panel img { display: block; max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; margin: 0 auto; }
.ic-preview-meta { margin-top: 10px; font-size: 12.5px; color: var(--text-secondary); text-align: left; }

/* ─── Inline converter — spacious modifier (카테고리 전용 페이지, 홈보다 넓은 컨테이너) ─── */
.ic-card-spacious .ic-row { padding: 18px 28px; gap: 16px; }
.ic-card-spacious .ic-head,
.ic-card-spacious .ic-foot { padding: 20px 28px; }

/* ─── 실행 페이지 공통 (convert-tool.js / compress-tool.js) ─── */
.tool-back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.tool-back-link:hover { color: var(--text-primary); }
.tool-empty { text-align: center; padding: 64px 24px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.tool-empty-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.tool-empty-desc { font-size: 14px; color: var(--text-secondary); margin-top: 8px; }

/* ─── 병합(merge) 실행 결과 — 단일 큰 카드 (여러 파일 → 1개 결과의 시각적 차별화) ─── */
.tool-merge-result { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 48px 24px; }
.tool-merge-result-icon { width: 72px; height: 72px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }

/* ─── FormatSelect (src/components/converter/FormatSelect.tsx) ─── */
.fmt-select { position: relative; width: 128px; flex-shrink: 0; }
.fmt-select-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font-size: 14px; font-weight: 500; text-transform: uppercase; cursor: pointer; transition: border-color 150ms ease; }
.fmt-select-btn:hover, .fmt-select-btn.open { border-color: var(--accent); }
.fmt-select-btn svg { transition: transform 200ms ease; flex-shrink: 0; }
.fmt-select-btn.open svg { transform: rotate(180deg); }
.fmt-select-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmt-select-pop { position: fixed; width: 220px; z-index: 9999; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; animation: slide-down 150ms ease-out; }
.fmt-select-search { padding: 8px 8px 6px; }
.fmt-select-search input { width: 100%; height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-primary); outline: none; }
.fmt-select-search input:focus { border-color: var(--accent); }
.fmt-select-tabs { display: flex; gap: 4px; padding: 0 8px 6px; }
.fmt-select-tabs button { flex: 1; padding: 4px; font-size: 10px; font-weight: 500; border-radius: 6px; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; }
.fmt-select-tabs button.active { background: var(--accent-soft); color: var(--accent); }
.fmt-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 8px 8px; max-height: 240px; overflow-y: auto; }
.fmt-select-item { padding: 8px 4px; border-radius: 8px; font-size: 12px; font-weight: 500; text-transform: uppercase; border: none; background: transparent; color: var(--text-primary); cursor: pointer; }
.fmt-select-item:hover { background: var(--surface-2); }
.fmt-select-item.selected { background: var(--accent-soft); color: var(--accent); }
.fmt-select-empty { grid-column: 1 / -1; text-align: center; padding: 16px 0; font-size: 12px; color: var(--text-secondary); }
