/* Pikkola Image Studio: a darkroom with a contact sheet on the wall.
   Charcoal surfaces, one amber safelight, square corners, mono numerals.
   Weights stay at 400, 500, 600 and 700. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/inter.woff2) format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono.woff2) format("woff2");
}

:root {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --r: 3px;
  --radius: 3px;
}

html[lang="ko"] {
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}
html[lang="ko"] body { font-weight: 500; }
html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3 { font-weight: 700; }
html[lang="ja"] {
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  word-break: normal;
}

/* The darkroom is the default identity. Daylight is the same room with the
   lamp on, kept for people who read long text on a bright screen. */
html[data-theme="dark"] {
  --bg: #141416;
  --bg-2: #191a1d;
  --surface: #1c1d21;
  --surface-2: #232429;
  --surface-3: #2a2b31;
  --ink: #f3f1ec;
  --ink-2: #bab7b0;
  --ink-3: #96928b;
  --line: #2c2d33;
  --line-2: #3b3c44;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-ink: #1a1204;
  --accent-soft: rgba(245, 158, 11, .13);
  --accent-line: rgba(245, 158, 11, .38);
  --ok: #6fcf8e;
  --ok-soft: rgba(111, 207, 142, .12);
  --bad: #f4877a;
  --bad-soft: rgba(244, 135, 122, .12);
  --warn: #f0c05a;
  --shadow: 0 30px 70px -50px #000, 0 2px 0 rgba(255, 255, 255, .02) inset;
  --grid: rgba(255, 255, 255, .045);
  --check-a: #26272c;
  --check-b: #1e1f23;
  --field: #17181b;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f3efe6;
  --bg-2: #ece6da;
  --surface: #fffdf7;
  --surface-2: #f7f2e7;
  --surface-3: #efe8da;
  --ink: #1a1814;
  --ink-2: #4e4941;
  --ink-3: #7d766b;
  --line: #ded6c7;
  --line-2: #c8bda9;
  --accent: #b45309;
  --accent-2: #92400e;
  --accent-ink: #fffdf7;
  --accent-soft: rgba(180, 83, 9, .1);
  --accent-line: rgba(180, 83, 9, .35);
  --ok: #1f7a48;
  --ok-soft: rgba(31, 122, 72, .1);
  --bad: #b23b2b;
  --bad-soft: rgba(178, 59, 43, .1);
  --warn: #8a5a00;
  --shadow: 0 1px 0 rgba(26, 24, 20, .04), 0 24px 50px -40px rgba(26, 24, 20, .55);
  --grid: rgba(26, 24, 20, .07);
  --check-a: #ffffff;
  --check-b: #e8e1d3;
  --field: #fffdf7;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A faint safelight glow at the top of the room. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(560px 320px at 78% -8%, var(--accent-soft), transparent 70%),
    radial-gradient(420px 260px at 8% -12%, var(--grid), transparent 72%);
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.14;
  letter-spacing: -.022em;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(2.35rem, 4.6vw, 3.9rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); letter-spacing: -.026em; }
h3 { font-size: 1.06rem; letter-spacing: -.012em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
strong { font-weight: 600; color: var(--ink); }
code, kbd, samp { font-family: var(--mono); font-size: .88em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 26px; position: relative; z-index: 1; }
.narrow { max-width: 800px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px;
  z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--r);
  font-size: .9rem; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

:where(a, button, select, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 22px;
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); text-decoration: none;
  font-weight: 600; letter-spacing: -.01em;
  flex: none;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.brand-name { font-size: 1.02rem; }
.brand-tool {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  padding-left: 9px; border-left: 1px solid var(--line-2);
}
.site-nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-2); text-decoration: none;
  font-size: .91rem; font-weight: 500; padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 10px; flex: none; }

.lang-field { position: relative; display: inline-flex; align-items: center; }
.lang-globe {
  position: absolute; left: 9px; width: 15px; height: 15px;
  color: var(--ink-3); pointer-events: none;
}
#langSelect {
  appearance: none; -webkit-appearance: none;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
  padding: 7px 24px 7px 29px; cursor: pointer;
}
#langSelect:hover { border-color: var(--line-2); color: var(--ink); }
.lang-field::after {
  content: ""; position: absolute; right: 9px; top: 50%;
  width: 5px; height: 5px; margin-top: -4px;
  border-right: 1.4px solid var(--ink-3); border-bottom: 1.4px solid var(--ink-3);
  transform: rotate(45deg); pointer-events: none;
}
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }
html[data-theme="dark"] .ico-sun { display: none; }
html[data-theme="dark"] .ico-moon { display: block; }
html[data-theme="light"] .ico-sun { display: block; }
html[data-theme="light"] .ico-moon { display: none; }

/* Shared section rhythm */
section { position: relative; z-index: 1; }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head p { color: var(--ink-2); }
.eyebrow {
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px; font-weight: 500;
}
.section-lede { font-size: 1.04rem; color: var(--ink-2); margin: 0; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 56px; align-items: center;
  padding: 68px 26px 62px;
}
.hero-copy h1 { margin-bottom: 20px; }
.hero-lede { font-size: 1.1rem; color: var(--ink-2); max-width: 33em; }
.hero-actions { display: flex; align-items: center; gap: 16px; margin: 26px 0 34px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: var(--r);
  padding: 12px 20px; font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.hero-note {
  font-size: .78rem; color: var(--ink-3);
  letter-spacing: .06em; text-transform: uppercase;
}
.hero-note::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; margin-right: 7px;
  background: var(--ok); border-radius: 50%;
  vertical-align: middle;
}

.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin: 0;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.facts > div { background: var(--bg); padding: 14px 14px 12px; }
.facts dt {
  font-family: var(--mono); font-size: 1.22rem; font-weight: 600;
  letter-spacing: -.02em; color: var(--ink);
}
.facts dd { margin: 3px 0 0; font-size: .78rem; color: var(--ink-3); line-height: 1.35; }

/* Contact sheet figure */
.sheet { margin: 0; }
.sheet-frame {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 12px 12px 0;
  box-shadow: var(--shadow);
  position: relative;
}
.sheet-titlebar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2px 10px;
}
.mono-label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.sheet-stage {
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0d0f;
  aspect-ratio: 4 / 3;
}
.sheet-photo { position: absolute; inset: 0; }
.sheet-photo svg { width: 100%; height: 100%; }
.sheet-split {
  position: absolute; top: 0; bottom: 0; left: 62%;
  width: 1.5px; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 0 18px rgba(245, 158, 11, .5);
}
.sheet-split::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: var(--accent);
  border: 3px solid #0d0d0f;
}
.sheet-tag {
  position: absolute; top: 10px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em;
  background: rgba(13, 13, 15, .78); color: #f3f1ec;
  padding: 3px 7px; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 2px;
}
.sheet-tag.left { left: 10px; }
.sheet-tag.right { right: 10px; color: var(--accent); border-color: var(--accent-line); }
.crop { position: absolute; width: 13px; height: 13px; border: 1.5px solid var(--accent); opacity: .85; }
.crop.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.crop.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.crop.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.crop.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.sheet-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 2px 12px;
  font-size: .78rem; color: var(--ink-3);
  font-family: var(--mono);
}
.sheet-arrow { color: var(--accent); }
.sheet-badge {
  margin-left: auto; color: var(--accent-ink); background: var(--accent);
  padding: 2px 8px; border-radius: 2px; font-weight: 600; letter-spacing: .02em;
}
.sheet figcaption {
  margin-top: 12px; font-size: .82rem; color: var(--ink-3);
  line-height: 1.5;
}

/* Studio */
.studio { padding: 54px 26px 30px; }
.studio-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 26px; flex-wrap: wrap;
}
.studio-head .section-head { margin-bottom: 0; }
.tool-badge {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 5px 9px; background: var(--surface);
}

.dropzone {
  position: relative;
  border: 1px dashed var(--line-2);
  background: var(--surface);
  border-radius: var(--r);
  padding: 38px 24px;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent-line); background: var(--surface-2); }
.dropzone.is-over {
  border-color: var(--accent); border-style: solid;
  background: var(--accent-soft);
}
.dz-icon {
  width: 46px; height: 46px; margin: 0 auto 14px;
  color: var(--accent);
}
.dz-title { font-size: 1.12rem; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.dz-text { font-size: .88rem; color: var(--ink-3); margin: 0; }
.dz-text kbd {
  font-size: .78rem; padding: 1px 5px; border: 1px solid var(--line-2);
  border-radius: 2px; background: var(--surface-2); color: var(--ink-2);
}
.dz-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dz-actions .btn { padding: 9px 16px; font-size: .9rem; }

/* Settings bar */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-top: 14px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h3 { margin: 0; font-size: .95rem; }
.panel-body { padding: 16px; display: grid; gap: 18px; }

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1.22fr) minmax(0, .66fr) minmax(0, 1.06fr);
  gap: 20px 24px;
  align-items: start;
}
.field { display: grid; gap: 7px; min-width: 0; }
.field > label:not(.switch), .field-label {
  font-family: var(--mono); font-size: .69rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--ink-3);
}
.field-note { font-size: .76rem; color: var(--ink-3); margin: 0; line-height: 1.45; }

.segmented {
  display: inline-flex; padding: 2px; gap: 2px;
  background: var(--field); border: 1px solid var(--line); border-radius: var(--r);
}
.segmented button {
  appearance: none; border: 0; background: transparent;
  color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 500;
  padding: 7px 12px; border-radius: 2px; cursor: pointer;
  white-space: nowrap;
}
.segmented button:hover { color: var(--ink); background: var(--surface-2); }
.segmented button[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.segmented button[disabled] { opacity: .38; cursor: not-allowed; }

select.input, input.input {
  appearance: none; -webkit-appearance: none;
  width: 100%; background: var(--field); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r);
  font: inherit; font-size: .89rem; padding: 8px 11px;
}
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
input.input.mono { font-family: var(--mono); }

.target-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.target-row .input { max-width: 104px; }
.target-row .field-note { margin: 0; font-family: var(--mono); font-size: .78rem; }

.range-row { display: flex; align-items: center; gap: 12px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 22px; background: transparent; cursor: pointer; min-width: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; background: var(--line-2); border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; margin-top: -6px;
  background: var(--accent); border: 2px solid var(--surface);
  border-radius: 50%; box-shadow: 0 0 0 1px var(--accent);
}
input[type="range"]::-moz-range-track { height: 3px; background: var(--line-2); border-radius: 2px; }
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; background: var(--accent);
  border: 2px solid var(--surface); border-radius: 50%;
}
.range-value {
  font-family: var(--mono); font-size: .84rem; color: var(--ink);
  min-width: 46px; text-align: right;
}
.presets-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  font-family: var(--mono); font-size: .74rem;
  background: var(--field); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 4px 9px; cursor: pointer;
}
.chip:hover { border-color: var(--accent-line); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.switch { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: .86rem; line-height: 1.4; color: var(--ink-2); }
.switch .track { margin-top: 1px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 34px; height: 19px; border-radius: 10px;
  background: var(--line-2); position: relative; flex: none;
  transition: background .15s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); transition: transform .15s ease;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(15px); background: var(--accent-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.controls-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.hidden-field { display: none !important; }

/* Workspace: settings + result column */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

.summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2);
}
.summary-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.summary-main .big {
  font-family: var(--mono); font-size: 1.16rem; font-weight: 600; color: var(--ink);
}
.summary-main .sub { font-size: .84rem; color: var(--ink-3); }
.summary-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.summary-actions .btn { padding: 8px 14px; font-size: .86rem; }

.file-list { display: grid; gap: 8px; }
.empty-state {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  padding: 26px 18px; text-align: center;
  color: var(--ink-3); font-size: .89rem;
}

.row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto auto;
  gap: 14px; align-items: center;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  text-align: left;
  width: 100%;
  font: inherit; color: inherit;
}
.row:hover { border-color: var(--line-2); background: var(--surface-2); }
.row[aria-current="true"] { border-color: var(--accent-line); background: var(--surface-2); }
.row-thumb {
  width: 62px; height: 46px; border-radius: 2px; overflow: hidden;
  background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 50% / 12px 12px;
  flex: none;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { min-width: 0; }
.row-name {
  font-size: .9rem; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-meta {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: .72rem; color: var(--ink-3);
  margin-top: 3px;
}
.row-meta .sep { color: var(--line-2); }
.tag {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .05em;
  text-transform: uppercase; padding: 1px 5px; border-radius: 2px;
  border: 1px solid var(--line-2); color: var(--ink-2);
  white-space: nowrap;
}
.tag.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag.ok { color: var(--ok); border-color: transparent; background: var(--ok-soft); }
.tag.bad { color: var(--bad); border-color: transparent; background: var(--bad-soft); }

.row-size { text-align: right; min-width: 96px; }
.row-size .now-row { display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; }
.row-size .now {
  font-family: var(--mono); font-size: .96rem; font-weight: 600; color: var(--ink);
}
.row-size .was {
  font-family: var(--mono); font-size: .72rem; color: var(--ink-3);
  text-decoration: line-through;
  margin-top: 1px;
}
.row-size .pct { font-family: var(--mono); font-size: .76rem; color: var(--ok); }
.row-tools { display: flex; gap: 4px; }
.icon-only {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 2px;
  color: var(--ink-3); cursor: pointer;
}
.icon-only:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-3); }
.icon-only svg { width: 15px; height: 15px; }
.row.is-working { opacity: .72; }
.spinner {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--line-2); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Compare stage */
.compare { padding: 54px 26px 20px; }
.compare-stage {
  background: #0e0e10;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 12px;
  box-shadow: var(--shadow);
}
.compare-frame {
  position: relative;
  overflow: hidden;
  margin-inline: auto;
  border: 1px solid #000;
  background: repeating-conic-gradient(#232326 0% 25%, #1b1b1e 0% 50%) 50% / 18px 18px;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  height: 420px;
}
.compare-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}
.compare-img.after { clip-path: inset(0 0 0 50%); }
.compare-placeholder {
  display: grid; place-items: center;
  aspect-ratio: 16 / 10;
  color: #6b6a66; font-size: .9rem; text-align: center; padding: 20px;
}
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: var(--accent); margin-left: -1px;
  pointer-events: none;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .7), 0 0 20px rgba(245, 158, 11, .35);
}
.compare-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: var(--accent);
  border: 3px solid #0e0e10;
  background-image: linear-gradient(var(--accent-ink), var(--accent-ink)), linear-gradient(var(--accent-ink), var(--accent-ink));
  background-size: 2px 10px, 2px 10px;
  background-position: calc(50% - 4px) 50%, calc(50% + 4px) 50%;
  background-repeat: no-repeat;
}
.compare-label {
  position: absolute; top: 12px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px;
  background: rgba(10, 10, 12, .8); color: #e9e6df;
  border: 1px solid rgba(255, 255, 255, .16); pointer-events: none;
}
.compare-label.left { left: 12px; }
.compare-label.right { right: 12px; color: var(--accent); border-color: var(--accent-line); }
.compare-badge {
  position: absolute; bottom: 12px; left: 12px;
  font-family: var(--mono); font-size: .74rem; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  padding: 4px 9px; border-radius: 2px; pointer-events: none;
}
.compare-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 12px 2px 0;
  font-size: .82rem; color: var(--ink-3);
}
.compare-stats { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: .78rem; }
.compare-stats b { color: var(--ink); font-weight: 600; }
.compare-note { margin: 14px 0 0; font-size: .84rem; color: var(--ink-3); max-width: 62em; }

/* Presets */
.presets { padding: 54px 26px; }
.preset-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
}
.preset {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
}
.preset::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--accent); opacity: .5;
}
.preset-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.preset h3 { margin: 0; font-size: 1rem; }
.preset .kb {
  font-family: var(--mono); font-size: .86rem; color: var(--accent);
  font-weight: 600;
}
.preset p { margin: 0; font-size: .86rem; color: var(--ink-3); line-height: 1.55; }
.preset .specs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px;
}
.preset button {
  margin-top: auto; align-self: flex-start;
  background: transparent; border: 1px solid var(--line-2); color: var(--ink);
  font: inherit; font-size: .84rem; font-weight: 500;
  padding: 7px 13px; border-radius: var(--r); cursor: pointer;
}
.preset button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Privacy / metadata section */
.meta-section { padding: 54px 26px; border-top: 1px solid var(--line); }
.meta-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; }
.meta-copy p { color: var(--ink-2); }
.meta-copy h2 { margin-bottom: 16px; }
.meta-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.meta-list li {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 11px;
  font-size: .92rem; color: var(--ink-2);
}
.meta-list svg { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }
.meta-list b { color: var(--ink); font-weight: 600; }

.exif-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 0; overflow: hidden; align-self: start;
}
.exif-card h3 {
  margin: 0; padding: 13px 16px; font-size: .82rem;
  font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.exif-rows { margin: 0; padding: 4px 0; }
.exif-rows div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 16px; font-size: .84rem;
}
.exif-rows div + div { border-top: 1px solid var(--line); }
.exif-rows dt { color: var(--ink-3); font-family: var(--mono); font-size: .76rem; }
.exif-rows dd { margin: 0; color: var(--ink); text-align: right; }
.exif-rows dd .gone { color: var(--bad); text-decoration: line-through; }
.exif-rows dd .kept { color: var(--ok); }
.exif-foot {
  padding: 11px 16px; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--ink-3); background: var(--surface-2);
}

/* Honest limits */
.limits { padding: 54px 26px; border-top: 1px solid var(--line); }
.limit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.limit { background: var(--bg); padding: 20px; }
.limit h3 { font-size: .96rem; margin-bottom: 8px; }
.limit p { margin: 0; font-size: .87rem; color: var(--ink-3); line-height: 1.6; }
.limit .num {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  color: var(--accent); display: block; margin-bottom: 8px;
}

/* FAQ */
.faq { padding: 54px 26px; border-top: 1px solid var(--line); }
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 17px 34px 17px 0; position: relative;
  font-weight: 600; font-size: 1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p {
  margin: 0 0 18px; color: var(--ink-2); font-size: .93rem;
  max-width: 68em;
}

/* Closing / CTA band */
.band {
  margin: 20px auto 0; padding: 44px 26px 56px;
}
.band-inner {
  border: 1px solid var(--line-2); border-radius: var(--r);
  background:
    radial-gradient(600px 220px at 12% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  padding: 34px 30px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap;
}
.band h2 { margin-bottom: 6px; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.band p { margin: 0; color: var(--ink-3); font-size: .92rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 26px 46px;
  margin-top: 30px;
  background: var(--bg-2);
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 30px;
}
.footer-brand p { color: var(--ink-3); font-size: .86rem; max-width: 34em; margin: 10px 0 0; }
.footer-col h4 {
  font-family: var(--mono); font-size: .69rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-col a { color: var(--ink-2); text-decoration: none; font-size: .88rem; }
.footer-col a:hover { color: var(--accent); }
.footer-base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px;
  font-family: var(--mono); font-size: .74rem; color: var(--ink-3);
}

/* Plain pages */
.doc { padding: 54px 0 30px; }
.doc h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.doc h2 { font-size: 1.24rem; margin-top: 2em; }
.doc h3 { font-size: 1rem; margin-top: 1.6em; }
.doc p, .doc li { color: var(--ink-2); font-size: .96rem; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .45em; }
.doc .updated {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .06em;
  color: var(--ink-3); text-transform: uppercase;
}
.doc .lede-doc { font-size: 1.1rem; color: var(--ink); }
.doc .callout {
  border-left: 2px solid var(--accent);
  background: var(--surface);
  padding: 14px 18px; margin: 22px 0;
  font-size: .92rem; color: var(--ink-2);
}
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .88rem; }
.doc th, .doc td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.doc th { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.doc td { color: var(--ink-2); }
.doc a { color: var(--accent); }

/* 404 */
.notfound { padding: 90px 26px 110px; text-align: center; }
.notfound .code {
  font-family: var(--mono); font-size: clamp(3.4rem, 10vw, 6rem);
  color: var(--accent); line-height: 1; letter-spacing: -.04em; margin-bottom: 18px;
}

.avif-note {
  font-size: .78rem; color: var(--warn); margin: 0;
  display: flex; gap: 6px; align-items: flex-start; line-height: 1.4;
}

/* Narrow screens: one column, a scrolling nav strip, and a tray that keeps its
   numbers readable next to a 46 px thumbnail. */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 46px; }
  .sheet { max-width: 620px; }
  .meta-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; min-height: 0; padding-block: 9px 0; gap: 8px 14px; }
  .site-nav {
    order: 3; width: 100%; margin-left: 0; margin-right: -26px;
    padding: 0 26px 8px 0; gap: 18px;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; font-size: .86rem; padding: 4px 0; }
  .header-tools { margin-left: auto; }
  .controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html { scroll-padding-top: 104px; }
  .studio, .compare, .presets, .meta-section, .limits, .faq { padding-top: 42px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .hero { padding: 34px 26px 44px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .controls { grid-template-columns: 1fr; }
  .studio-head { align-items: flex-start; }
  .row { grid-template-columns: 44px minmax(0, 1fr) auto 56px; gap: 8px; padding: 10px; }
  .row-thumb { width: 44px; height: 34px; }
  .row-tools { justify-self: end; }
  .icon-only { width: 26px; height: 28px; }
  .row-size { min-width: 72px; }
  .row-size .now { font-size: .88rem; }
  .row-size .was, .row-size .pct { font-size: .66rem; }
  .row-meta { font-size: .66rem; gap: 5px; }
  .summary { padding: 12px; }
  .summary-actions { width: 100%; }
  .summary-actions .btn { flex: 1; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .band-inner { padding: 24px 20px; }
  .compare-stage { padding: 8px; }
  .compare-label { font-size: .62rem; }
  .doc { padding-top: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
