/* Extracted from imagepress.html <style> */
  /* ==============================
     DESIGN TOKENS
  ============================== */
  :root {
    --sky-0: #e0f2fe;
    --sky-1: #bae6fd;
    --sky-2: #7dd3fc;
    --sky-3: #38bdf8;
    --sky-4: #0ea5e9;
    --sky-5: #0284c7;
    --sky-deep: #0c4a6e;
    --glass-bg: rgba(255,255,255,0.18);
    --glass-border: rgba(255,255,255,0.45);
    --glass-shadow: rgba(14,165,233,0.13);
    --blur: 18px;
    --radius: 20px;
    --text-main: #0c4a6e;
    --text-sub: #0369a1;
    --accent: #0ea5e9;
    --danger: #f87171;
    --success: #34d399;
    --card-bg: rgba(255,255,255,0.22);
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Syne', sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 25%, #7dd3fc 55%, #38bdf8 80%, #0ea5e9 100%);
    color: var(--text-main);
  }

  body::before {
    content: '';
    position: fixed; inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 20% 20%, rgba(255,255,255,0.38) 0%, transparent 60%),
      radial-gradient(ellipse 60% 40% at 80% 70%, rgba(186,230,253,0.4) 0%, transparent 55%),
      radial-gradient(ellipse 40% 30% at 60% 10%, rgba(255,255,255,0.28) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
    animation: atmosphereShift 12s ease-in-out infinite alternate;
  }
  @keyframes atmosphereShift { 0%{opacity:.7} 100%{opacity:1} }

  /* 구름: viewport 진입 시만 애니메이션 (IntersectionObserver로 제어) */
  .cloud {
    position: fixed; border-radius: 50%;
    background: rgba(255,255,255,0.22); filter: blur(40px);
    pointer-events: none; z-index: 0;
    animation-play-state: paused;
    animation: drift linear infinite;
    animation-play-state: running;
  }
  .cloud:nth-child(1){width:340px;height:180px;top:8%;left:-80px;animation-duration:30s}
  .cloud:nth-child(2){width:220px;height:120px;top:55%;right:-60px;animation-duration:22s;animation-delay:-8s}
  .cloud:nth-child(3){width:280px;height:150px;top:30%;left:60%;animation-duration:26s;animation-delay:-14s}
  @keyframes drift{0%{transform:translate(0,0)}50%{transform:translate(40px,-20px)}100%{transform:translate(0,0)}}

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

  /* ==============================
     ROOT LAYOUT
  ============================== */
  #app {
    position: relative; z-index: 1;
    width: 100%; height: 100%;
    display: flex;
  }

  /* ==============================
     LEFT PANEL
  ============================== */
  .left-panel {
    flex: 1;
    min-width: 280px;
    max-width: 480px;
    height: 100%;
    padding: 22px 18px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(14,165,233,0.2) transparent;
  }
  .left-panel::-webkit-scrollbar { width: 4px; }
  .left-panel::-webkit-scrollbar-thumb { background: rgba(14,165,233,0.25); border-radius: 99px; }

  /* ==============================
     RIGHT PANEL
  ============================== */
  .right-panel {
    flex: 2;
    height: 100%;
    padding: 22px 22px 22px 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
  }

  /* ==============================
     GLASS CARD
  ============================== */
  .glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 40px var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.6);
  }

  /* ==============================
     LOGO / HEADER
  ============================== */
  .logo-wrap {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
    animation: slideDown .5s cubic-bezier(.22,1,.36,1) both;
  }
  .logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--sky-4), var(--sky-5));
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(14,165,233,0.35);
  }
  .logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800; font-size: 1.18rem;
    color: var(--text-main); letter-spacing: -0.03em; line-height: 1.1;
  }
  .logo-sub { font-size: .7rem; color: var(--text-sub); margin-top: 1px; font-family: 'Syne', sans-serif; }

  /* Language toggle */
  .lang-toggle {
    margin-left: auto;
    background: rgba(255,255,255,0.4);
    border: 1.5px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-sub);
    font-family: 'Syne', sans-serif;
    font-size: .7rem; font-weight: 700;
    padding: 4px 9px; cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
  }
  .lang-toggle:hover { background: rgba(255,255,255,0.65); transform: scale(1.05); }

  /* ==============================
     DROP ZONE
  ============================== */
  .drop-zone {
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative; overflow: hidden;
    animation: slideDown .5s cubic-bezier(.22,1,.36,1) .05s both;
  }
  .drop-zone-inner { padding: 22px 16px; }
  .drop-zone::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(14,165,233,0.07) 0%, transparent 70%);
    pointer-events: none;
  }
  .drop-zone.dragover {
    background: rgba(14,165,233,0.14); transform: scale(1.015);
    box-shadow: 0 12px 60px rgba(14,165,233,0.22), inset 0 1px 0 rgba(255,255,255,0.6);
  }
  .drop-icon {
    width: 50px; height: 50px; margin: 0 auto 9px;
    background: linear-gradient(135deg, rgba(14,165,233,0.15), rgba(2,132,199,0.1));
    border: 2px dashed rgba(14,165,233,0.4);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; transition: transform 0.3s ease;
  }
  .drop-zone:hover .drop-icon, .drop-zone.dragover .drop-icon { transform: translateY(-3px) scale(1.07); }
  .drop-zone h2 {
    font-family: 'Syne', sans-serif;
    font-size: .9rem; font-weight: 700; color: var(--text-main); margin-bottom: 3px;
  }
  .drop-zone p { font-size: .76rem; color: var(--text-sub); font-family: 'Syne', sans-serif; }
  .drop-zone p span {
    color: var(--accent); font-weight: 500; cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
  }
  .file-input { display: none; }
  .limit-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.25);
    border-radius: 50px; padding: 4px 11px;
    font-size: .68rem; font-weight: 500; color: var(--sky-5); margin-top: 9px;
    transition: all .2s ease; font-family: 'Syne', sans-serif;
  }

  /* ==============================
     SETTINGS CARD
  ============================== */
  .settings-card {
    flex-shrink: 0;
    animation: slideDown .5s cubic-bezier(.22,1,.36,1) .08s both;
    overflow: hidden;
  }
  .settings-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; cursor: pointer;
    user-select: none;
    transition: background .15s ease;
  }
  .settings-header:hover { background: rgba(255,255,255,0.2); }
  .settings-title-row {
    display: flex; align-items: center; gap: 6px;
    font-family: 'Syne', sans-serif;
    font-size: .76rem; font-weight: 700; color: var(--text-main);
  }
  .settings-chevron {
    font-size: .85rem; color: var(--text-sub);
    transition: transform .22s ease;
    line-height: 1;
  }
  .settings-chevron.open { transform: rotate(90deg); }

  .settings-body {
    padding: 0 14px 12px;
    display: flex; flex-direction: column; gap: 10px;
    animation: fadeUp .22s ease both;
  }

  /* ──────────────────────────────
     Basic / Advanced 탭
  ────────────────────────────── */
  .settings-tabs {
    display: flex; gap: 4px;
    background: rgba(14,165,233,0.07);
    border-radius: 10px; padding: 3px;
    margin-bottom: 2px;
  }
  .settings-tab {
    flex: 1; padding: 4px 0;
    border: none; cursor: pointer;
    border-radius: 8px;
    font-family: 'Syne', sans-serif;
    font-size: .68rem; font-weight: 700;
    color: var(--text-sub);
    background: transparent;
    transition: all .15s ease;
  }
  .settings-tab.active {
    background: rgba(255,255,255,0.7);
    color: var(--text-main);
    box-shadow: 0 1px 6px rgba(14,165,233,0.12);
  }

  .setting-row { display: flex; flex-direction: column; gap: 5px; }
  .setting-lbl {
    font-size: .66rem; font-weight: 500; color: var(--text-sub);
    text-transform: uppercase; letter-spacing: .05em;
    font-family: 'Syne', sans-serif;
  }
  .fmt-group { display: flex; gap: 5px; }
  .fmt-btn {
    flex: 1; padding: 5px 0;
    background: rgba(255,255,255,0.3);
    border: 1.5px solid transparent;
    border-radius: 9px;
    font-family: 'Syne', sans-serif;
    font-size: .7rem; font-weight: 700; color: var(--text-sub);
    cursor: pointer; transition: all .17s ease;
  }
  .fmt-btn:hover { background: rgba(255,255,255,0.55); }
  .fmt-btn.active {
    background: linear-gradient(135deg, var(--sky-4), var(--sky-5));
    color: #fff; border-color: transparent;
    box-shadow: 0 2px 10px rgba(14,165,233,0.3);
  }
  .slider-head { display: flex; justify-content: space-between; align-items: center; }
  .slider-val {
    font-family: 'Syne', sans-serif;
    font-size: .72rem; font-weight: 700; color: var(--sky-5);
  }
  .compress-slider {
    width: 100%; appearance: none;
    height: 4px; border-radius: 99px;
    background: linear-gradient(90deg, var(--sky-3) var(--slider-pct,40%), rgba(14,165,233,0.15) var(--slider-pct,40%));
    outline: none; cursor: pointer;
  }
  .compress-slider::-webkit-slider-thumb {
    appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-4), var(--sky-5));
    box-shadow: 0 2px 8px rgba(14,165,233,0.4);
    cursor: pointer; transition: transform .15s ease;
  }
  .compress-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
  .compress-slider::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--sky-4), var(--sky-5));
    box-shadow: 0 2px 8px rgba(14,165,233,0.4);
    cursor: pointer;
  }
  .png-note {
    font-size: .66rem; color: var(--text-sub);
    background: rgba(14,165,233,0.07);
    border: 1px solid rgba(14,165,233,0.18);
    border-radius: 8px; padding: 6px 9px;
    line-height: 1.4; font-family: 'Syne', sans-serif;
  }

  /* ==============================
     STATS GRID
  ============================== */
  .stats-panel {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 6px; flex-shrink: 0;
    animation: fadeUp .35s ease both;
  }
  .stat-chip {
    background: rgba(255,255,255,0.28); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 9px 12px;
    display: flex; flex-direction: column; gap: 2px;
  }
  .stat-chip .val {
    font-family: 'Syne', sans-serif;
    font-size: .9rem; font-weight: 800; color: var(--text-main); line-height: 1;
  }
  .stat-chip .lbl { font-size: .6rem; color: var(--text-sub); text-transform: uppercase; letter-spacing: .05em; font-family: 'Syne', sans-serif; }
  .stat-chip.c-accent .val { color: var(--sky-5); }
  .stat-chip.c-green  .val { color: #0d9488; }

  /* ==============================
     SPACER
  ============================== */
  .flex-spacer { flex: 1; min-height: 0; }

  /* ==============================
     ACTION BUTTONS
  ============================== */
  .actions-stack {
    display: flex; flex-direction: column; gap: 8px;
    flex-shrink: 0;
    animation: slideDown .5s cubic-bezier(.22,1,.36,1) .15s both;
  }
  .btn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    border: none; cursor: pointer;
    border-radius: 13px; padding: 12px 18px;
    font-family: 'Syne', sans-serif;
    font-size: .855rem; font-weight: 700;
    transition: all .22s ease; letter-spacing: .01em; width: 100%;
  }
  .btn-primary {
    background: linear-gradient(135deg, var(--sky-4), var(--sky-5));
    color: #fff; box-shadow: 0 4px 20px rgba(14,165,233,0.35);
  }
  .btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(14,165,233,0.45); }
  .btn-primary:disabled { opacity: .42; cursor: not-allowed; transform: none; }
  .btn-secondary {
    background: rgba(255,255,255,0.38); color: var(--text-main);
    border: 1.5px solid var(--glass-border); backdrop-filter: blur(8px);
  }
  .btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.62); transform: translateY(-1px); }
  .btn-secondary:disabled { opacity: .35; cursor: not-allowed; }
  .mobile-share-only { display: none; }
  .btn-danger {
    background: rgba(248,113,113,0.1); color: var(--danger);
    border: 1px solid rgba(248,113,113,0.22);
  }
  .btn-danger:hover:not(:disabled) { background: rgba(248,113,113,0.2); }
  .btn-danger:disabled { opacity: .35; cursor: not-allowed; }

  /* ==============================
     QUEUE HEADER
  ============================== */
  .queue-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 11px; flex-shrink: 0;
  }
  .section-title {
    font-family: 'Syne', sans-serif;
    font-size: .75rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--text-sub);
  }
  .queue-count-badge {
    background: rgba(14,165,233,0.12); border: 1px solid rgba(14,165,233,0.25);
    border-radius: 50px; padding: 3px 10px;
    font-size: .68rem; font-weight: 600; color: var(--sky-5);
    font-family: 'Syne', sans-serif;
  }
  .queue-action-btn {
    background: rgba(255,255,255,0.35); border: 1px solid var(--glass-border);
    border-radius: 8px; padding: 3px 9px;
    font-size: .67rem; font-weight: 600; color: var(--text-sub);
    cursor: pointer; transition: all .16s ease;
    display: flex; align-items: center; gap: 4px;
    font-family: 'Syne', sans-serif;
  }
  .queue-action-btn:hover { background: rgba(255,255,255,0.6); color: var(--text-main); }
  .queue-action-btn.retry { color: var(--danger); border-color: rgba(248,113,113,0.3); }
  .queue-action-btn.retry:hover { background: rgba(248,113,113,0.12); }

  /* ==============================
     SCROLLABLE QUEUE
  ============================== */
  .queue-scroll {
    flex: 1; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column; gap: 8px;
    padding-right: 4px;
    scrollbar-width: thin; scrollbar-color: rgba(14,165,233,0.28) transparent;
  }
  .queue-scroll::-webkit-scrollbar { width: 5px; }
  .queue-scroll::-webkit-scrollbar-track { background: transparent; }
  .queue-scroll::-webkit-scrollbar-thumb { background: rgba(14,165,233,0.28); border-radius: 99px; }

  .empty-state {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 9px; color: var(--text-sub); opacity: .65;
    font-size: .86rem; text-align: center; padding: 24px;
    user-select: none; font-family: 'Syne', sans-serif;
  }
  .empty-icon { font-size: 2.4rem; opacity: .55; }

  /* ==============================
     QUEUE ITEM
  ============================== */
  .queue-item {
    background: rgba(255,255,255,0.32);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 14px; padding: 11px 13px;
    display: grid; grid-template-columns: 42px 1fr auto;
    align-items: center; gap: 11px;
    transition: background .2s ease;
    animation: itemIn .28s cubic-bezier(.22,1,.36,1) both;
    flex-shrink: 0;
  }
  @keyframes itemIn { from{opacity:0;transform:translateX(10px)} to{opacity:1;transform:translateX(0)} }
  .queue-item:hover { background: rgba(255,255,255,0.46); }

  .thumb {
    width: 42px; height: 42px; border-radius: 9px; object-fit: cover;
    background: rgba(14,165,233,0.1); border: 1px solid rgba(255,255,255,0.5);
    flex-shrink: 0; transition: transform .2s ease;
  }
  .thumb.clickable { cursor: zoom-in; }
  .thumb.clickable:hover { transform: scale(1.08); }

  .item-info { min-width: 0; }
  .item-name {
    font-size: .8rem; font-weight: 500; color: var(--text-main);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
    font-family: 'Syne', sans-serif;
  }
  .item-meta {
    font-size: .69rem; color: var(--text-sub);
    display: flex; gap: 5px; align-items: center; flex-wrap: wrap;
    font-family: 'Syne', sans-serif;
  }

  /* ── 예상 용량 뱃지 ── */
  .item-estimate {
    font-size: .63rem; color: var(--text-sub);
    opacity: .7; font-style: italic;
    font-family: 'Syne', sans-serif;
  }

  .size-badge {
    padding: 1px 6px; border-radius: 50px;
    background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.2);
    font-size: .63rem; color: var(--sky-5);
    font-family: 'Syne', sans-serif;
  }
  .item-actions { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
  .btn-icon {
    width: 29px; height: 29px; border: none; cursor: pointer;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: all .17s ease;
    background: rgba(255,255,255,0.4); color: var(--text-sub);
  }
  .btn-icon:hover { background: rgba(255,255,255,0.72); transform: scale(1.1); }
  .btn-icon.download { color: var(--sky-5); }
  .btn-icon.remove   { color: var(--danger); }
  .btn-icon.compare  { color: var(--sky-5); }
  .btn-icon.retry-single { color: var(--danger); }

  /* ── 에러 메시지 ── */
  .item-error {
    font-size: .65rem; color: var(--danger);
    margin-top: 3px; font-family: 'Syne', sans-serif;
    line-height: 1.45;
    white-space: pre-wrap;
  }

  .item-progress { margin-top: 5px; display: none; }
  .progress-track {
    height: 4px; border-radius: 99px;
    background: rgba(14,165,233,0.12); overflow: hidden;
  }
  .progress-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--sky-3), var(--sky-5));
    width: 0%; transition: width .35s ease; position: relative;
  }
  .progress-fill::after {
    content: ''; position: absolute; right:0; top:0; bottom:0; width:22px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5));
    animation: shimmer 1.1s infinite;
  }
  @keyframes shimmer{0%{opacity:0}50%{opacity:1}100%{opacity:0}}
  .progress-label {
    font-size: .64rem; color: var(--text-sub); margin-top: 3px;
    display: flex; justify-content: space-between;
    font-family: 'Syne', sans-serif;
  }
  .status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(14,165,233,0.22); flex-shrink: 0;
  }
  .status-dot.done { background: var(--success); box-shadow: 0 0 6px var(--success); }
  .status-dot.error { background: var(--danger); }
  .status-dot.processing { background: var(--accent); animation: dotPulse 1s infinite; }
  @keyframes dotPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(1.35)}}

  /* ==============================
     COMPARE MODAL
  ============================== */
  .compare-modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .2s ease both;
  }
  @keyframes fadeIn{from{opacity:0}to{opacity:1}}
  .compare-overlay {
    position: absolute; inset: 0;
    background: rgba(12, 74, 110, 0.55);
    backdrop-filter: blur(6px);
    cursor: pointer;
  }
  .compare-box {
    position: relative; z-index: 1;
    width: min(90vw, 760px);
    max-height: 88vh;
    padding: 18px;
    display: flex; flex-direction: column; gap: 12px;
    animation: scaleIn .22s cubic-bezier(.22,1,.36,1) both;
  }
  @keyframes scaleIn{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
  .compare-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
  }
  .compare-title {
    font-family: 'Syne', sans-serif;
    font-size: .85rem; font-weight: 800; color: var(--text-main);
  }

  .compare-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 55vh;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0,0,0,0.1);
    cursor: ew-resize;
    user-select: none;
    flex-shrink: 0;
  }
  .compare-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    pointer-events: none;
  }
  .compare-after { z-index: 1; }
  .compare-before-wrap {
    position: absolute; inset: 0; z-index: 2;
    overflow: hidden;
  }
  .compare-before {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    pointer-events: none;
  }
  .compare-handle {
    position: absolute; top: 0; bottom: 0; z-index: 3;
    width: 2px; background: #fff;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    transform: translateX(-50%);
    left: 50%;
    display: flex; align-items: center; justify-content: center;
  }
  .compare-handle::before {
    content: '';
    position: absolute; top: 0; bottom: 0;
    width: 40px; transform: translateX(-50%);
    left: 50%; cursor: ew-resize;
  }
  .compare-handle-grip {
    width: 34px; height: 34px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--sky-5);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    flex-shrink: 0;
    cursor: ew-resize;
  }
  .compare-lbl {
    position: absolute; bottom: 10px; z-index: 4;
    background: rgba(255,255,255,0.85);
    border-radius: 6px; padding: 2px 8px;
    font-size: .66rem; font-weight: 600; color: var(--text-main);
    pointer-events: none; font-family: 'Syne', sans-serif;
  }
  .compare-lbl-left  { left: 10px; }
  .compare-lbl-right { right: 10px; }

  .compare-info {
    display: flex; flex-direction: column; gap: 10px;
    font-size: .74rem; color: var(--text-sub); flex-shrink: 0;
    font-family: 'Syne', sans-serif;
  }
  .compare-info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
  }
  .ci-card {
    background: rgba(255,255,255,0.38);
    border: 1px solid rgba(14,165,233,0.14);
    border-radius: 10px;
    padding: 8px 10px;
  }
  .ci-k {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-sub);
    margin-bottom: 3px;
  }
  .ci-v {
    font-size: .75rem;
    color: var(--text-main);
    font-weight: 700;
  }
  .compare-info-summary {
    display: flex; gap: 8px; flex-wrap: wrap;
    justify-content: center; align-items: center;
  }
  .compare-shortcut { font-size: .66rem; color: var(--text-sub); }

  .compare-warning {
    background: rgba(248,113,113,0.13);
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: 8px;
    color: #b91c1c;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.45;
    padding: 8px 10px;
  }
  .warning-badge {
    background: rgba(248,113,113,0.12);
    border-color: rgba(248,113,113,0.3);
    color: #b91c1c;
  }

  /* ==============================
     HISTORY
  ============================== */
  .history-panel {
    flex-shrink: 0;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.32);
  }
  .history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
  }
  .history-heading {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }
  .history-note,
  .history-empty {
    font-family: 'Syne', sans-serif;
    font-size: .65rem;
    color: var(--text-sub);
    opacity: .72;
  }
  .history-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  .history-action-btn {
    height: 24px;
    border: 1px solid rgba(14,165,233,0.16);
    border-radius: 7px;
    background: rgba(255,255,255,0.34);
    color: var(--text-main);
    cursor: pointer;
    font-family: 'Syne', sans-serif;
    font-size: .62rem;
    font-weight: 800;
    line-height: 1;
    padding: 0 8px;
    transition: transform .16s ease, background .16s ease, opacity .16s ease;
  }
  .history-action-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.56);
    transform: translateY(-1px);
  }
  .history-action-btn:disabled {
    cursor: not-allowed;
    opacity: .45;
  }
  .history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 5px;
    max-height: 88px;
    overflow-y: auto;
    padding-right: 4px;
  }
  .history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    background: rgba(255,255,255,0.28);
    border: 1px solid var(--glass-border);
    border-radius: 7px;
    padding: 5px 7px;
  }
  .history-item.warning {
    border-color: rgba(248,113,113,0.28);
    background: rgba(248,113,113,0.08);
  }
  .history-main { min-width: 0; }
  .history-name {
    font-family: 'Syne', sans-serif;
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 1px;
    font-family: 'Syne', sans-serif;
    font-size: .58rem;
    color: var(--text-sub);
    opacity: .82;
  }
  .history-badge {
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(14,165,233,0.1);
    border: 1px solid rgba(14,165,233,0.2);
    color: var(--sky-5);
    font-family: 'Syne', sans-serif;
    font-size: .6rem;
    font-weight: 800;
    padding: 2px 6px;
  }

  /* ==============================
     MOBILE
  ============================== */
  @media (max-width: 719px) {
    html, body { overflow: hidden; }
    #app { flex-direction: column; height: 100dvh; }

    .left-panel {
      width: 100%; min-width: unset;
      height: auto; flex-shrink: 0;
      padding: 12px 12px 8px;
      gap: 8px;
      max-height: 60vh;
    }
    .stats-panel { display: none !important; }
    .logo-sub { display: none; }
    .logo-wrap { gap: 8px; }
    .logo-icon { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }
    .logo-text { font-size: 1.05rem; }
    .drop-zone-inner { padding: 13px 12px; }
    .drop-icon { width: 38px; height: 38px; font-size: 17px; margin-bottom: 6px; }
    .drop-zone h2 { font-size: .84rem; }
    .drop-zone p  { font-size: .72rem; }
    .limit-badge  { font-size: .64rem; margin-top: 7px; }
    .flex-spacer { display: none; }
    .actions-stack { flex-direction: row; flex-wrap: nowrap; gap: 6px; }
    .actions-stack .btn { flex: 1; padding: 10px 6px; font-size: .74rem; border-radius: 11px; }
    .mobile-share-only:not([hidden]) { display: flex; }
    .right-panel { flex: 1; min-height: 0; padding: 0 12px 12px; }
    .compare-box { width: 96vw; padding: 14px; }
  }

  /* ==============================
     ANIMATIONS
  ============================== */
  @keyframes slideDown { from{opacity:0;transform:translateY(-14px)} to{opacity:1;transform:translateY(0)} }
  @keyframes fadeUp    { from{opacity:0;transform:translateY(10px)}  to{opacity:1;transform:translateY(0)} }

  /* ==============================
     PARALLEL STEPPER
  ============================== */
  .parallel-stepper {
    display: flex; align-items: center; gap: 7px;
  }
  .stepper-btn {
    width: 28px; height: 28px; border-radius: 8px;
    background: rgba(255,255,255,0.38);
    border: 1.5px solid var(--glass-border);
    color: var(--text-main); font-size: 1rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .15s ease; flex-shrink: 0; line-height: 1;
    font-family: 'Syne', sans-serif;
  }
  .stepper-btn:hover:not(:disabled) { background: rgba(255,255,255,0.65); transform: scale(1.08); }
  .stepper-btn:disabled { opacity: .3; cursor: not-allowed; transform: none; }
  .stepper-val {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: .92rem; color: var(--sky-5);
    min-width: 18px; text-align: center;
  }
  .stepper-track {
    flex: 1; display: flex; gap: 3px; align-items: center;
  }
  .stepper-dot {
    flex: 1; height: 4px; border-radius: 99px;
    background: rgba(14,165,233,0.15);
    transition: background .18s ease;
  }
  .stepper-dot.active { background: var(--sky-4); }
  .stepper-info {
    font-size: .64rem; color: var(--text-sub);
    font-style: italic; font-family: 'Syne', sans-serif;
  }

  /* ==============================
     LOSSLESS
  ============================== */
  .lossless-note {
    font-size: .66rem; color: #0d9488;
    background: rgba(52,211,153,0.09);
    border: 1px solid rgba(52,211,153,0.28);
    border-radius: 8px; padding: 7px 10px;
    line-height: 1.5; font-family: 'Syne', sans-serif;
  }
  .fmt-btn.lossless-active {
    background: linear-gradient(135deg, #0d9488, #059669);
    color: #fff; border-color: transparent;
    box-shadow: 0 2px 10px rgba(13,148,136,0.3);
  }

  /* ==============================
     BATCH GROUPS
  ============================== */
  .batch-group-divider {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 2px 2px;
    font-size: .63rem; font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase; letter-spacing: .06em;
    flex-shrink: 0; font-family: 'Syne', sans-serif;
  }
  .batch-group-divider .bgd-line {
    flex: 1; height: 1px; background: rgba(14,165,233,0.18); border-radius: 99px;
  }
  .batch-dl-btn {
    background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.25);
    border-radius: 6px; padding: 2px 9px;
    font-size: .62rem; color: var(--sky-5); font-weight: 700;
    cursor: pointer; transition: all .15s ease; white-space: nowrap;
    font-family: 'Syne', sans-serif;
  }
  .batch-dl-btn:hover { background: rgba(14,165,233,0.22); transform: scale(1.04); }
  .batch-dl-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
