/* ============================================================
   ONLINE IMAGE CROPPER — styles
   idcardgeneratoronline.com/online-image-cropper

   Design concept: a photographer's contact sheet / light table.
   Cool pale-gray surface (not the warm-cream default), deep
   charcoal ink, a single precise "safelight amber" accent. The
   signature element is the crop-mark corner bracket — the same
   L-shaped mark used on every real photo-editing tool — echoed
   throughout the page (step numbers, section corners) instead of
   generic decoration.
   ============================================================ */

:root {
  /* Color */
  --paper:        #F6F7F5;   /* contact-sheet background */
  --surface:       #FFFFFF;   /* card white */
  --surface-sunken: #EEF0EE;
  --ink:           #1A1D22;   /* near-black charcoal */
  --ink-soft:      #4A5058;
  --ink-faint:     #868C94;
  --line:          #DEE1E5;
  --line-strong:   #C7CBD1;
  --accent:        #E2891A;   /* safelight amber */
  --accent-dark:   #B86A0F;
  --accent-soft:   #FCEEDA;
  --danger:        #C0392B;
  --danger-soft:   #FBECEA;
  --success:       #2F7D5A;
  --success-soft:  #E9F5EF;

  /* Type */
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-small:   clamp(0.80rem, 0.77rem + 0.12vw, 0.90rem);
  --fs-body:    clamp(0.95rem, 0.92rem + 0.14vw, 1.05rem);
  --fs-body-lg: clamp(1rem, 0.96rem + 0.18vw, 1.15rem);

  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 1px 0 rgba(26,29,34,.04), 0 8px 24px rgba(26,29,34,.07);
  --shadow-md: 0 12px 32px rgba(26,29,34,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* The hidden attribute must always win, even against class-level
   display:flex rules (e.g. .control-group, .bg-sub-panel) — without
   this, JS-toggled panels like the background color picker stay
   visible and clicks on them silently do nothing. */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; }

.skip-nav {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-nav:focus { left: 0; }

.noscript-banner {
  background: var(--danger); color: #fff; text-align: center; padding: 12px 16px; font-weight: 600;
}

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

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--ink);
  padding: 14px 0;
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.logo-link { display: flex; align-items: center; gap: 8px; color: var(--paper); }
.logo-link:hover { text-decoration: none; }
.logo-mark {
  font-family: var(--font-mono); color: var(--accent); font-size: 1.1rem; font-weight: 600; letter-spacing: -2px;
}
.logo-text { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--paper); }
.site-header nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-header nav a { color: rgba(246,247,245,.72); font-size: var(--fs-small); font-weight: 500; }
.site-header nav a:hover { color: var(--accent); text-decoration: none; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }

.ad-slot {
  margin: 22px 0;
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-sunken);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
}
.ad-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; color: var(--ink-faint); }

/* ── HEADLINE ───────────────────────────────────────────── */
/* Full page-wrap width and tight vertical rhythm so the tool
   itself lands as high on the screen as possible. */
.headline { margin: 16px 0 0; text-align: center; }
.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; color: var(--accent-dark);
  font-weight: 600; margin: 0 0 6px;
}
.headline h1 { font-size: clamp(2rem, 4.5vw + 0.5rem, 3rem); font-weight: 700; letter-spacing: -.01em; }
.headline-sub { color: var(--ink-soft); font-size: var(--fs-body-lg); margin: 8px 0 0; line-height: 1.6; }

/* ── DROP ZONE ──────────────────────────────────────────── */
.cropper-tool { margin: 18px 0 30px; }
.drop-zone {
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone-bracket {
  display: block; font-family: var(--font-mono); font-size: 1.6rem; color: var(--line-strong);
  letter-spacing: 2px; margin-bottom: 8px;
}
.drop-zone-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 0; }
.drop-zone-sub { color: var(--ink-faint); font-size: var(--fs-small); margin: 6px 0 14px; }
.btn-choose-file {
  display: inline-block; background: var(--ink); color: var(--paper); font-weight: 600;
  padding: 11px 26px; border-radius: 100px; font-size: var(--fs-small);
}
.load-error {
  margin: 14px 0 0; padding: 12px 16px; background: var(--danger-soft); color: var(--danger);
  border-radius: var(--radius); font-size: var(--fs-small); font-weight: 600;
}

/* ── WORKSPACE ──────────────────────────────────────────── */
.cropper-workspace { margin-top: 22px; }
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 24px;
  align-items: start;
}
.stage-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}
.checkerboard-bg {
  background:
    linear-gradient(45deg, #e4e6e4 25%, transparent 25%),
    linear-gradient(-45deg, #e4e6e4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4e6e4 75%),
    linear-gradient(-45deg, transparent 75%, #e4e6e4 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.cropper-stage {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  height: 460px; /* steady stage height — image is scaled to fit inside */
  touch-action: none;
  border-radius: 6px;
  overflow: hidden;
}
.cropper-stage canvas { display: block; }
#stage-canvas { position: absolute; }

.crop-box {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(26,29,34,.55);
  touch-action: none;
  cursor: move;
}
.mask-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: none;
}
.crop-box.is-circle .mask-canvas {
  display: block;
  border-radius: 50%;
  /* Thin ring so the circle boundary stays visible — the corners
     around it now show the untouched image (no checkerboard). */
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.9), 0 0 0 3px rgba(26,29,34,.28);
}
.crop-box::before {
  content: "";
  position: absolute; inset: 0;
  border: 1.5px solid rgba(255,255,255,.9);
  pointer-events: none;
}
.crop-corner {
  position: absolute;
  width: 22px; height: 22px;
  pointer-events: none;
}
.crop-corner::before, .crop-corner::after { content: ""; position: absolute; background: var(--accent); }
.crop-corner::before { width: 100%; height: 3px; }
.crop-corner::after { width: 3px; height: 100%; }
.crop-corner--tl { top: -2px; left: -2px; }
.crop-corner--tl::before, .crop-corner--tl::after { top: 0; left: 0; }
.crop-corner--tr { top: -2px; right: -2px; }
.crop-corner--tr::before { top: 0; right: 0; }
.crop-corner--tr::after { top: 0; right: 0; }
.crop-corner--bl { bottom: -2px; left: -2px; }
.crop-corner--bl::before { bottom: 0; left: 0; }
.crop-corner--bl::after { bottom: 0; left: 0; }
.crop-corner--br { bottom: -2px; right: -2px; }
.crop-corner--br::before { bottom: 0; right: 0; }
.crop-corner--br::after { bottom: 0; right: 0; }

.crop-handle {
  position: absolute;
  background: transparent;
  touch-action: none;
}
.crop-handle::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}
.crop-handle[data-edge="top"] {
  top: -12px; left: 12px; right: 12px; height: 24px; cursor: ns-resize;
}
.crop-handle[data-edge="top"]::after { top: 9px; left: calc(50% - 16px); width: 32px; height: 6px; }
.crop-handle[data-edge="bottom"] {
  bottom: -12px; left: 12px; right: 12px; height: 24px; cursor: ns-resize;
}
.crop-handle[data-edge="bottom"]::after { bottom: 9px; left: calc(50% - 16px); width: 32px; height: 6px; }
.crop-handle[data-edge="left"] {
  left: -12px; top: 12px; bottom: 12px; width: 24px; cursor: ew-resize;
}
.crop-handle[data-edge="left"]::after { left: 9px; top: calc(50% - 16px); height: 32px; width: 6px; }
.crop-handle[data-edge="right"] {
  right: -12px; top: 12px; bottom: 12px; width: 24px; cursor: ew-resize;
}
.crop-handle[data-edge="right"]::after { right: 9px; top: calc(50% - 16px); height: 32px; width: 6px; }

.stage-meta { display: flex; justify-content: center; margin-top: 12px; }
.crop-dimensions {
  font-family: var(--font-mono); font-size: var(--fs-small); color: var(--ink-soft);
  background: var(--surface-sunken); padding: 5px 12px; border-radius: 100px;
}
.pdf-page-note {
  margin: 10px 0 0; font-size: var(--fs-small); color: var(--accent-dark); text-align: center;
}

/* ── CONTROLS ───────────────────────────────────────────── */
.control-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.control-group { display: flex; flex-direction: column; gap: 8px; }
.control-label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}
.control-hint { font-size: .78rem; color: var(--ink-faint); margin: 2px 0 0; }
.tool-quickuse { font-size: var(--fs-small); color: var(--ink-faint); margin: 0 0 12px; }
.tool-quickuse strong { color: var(--ink); font-weight: 600; }

.rotate-buttons, .ratio-buttons, .format-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-icon, .ratio-btn, .format-btn {
  appearance: none; font: inherit; cursor: pointer;
  background: var(--surface-sunken); border: 1.5px solid var(--line);
  color: var(--ink-soft); font-weight: 600; font-size: var(--fs-small);
  padding: 9px 14px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-icon:hover, .ratio-btn:hover, .format-btn:hover { border-color: var(--accent); color: var(--ink); }
.ratio-btn.is-active, .format-btn.is-active {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}

#quality-slider { width: 100%; accent-color: var(--accent); }

/* ── BACKGROUND CONTROLS (circle crop) ─────────────────── */
.bg-type-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-type-btn {
  appearance: none; font: inherit; cursor: pointer;
  background: var(--surface-sunken); border: 1.5px solid var(--line);
  color: var(--ink-soft); font-weight: 600; font-size: var(--fs-small);
  padding: 8px 14px; border-radius: 100px;
  transition: background .15s, border-color .15s, color .15s;
}
.bg-type-btn:hover { border-color: var(--accent); color: var(--ink); }
.bg-type-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.bg-sub-panel { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
#bg-color-input {
  width: 100%; height: 40px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
}
.bg-swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-swatch {
  appearance: none; padding: 0; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--line-strong);
  transition: box-shadow .15s, transform .1s;
}
.bg-swatch:hover { transform: scale(1.08); }
.bg-swatch.is-active { box-shadow: 0 0 0 2.5px var(--accent); }
.bg-swatch--gradient, .bg-swatch--3d { border-radius: 8px; width: 40px; height: 34px; }

.size-readout { background: var(--surface-sunken); border-radius: var(--radius); padding: 12px 14px; }
.size-row { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); }
.size-item { display: flex; flex-direction: column; gap: 2px; }
.size-item-label { font-size: .68rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; }
.size-item-value { font-size: 1rem; font-weight: 600; color: var(--ink); }
.size-arrow { color: var(--ink-faint); }
.size-savings {
  display: inline-block; margin-top: 8px; font-size: var(--fs-small); font-weight: 700; color: var(--success);
}
.size-savings.is-larger { color: var(--danger); }

.control-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.btn-primary, .btn-secondary, .btn-ghost {
  appearance: none; font: inherit; cursor: pointer; border-radius: 10px; font-weight: 700;
  padding: 13px 18px; font-size: var(--fs-body); text-align: center;
}
.btn-primary {
  background: var(--accent); color: #fff; border: none;
  box-shadow: 0 3px 0 var(--accent-dark);
  transition: filter .15s, transform .1s, box-shadow .1s;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary {
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost {
  background: transparent; color: var(--ink-faint); border: 1.5px dashed var(--line-strong);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ── CONTENT SECTIONS ───────────────────────────────────── */
.content-section { margin: 34px 0; }
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow);
}
.content-heading { font-size: clamp(1.3rem, 2vw + 0.6rem, 1.7rem); font-weight: 700; margin-bottom: 6px; }
.content-intro { color: var(--ink-soft); font-size: var(--fs-body-lg); margin: 10px 0 18px; }
.content-card p { color: var(--ink-soft); }
.content-card strong { color: var(--ink); }

/* Steps list — bracket-numbered instead of generic 01/02/03 */
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps-list li { display: flex; gap: 16px; align-items: flex-start; }
.step-bracket {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600;
  color: var(--accent); width: 36px; text-align: center; line-height: 1.4;
}
.steps-list h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.steps-list p { margin: 0; font-size: var(--fs-body); }

/* Preset grid */
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 6px; }
.preset-item {
  background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px;
}
.preset-tag {
  display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: .78rem;
  background: var(--accent-soft); color: var(--accent-dark); padding: 3px 10px; border-radius: 100px;
  margin-bottom: 10px;
}
.preset-item h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.preset-item p { font-size: var(--fs-small); margin: 0; line-height: 1.55; }

.quality-list { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.quality-list li { font-size: var(--fs-body); }

/* Uses grid */
.uses-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 6px; }
.use-cell { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.use-cell h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; color: var(--accent-dark); }
.use-cell p { font-size: var(--fs-small); margin: 0; line-height: 1.55; }

/* Comparison table */
.compare-table-wrap { margin-top: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
.compare-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); min-width: 280px; }
.compare-table th, .compare-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table thead th {
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-small);
  letter-spacing: .02em; text-transform: uppercase;
}
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:nth-child(even) { background: var(--surface-sunken); }
.compare-table tbody th { font-weight: 500; color: var(--ink-soft); }
.compare-table td { width: 110px; text-align: center; }
.check-mark { color: var(--success); font-weight: 700; font-size: 1.05rem; }
.cross-mark { color: var(--danger); font-weight: 700; font-size: 1.05rem; }

/* Browser compatibility */
.browser-list {
  list-style: none; margin: 6px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px;
}
.browser-list li {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; font-weight: 500; font-size: var(--fs-body);
}
.tested-note {
  margin: 16px 0 0; font-size: var(--fs-small); color: var(--ink-faint);
  font-family: var(--font-mono); border-top: 1px dashed var(--line); padding-top: 12px;
}

/* Hero image */
.hero-image-wrap {
  margin: 30px 0; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-image { width: 100%; height: auto; aspect-ratio: 1200/630; object-fit: cover; background: var(--surface-sunken); }

/* FAQ */
.faq-list { display: grid; gap: 10px; margin-top: 14px; }
.faq-item { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; }
.faq-q { cursor: pointer; font-weight: 700; padding: 14px 0; font-size: var(--fs-body); list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::before { content: "+ "; color: var(--accent); font-weight: 800; }
.faq-item[open] .faq-q::before { content: "\2212 "; }
.faq-a { padding: 0 0 16px; color: var(--ink-soft); font-size: var(--fs-body); line-height: 1.65; }

/* Related links */
.related-links-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 14px 0 0; padding: 0; }
.related-links-list a {
  display: inline-flex; align-items: center; padding: 9px 16px; border: 1.5px solid var(--line-strong);
  border-radius: 100px; color: var(--ink); font-weight: 600; font-size: var(--fs-small);
  transition: background .15s, color .15s, border-color .15s;
}
.related-links-list a:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); text-decoration: none; }

/* Author */
.author-line {
  max-width: 1100px; margin: 26px auto 6px; padding: 14px 4px; border-top: 2px solid var(--line-strong);
  font-size: var(--fs-body); color: var(--ink-soft); display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.author-label { font-weight: 700; color: var(--ink); }
a.author-name { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
a.author-name:hover { text-decoration: underline; }
.byline-sep { color: var(--line-strong); }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: rgba(246,247,245,.7); margin-top: 30px; }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 28px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.footer-logo-text { font-family: var(--font-display); font-weight: 600; color: var(--paper); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-nav a { color: rgba(246,247,245,.65); font-size: var(--fs-small); }
.footer-nav a:hover { color: var(--accent); text-decoration: none; }
.footer-copy { font-size: .78rem; color: rgba(246,247,245,.4); margin: 0; }

/* ── PRINT ──────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .ad-slot, .cropper-tool { display: none !important; }
}

/* ── BREAKPOINTS ────────────────────────────────────────── */
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .cropper-stage { height: 400px; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .cropper-stage { height: 340px; }
  .header-inner { justify-content: center; text-align: center; }
  .site-header nav { justify-content: center; }
  .drop-zone { padding: 18px 16px; }
  .content-card { padding: 22px 18px; }
  .preset-grid, .uses-grid { grid-template-columns: 1fr; }
  .browser-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .compare-table th, .compare-table td { padding: 10px 12px; }
  .compare-table td { width: 84px; }
  .steps-list li { gap: 12px; }
  .step-bracket { font-size: 1.2rem; width: 28px; }
  .control-col { padding: 16px; }
  /* Handles get a bit larger on touch screens for easier grabbing */
  .crop-handle[data-edge="top"], .crop-handle[data-edge="bottom"] { height: 30px; }
  .crop-handle[data-edge="left"], .crop-handle[data-edge="right"] { width: 30px; }
  /* Background swatches get roomier tap targets on touch screens */
  .bg-swatch { width: 40px; height: 40px; }
  .bg-swatch--gradient, .bg-swatch--3d { width: 46px; height: 40px; }
}

@media (max-width: 420px) {
  .cropper-stage { height: 280px; }
  .headline h1 { font-size: 1.7rem; }
  .rotate-buttons, .ratio-buttons, .format-buttons { gap: 6px; }
  .btn-icon, .ratio-btn, .format-btn { padding: 8px 12px; font-size: .82rem; }
}
