/* Qpdf Image Tools — one stylesheet, no framework.
   Type: Instrument Sans (UI) + Newsreader (display). One accent: ink blue. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-var-italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;
  --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', ui-serif, 'Iowan Old Style', Georgia, serif;

  --bg: #f6f4ef;
  --bg-elev: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --surface-3: #e7e3d9;
  --stage: #ebe8e1;
  --stage-dot: rgba(23, 21, 17, 0.075);
  --line: rgba(31, 27, 20, 0.11);
  --line-strong: rgba(31, 27, 20, 0.2);
  --ink: #171511;
  --ink-2: #48443d;
  --ink-3: #686358;
  --accent: #26428f;
  --accent-hover: #1d3577;
  --accent-ink: #ffffff;
  --accent-text: #26428f;
  --accent-soft: rgba(38, 66, 143, 0.08);
  --accent-line: rgba(38, 66, 143, 0.42);
  --danger: #a1382a;
  --danger-soft: rgba(161, 56, 42, 0.08);
  --track: rgba(31, 27, 20, 0.12);
  --thumb: #ffffff;
  --checker-a: #f3f1ec;
  --checker-b: #e4e0d7;

  --shadow-1: 0 1px 1px rgba(23, 21, 17, 0.04), 0 1px 2px rgba(23, 21, 17, 0.05);
  --shadow-2: 0 1px 2px rgba(23, 21, 17, 0.04), 0 6px 16px -6px rgba(23, 21, 17, 0.08), 0 24px 48px -24px rgba(23, 21, 17, 0.12);
  --shadow-image: 0 0 0 1px rgba(23, 21, 17, 0.06), 0 2px 4px rgba(23, 21, 17, 0.06), 0 16px 36px -12px rgba(23, 21, 17, 0.28);
  --shadow-pop: 0 2px 6px rgba(23, 21, 17, 0.08), 0 18px 40px -12px rgba(23, 21, 17, 0.25);

  --r-xs: 6px;
  --r-sm: 9px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --maxw: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131312;
    --bg-elev: #181816;
    --surface: #1e1e1c;
    --surface-2: #262623;
    --surface-3: #30302c;
    --stage: #0d0d0c;
    --stage-dot: rgba(255, 250, 235, 0.06);
    --line: rgba(255, 250, 235, 0.09);
    --line-strong: rgba(255, 250, 235, 0.17);
    --ink: #eeebe4;
    --ink-2: #bdb8ae;
    --ink-3: #959086;
    --accent: #a3b6ff;
    --accent-hover: #bccaff;
    --accent-ink: #0d1735;
    --accent-text: #a9bbff;
    --accent-soft: rgba(163, 182, 255, 0.11);
    --accent-line: rgba(163, 182, 255, 0.5);
    --danger: #f08a78;
    --danger-soft: rgba(240, 138, 120, 0.1);
    --track: rgba(255, 250, 235, 0.14);
    --thumb: #f3f1ec;
    --checker-a: #222220;
    --checker-b: #2b2b28;
    --shadow-1: 0 1px 1px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5), 0 24px 48px -24px rgba(0, 0, 0, 0.6);
    --shadow-image: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px rgba(0, 0, 0, 0.3), 0 20px 44px -12px rgba(0, 0, 0, 0.7);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  }
}

/* ------------------------------------------------------------- base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 420;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.88em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.55em;
  padding: 0 0.4em;
  font-family: var(--font-sans);
  font-size: 0.78em;
  font-weight: 560;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  vertical-align: 0.08em;
  margin-inline: 0.08em;
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.icon { flex: none; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: calc(var(--maxw) + var(--gutter) * 2); }

/* ----------------------------------------------------------- header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo-mark { width: 28px; height: 28px; }
.logo-bg { fill: var(--ink); }
.logo-q { stroke: var(--bg); }
.logo-tail { stroke: var(--accent); }
@media (prefers-color-scheme: dark) {
  .logo-tail { stroke: #26428f; }
}
.wm-name { font-weight: 640; font-size: 16.5px; letter-spacing: -0.01em; }
.wm-sep { width: 1px; height: 16px; background: var(--line-strong); }
.wm-product { font-weight: 450; font-size: 16px; color: var(--ink-2); letter-spacing: -0.005em; }

.header-nav { margin-left: auto; }
.header-nav ul { display: flex; gap: 2px; }
.header-nav a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.header-nav a:hover { color: var(--ink); background: var(--surface-2); }
.header-nav a[aria-current='page'] { color: var(--ink); background: var(--surface-2); }
.parent-link {
  font-size: 14px;
  font-weight: 520;
  color: var(--ink-2);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.parent-link span { display: inline-block; transition: transform var(--dur) var(--ease); }
.parent-link:hover { color: var(--ink); border-color: var(--line-strong); }
.parent-link:hover span { transform: translateX(2px); }
@media (max-width: 1120px) {
  .header-nav { display: none; }
  .parent-link { margin-left: auto; }
}
@media (max-width: 420px) {
  .wm-sep, .wm-product { display: none; }
}

/* ------------------------------------------------------------- hero */
.hero { padding-block: clamp(40px, 7vw, 84px) clamp(28px, 4vw, 44px); }
.hero--tool { padding-block: clamp(32px, 5vw, 60px) clamp(24px, 3vw, 36px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.display {
  font-family: var(--font-serif);
  font-weight: 380;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-variation-settings: 'opsz' 72;
  max-width: 17ch;
  text-wrap: balance;
}
.display em { font-style: italic; font-weight: 360; letter-spacing: -0.02em; }
.display--tool { font-size: clamp(2.2rem, 4.4vw, 3.6rem); max-width: 22ch; }
.lede {
  margin-top: 18px;
  max-width: 58ch;
  font-size: clamp(16.5px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.crumbs {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink-2); }

/* -------------------------------------------------------- sections */
.section { padding-block: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.section-title {
  font-family: var(--font-serif);
  font-weight: 420;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  letter-spacing: -0.018em;
  line-height: 1.15;
  font-variation-settings: 'opsz' 48;
}
.section-sub { color: var(--ink-3); max-width: 52ch; }
.section-sub a { color: var(--ink-2); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tool-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 3px;
  align-items: center;
  padding: 20px 52px 20px 20px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.tool-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); background: var(--surface); transform: translateY(-1px); }
.tool-icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tool-card:hover .tool-icon { background: var(--accent-soft); color: var(--accent-text); }
.tool-name { font-weight: 600; font-size: 15.5px; letter-spacing: -0.005em; align-self: end; }
.tool-blurb { font-size: 13.5px; color: var(--ink-3); line-height: 1.45; align-self: start; }
.tool-go {
  position: absolute;
  right: 18px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-3);
  opacity: 0.6;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tool-card:hover .tool-go { transform: translateX(3px); opacity: 1; color: var(--ink); }
@media (max-width: 960px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tool-grid { grid-template-columns: 1fr; } }

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.promise-grid li { padding: 28px 28px 0 0; }
.promise-grid li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.promise-grid .icon { color: var(--accent-text); margin-bottom: 18px; }
.promise-grid h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.005em; }
.promise-grid p { color: var(--ink-3); font-size: 14.5px; max-width: 34ch; }
@media (max-width: 760px) {
  .promise-grid { grid-template-columns: 1fr; }
  .promise-grid li, .promise-grid li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
}
.info-grid .section-title { margin-bottom: 24px; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }

.steps { counter-reset: step; display: grid; gap: 22px; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.1;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums lining-nums;
  font-variation-settings: 'opsz' 36;
}
.steps h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.steps p { color: var(--ink-2); font-size: 14.5px; }

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 560;
  font-size: 15.5px;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .faq-chev { color: var(--ink); }
.faq-chev { color: var(--ink-3); transition: transform 220ms var(--ease); }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-a { padding: 0 32px 20px 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }
.faq-a a { color: var(--accent-text); }

/* ----------------------------------------------------------- prose */
.prose { max-width: calc(720px + var(--gutter) * 2); padding-bottom: 24px; }
.prose > p, .prose li > span { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose > p + p { margin-top: 1em; }
.prose h2 {
  font-family: var(--font-serif);
  font-weight: 440;
  font-size: 1.7rem;
  letter-spacing: -0.015em;
  margin: 2.2em 0 0.6em;
  font-variation-settings: 'opsz' 48;
}
.prose h2:first-child { margin-top: 0.4em; }
.prose a { color: var(--accent-text); }
.prose strong { color: var(--ink); font-weight: 600; }
.checklist { display: grid; gap: 10px; margin-top: 20px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev); }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li > span { font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.checklist .icon { color: var(--accent-text); margin-top: 2px; }
.steps--compact { margin-top: 18px; }
.steps--compact p { font-size: 15.5px; line-height: 1.65; }
.license-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 28px 0; }
.license { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev); }
.license-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.license h2 { font-family: var(--font-sans); font-size: 16px; font-weight: 620; margin: 0; letter-spacing: -0.005em; }
.license-meta { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.license p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.license-links { display: flex; gap: 16px; margin-top: 12px; }
.license-links a { color: var(--accent-text); font-weight: 520; font-size: 13.5px; }
@media (max-width: 680px) { .license-list { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- footer */
.site-footer {
  margin-top: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--line);
  padding-top: 48px;
  font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-promise { display: flex; gap: 10px; align-items: center; margin-top: 18px; color: var(--ink-2); font-size: 15px; }
.footer-promise .icon { color: var(--accent-text); }
.footer-h { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 8px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  position: relative;
  margin-top: 48px;
  padding-block: 22px calc(22px + env(safe-area-inset-bottom));
  color: var(--ink-3);
  font-size: 13px;
}
.footer-base::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }
.footer-base a { color: var(--ink-2); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 560;
  letter-spacing: -0.003em;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 120ms var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(0.5px) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-lg { height: 46px; padding: 0 18px; border-radius: 12px; font-size: 15px; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(23, 21, 17, 0.14), 0 2px 8px -2px rgba(38, 66, 143, 0.35);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-1); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 0 10px; height: 36px; font-size: 14px; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn[aria-pressed='true'], .icon-btn.is-active { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.icon-btn--lg { width: 46px; height: 46px; border-radius: 12px; border-color: var(--line-strong); background: var(--surface); box-shadow: var(--shadow-1); }
.icon-btn--lg:hover { background: var(--surface-2); }
.mini-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.mini-btn:hover { color: var(--ink); background: var(--surface-2); }
.mini-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* =================================================================== editor */
.editor {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-elev);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  isolation: isolate;
}

/* --- empty state */
.dropzone {
  position: relative;
  min-height: clamp(360px, 50vh, 500px);
  display: grid;
  place-items: center;
  padding: 40px 24px;
  cursor: pointer;
  background-color: var(--bg-elev);
  background-image: radial-gradient(var(--stage-dot) 1px, transparent 1.2px);
  background-size: 18px 18px;
  background-position: center;
}
.dropzone::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: calc(var(--r-xl) - 8px);
  border: 1px solid var(--line);
  pointer-events: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.dropzone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, var(--bg-elev) 78%);
  pointer-events: none;
}
.dropzone:hover::before, .dropzone.is-over::before { border-color: var(--accent-line); background: var(--accent-soft); }
.dz-inner { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; }
.dz-art { position: relative; width: 112px; height: 92px; margin-bottom: 26px; }
.dz-card {
  position: absolute;
  inset: 8px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-1);
  transition: transform 260ms var(--ease);
}
.dz-card--back { transform: rotate(-9deg) translate(-10px, 2px); background: var(--surface-2); }
.dz-card--mid { transform: rotate(6deg) translate(10px, -1px); background: var(--surface-2); }
.dz-card--front { display: grid; place-items: center; color: var(--ink-2); box-shadow: var(--shadow-2); }
.dropzone:hover .dz-card--back, .dropzone.is-over .dz-card--back { transform: rotate(-14deg) translate(-20px, 4px); }
.dropzone:hover .dz-card--mid, .dropzone.is-over .dz-card--mid { transform: rotate(11deg) translate(20px, -2px); }
.dropzone:hover .dz-card--front, .dropzone.is-over .dz-card--front { transform: translateY(-4px); color: var(--accent-text); }
.dz-title {
  font-family: var(--font-serif);
  font-weight: 420;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 48;
  line-height: 1.1;
}
.dz-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; margin-top: 22px; }
.dz-or { color: var(--ink-3); font-size: 14px; }
.dz-formats { margin-top: 26px; font-size: 12px; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 520; }
.dz-privacy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.dz-privacy .icon { color: var(--accent-text); }

.resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 20px;
}
.resume-text { font-weight: 540; }

/* --- workspace */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  height: clamp(600px, calc(100vh - 150px), 880px);
  height: clamp(600px, calc(100dvh - 150px), 880px);
}
.stage-col { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 10px 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.stage-meta { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.stage-name { font-weight: 580; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-dims { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.stage-actions { display: flex; gap: 4px; }
.mobile-only { display: none; }

.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 28px;
  background-color: var(--stage);
  background-image: radial-gradient(var(--stage-dot) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.stage-canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 3px;
  box-shadow: var(--shadow-image);
  background-color: var(--checker-a);
  background-image:
    linear-gradient(45deg, var(--checker-b) 25%, transparent 25%, transparent 75%, var(--checker-b) 75%),
    linear-gradient(45deg, var(--checker-b) 25%, transparent 25%, transparent 75%, var(--checker-b) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  transition: opacity 160ms var(--ease);
}
.stage.is-busy .stage-canvas { opacity: 0.5; }
.crop-host { position: absolute; inset: 20px; }
.crop-host > img { display: block; max-width: 100%; opacity: 0; }
.stage-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(20, 19, 17, 0.78);
  color: #f3f1ec;
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.stage-status {
  position: absolute;
  inset: auto 0 18px;
  margin-inline: auto;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  color: var(--ink-2);
}
.stage-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  color: var(--ink-2);
  background: var(--stage);
}
.stage-error .icon { color: var(--danger); }
.stage-error strong { color: var(--ink); font-weight: 600; font-size: 16px; }
.stage-error p { max-width: 42ch; font-size: 14px; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--track);
  border-top-color: var(--accent);
  animation: spin 700ms linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- filmstrip */
.filmstrip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  min-width: 0;
}
.film-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  min-width: 0;
  padding: 2px;
}
.film-item {
  position: relative;
  flex: none;
  scroll-snap-align: start;
}
.film-select {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 244px;
  padding: 6px 30px 6px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.film-select:hover { border-color: var(--line-strong); }
.film-item[aria-current='true'] .film-select { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-line); }
.film-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.film-thumb canvas { width: 100%; height: 100%; object-fit: cover; }
.film-meta { display: grid; gap: 1px; min-width: 0; }
.film-name { font-size: 13px; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-size { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 5px; align-items: center; }
.film-size b { color: var(--ink-2); font-weight: 560; }
.film-size .delta { color: var(--accent-text); font-weight: 560; }
.film-size .spinner { width: 11px; height: 11px; border-width: 1.5px; }
.film-item.is-error .film-size { color: var(--danger); }
.film-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.film-item:hover .film-remove, .film-item:focus-within .film-remove, .film-item[aria-current='true'] .film-remove { opacity: 1; }
.film-remove:hover { background: var(--surface-2); color: var(--ink); }
@media (hover: none) { .film-remove { opacity: 1; } }
.film-add {
  flex: none;
  width: 44px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.film-add:hover { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }

/* --- panel */
.panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
}
.tabs {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2px;
  margin: 12px 14px 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
}
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { .tab[aria-selected='true'] { background: var(--surface-3); } }
.panes { overflow-y: auto; overscroll-behavior: contain; min-height: 0; scrollbar-width: thin; }
.pane { padding: 4px 0 8px; outline: none; animation: fade-in 200ms var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } }

.group { padding: 18px 20px; display: grid; gap: 12px; }
.group + .group { border-top: 1px solid var(--line); }
.group.is-focus { animation: focus-flash 1.6s var(--ease); }
@keyframes focus-flash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.group-title {
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.hint:empty { display: none; }
.hint.is-warn { color: var(--ink-2); }
.scope-note { font-size: 12.5px; color: var(--ink-3); }
.scope-note--batch {
  margin: 14px 20px 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.pane-foot { display: grid; justify-items: start; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.pane-foot .scope-note { padding-inline: 6px; }

.readout {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--ink-3);
}
.readout .num { color: var(--ink); font-weight: 580; font-size: 13.5px; }

/* segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: var(--surface-2);
}
.seg { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-3);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  pointer-events: none;
}
.seg:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { .seg input:checked + span { background: var(--surface-3); } }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* chips */
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.chip { position: relative; display: block; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: grid;
  place-items: center;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  pointer-events: none;
}
.chip:hover span { border-color: var(--line-strong); color: var(--ink); }
.chip input:checked + span { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* text inputs */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-width: 0;
}
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 10px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.input-wrap .prefix, .input-wrap .suffix { font-size: 12px; font-weight: 600; color: var(--ink-3); padding-inline: 10px 0; letter-spacing: 0.04em; }
.input-wrap .suffix { padding-inline: 0 12px; }
.input-wrap--prefix input { padding-left: 6px; }
.ratio-custom, .resize-dims { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.ratio-colon { color: var(--ink-3); font-weight: 600; }
.target-custom { max-width: 160px; }
.lock-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lock-btn:hover { background: var(--surface-2); color: var(--ink); }
.lock-btn[aria-pressed='true'] { color: var(--accent-text); }
.lock-btn[aria-pressed='true'] .i-off, .lock-btn[aria-pressed='false'] .i-on { display: none; }

/* sliders */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 6px; }
.field-head { display: flex; align-items: center; justify-content: space-between; }
.field-head label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.field-head label .icon { color: var(--ink-3); }
.field-head output { font-size: 13px; color: var(--ink); font-weight: 580; min-width: 4ch; text-align: right; }

.range {
  --from: 0%;
  --to: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
.range:focus-visible { outline: none; }
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--track) 0 var(--from), var(--accent) var(--from) var(--to), var(--track) var(--to) 100%);
}
.range::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--track) 0 var(--from), var(--accent) var(--from) var(--to), var(--track) var(--to) 100%);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--thumb);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.14);
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
}
.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--thumb);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.14);
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
}
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:active::-moz-range-thumb { transform: scale(1.12); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bg-elev), 0 0 0 5px var(--accent); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--bg-elev), 0 0 0 5px var(--accent); }
.range:disabled { opacity: 0.4; cursor: not-allowed; }

/* switch */
.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
}
.switch-row .icon { color: var(--ink-3); }
.switch-row > span:not(.switch) { flex: 1; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--track);
  transition: background-color var(--dur) var(--ease);
  flex: none;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--thumb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 200ms var(--ease);
}
.switch-input:checked + .switch { background: var(--accent); }
.switch-input:checked + .switch::after { transform: translateX(16px); }
.switch-input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

/* rotate buttons */
.tool-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tool-btn {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 540;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tool-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.tool-btn:active { transform: scale(0.98); }

/* privacy card */
.privacy-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin: 6px 14px 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.privacy-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.privacy-card .group-title { color: var(--ink); text-transform: none; letter-spacing: -0.003em; font-size: 14px; margin-bottom: 3px; }
.privacy-card p { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.privacy-card .meta-found { margin-top: 8px; color: var(--ink-2); }
.meta-found b { font-weight: 600; color: var(--ink); }

/* panel footer */
.panel-foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; background: var(--surface); }
.size-compare { display: grid; grid-template-columns: auto auto auto 1fr; align-items: end; gap: 14px; }
.sc-col { display: grid; gap: 1px; }
.sc-label { font-size: 11px; font-weight: 620; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.sc-val { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.3; }
#size-before { color: var(--ink-2); font-weight: 520; }
.sc-arrow { color: var(--ink-3); padding-bottom: 4px; }
.sc-delta {
  justify-self: end;
  align-self: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 620;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.sc-delta:empty { display: none; }
.sc-delta.is-up { background: var(--surface-2); color: var(--ink-2); }
.batch { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.progress { position: relative; height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.progress span { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--accent); border-radius: inherit; transition: width 240ms var(--ease); }
.batch-text { font-size: 12.5px; color: var(--ink-3); }
.actions { display: flex; gap: 8px; }
.actions .btn-primary { flex: 1.2; }
.actions .btn-secondary { flex: 1; }
.btn.is-busy .icon { animation: pulse 1s var(--ease) infinite alternate; }
@keyframes pulse { to { opacity: 0.35; } }

/* overlays */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  animation: fade-in 150ms var(--ease);
}
.drop-overlay::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1.5px dashed var(--accent-line);
  border-radius: var(--r-xl);
}
.drop-overlay > div {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 36px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-weight: 580;
  color: var(--ink);
}
.drop-overlay .icon { color: var(--accent-text); }

.toasts {
  position: absolute;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  z-index: 20;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
  width: min(92%, 460px);
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-pop);
  animation: toast-in 220ms var(--ease);
  pointer-events: auto;
}
.toast .icon { margin-top: 1px; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* Cropper.js theme */
.cropper-container { touch-action: none; }
.cropper-modal { background-color: #0b0b0a; opacity: 0.52; }
.cropper-view-box { outline: 1.5px solid rgba(255, 255, 255, 0.95); outline-color: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.cropper-dashed { border-color: rgba(255, 255, 255, 0.45); border-style: solid; opacity: 1; }
.cropper-center { display: none; }
.cropper-line { background-color: transparent; }
.cropper-point { background-color: #fff; opacity: 1; width: 9px; height: 9px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.cropper-point.point-se { width: 9px; height: 9px; }
.cropper-point.point-se::before { display: none; }
.cropper-point.point-n, .cropper-point.point-s { width: 22px; height: 5px; margin-left: -11px; }
.cropper-point.point-e, .cropper-point.point-w { width: 5px; height: 22px; margin-top: -11px; }
.cropper-point.point-n { top: -3px; } .cropper-point.point-s { bottom: -3px; }
.cropper-point.point-e { right: -3px; } .cropper-point.point-w { left: -3px; }
.cropper-point.point-ne, .cropper-point.point-nw, .cropper-point.point-se, .cropper-point.point-sw { width: 12px; height: 12px; }
.cropper-point.point-ne { top: -5px; right: -5px; } .cropper-point.point-nw { top: -5px; left: -5px; }
.cropper-point.point-se { bottom: -5px; right: -5px; } .cropper-point.point-sw { bottom: -5px; left: -5px; }
.cropper-face { background-color: transparent; }
.cropper-canvas img, .cropper-view-box img { filter: var(--adjust-filter, none); }
@media (pointer: coarse) {
  .cropper-point.point-ne, .cropper-point.point-nw, .cropper-point.point-se, .cropper-point.point-sw { width: 14px; height: 14px; border-radius: 3px; }
  .cropper-point.point-ne { top: -6px; right: -6px; } .cropper-point.point-nw { top: -6px; left: -6px; }
  .cropper-point.point-se { bottom: -6px; right: -6px; } .cropper-point.point-sw { bottom: -6px; left: -6px; }
  .cropper-line { opacity: 0.01; background-color: #fff; }
  .cropper-line.line-e, .cropper-line.line-w { width: 24px; } .cropper-line.line-e { right: -12px; } .cropper-line.line-w { left: -12px; }
  .cropper-line.line-n, .cropper-line.line-s { height: 24px; } .cropper-line.line-n { top: -12px; } .cropper-line.line-s { bottom: -12px; }
}

/* =========================================================== mobile editor */
@media (max-width: 860px) {
  body { font-size: 15.5px; }
  .input-wrap input { font-size: 16px; } /* stops iOS zooming on focus */
  .editor { border-radius: var(--r-lg); }
  .container--wide { padding-inline: 12px; }
  .dropzone { min-height: 340px; }
  .kbd-hint { display: none; }

  .editor.is-open {
    position: fixed;
    inset: 0;
    z-index: 200;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--surface);
  }
  .editor.is-open .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100vh;
    height: 100dvh;
  }
  .stage-col { grid-template-rows: auto minmax(0, 1fr) auto; }
  .stage-bar { height: calc(48px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .mobile-only { display: inline-grid; }
  .stage { padding: 16px; }
  .crop-host { inset: 12px; }
  .filmstrip { padding: 8px 10px; }
  .film-select { width: 150px; grid-template-columns: 40px minmax(0, 1fr); padding: 5px 26px 5px 5px; }
  .film-size .fs-before { display: none; }
  .film-thumb { width: 40px; height: 40px; }
  .film-add { height: 52px; width: 40px; }

  .panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.18);
    margin-top: -1px;
    grid-template-rows: auto auto auto;
  }
  .panel::before {
    content: '';
    justify-self: center;
    width: 36px;
    height: 4px;
    margin-top: 8px;
    border-radius: 4px;
    background: var(--line-strong);
    grid-row: 1;
    position: absolute;
    left: 50%;
    translate: -50% 0;
  }
  .tabs { margin-top: 18px; }
  .panes { max-height: 34vh; max-height: 34dvh; }
  .panel-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .group { padding: 14px 16px; }
  .size-compare { gap: 10px; }
  .sc-val { font-size: 16px; }
  .tab span { font-size: 12.5px; }
}
@media (max-width: 380px) {
  .tab .icon { display: none; }
  .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
body.editor-open { overflow: hidden; }

/* =========================================================== motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .spinner { animation: spin 1.4s linear infinite !important; }
}

@media print {
  .editor, .site-header nav, .parent-link { display: none; }
}
