/* ImgDocLab: shared styles.
   Direction: a precise, calm laboratory. Porcelain surfaces, midnight ink, one
   cobalt accent, and an amber marker used only for "your target".
   Instrument Serif carries the personality in headlines; Instrument Sans does the work.
   Both are self-hosted, so no third-party font requests. */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/instrument-sans-400.woff") format("woff"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/instrument-sans-700.woff") format("woff"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/instrument-serif-400.woff") format("woff"); }

:root {
  color-scheme: light dark;
  --page: #f3f5f4;
  --surface: #ffffff;
  --ink: #12213a;
  --ink-2: #4b5a72;
  --mist: #e4e9ef;
  --line: #d3dae3;
  --cobalt: #2148f5;
  --on-cobalt: #ffffff;
  --cobalt-ink: #1c3ac4;
  --cobalt-soft: #e8edff;
  --amber: #f5a524;
  --ok: #0e8f63;
  --bad: #d92d20;
  --footer-bg: #12213a;
  --footer-ink: #cfd8e6;
  --shadow: 0 1px 2px rgba(18, 33, 58, 0.06), 0 18px 40px -22px rgba(18, 33, 58, 0.28);
  --sans: "Instrument Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sticky-h: 84px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a101c;
    --surface: #121a2a;
    --ink: #e9eef7;
    --ink-2: #9ba9c0;
    --mist: #1b2538;
    --line: #26324a;
    --cobalt: #6b86ff;
    --on-cobalt: #08101f;
    --cobalt-ink: #b1c0ff;
    --cobalt-soft: #18244a;
    --ok: #34d399;
    --bad: #ff8a7a;
    --footer-bg: #0d1526;
    --footer-ink: #a9b6cc;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -22px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 1rem/1.6 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body.has-sticky-ad { padding-bottom: calc(var(--sticky-h) + 12px); }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
.icon { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }

h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.015em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.25rem); }
h3 { font-family: var(--sans); font-weight: 700; font-size: 1.0625rem; letter-spacing: 0; }

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 30; background: var(--page); }
.header-row { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.025em; }

.menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; font-size: 0.9375rem;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border: solid currentColor; border-width: 0 1.75px 1.75px 0; transform: rotate(45deg); transition: transform 0.15s; }
.menu[open] > summary { border-color: var(--cobalt); }
.menu[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.menu-panel {
  position: absolute; z-index: 50; top: 100%; left: 20px; right: 20px; margin-top: 8px;
  display: grid; gap: 24px; max-height: 74vh; overflow: auto; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li { padding: 6px 0; line-height: 1.35; }
.menu-live a { display: block; font-weight: 700; text-decoration: none; }
.menu-live a:hover { color: var(--cobalt-ink); text-decoration: underline; }
.menu-soon-label { margin: 16px 0 2px; color: var(--ink-2); font-size: 0.8125rem; font-weight: 700; }
.menu-soon li { padding: 4px 0; color: var(--ink-2); font-size: 0.9375rem; }
.menu-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; color: var(--cobalt-ink); }
@media (min-width: 720px) { .menu-panel { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .menu-panel { left: auto; right: 20px; width: 800px; } }

.privacy-strip { background: var(--cobalt-soft); color: var(--cobalt-ink); font-size: 0.875rem; font-weight: 700; border-block: 1px solid color-mix(in srgb, var(--cobalt) 18%, transparent); }
.privacy-strip .wrap { display: flex; align-items: center; gap: 8px; padding-block: 8px; }

.is-soon { color: var(--ink-2); }
.tag {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px;
  font-size: 0.75rem; font-weight: 700; color: var(--ink-2); vertical-align: 1px; white-space: nowrap;
}

/* ---------- Buttons and chips ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: 700 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.btn:hover:not(:disabled) { border-color: var(--ink-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--cobalt); border-color: var(--cobalt); color: var(--on-cobalt);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 22px -12px var(--cobalt);
}
.btn-primary:hover:not(:disabled) { background: var(--cobalt); border-color: var(--cobalt); filter: brightness(1.08); }
.btn-quiet { background: transparent; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; border-radius: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 10px; border-radius: 99px; background: var(--cobalt-soft); color: var(--cobalt-ink); font-weight: 700; font-size: 0.875rem; }

/* ---------- Gauge: original size, new size, your target ---------- */

.gauge { position: relative; height: 10px; margin: 14px 0 20px; border-radius: 99px; background: var(--mist); }
.gauge::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 7px; margin-top: 4px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%);
}
.gauge-fill { position: absolute; top: 0; bottom: 0; left: 0; min-width: 6px; border-radius: 99px; background: var(--cobalt); }
.gauge-fill[data-miss] { background: var(--bad); }
.gauge-mark { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--amber); }

/* ---------- Home ---------- */

.hero { position: relative; isolation: isolate; display: grid; gap: 40px; padding-block: 56px 32px; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -72px -20px 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 36px 36px; opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 35% 15%, #000 20%, transparent 78%); mask-image: radial-gradient(ellipse 75% 85% at 35% 15%, #000 20%, transparent 78%);
}
.hero h1 { font-size: clamp(2.75rem, 8vw, 5.25rem); line-height: 0.98; letter-spacing: -0.025em; max-width: 12ch; }
.lede { max-width: 54ch; margin: 20px 0 0; font-size: 1.1875rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (min-width: 940px) { .hero { grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 64px; padding-block: 88px 48px; } }

.specimen { margin: 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.specimen figcaption { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); font-size: 0.9375rem; }
.specimen figcaption strong { color: var(--ink); }
.specimen-figures { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 22px 0 8px; }
.specimen-figures small { display: block; color: var(--ink-2); font-size: 0.875rem; }
.specimen-figures b { display: block; font: 400 clamp(2.5rem, 5vw, 3.5rem)/1 var(--serif); letter-spacing: -0.02em; }
.specimen-figures .icon { margin-bottom: 10px; color: var(--ink-2); }
.specimen-note { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.specimen-note span { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; background: var(--amber); }

.group { padding-block: 40px 8px; }
.group + .group { border-top: 1px solid var(--line); margin-top: 32px; }
.group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.group-head p { margin: 4px 0 0; color: var(--ink-2); }
.group-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--cobalt-soft); color: var(--cobalt-ink); }

.tile-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tile {
  display: grid; align-content: start; gap: 6px; padding: 22px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; transition: border-color 0.15s;
}
.tile:hover { border-color: var(--cobalt); }
.tile:hover strong { color: var(--cobalt-ink); }
.tile strong { font-size: 1.125rem; letter-spacing: -0.01em; }
.tile > span:last-child { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }
.tile-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: 12px; background: var(--cobalt-soft); color: var(--cobalt-ink); }
.tile-grid--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.tile-grid--compact .tile { padding: 18px; }

.soon-list { display: flex; flex-wrap: wrap; gap: 8px 8px; list-style: none; margin: 20px 0 0; padding: 0; }
.soon-list li { padding: 6px 4px 6px 14px; border: 1px dashed var(--line); border-radius: 99px; color: var(--ink-2); font-size: 0.9375rem; }
.soon-list .tag { margin-left: 6px; }

.trust { display: grid; gap: 28px; margin-top: 48px; padding-block: 48px; border-top: 1px solid var(--line); }
.trust-item { display: grid; align-content: start; gap: 6px; }
.trust-item .tile-icon { margin-bottom: 8px; }
.trust-item p { margin: 0; color: var(--ink-2); max-width: 36ch; }
.trust h2 { max-width: 20ch; }
@media (min-width: 860px) { .trust { grid-template-columns: 1fr 1fr 1fr; } .trust h2 { grid-column: 1 / -1; } }

/* ---------- Tool pages ---------- */

.tool-head { padding-block: 40px 4px; }
.tool-head h1 { font-size: clamp(2.375rem, 6vw, 3.75rem); line-height: 1; letter-spacing: -0.025em; max-width: 18ch; }
.layout { display: grid; gap: 28px; padding-block: 8px 48px; }
.stack > * + * { margin-top: 48px; }
.rail { display: none; }
@media (min-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
  .rail { display: block; }
  .rail-inner { position: sticky; top: 20px; }
}

.bench { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .bench { padding: 28px; } }

.drop {
  display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed color-mix(in srgb, var(--cobalt) 45%, var(--line)); border-radius: 18px; background: var(--cobalt-soft);
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover { border-color: var(--cobalt); }
.drop.is-over { border-style: solid; border-color: var(--cobalt); background: color-mix(in srgb, var(--cobalt) 16%, var(--surface)); }
.drop:focus-within { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.drop-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 50%; background: var(--cobalt); color: var(--on-cobalt); transition: transform 0.2s; }
.drop.is-over .drop-icon { transform: translateY(-4px); }
.drop-title { font: 400 1.875rem/1.1 var(--serif); letter-spacing: -0.01em; }
.drop-sub { color: var(--ink-2); }
.drop-sub b { color: var(--cobalt-ink); text-decoration: underline; text-underline-offset: 3px; }
.bench.has-files .drop { padding: 18px; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 14px; }
.bench.has-files .drop-icon { width: 40px; height: 40px; margin: 0; grid-row: span 2; }
.bench.has-files .drop-title { font-size: 1.5rem; }
.bench.has-files .drop-sub { display: none; }

.settings { display: grid; gap: 24px; margin-top: 28px; }
@media (min-width: 720px) { .settings { grid-template-columns: 1fr 1fr; } .settings .span-all { grid-column: 1 / -1; } }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field > legend, .field-label { display: block; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 0.9375rem; }
.field-hint { margin: 8px 0 0; color: var(--ink-2); font-size: 0.875rem; }
.input, .select {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--ink);
  font: 700 1.125rem var(--sans); font-variant-numeric: tabular-nums; transition: border-color 0.15s;
}
.input { width: 100%; max-width: 9rem; }
.input:hover, .select:hover { border-color: var(--ink-2); }
.input:focus, .select:focus { border-color: var(--cobalt); outline: 3px solid color-mix(in srgb, var(--cobalt) 30%, transparent); outline-offset: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row .join { color: var(--ink-2); font-weight: 700; }
.range { width: 100%; max-width: 22rem; accent-color: var(--cobalt); }
.range-value { min-width: 4ch; font-weight: 700; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.presets button {
  min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink);
  font: 700 0.9375rem var(--sans); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.presets button:hover { border-color: var(--cobalt); }
.presets button[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: var(--on-cobalt); }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 13px; background: var(--mist); }
.segmented label { position: relative; }
.segmented input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.segmented span { display: block; padding: 8px 16px; border-radius: 10px; color: var(--ink-2); font-weight: 700; font-size: 0.9375rem; transition: background 0.15s, color 0.15s; }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 33, 58, 0.16); }
.segmented input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.segmented input:disabled { cursor: not-allowed; }
.segmented input:disabled + span { opacity: 0.45; }

.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--cobalt); flex: none; }

.bar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.status { min-height: 1.6em; margin: 18px 0 0; font-weight: 700; }
.status.is-error { color: var(--bad); }

.files { list-style: none; margin: 8px 0 0; padding: 0; }
.file { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; background: var(--mist); }
.file-name { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.file-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name .icon { color: var(--ok); }
.file-meta { color: var(--ink-2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.file[data-state="error"] .file-meta { color: var(--bad); font-weight: 700; }
.file-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.file-actions:empty { display: none; }
@media (min-width: 600px) {
  .file { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .file-actions { grid-column: auto; }
}
.busy { height: 6px; margin-top: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--mist) 0 35%, var(--cobalt) 35% 65%, var(--mist) 65%); background-size: 200% 100%; animation: slide 1.1s linear infinite; }
@keyframes slide { to { background-position: -200% 0; } }
.legend { margin: 12px 0 0; font-size: 0.875rem; color: var(--ink-2); }

/* ---------- Ads ---------- */

.ad { display: flex; flex-direction: column; align-items: center; max-width: 100%; margin: 24px auto; }
.ad-label { align-self: flex-start; margin: 0 0 6px; font-size: 0.6875rem; color: var(--ink-2); }
.ad-fill {
  display: grid; place-content: center; gap: 2px; width: 100%; text-align: center; color: var(--ink-2);
  border: 1px dashed var(--line); border-radius: 12px; font-size: 0.875rem; background: color-mix(in srgb, var(--mist) 55%, transparent);
}
.ad ins { width: 100%; }
.ad--top { width: 100%; max-width: 728px; }
.ad--top .ad-fill, .ad--top ins { min-height: 100px; }
.ad--rect { width: 100%; max-width: 336px; margin-top: 36px; }
.ad--rect .ad-fill, .ad--rect ins { min-height: 250px; }
.ad--side { width: 300px; margin: 0; }
.ad--side .ad-fill, .ad--side ins { min-height: 600px; }
.ad--sticky { flex: 1; width: 100%; max-width: 728px; margin: 0; }
.ad--sticky .ad-fill, .ad--sticky ins { min-height: 50px; }
@media (min-width: 768px) { .ad--top .ad-fill, .ad--top ins { min-height: 90px; } }

.sticky-ad {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: center; gap: 12px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
}
.sticky-close { flex: none; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink-2); font: 700 0.8125rem var(--sans); cursor: pointer; }

/* ---------- Written content ---------- */

.prose { max-width: 66ch; }
.prose h2 { margin-bottom: 16px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.25rem; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--cobalt-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; }
.related h2 { margin-bottom: 20px; font-size: 1.75rem; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 32px; padding-block: 48px 32px; background: var(--footer-bg); color: var(--footer-ink); }
.footer-grid { display: grid; gap: 28px; }
.footer-brand { margin: 0 0 8px; font: 400 2rem/1 var(--serif); color: #fff; }
.footer-note { margin: 0; max-width: 42ch; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: #fff; }
.footer-fine { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.875rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }

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

/* ---------- Passport photo cropper ---------- */

.crop-layout { display: grid; gap: 28px; margin-top: 24px; }
@media (min-width: 860px) { .crop-layout { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 36px; align-items: start; } }
.crop-col { display: grid; gap: 20px; min-width: 0; }
.crop-stage {
  position: relative; justify-self: center; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
  border: 1px solid var(--line); border-radius: 6px; background: var(--mist); line-height: 0; box-shadow: var(--shadow);
}
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { display: block; border-radius: 5px; }
.crop-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crop-guide * { fill: none; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.crop-guide .shadow { stroke: rgba(0, 0, 0, 0.55); stroke-width: 3.5; }
.crop-guide .dash { stroke-dasharray: 6 5; }
.crop-facts { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--cobalt-soft); color: var(--cobalt-ink); font-weight: 700; font-size: 0.9375rem; }
.color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
input[type="color"] { width: 52px; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); cursor: pointer; }

/* ---------- Image merger ---------- */

.merge-list { list-style: none; margin: 20px 0 0; padding: 0; }
.merge-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.merge-item .file-actions { grid-column: 1 / -1; }
@media (min-width: 600px) { .merge-item { grid-template-columns: 56px minmax(0, 1fr) auto; } .merge-item .file-actions { grid-column: auto; } }
.result { margin: 24px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--page); }
.result img { display: block; max-width: 100%; max-height: 420px; margin: 0 auto; border-radius: 8px; background: repeating-conic-gradient(var(--mist) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.result figcaption { margin-top: 12px; color: var(--ink-2); font-size: 0.9375rem; text-align: center; overflow-wrap: anywhere; }

/* ---------- Color palette ---------- */

.palette-top { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 720px) { .palette-top { grid-template-columns: 200px minmax(0, 1fr); align-items: start; gap: 28px; } }
.palette-top img { display: block; width: 100%; max-height: 220px; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); background: var(--mist); }
.swatches { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.swatch { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.swatch-color { display: grid; align-content: end; min-height: 120px; padding: 12px 14px; font: 700 1.125rem var(--sans); letter-spacing: 0.01em; }
.swatch dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; padding: 12px 14px 4px; font-size: 0.875rem; }
.swatch dt { color: var(--ink-2); }
.swatch dd { margin: 0; font-weight: 700; }
.swatch button { margin: 8px 14px 14px; }

.row > .input { width: 7.5rem; }
