/*!
 * MoosePic — application stylesheet.
 * Shares the family palette and component language established by BeaverFile:
 * forest green, bark brown, cream paper. No web fonts, no third-party assets,
 * no network requests: the page must work with the network off once loaded.
 */

/* 1 ------------------------------------------------------------ tokens */

:root {
  --bg: #FDFBF6;
  --bg-deep: #F6F0E5;
  --surface: #FFFFFF;
  --surface-2: #F8F3E9;
  --surface-3: #EFE7D8;
  --ink: #14211A;
  --ink-2: #4E574F;
  --ink-3: #868C82;
  --line: #E6DECD;
  --line-strong: #D5C9B2;
  --acc: #2E7B58;
  --acc-hi: #35906A;
  --acc-soft: #E7F1EA;
  --acc-ink: #1D5B41;
  --bark: #A9744B;
  --bark-soft: #F4E7D6;
  --cream: #FBF1DE;
  --lake: #2F6E8F;
  --lake-soft: #E6F0F5;
  --warn: #8A5A06;
  --warn-soft: #F8EEDC;
  --bad: #A3291F;
  --bad-soft: #FAEBE9;
  --shadow-1: 0 1px 2px rgba(20, 33, 26, .05), 0 1px 3px rgba(20, 33, 26, .04);
  --shadow-2: 0 8px 28px -12px rgba(20, 33, 26, .22), 0 2px 8px rgba(20, 33, 26, .05);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --ease: cubic-bezier(.22, .86, .28, 1);
  --shell: 1160px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0E1512;
  --bg-deep: #0A100D;
  --surface: #141C18;
  --surface-2: #1A241F;
  --surface-3: #22302A;
  --ink: #EDF2EE;
  --ink-2: #A9B5AD;
  --ink-3: #7A857E;
  --line: #24312B;
  --line-strong: #304038;
  --acc: #5FC79A;
  --acc-hi: #7BD8AE;
  --acc-soft: #12291F;
  --acc-ink: #B6EDD2;
  --bark: #C89066;
  --bark-soft: #2A2018;
  --lake: #7FB6D4;
  --lake-soft: #12242E;
  --warn: #E0AE63;
  --warn-soft: #241C10;
  --bad: #FF9086;
  --bad-soft: #2B1614;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 10px 34px -14px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* 2 ------------------------------------------------------------ reset */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 78px; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(90rem 40rem at 50% -20%, var(--acc-soft), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  opacity: .9;
}
a { color: var(--acc); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--acc-hi); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0; font-weight: 650; overflow-wrap: break-word; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
/* The width/height attributes on the mascot are intrinsic hints; CSS width must
   win without the height attribute pinning a 1024px-tall box. */
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Touch: remove the 300 ms tap delay and the grey flash without taking away
   double-tap zoom. */
button, a, label, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
.shell {
  width: 100%; max-width: var(--shell); margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--r-sm); z-index: 50; box-shadow: var(--shadow-2); }
.skip:focus { top: 12px; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 3 ------------------------------------------------------------ app bar */

.appbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar__in { display: flex; align-items: center; gap: 18px; height: 63px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; font-size: 17px; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; padding: 7px 10px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.appbar__end { display: flex; align-items: center; gap: 6px; }
.iconbtn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); border-radius: 999px; padding: 7px 12px;
  font-size: 14px; cursor: pointer; min-height: 44px; min-width: 44px;
  justify-content: center;
}
.iconbtn:hover { border-color: var(--line-strong); color: var(--ink); }
.iconbtn .i-moon { display: none; }
html[data-theme="dark"] .iconbtn .i-sun { display: none; }
html[data-theme="dark"] .iconbtn .i-moon { display: block; }

/* 4 ------------------------------------------------------------ hero */

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; padding: 56px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--acc-ink); background: var(--acc-soft); border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent); padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.6rem); margin: 18px 0 14px; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--acc); }
.hero__sub { color: var(--ink-2); font-size: 18px; max-width: 34em; }
.hero__promise { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14.5px; margin-top: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__mascot { justify-self: center; width: min(320px, 80%); filter: drop-shadow(0 18px 26px rgba(20, 33, 26, .14)); }
.hero__note { font-size: 13px; color: var(--ink-3); margin-top: 12px; }

/* 5 ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--acc); color: #fff; border: 1px solid transparent;
  border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; min-height: 44px;
  transition: transform .16s var(--ease), background .16s var(--ease);
}
.btn:hover { background: var(--acc-hi); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--sm { padding: 8px 14px; min-height: 36px; font-size: 14px; }
.btn--danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.btn--danger:hover { background: var(--bad-soft); color: var(--bad); }
.linkbtn {
  display: inline-flex; align-items: center;
  background: none; border: 0; padding: 0; min-height: 32px;
  color: var(--acc); cursor: pointer; font-size: 14px;
  text-decoration: underline; text-underline-offset: 2px;
}

/* 6 ------------------------------------------------------------ cards and sections */

.section { padding: 34px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section__head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section__head p { color: var(--ink-2); max-width: 44em; margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); color: var(--ink); }
.card__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--acc-soft); color: var(--acc-ink); display: grid; place-items: center; }
.card h3 { font-size: 16px; }
.card p { color: var(--ink-2); font-size: 14px; }
.card__more { margin-top: auto; color: var(--acc); font-size: 13.5px; font-weight: 600; }

.promise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.promise__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.promise__item strong { display: block; font-size: 15px; }
.promise__item span { color: var(--ink-2); font-size: 14px; }

/* 7 ------------------------------------------------------------ editor */

.editor { padding: 22px 0 40px; }
.editor__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.editor__title { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.editor__badge { font-size: 12.5px; color: var(--acc-ink); background: var(--acc-soft); border-radius: 999px; padding: 4px 10px; font-weight: 600; }
.editor__bar .spacer { flex: 1; }

.drop {
  border: 2px dashed var(--line-strong); border-radius: var(--r-xl);
  background: var(--surface); padding: 46px 24px; text-align: center;
  cursor: pointer; transition: border-color .16s var(--ease), background .16s var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--acc); background: var(--acc-soft); }
.drop__art { width: 132px; margin: 0 auto 14px; }
.drop h2 { font-size: 1.25rem; margin-bottom: 6px; }
.drop p { color: var(--ink-2); }
.drop__types { display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.drop__types li { font: 600 11.5px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.stage-wrap {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px; min-height: 380px;
  display: grid; place-items: center; overflow: hidden;
}
.stage { position: relative; display: inline-block; max-width: 100%; }
#preview { display: block; max-width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow-2); touch-action: none; }
/* With the crop handles turned off there is nothing to drag, so let a swipe on
   the photo scroll the page again instead of trapping the thumb. */
#preview[data-crop="off"] { touch-action: pan-y; }
.stage__empty { color: var(--ink-3); font-size: 14px; text-align: center; padding: 40px 20px; }
.stage__meta { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.stage__meta .mono { font-family: var(--mono); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
@media (min-width: 981px) {
  .panel { position: sticky; top: 78px; }
  .panel__body { max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; }
}
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel__actions { display: flex; align-items: center; gap: 10px; }
.panel__head h3 { font-size: 14px; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); font-weight: 650; }
.panel__body { padding: 14px; display: grid; gap: 16px; }
.panel__group { display: grid; gap: 10px; }
.panel__label { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.toolrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.toolbtn {
  display: grid; place-items: center; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 4px; font-size: 10.5px; color: var(--ink-2); cursor: pointer; min-height: 52px;
}
.toolbtn:hover { border-color: var(--line-strong); color: var(--ink); }
.toolbtn[aria-pressed="true"] { background: var(--acc-soft); border-color: color-mix(in srgb, var(--acc) 40%, transparent); color: var(--acc-ink); }
.toolbtn .ico { width: 17px; height: 17px; }

.field { display: grid; gap: 5px; }
.field__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field label { font-size: 13.5px; color: var(--ink-2); }
.field output { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.field__hint { font-size: 12px; color: var(--ink-3); }
/* Sliders get a real, thumb-sized grip instead of the 12 px OS nub: on a phone
   the default track is almost impossible to catch. */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 30px; background: transparent; cursor: pointer;
  accent-color: var(--acc);
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: var(--line-strong);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--acc); border: 2px solid var(--surface);
  box-shadow: var(--shadow-1);
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--line-strong);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--acc); border: 2px solid var(--surface);
}
input[type="number"], input[type="text"], select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-height: 44px;
}
input[type="color"] { width: 100%; height: 44px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; min-height: 38px;
  font-size: 13.5px; cursor: pointer; color: var(--ink-2);
}
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }

.checkline { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.checkline input { width: 17px; height: 17px; accent-color: var(--acc); }

/* Export first: the download is the point of the page, so it stays at the top of
   the panel while the controls scroll beneath it. */
.export { display: grid; gap: 10px; order: -1; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.export__size { font-size: 12.5px; color: var(--ink-3); }
.notice { border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.notice--ok { background: var(--acc-soft); color: var(--acc-ink); border-color: color-mix(in srgb, var(--acc) 25%, transparent); }

/* 8 ------------------------------------------------------------ herd */

.herd { padding: 38px 0 10px; }
.herd__head { text-align: center; max-width: 640px; margin: 0 auto 22px; }
.herd__head h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); }
.herd__head p { color: var(--ink-2); margin-top: 8px; }
.herd__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); justify-content: center; gap: 14px; }
.herd__card {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--shadow-1); transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.herd__card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: var(--ink); }
.herd__mascot { width: 58px; height: 58px; flex: none; background: var(--acc-soft); border-radius: 14px; display: grid; place-items: center; }
.herd__mascot svg, .herd__mascot img { width: 46px; height: 46px; }
.herd__name { display: block; font-weight: 650; font-size: 15.5px; }
.herd__tagline { display: block; font-size: 13.5px; color: var(--ink-2); }
.herd__cta { margin-left: auto; color: var(--acc); font-size: 18px; }
.herd__promise { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 16px; }

/* 9 ------------------------------------------------------------ content pages */

.page { max-width: 780px; padding-top: 44px; padding-bottom: 50px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 12px; }
.page .lede { font-size: 18px; color: var(--ink-2); }
.page h2 { font-size: 1.4rem; margin: 34px 0 10px; }
.page h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.page p { margin: 10px 0; color: var(--ink-2); }
.page ul, .page ol { color: var(--ink-2); padding-left: 22px; margin: 10px 0; }
.page li { margin: 6px 0; }
.page .callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: var(--r); padding: 14px 16px; margin: 18px 0; }
.page .callout p { margin: 0; }
.page__cta { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.faq details p { margin-top: 8px; }
.steps { display: grid; gap: 12px; counter-reset: step; }
.steps li { list-style: none; display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; counter-increment: step; }
.steps li::before { content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--acc); color: #fff; font: 650 13px/26px var(--font); text-align: center; }
.steps li { color: var(--ink-2); }

/* 10 ------------------------------------------------------------ footer */

.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 40px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.footer__in { display: flex; flex-wrap: wrap; gap: 22px; justify-content: space-between; align-items: flex-start; }
.footer__brand { display: flex; gap: 12px; align-items: flex-start; max-width: 360px; }
.footer__brand img { width: 40px; height: 40px; }
.footer__brand strong { display: block; }
.footer__brand p { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.footer nav { display: grid; gap: 6px; font-size: 14px; }
.footer nav a { color: var(--ink-2); text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
.footer__legal { color: var(--ink-3); font-size: 12.5px; margin-top: 24px; }

/* 11 ------------------------------------------------------------ responsive */

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .panel__body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
  .panel__group { align-content: start; }
  .export { grid-column: 1 / -1; }
}
/* Phones. Three rules drive everything below: the menu is reachable without
   JavaScript, the promise and the button come before the mascot, and every
   control is at least 44 px so a thumb can hit it. */
@media (max-width: 760px) {
  /* the sticky two-row bar is ~104 px tall; anchor targets must clear it */
  html { scroll-padding-top: 112px; }

  /* --- app bar: brand + theme on the first row, nav as a scrollable strip --- */
  .appbar__in { height: auto; flex-wrap: wrap; gap: 0 10px; padding-top: 4px; }
  .appbar__end { margin-left: auto; }
  .brand { min-height: 48px; }
  .nav {
    display: flex; order: 3; width: 100%;
    margin: 0 -24px; padding: 0 24px 8px; gap: 6px;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    display: inline-flex; align-items: center; flex: none;
    min-height: 44px; padding: 0 15px; font-size: 14.5px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; white-space: nowrap; scroll-snap-align: start;
  }
  .nav a:hover { background: var(--surface-2); }

  /* --- hero: headline, promise and the button first; mascot after --- */
  .hero { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 22px 0 14px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.7rem); margin: 14px 0 10px; }
  .hero__sub { font-size: 16.5px; }
  .hero__promise { margin-top: 12px; }
  .hero__actions { margin-top: 18px; }
  .hero__actions .btn { flex: 1 1 160px; }
  .hero__mascot { width: 132px; order: 2; justify-self: end; margin: 16px 0 0; }

  /* --- sections and cards --- */
  .section { padding: 24px 0; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .promise { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card { padding: 16px; }
  /* Hover effects are meaningless on touch and just cause sticky states. */
  .card:hover, .herd__card:hover, .btn:hover { transform: none; }
  .herd__card { padding: 14px; }
  .page { padding-top: 28px; }

  /* --- editor: controls stack under the photo, no nested scroll areas --- */
  .editor { padding: 14px 0 30px; }
  .editor__bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
  .editor__bar > div { grid-column: 1 / -1; }
  .editor__bar .spacer { display: none; }
  .editor__badge { grid-column: 1 / -1; justify-self: start; }
  .editor__title { font-size: 1.45rem; }

  .drop { padding: 24px 16px; border-radius: var(--r-lg); }
  .drop__art { width: 84px; margin-bottom: 8px; }
  .drop h2 { font-size: 1.1rem; }

  .workspace { gap: 10px; }
  .stage-wrap { min-height: 200px; padding: 8px; border-radius: var(--r); }
  .stage__meta { flex-wrap: wrap; gap: 2px 12px; margin-top: 8px; }

  .panel__body { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px; }
  .panel__head { padding: 10px 12px; }
  .panel__head h3 { font-size: 13px; }
  /* Undo and Redo are the two smallest controls on the page. On a phone they
     measured 43x44 and 41x44, under the 44 px tap-target floor the rest of the
     editor meets, so they get an explicit floor here. */
  .panel__actions .linkbtn { min-height: 44px; min-width: 44px; }

  /* Five transform buttons wrapped 4+1 before; three across reads evenly. */
  .toolrow { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .toolbtn { min-height: 58px; font-size: 11.5px; }
  .toolbtn .ico { width: 19px; height: 19px; }

  /* thumb-sized controls */
  .chip { min-height: 44px; padding: 0 16px; font-size: 14px; }
  .checkline { min-height: 48px; }
  .checkline input { width: 21px; height: 21px; }
  .linkbtn { min-height: 44px; padding: 0 4px; font-size: 14.5px; }
  .btn { min-height: 48px; }
  .btn--sm { min-height: 46px; }
  input[type="range"] { height: 44px; }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; }
  input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; }
  input[type="number"], input[type="text"], select { min-height: 48px; font-size: 16px; }
  input[type="color"] { height: 48px; }
  .field label { font-size: 14px; }
  .field__hint { font-size: 12.5px; }
  /* Phones read top-down in task order: straighten and crop first, then light,
     then size, and the download lands at the end of the flow. */
  .panel__group:first-of-type { order: -1; }
  .export {
    order: 1; border-bottom: 0; border-top: 1px solid var(--line);
    padding: 14px 0 0;
  }
  .export .btn { width: 100%; }

  /* --- footer --- */
  .footer { margin-top: 28px; padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); }
  .footer__in { flex-direction: column; gap: 18px; }
  .footer nav { gap: 0; }
  .footer nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .footer__legal { margin-top: 16px; }
}
@media (max-width: 460px) {
  .shell {
    padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  }
  .nav { margin: 0 -16px; padding: 0 16px 8px; }
  .hero h1 { font-size: clamp(1.9rem, 10vw, 2.4rem); }
}

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