@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --paper: #f4f1e9;
  --paper-deep: #eae6dc;
  --surface: #fffefa;
  --surface-blue: #f4f7ff;
  --ink: #17243a;
  --ink-soft: #536178;
  --ink-faint: #8290a3;
  --line: #dce1e8;
  --line-strong: #c6cfdb;
  --cobalt: #2d5cf5;
  --cobalt-deep: #1942c0;
  --cobalt-soft: #eaf0ff;
  --lime: #d8f36a;
  --lime-ink: #526515;
  --success: #16824f;
  --success-soft: #eaf8f0;
  --danger: #bd3c48;
  --danger-soft: #fff0f1;
  --shadow-card: 0 18px 50px rgba(31, 45, 72, 0.08), 0 2px 8px rgba(31, 45, 72, 0.04);
  --shadow-button: 0 8px 18px rgba(45, 92, 245, 0.2);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121826;
  --paper-deep: #1a2231;
  --surface: #1b2435;
  --surface-blue: #202c47;
  --ink: #f4f7fb;
  --ink-soft: #b9c4d5;
  --ink-faint: #91a0b6;
  --line: #344258;
  --line-strong: #4a5a73;
  --cobalt: #7e99ff;
  --cobalt-deep: #a8b8ff;
  --cobalt-soft: #203268;
  --lime: #d8f36a;
  --lime-ink: #d8f36a;
  --success: #61d69a;
  --success-soft: #173529;
  --danger: #ff8e9a;
  --danger-soft: #3a2028;
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .page-shell {
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

body[data-theme="dark"] .language-toggle,
body[data-theme="dark"] .header-action,
body[data-theme="dark"] .mobile-menu-toggle,
body[data-theme="dark"] .trust-pill,
body[data-theme="dark"] .privacy-aside,
body[data-theme="dark"] .install-app {
  background: rgba(27, 36, 53, 0.72);
}

body[data-theme="dark"] .dropzone { background: linear-gradient(135deg, rgba(32, 44, 71, 0.82), rgba(31, 45, 43, 0.68)); }
body[data-theme="dark"] .secondary-btn:hover { background: #27344a; }
body[data-theme="dark"] .icon-btn { border-color: #50617c; background: rgba(27, 36, 53, 0.92); }
body[data-theme="dark"] .image-card { background: #212b3c; }
body[data-theme="dark"] .image-thumb { background: #2d384c; }
body[data-theme="dark"] .info-step-card,
body[data-theme="dark"] .privacy-detail-card { background: rgba(27, 36, 53, 0.78); }
body[data-theme="dark"] .privacy-callout { background: #0b1220; }
body[data-theme="dark"] .progress-track { background: #36445b; }
body[data-theme="dark"] .ready-card { border-color: #2d674b; background: #14271f; }
body[data-theme="dark"] .error-card { border-color: #6c3640; background: #2b1b22; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid rgba(45, 92, 245, 0.4);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  color: white;
  background: var(--ink);
  transition: top 180ms ease;
}
.skip-link:focus { top: 16px; }

.page-shell {
  min-height: 100vh;
  overflow: hidden;
  background-image: linear-gradient(rgba(50, 67, 95, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(50, 67, 95, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
}

.site-header, .site-footer, .hero, .workspace-shell, .pdf-image-shell, .compress-image-shell, .info-page {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid rgba(198, 207, 219, 0.68);
}

.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 9px 9px 9px 3px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-5deg);
}
.brand-mark.small { width: 22px; height: 22px; border-radius: 6px 6px 6px 2px; font-size: 13px; }

.site-nav { display: flex; align-items: center; gap: 26px; margin-left: 90px; }
.nav-link { position: relative; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.nav-link::after { content: ''; position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; background: var(--cobalt); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.tools-menu { position: static; }
.tools-menu-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; font: inherit; }
.tools-menu.is-active .tools-menu-toggle { color: var(--ink); }
.nav-chevron { display: block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 180ms ease; }
.tools-menu-toggle[aria-expanded="true"] .nav-chevron { transform: translateY(2px) rotate(225deg); }
.tools-menu-panel { position: absolute; z-index: 25; top: calc(100% + 18px); left: 50%; width: min(1160px, calc(100vw - 48px)); padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 20px 44px rgba(31, 45, 72, 0.16), 0 2px 8px rgba(31, 45, 72, 0.06); animation: tools-menu-in 160ms ease both; transform: translateX(-50%); }
.tools-menu-panel[hidden] { display: none; }
@keyframes tools-menu-in { from { opacity: 0; transform: translate(-50%, -5px); } to { opacity: 1; transform: translate(-50%, 0); } }
.tools-menu-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 9px 14px; border-radius: 12px; background: var(--cobalt-soft); }
.tools-menu-kicker, .tools-menu-description { margin: 0; }
.tools-menu-kicker { color: var(--cobalt-deep); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.tools-menu-description { margin-top: 0; color: var(--ink); font-size: 14px; font-weight: 700; }
.tools-menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tools-menu-group { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.tools-menu-group-label { margin: 2px 5px 7px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.tool-menu-item { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px; border-radius: 9px; color: var(--ink); transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.tool-menu-item:hover, .tool-menu-item.active { color: var(--cobalt-deep); background: var(--cobalt-soft); transform: translateX(2px); }
.tool-menu-item.is-coming-soon { position: relative; cursor: default; color: var(--ink-soft); background: transparent; opacity: 0.78; }
.tool-menu-item.is-coming-soon:hover { color: var(--ink-soft); background: transparent; transform: none; }
.tool-menu-item.is-coming-soon .tool-menu-icon { color: var(--ink-faint); border-style: dashed; }
.tool-menu-item.is-coming-soon em { align-self: flex-start; margin-left: auto; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 8px; font-style: normal; letter-spacing: 0.05em; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.tool-menu-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--cobalt); font-size: 15px; }
.tool-menu-item strong, .tool-menu-item small { display: block; }
.tool-menu-item strong { font-size: 12px; }
.tool-menu-item small { margin-top: 2px; color: var(--ink-faint); font-size: 10px; }
.mobile-menu-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.language-switcher { position: relative; }
.language-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: rgba(255, 254, 250, 0.68); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.language-toggle:hover, .language-toggle[aria-expanded="true"] { border-color: var(--cobalt); background: var(--surface); transform: translateY(-1px); }
.theme-toggle { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: rgba(255, 254, 250, 0.68); font-size: 16px; line-height: 1; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.theme-toggle:hover { border-color: var(--cobalt); background: var(--surface); transform: translateY(-1px); }
body[data-theme="dark"] .theme-toggle { background: rgba(27, 36, 53, 0.72); }
.language-globe { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: var(--font-sans); font-size: 12px; line-height: 1; }
.language-chevron { display: block; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-faint); border-bottom: 1.5px solid var(--ink-faint); transform: translateY(-2px) rotate(45deg); transition: transform 180ms ease; }
.language-toggle[aria-expanded="true"] .language-chevron { transform: translateY(2px) rotate(225deg); }
.language-menu { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: 236px; padding: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 34px rgba(31, 45, 72, 0.14), 0 2px 6px rgba(31, 45, 72, 0.06); animation: language-menu-in 160ms ease both; }
.language-menu[hidden] { display: none; }
@keyframes language-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.language-menu-label { margin: 3px 8px 8px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.language-option { display: grid; width: 100%; grid-template-columns: 26px 1fr 16px; align-items: center; gap: 8px; min-height: 41px; padding: 0 8px; border: 0; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; transition: background 160ms ease, color 160ms ease; }
.language-option:hover, .language-option.is-selected { color: var(--cobalt-deep); background: var(--cobalt-soft); }
.language-option-code { color: var(--ink-faint); font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.language-option-name { font-size: 13px; font-weight: 600; }
.language-check { color: var(--cobalt); font-size: 13px; opacity: 0; }
.language-option.is-selected .language-check { opacity: 1; }

.header-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.55);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.header-action:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-1px); }

.hero { display: grid; grid-template-columns: minmax(280px, 0.83fr) minmax(480px, 1.17fr); gap: 72px; align-items: center; padding: 76px 0 90px; }
.hero-copy { padding-left: 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; color: var(--cobalt-deep); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--cobalt); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 540px; margin-bottom: 24px; color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(3.2rem, 5.2vw, 5.3rem); font-weight: 400; letter-spacing: -0.07em; line-height: 0.97; }
h1 em { color: var(--cobalt); font-style: italic; }
.hero-description { max-width: 450px; margin-bottom: 28px; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid rgba(198, 207, 219, 0.9); border-radius: 999px; background: rgba(255, 254, 250, 0.52); color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.trust-pill .check { display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: var(--lime-ink); background: var(--lime); font-size: 10px; font-weight: 700; }

.tool-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.tool-card::before { content: '01 / CONVERTER'; position: absolute; top: -13px; left: 30px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink-faint); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; }
.tool-card-inner { padding: 32px; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.tool-title { margin: 0 0 4px; font-size: 21px; letter-spacing: -0.04em; }
.tool-subtitle { margin: 0; color: var(--ink-faint); font-size: 13px; }
.local-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; color: var(--lime-ink); background: #f2fad0; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.03em; white-space: nowrap; }
.local-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #9ab836; box-shadow: 0 0 0 3px rgba(154, 184, 54, 0.14); }

.dropzone { display: flex; min-height: 326px; flex-direction: column; align-items: center; justify-content: center; padding: 32px; border: 1.5px dashed var(--line-strong); border-radius: 18px; background: linear-gradient(135deg, rgba(244, 247, 255, 0.82), rgba(250, 251, 247, 0.75)); text-align: center; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--cobalt); background: var(--cobalt-soft); transform: translateY(-2px); }
.upload-mark { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 18px; border-radius: 16px 16px 16px 5px; color: white; background: var(--cobalt); box-shadow: var(--shadow-button); transform: rotate(-4deg); }
.upload-mark svg { transform: rotate(4deg); }
.dropzone h2 { margin-bottom: 7px; font-size: 20px; letter-spacing: -0.04em; }
.dropzone p { margin-bottom: 22px; color: var(--ink-soft); font-size: 13px; }
.dropzone p strong { color: var(--ink); font-weight: 600; }
.supported-formats { margin-top: 18px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; }
.inline-error { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 11px 12px; border: 1px solid #f0c2c7; border-radius: 10px; color: var(--danger); background: var(--danger-soft); font-size: 12px; line-height: 1.45; }
.inline-error svg { flex: 0 0 auto; margin-top: 1px; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.primary-btn, .secondary-btn, .text-btn, .icon-btn { border: 0; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
.primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 18px; border-radius: 11px; color: white; background: var(--cobalt); box-shadow: var(--shadow-button); font-size: 14px; font-weight: 700; }
.primary-btn:hover { background: var(--cobalt-deep); box-shadow: 0 10px 24px rgba(45, 92, 245, 0.28); transform: translateY(-2px); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.secondary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: var(--surface); font-size: 13px; font-weight: 700; }
.secondary-btn:hover { border-color: var(--ink); background: #fff; transform: translateY(-1px); }
.text-btn { padding: 5px 0; color: var(--cobalt-deep); background: transparent; font-size: 13px; font-weight: 700; }
.text-btn:hover { color: var(--ink); }
.icon-btn { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(255,255,255,0.7); border-radius: 8px; color: var(--ink); background: rgba(255,254,250,0.92); box-shadow: 0 2px 8px rgba(23,36,58,0.1); }
.icon-btn:hover { color: var(--danger); border-color: #f3c6cb; background: var(--danger-soft); }
.rotate-btn:hover { color: var(--cobalt); border-color: #c8d3ff; background: var(--cobalt-soft); }

.info-page { width: min(1160px, calc(100% - 48px)); margin-inline: auto; padding: 76px 0 100px; }
.info-page-header { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr); gap: 72px; align-items: end; padding-bottom: 58px; border-bottom: 1px solid var(--line); }
.info-page-header h1 { max-width: 720px; margin-bottom: 0; font-size: clamp(3.2rem, 6vw, 5.8rem); }
.info-page-intro { max-width: 460px; padding-bottom: 4px; }
.info-page-intro p { margin: 0 0 24px; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }
.info-step-grid, .privacy-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 58px; }
.info-step-card, .privacy-detail-card { min-height: 220px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 254, 250, 0.62); box-shadow: 0 8px 24px rgba(31, 45, 72, 0.035); }
.info-step-card .step-number, .privacy-detail-card .info-card-icon { display: block; margin-bottom: 54px; color: var(--cobalt); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; }
.info-step-card h2, .privacy-detail-card h2 { margin-bottom: 9px; font-size: 19px; letter-spacing: -0.04em; }
.info-step-card p, .privacy-detail-card p { max-width: 31ch; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.privacy-callout { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 16px; padding: 25px 28px; border-radius: var(--radius-md); color: white; background: var(--ink); }
.privacy-callout .section-kicker { margin-bottom: 8px; color: var(--lime); }
.privacy-callout h2 { margin: 0; font-family: var(--font-mono); font-size: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.privacy-callout-mark { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,0.2); border-radius: 13px; color: var(--lime); }
.privacy-callout-mark svg { width: 20px; height: 20px; }
.section-kicker { margin: 0 0 10px; color: var(--cobalt-deep); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.section-title { max-width: 480px; margin-bottom: 34px; font-family: Georgia, 'Times New Roman', serif; font-size: 37px; font-weight: 400; letter-spacing: -0.06em; line-height: 1.03; }

.workspace-shell { padding: 60px 0 92px; }
.workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.workspace-header h1 { max-width: none; margin-bottom: 9px; font-size: clamp(2.5rem, 4vw, 4.3rem); }
.workspace-header p { margin: 0; color: var(--ink-soft); }
.workspace-actions { display: flex; align-items: center; gap: 10px; }
.workspace-primary-action { display: flex; justify-content: flex-end; gap: 8px; margin: -8px 0 18px; }
.workspace-primary-action .primary-btn { min-width: 190px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.images-panel, .settings-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.images-panel { padding: 26px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -0.04em; }
.panel-heading span { color: var(--ink-faint); font-family: var(--font-mono); font-size: 11px; }
.image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.image-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #f2f4f7; transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.image-card:hover, .image-card.dragging { border-color: var(--cobalt); box-shadow: 0 8px 20px rgba(31, 45, 72, 0.11); transform: translateY(-2px); }
.image-card.dragging { opacity: 0.55; }
.image-thumb { position: relative; aspect-ratio: 1.12 / 1; overflow: hidden; background: #e6eaf0; }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 220ms cubic-bezier(.2,.75,.25,1); }
.page-number { position: absolute; top: 9px; left: 9px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: white; background: rgba(23, 36, 58, 0.78); font-family: var(--font-mono); font-size: 10px; }
.image-card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.image-card-actions .icon-btn { width: 36px; height: 36px; }
.image-meta { padding: 11px 12px 12px; }
.image-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.image-meta-copy { min-width: 0; flex: 1; }
.image-name { overflow: hidden; margin: 0 0 2px; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.image-size { margin: 0; color: var(--ink-faint); font-family: var(--font-mono); font-size: 10px; }
.image-order-actions { display: flex; flex: 0 0 auto; gap: 4px; }
.image-order-actions .icon-btn { width: 44px; height: 44px; border-color: var(--line); background: var(--surface); box-shadow: none; }
.order-btn:hover:not(:disabled) { color: var(--cobalt); border-color: #c8d3ff; background: var(--cobalt-soft); }
.order-btn:disabled { cursor: not-allowed; opacity: 0.35; }
.drag-hint { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; color: var(--ink-faint); font-size: 11px; }
.image-adjust { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.image-adjust summary { color: var(--cobalt-deep); cursor: pointer; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.image-adjust summary::marker { color: var(--cobalt); }
.adjust-fields { display: grid; gap: 10px; padding-top: 12px; }
.adjust-select label, .range-field span { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.05em; text-transform: uppercase; }
.adjust-select select { width: 100%; height: 36px; margin-top: 5px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 11px; }
.range-field { display: block; }
.range-field input { width: 100%; margin: 8px 0 0; accent-color: var(--cobalt); }
.range-field output { color: var(--ink); font-size: 9px; }
.dropzone.compact { min-height: 96px; margin-top: 16px; border-radius: 12px; }
.dropzone.compact .upload-mark { width: 34px; height: 34px; margin: 0 0 8px; border-radius: 10px 10px 10px 3px; box-shadow: none; }
.dropzone.compact .upload-mark svg { width: 16px; height: 16px; }
.dropzone.compact h2 { margin: 0; font-size: 13px; }
.dropzone.compact p, .dropzone.compact .supported-formats { display: none; }
.settings-panel { position: sticky; top: 20px; padding: 24px; }
.settings-panel h2 { margin-bottom: 3px; font-size: 18px; letter-spacing: -0.04em; }
.target-size-control { margin: 18px 0 22px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-blue); }
.target-size-toggle { position: relative; display: flex !important; align-items: center; gap: 10px; min-height: 42px; margin: 0 !important; color: var(--ink); cursor: pointer; font-family: var(--font-sans) !important; font-size: 13px !important; letter-spacing: 0 !important; text-transform: none !important; }
.target-size-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.target-size-toggle:has(input:focus-visible) { outline: 3px solid rgba(45, 92, 245, 0.28); outline-offset: 4px; border-radius: 8px; }
.target-size-toggle-copy { display: grid; flex: 1; gap: 2px; }
.target-size-toggle-copy strong { font-size: 13px; }
.target-size-toggle-copy small { color: var(--ink-faint); font-size: 11px; line-height: 1.35; }
.target-size-switch { position: relative; display: block; width: 38px; height: 22px; flex: 0 0 auto; border-radius: 99px; background: var(--line-strong); transition: background 180ms ease; }
.target-size-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(23, 36, 58, 0.2); transition: transform 180ms ease; }
.target-size-toggle input:checked ~ .target-size-switch { background: var(--cobalt); }
.target-size-toggle input:checked ~ .target-size-switch::after { transform: translateX(16px); }
.target-size-field { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.target-size-field[hidden] { display: none; }
.target-size-field > label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.target-size-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}
.target-size-input-row:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(45, 92, 245, 0.1); }
.target-size-input-row .filename-input {
  width: 100%;
  height: 41px;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 9px 0 0 9px;
  background: transparent;
  box-shadow: none;
}
.target-size-input-row .filename-input:focus { border: 0; box-shadow: none; }
.target-size-input-row .select-wrap { position: relative; height: 100%; min-width: 70px; }
.target-size-input-row .select-wrap::after { right: 7px; width: 6px; height: 6px; }
.target-size-input-row .select-wrap select {
  appearance: none;
  width: 100%;
  height: 41px;
  padding: 0 22px 0 8px;
  border: 0;
  outline: none;
  border-radius: 0 9px 9px 0;
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
}
.target-size-field .field-hint { margin: 8px 2px 0; }
.field { margin-bottom: 18px; }
.field label, .field-label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.custom-size-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -6px 0 18px; }
.custom-size-fields[hidden] { display: none; }
.custom-size-field label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.custom-size-field input { height: 40px; }
.field.is-disabled { opacity: 0.55; }
.field.is-disabled select { cursor: not-allowed; }
.select-wrap { position: relative; }
.select-wrap::after { content: ''; position: absolute; top: 50%; right: 14px; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-faint); border-bottom: 1.5px solid var(--ink-faint); pointer-events: none; transform: translateY(-65%) rotate(45deg); }
.field select, .filename-input { width: 100%; height: 43px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; color: var(--ink); background: var(--surface); font-size: 13px; }
.field select { appearance: none; padding: 0 35px 0 12px; }
.filename-input { padding: 0 12px; }
.field select:focus, .filename-input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(45,92,245,0.1); }
.filename-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.extension { color: var(--ink-faint); font-family: var(--font-mono); font-size: 12px; }
.settings-divider { height: 1px; margin: 22px 0; background: var(--line); }
.settings-note { display: flex; gap: 9px; margin: 0 0 20px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.settings-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--cobalt); }
.settings-note-secondary { margin-top: -10px; }
.estimate-note { margin-top: -10px; color: var(--cobalt-deep); }
.convert-btn { width: 100%; }
.sticky-cta { display: none; }

.pdf-image-hero .tool-card::before { content: '02 / PDF TOOL'; }
.pdf-image-shell { padding: 60px 0 92px; }
.pdf-image-header { margin-bottom: 24px; }
.pdf-image-header h1 { max-width: 680px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-image-grid-layout { align-items: start; }
.pdf-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pdf-page-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.pdf-page-card:hover { border-color: var(--cobalt); box-shadow: 0 8px 20px rgba(31, 45, 72, 0.11); transform: translateY(-2px); }
.pdf-page-preview { position: relative; display: grid; min-height: 190px; place-items: center; padding: 12px; background: #e9edf3; }
.pdf-page-preview img { display: block; width: 100%; height: 100%; max-height: 260px; object-fit: contain; background: white; box-shadow: 0 5px 14px rgba(23, 36, 58, 0.12); }
.pdf-page-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px 12px; }
.pdf-page-meta strong { color: var(--ink); font-size: 12px; }
.pdf-page-meta span { color: var(--ink-faint); font-family: var(--font-mono); font-size: 9px; }
.pdf-image-settings .settings-note { margin-bottom: 18px; }
.pdf-local-note { margin-top: 18px; margin-bottom: 0; }
.pdf-tool-hero .tool-card::before { content: '04 / PDF TOOL'; }
.pdf-tool-shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; padding: 60px 0 92px; }
.pdf-tool-header { margin-bottom: 24px; }
.pdf-tool-header h1 { max-width: 760px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-tool-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.pdf-tool-header-actions .workspace-primary-action { margin: 0; }
.pdf-tool-header-actions .workspace-primary-action .primary-btn { min-width: 190px; }
.pdf-tool-grid-layout { align-items: start; }
.pdf-tool-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pdf-tool-page-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.pdf-tool-page-card:hover { border-color: var(--cobalt); box-shadow: 0 8px 20px rgba(31, 45, 72, 0.11); transform: translateY(-2px); }
.pdf-tool-page-preview { position: relative; display: grid; min-height: 190px; place-items: center; padding: 12px; background: #e9edf3; }
.pdf-tool-page-preview img { display: block; width: 100%; height: 100%; max-height: 260px; object-fit: contain; background: white; box-shadow: 0 5px 14px rgba(23, 36, 58, 0.12); transition: transform 180ms ease; }
.pdf-tool-page-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 66px; padding: 11px 12px 12px; }
.pdf-tool-page-meta > div:first-child { min-width: 0; }
.pdf-tool-page-meta strong, .pdf-tool-page-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-tool-page-meta strong { color: var(--ink); font-size: 12px; }
.pdf-tool-page-meta span { margin-top: 3px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 9px; }
.pdf-tool-page-actions { display: flex; flex: 0 0 auto; gap: 4px; }
.pdf-tool-page-actions .icon-btn { width: 32px; height: 32px; border-color: var(--line); box-shadow: none; }
.pdf-tool-page-actions .icon-btn:disabled { cursor: not-allowed; opacity: 0.35; }
.pdf-tool-page-actions .icon-btn:hover:not(:disabled) { color: var(--cobalt); border-color: #c8d3ff; background: var(--cobalt-soft); }
.pdf-tool-page-actions .icon-btn:last-child:hover:not(:disabled) { color: var(--danger); border-color: #f3c6cb; background: var(--danger-soft); }
.pdf-tool-settings-intro { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 22px; padding: 12px; border-radius: 12px; background: var(--surface-blue); }
.settings-intro-mark { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--cobalt); background: var(--surface); }
.settings-intro-mark svg { width: 16px; height: 16px; }
.pdf-tool-settings-intro strong { display: block; font-size: 13px; }
.pdf-tool-settings-intro p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.pdf-tool-estimate { margin-top: -8px; color: var(--cobalt-deep); }
body[data-theme="dark"] .pdf-tool-page-card { background: #212b3c; }
body[data-theme="dark"] .pdf-tool-page-preview { background: #2d384c; }
body[data-theme="dark"] .pdf-tool-page-preview img { background: #f8fafc; }
.range-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range-option { display: flex !important; align-items: center; gap: 8px; min-height: 40px; margin: 0 !important; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink-soft); background: var(--surface); cursor: pointer; font-family: var(--font-sans) !important; font-size: 12px !important; letter-spacing: 0 !important; text-transform: none !important; transition: border-color 180ms ease, background 180ms ease, color 180ms ease; }
.range-option:has(input:checked) { border-color: var(--cobalt); color: var(--cobalt-deep); background: var(--cobalt-soft); }
.range-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--cobalt); }
.range-custom { margin-top: 10px; }
.range-custom[hidden] { display: none; }
.field-hint { margin: 8px 2px 0; color: var(--ink-faint); font-size: 11px; line-height: 1.45; }
.compress-image-hero .tool-card::before { content: '03 / IMAGE TOOL'; }
.compress-image-shell { padding: 60px 0 92px; }
.compress-image-header { margin-bottom: 24px; }
.compress-image-header h1 { max-width: 760px; }
.compress-image-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.compress-image-header-actions > .secondary-btn { order: 1; }
.compress-image-header-actions > .workspace-primary-action { order: 2; margin: 0; }
.compress-image-header-actions > .workspace-primary-action .primary-btn { min-width: 190px; }
.compress-image-grid-layout { align-items: start; }
.compress-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.compress-image-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.compress-image-card:hover { border-color: var(--cobalt); box-shadow: 0 8px 20px rgba(31, 45, 72, 0.11); transform: translateY(-2px); }
.compress-image-preview { position: relative; display: grid; min-height: 190px; place-items: center; padding: 12px; background: #e9edf3; }
.compress-image-preview img { display: block; width: 100%; height: 100%; max-height: 260px; object-fit: contain; background: white; box-shadow: 0 5px 14px rgba(23, 36, 58, 0.12); }
.compress-image-index, .compress-image-save { position: absolute; top: 9px; display: grid; min-width: 24px; height: 24px; place-items: center; padding: 0 6px; border-radius: 7px; color: white; background: rgba(23, 36, 58, 0.78); font-family: var(--font-mono); font-size: 10px; }
.compress-image-index { left: 9px; }
.compress-image-save { right: 9px; color: var(--lime-ink); background: var(--lime); font-weight: 700; }
.compress-image-meta { padding: 11px 12px 12px; }
.compress-image-meta .image-name { margin-bottom: 4px; }
.compress-image-meta .image-size { white-space: nowrap; }
.compress-primary-action { margin-top: -4px; }
.compress-image-settings .settings-note { margin-bottom: 18px; }
.compress-estimate { color: var(--cobalt-deep); }
.image-tool-hero .tool-card::before, .pdf-utility-hero .tool-card::before { content: 'TOOL / LOCAL'; }
.image-tool-shell, .pdf-utility-shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; padding: 60px 0 92px; }
.image-tool-header, .pdf-utility-header { margin-bottom: 24px; }
.image-tool-header h1, .pdf-utility-header h1 { max-width: 760px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-tool-header-actions, .pdf-utility-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.image-tool-header-actions .workspace-primary-action, .pdf-utility-header-actions .workspace-primary-action { margin: 0; }
.image-tool-header-actions .workspace-primary-action .primary-btn, .pdf-utility-header-actions .workspace-primary-action .primary-btn { min-width: 190px; }
.image-tool-grid-layout, .pdf-utility-grid-layout { align-items: start; }
.image-tool-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.image-tool-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.image-tool-card:hover { border-color: var(--cobalt); box-shadow: 0 8px 20px rgba(31, 45, 72, 0.11); transform: translateY(-2px); }
.image-tool-preview { position: relative; display: grid; min-height: 190px; place-items: center; padding: 12px; background: #e9edf3; }
.image-tool-preview img { display: block; width: 100%; height: 100%; max-height: 260px; object-fit: contain; background: white; box-shadow: 0 5px 14px rgba(23, 36, 58, 0.12); }
.image-tool-card-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 11px 12px 12px; }
.image-tool-card-meta strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.image-tool-card-meta span { flex: 0 0 auto; color: var(--ink-faint); font-family: var(--font-mono); font-size: 9px; }
.image-tool-local-note { margin-top: 18px; margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.unit-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; height: 43px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.unit-input:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(45,92,245,0.1); }
.unit-input input { width: 100%; min-width: 0; height: 41px; padding: 0 12px; border: 0; outline: none; color: var(--ink); background: transparent; }
.unit-input span { padding-right: 11px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 10px; }
.check-field { display: flex !important; align-items: center; gap: 9px; margin: -5px 0 18px !important; color: var(--ink); cursor: pointer; font-family: var(--font-sans) !important; font-size: 12px !important; letter-spacing: 0 !important; text-transform: none !important; }
.check-field input { width: 16px; height: 16px; accent-color: var(--cobalt); }
.pdf-utility-file-card { display: flex; align-items: center; gap: 14px; min-height: 124px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-blue); }
.pdf-utility-file-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--cobalt); background: var(--surface); }
.pdf-utility-file-icon svg { width: 23px; height: 23px; }
.pdf-utility-file-card strong, .pdf-utility-file-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-utility-file-card strong { color: var(--ink); font-size: 14px; }
.pdf-utility-file-card span { margin-top: 4px; color: var(--ink-soft); font-family: var(--font-mono); font-size: 10px; }
body[data-theme="dark"] .image-tool-card { background: #212b3c; }
body[data-theme="dark"] .image-tool-preview { background: #2d384c; }
body[data-theme="dark"] .image-tool-preview img { background: #f8fafc; }
body[data-theme="dark"] .pdf-page-card { background: #212b3c; }
body[data-theme="dark"] .pdf-page-preview { background: #2d384c; }
body[data-theme="dark"] .pdf-page-preview img { background: #f8fafc; }
body[data-theme="dark"] .compress-image-card { background: #212b3c; }
body[data-theme="dark"] .compress-image-preview { background: #2d384c; }
body[data-theme="dark"] .compress-image-preview img { background: #f8fafc; }

.status-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.processing-card, .ready-card, .error-card { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.status-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--cobalt); background: var(--cobalt-soft); }
.ready-card .status-icon { color: var(--success); background: var(--success-soft); }
.error-card .status-icon { color: var(--danger); background: var(--danger-soft); }
.status-copy { flex: 1; }
.status-copy h2 { margin: 0 0 3px; font-size: 15px; }
.status-copy p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.progress-wrap { min-width: 160px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #e8ecf2; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--cobalt); transition: width 180ms ease; }
.ready-card { margin-bottom: 18px; border-color: #b8e4cc; background: #fcfffd; }
.ready-card .primary-btn { min-width: 148px; }
.status-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.error-card { margin-bottom: 18px; border-color: #f0c2c7; background: #fffafa; }

.undo-toast { position: fixed; z-index: 35; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 18px; max-width: min(360px, calc(100vw - 48px)); padding: 11px 14px 11px 16px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: 0 14px 34px rgba(31, 45, 72, 0.16); animation: undo-toast-in 180ms ease both; }
.undo-toast span { color: var(--ink-soft); font-size: 12px; }
.undo-toast .text-btn { padding: 6px 0; white-space: nowrap; }
@keyframes undo-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

body.preview-open { overflow: hidden; }
.preview-backdrop { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(23, 36, 58, 0.66); animation: preview-backdrop-in 180ms ease both; }
@keyframes preview-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.preview-dialog { display: flex; width: min(880px, 100%); height: min(82vh, 760px); flex-direction: column; overflow: hidden; padding: 24px; border: 1px solid rgba(255,255,255,0.72); border-radius: 20px; background: var(--surface); box-shadow: 0 24px 70px rgba(9, 20, 42, 0.3); animation: preview-dialog-in 220ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes preview-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.preview-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.preview-dialog-header .section-kicker { margin-bottom: 4px; }
.preview-dialog-header h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 29px; font-weight: 400; letter-spacing: -0.05em; }
.preview-dialog-header .icon-btn { flex: 0 0 auto; }
.preview-hint { margin: 9px 0 18px; color: var(--ink-soft); font-size: 13px; }
.preview-frame { width: 100%; min-height: 0; flex: 1; border: 1px solid var(--line); border-radius: 12px; background: #eef1f5; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 88px; border-top: 1px solid rgba(198, 207, 219, 0.68); color: var(--ink-faint); font-size: 11px; }
.footer-brand { color: var(--ink); font-size: 13px; }
.footer-status { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #8ca52c; box-shadow: 0 0 0 3px rgba(140, 165, 44, 0.15); }
.footer-status.is-offline .status-dot { background: var(--cobalt); box-shadow: 0 0 0 3px rgba(45, 92, 245, 0.15); }
.install-app { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: rgba(255, 254, 250, 0.58); font-family: var(--font-mono); font-size: 10px; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.install-app:hover { border-color: var(--cobalt); background: var(--surface); transform: translateY(-1px); }

.reveal { animation: reveal 520ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
  .tools-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; gap: 54px; max-width: 720px; padding-top: 60px; }
  .hero-copy { padding-left: 0; }
  h1 { max-width: 680px; font-size: clamp(3.3rem, 9vw, 5rem); }
  .hero-description { max-width: 600px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .settings-panel { position: static; }
  .info-page-header { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 680px) {
  .site-header, .site-footer, .hero, .workspace-shell, .pdf-image-shell, .compress-image-shell, .image-tool-shell, .pdf-utility-shell, .info-page { width: min(100% - 32px, 540px); }
  .site-header { min-height: 72px; flex-wrap: wrap; row-gap: 12px; padding: 12px 0 14px; }
  .mobile-menu-toggle { display: grid; order: 3; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: rgba(255, 254, 250, 0.68); transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
  .mobile-menu-toggle:hover, .mobile-menu-toggle[aria-expanded="true"] { border-color: var(--cobalt); background: var(--surface); transform: translateY(-1px); }
  .mobile-menu-icon { display: grid; gap: 5px; }
  .mobile-menu-icon i { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform 180ms ease; }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon i:first-child { transform: translateY(3.25px) rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon i:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .site-nav { display: none; width: 100%; order: 3; flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; padding: 10px; overflow: visible; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 30px rgba(31, 45, 72, 0.1); }
  .site-nav.is-open { display: flex; }
  .site-nav .nav-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 13px; white-space: normal; }
  .site-nav .nav-link::after { right: 12px; bottom: 0; left: 12px; }
  .tools-menu { width: 100%; }
  .tools-menu-toggle { width: 100%; justify-content: space-between; }
  .tools-menu-panel { position: static; width: 100%; margin: 0; padding: 8px 0 2px; border: 0; box-shadow: none; background: transparent; animation: none; transform: none; }
  .tools-menu-intro { display: none; }
  .tools-menu-grid { grid-template-columns: 1fr; gap: 8px; }
  .tools-menu-group { padding: 6px; }
  .tool-menu-item { min-height: 50px; }
  .site-nav .tools-menu-panel .tool-menu-item { padding-left: 8px; }
  .header-actions { gap: 6px; }
  .language-switcher { order: 1; }
  .theme-toggle { order: 2; }
  .language-toggle { min-height: 36px; padding: 0 8px; }
  .theme-toggle { width: 36px; height: 36px; }
  .language-globe { display: none; }
  .hero { gap: 42px; padding: 50px 0 68px; }
  .eyebrow { margin-bottom: 16px; }
  h1 { margin-bottom: 19px; font-size: clamp(3rem, 15vw, 4.3rem); }
  .hero-description { font-size: 15px; }
  .tool-card-inner { padding: 20px; }
  .tool-card::before { left: 20px; }
  .tool-card-top { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .dropzone { min-height: 290px; padding: 22px; }
  .info-page { padding: 50px 0 68px; }
  .info-page-header { gap: 28px; padding-bottom: 40px; }
  .info-page-header h1 { font-size: clamp(3rem, 15vw, 4.3rem); }
  .info-page-intro p { font-size: 15px; }
  .info-step-grid, .privacy-detail-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 40px; }
  .info-step-card, .privacy-detail-card { min-height: auto; padding: 20px; }
  .info-step-card .step-number, .privacy-detail-card .info-card-icon { margin-bottom: 30px; }
  .privacy-callout { align-items: flex-start; padding: 20px; }
  .workspace-shell { padding: 40px 0 64px; }
  .pdf-image-shell { padding: 40px 0 64px; }
  .pdf-tool-shell { width: min(100% - 32px, 540px); padding: 40px 0 64px; }
  .compress-image-shell { padding: 40px 0 64px; }
  .image-tool-shell, .pdf-utility-shell { padding: 40px 0 64px; }
  .workspace-header { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .compress-image-header-actions { width: 100%; align-items: stretch; flex-direction: column; gap: 8px; }
  .compress-image-header-actions > .workspace-primary-action { order: 1; }
  .compress-image-header-actions > .secondary-btn { order: 2; }
  .compress-image-header-actions > .secondary-btn, .compress-image-header-actions > .workspace-primary-action, .compress-image-header-actions > .workspace-primary-action .primary-btn { width: 100%; }
  .workspace-header h1 { font-size: 3rem; }
  .workspace-actions { width: 100%; }
  .workspace-actions .secondary-btn { flex: 1; }
  .workspace-primary-action { align-items: stretch; flex-direction: column; margin: -4px 0 16px; }
  .workspace-primary-action .primary-btn, .workspace-primary-action .secondary-btn { width: 100%; }
  .images-panel { padding: 16px; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pdf-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pdf-page-preview { min-height: 150px; padding: 8px; }
  .pdf-tool-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pdf-tool-page-preview { min-height: 150px; padding: 8px; }
  .compress-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .compress-image-preview { min-height: 150px; padding: 8px; }
  .image-tool-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .image-tool-preview { min-height: 150px; padding: 8px; }
  .compress-image-header h1 { max-width: 100%; font-size: 2.3rem; }
  .pdf-page-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .pdf-image-header h1 { max-width: 100%; font-size: 2.3rem; }
  .pdf-tool-header h1 { max-width: 100%; font-size: 2.3rem; }
  .image-tool-header h1, .pdf-utility-header h1 { max-width: 100%; font-size: 2.3rem; }
  .pdf-tool-header-actions { width: 100%; align-items: stretch; flex-direction: column; gap: 8px; }
  .pdf-tool-header-actions .secondary-btn, .pdf-tool-header-actions .workspace-primary-action, .pdf-tool-header-actions .workspace-primary-action .primary-btn { width: 100%; }
  .image-tool-header-actions, .pdf-utility-header-actions { width: 100%; align-items: stretch; flex-direction: column; gap: 8px; }
  .image-tool-header-actions .secondary-btn, .image-tool-header-actions .workspace-primary-action, .image-tool-header-actions .workspace-primary-action .primary-btn, .pdf-utility-header-actions .secondary-btn, .pdf-utility-header-actions .workspace-primary-action, .pdf-utility-header-actions .workspace-primary-action .primary-btn { width: 100%; }
  .pdf-tool-page-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pdf-tool-page-actions { width: 100%; justify-content: flex-end; }
  .settings-panel { padding: 20px; }
  .pdf-utility-file-card { padding: 16px; }
  .processing-card, .ready-card, .error-card { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
  .progress-wrap { width: calc(100% - 60px); min-width: 0; margin-left: 60px; }
  .status-actions { width: 100%; flex-direction: column-reverse; }
  .status-actions .primary-btn, .status-actions .secondary-btn, .error-card .secondary-btn { width: 100%; }
  body.has-sticky-cta { padding-bottom: 86px; }
  .sticky-cta { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: block; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(244, 241, 233, 0.92); box-shadow: 0 -8px 24px rgba(31, 45, 72, 0.08); backdrop-filter: blur(14px); }
  body[data-theme="dark"] .sticky-cta { background: rgba(18, 24, 38, 0.92); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18); }
  .sticky-cta .primary-btn { width: 100%; }
  .undo-toast { right: 16px; bottom: 86px; left: 16px; justify-content: space-between; max-width: none; }
  .preview-backdrop { padding: 12px; }
  .preview-dialog { height: min(88vh, 720px); padding: 18px; border-radius: 16px; }
  .preview-dialog-header h2 { font-size: 25px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; padding: 25px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
