:root {
  /* ---- Splitgram bright "paper + sticker" theme ---- */
  --paper: #FBF6EA;          /* warm cream page */
  --paper-2: #F1EAD8;        /* darker cream (stripes / tracks) */
  --card: #FFFFFF;
  --ink: #16150F;            /* near-black warm */
  --ink-2: #5A574C;          /* muted body */
  --ink-3: #908C7E;          /* faint */
  --accent: #CCFF00;         /* acid lime (overridable via Tweaks) */
  --line: 2px solid var(--ink);
  --sh: 4px 4px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --sh-lg: 5px 5px 0 var(--ink);
  --r: 20px;
  --r-sm: 13px;
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Archivo Expanded', 'Archivo', sans-serif;
  --num: 'Space Grotesk', var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
#root { display: block; }

.app {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 26px;
  border-bottom: var(--line);
  background: var(--paper);
  flex: none;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent);
  border: var(--line);
  box-shadow: var(--sh-sm);
  display: grid; place-items: center;
}
.brand-mark span { display: flex; gap: 3px; align-items: center; }
.brand-mark span i {
  display: block; width: 4px; background: var(--ink); border-radius: 2px;
}
.brand-name {
  font-family: var(--display);
  font-weight: 900; font-size: 23px; letter-spacing: -0.03em;
  line-height: 1;
}
.brand-name b { font-weight: 900; }
.brand-tag {
  font-size: 11px; color: var(--ink-3); font-weight: 700;
  letter-spacing: 0.02em; margin-top: 3px; white-space: nowrap;
}
.topbar-spacer { flex: 1; }
.topbar-link {
  font-size: 13px; font-weight: 700; color: var(--ink-2); text-decoration: none;
  padding: 7px 11px; border-radius: 9px; transition: background .15s, color .15s;
}
.topbar-link:hover { color: var(--ink); background: var(--paper-2); }
.topbar-hint {
  font-size: 12px; color: var(--ink-3); font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.topbar-hint kbd {
  font-family: var(--font); font-size: 11px; font-weight: 700;
  background: var(--card); border: var(--line); border-radius: 7px;
  padding: 1px 7px; color: var(--ink);
}
@media (max-width: 860px) { .topbar-hint { display: none; } }

.pro-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  color: var(--ink); padding: 6px 12px; border-radius: 999px;
  background: var(--accent); border: var(--line); box-shadow: var(--sh-sm);
}

/* ---------- language toggle (JP / EN) ---------- */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px; border-radius: 999px; border: var(--line);
  background: var(--card);
}
.lang-opt {
  font-family: var(--font); font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  color: var(--ink-3); background: transparent; border: none; cursor: pointer;
  padding: 4px 9px; border-radius: 999px; transition: background .15s, color .15s;
}
.lang-opt:hover { color: var(--ink); }
.lang-opt.on { color: var(--ink); background: var(--accent); box-shadow: var(--sh-sm); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font); font-weight: 800; font-size: 13.5px;
  border: var(--line); border-radius: 999px; cursor: pointer;
  padding: 10px 18px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); background: var(--card);
  transition: transform .1s, box-shadow .12s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: none !important; }
.btn-ghost { background: var(--card); }
.btn-ghost:hover { box-shadow: var(--sh-sm); transform: translate(-1px,-1px); }
.btn-ig { background: var(--accent); box-shadow: var(--sh-sm); }
.btn-ig:hover { box-shadow: var(--sh); transform: translate(-1px,-1px); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; padding: 13px; margin-top: 4px; box-shadow: var(--sh); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- main layout ---------- */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  min-height: 0;
}
@media (max-width: 1180px) {
  .layout { grid-template-columns: 244px minmax(0, 1fr); }
}

/* ---------- mobile styles live at the END of this file ---------- */

.col { min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.col-stage { overflow: hidden; }

.panel {
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
}
.panel.scroll { overflow-y: auto; }
.panel-pad { padding: 18px; }

.section-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.section-label::after {
  content: ""; flex: 1; height: 2px; background: var(--paper-2);
}

/* ---------- presets ---------- */
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset {
  background: var(--card);
  border: var(--line);
  border-radius: var(--r-sm);
  padding: 12px 10px 10px;
  cursor: pointer; text-align: left;
  transition: transform .1s, box-shadow .12s, background .12s;
}
.preset:hover { transform: translate(-1px,-1px); box-shadow: var(--sh-sm); }
.preset.active { background: var(--accent); box-shadow: var(--sh-sm); }
.preset .mini { display: grid; gap: 2px; width: 100%; margin-bottom: 9px; }
.preset .mini i { background: var(--ink); border-radius: 1px; aspect-ratio: 3/4; opacity: 0.35; }
.preset.active .mini i { opacity: 1; }
.preset .p-name { font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.preset .p-sub { font-size: 11px; color: var(--ink); font-weight: 700; font-family: var(--num); letter-spacing: -0.01em; line-height: 1.2; }
.preset .p-sub .px { font-size: 9px; font-weight: 600; color: var(--ink-3); margin-left: 1px; }
.preset .p-ratio { font-size: 9.5px; color: var(--ink-3); font-weight: 600; margin-top: 1px; }
.preset.active .p-sub .px, .preset.active .p-ratio { color: var(--ink-2); }

/* ---------- fields / slider ---------- */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.field-head label { font-size: 13px; color: var(--ink); font-weight: 700; }
.field-head .val {
  font-family: var(--num); font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: var(--paper); border: var(--line); padding: 0 9px; border-radius: 8px;
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 6px;
  background: var(--ink); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); border: var(--line); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: var(--line); cursor: pointer;
}

/* ---------- stage / workspace ---------- */
.col-stage .panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.stage-panel { position: relative; }

/* in-place drop affordance (top bar of stage) */
.dropbtn {
  font-family: var(--font); font-weight: 800; font-size: 12.5px;
  color: var(--ink); background: var(--paper);
  border: 2px dashed var(--ink); border-radius: 999px; cursor: pointer;
  padding: 8px 15px; display: inline-flex; align-items: center; gap: 7px;
  transition: transform .1s, box-shadow .12s, background .12s;
}
.dropbtn:hover { background: var(--accent); transform: translate(-1px,-1px); box-shadow: var(--sh-sm); border-style: solid; }
.dropbtn-or { opacity: 0.4; font-weight: 700; }

/* first-run coachmark over the workspace */
.drop-coach {
  position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%);
  z-index: 6; white-space: nowrap;
  font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: var(--card); border: var(--line); border-radius: 999px;
  box-shadow: var(--sh); cursor: pointer;
  padding: 9px 17px 9px 11px; display: inline-flex; align-items: center; gap: 9px;
  animation: coachbob 2.4s ease-in-out infinite;
}
.drop-coach b { font-weight: 800; }
.drop-coach:hover { box-shadow: var(--sh-lg); }
.drop-coach-ico {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: var(--accent); border: var(--line);
  display: grid; place-items: center; color: var(--ink);
}
@keyframes coachbob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -4px); } }

/* seam-proof badge in preview */
.seam-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--ink);
  background: var(--accent); border: var(--line); border-radius: 999px;
  padding: 5px 13px; box-shadow: var(--sh-sm);
}

/* clear/remove photo button */
.clear-photo {
  position: absolute; top: 62px; right: 18px; z-index: 7;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card); border: var(--line); box-shadow: var(--sh-sm);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: transform .1s, box-shadow .12s, background .12s;
}
.clear-photo:hover { background: #FFDFD8; transform: translate(-1px,-1px); box-shadow: var(--sh); }
.clear-photo:active { transform: translate(1px,1px); box-shadow: none; }
.stage-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: var(--line); flex: none;
}
.stage-title { font-size: 14px; font-weight: 800; }
.stage-title b { font-weight: 900; }
.stage-head .spacer { flex: 1; }
.chip {
  font-size: 11.5px; font-weight: 700; color: var(--ink);
  background: var(--paper); border: var(--line); border-radius: 999px; padding: 3px 11px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip b { font-weight: 800; font-family: var(--num); }

.stage-canvas {
  flex: 1; min-height: 0; position: relative;
  display: grid; place-items: center; padding: 26px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(45deg, var(--paper-2) 0 14px, transparent 14px 28px);
}

.frame {
  position: relative; cursor: grab;
  border-radius: 8px; overflow: hidden;
  border: var(--line);
  box-shadow: var(--sh-lg);
  touch-action: none; user-select: none;
  -webkit-user-select: none;
}
.frame.grabbing { cursor: grabbing; }
.frame-base { position: absolute; top: 0; left: 0; will-change: transform; pointer-events: none; transform-origin: 0 0; }
/* per-cell real images — sit above the live composite; iOS long-press on them
   shows the native callout (Save to Photos / Share / Copy). */
.cell-img {
  position: absolute; z-index: 2; display: block;
  object-fit: cover;
  -webkit-touch-callout: default; /* re-enable the iOS long-press menu */
  -webkit-user-select: none; user-select: none;
}
.grid-lines { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.grid-lines .gl { position: absolute; background: #fff; box-shadow: 0 0 0 1px var(--ink); }
.grid-lines .gl.v { top: 0; bottom: 0; width: 2px; transform: translateX(-1px); }
.grid-lines .gl.h { left: 0; right: 0; height: 2px; transform: translateY(-1px); }
.cell-badge {
  position: absolute; z-index: 4; pointer-events: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--accent);
  font-size: 12px; font-weight: 800; font-family: var(--num);
  display: grid; place-items: center; border: 2px solid var(--accent);
}

/* drop zone */
.dropzone {
  width: min(82%, 470px); aspect-ratio: 3/2;
  border-radius: var(--r);
  border: 2.5px dashed var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; cursor: pointer; text-align: center;
  background: var(--card);
  transition: transform .12s, box-shadow .15s;
}
.dropzone:hover, .dropzone.over { transform: translate(-2px,-2px); box-shadow: var(--sh-lg); }
.dz-icon {
  width: 60px; height: 60px; border-radius: 16px; background: var(--ink);
  display: grid; place-items: center; border: var(--line);
}
.dz-title { font-size: 17px; font-weight: 800; }
.dz-sub { font-size: 12.5px; color: var(--ink-2); max-width: 300px; line-height: 1.55; font-weight: 500; }

/* stage footer */
.stage-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-top: var(--line); flex: none;
}
.foot-zoom { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.stage-foot .zoomwrap { flex: 1; display: flex; align-items: center; min-width: 0; }
.foot-dl { flex: none; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--card); border: var(--line);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: transform .1s, box-shadow .12s;
}
.icon-btn:hover { box-shadow: var(--sh-sm); transform: translate(-1px,-1px); }
.icon-btn:active { transform: translate(1px,1px); box-shadow: none; }

/* ---------- right preview ---------- */
.col-preview { overflow: hidden; }
.col-preview .panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.preview-head {
  display: flex; align-items: baseline; gap: 9px;
  padding: 15px 18px 13px; border-bottom: var(--line);
}
.preview-head-title { font-size: 14px; font-weight: 800; }
.preview-head-sub { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.preview-body {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 18px 22px; gap: 15px;
}

.ig-grid {
  width: 216px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: var(--line); border-radius: 4px; overflow: hidden; box-shadow: var(--sh-sm);
}
.ig-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; background: var(--paper-2); border-right: var(--line); border-bottom: var(--line); }
.ig-grid img:nth-child(3n) { border-right: none; }
.ig-grid .empty { width: 100%; aspect-ratio: 3/4; background: var(--paper-2); border-right: var(--line); border-bottom: var(--line); }
.ig-grid .empty:nth-child(3n) { border-right: none; }
.preview-note { font-size: 12px; color: var(--ink-2); text-align: center; line-height: 1.6; max-width: 224px; font-weight: 500; }
.preview-note b { color: var(--ink); font-weight: 800; }

/* slices */
.slices { flex: none; border-top: var(--line); padding: 14px 18px 16px; }
.slices-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.slices-head .t { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.slices-head .spacer { flex: 1; }
.slice-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.slice {
  position: relative; flex: none; border-radius: 8px; overflow: hidden;
  border: var(--line); cursor: pointer; transition: transform .1s, box-shadow .12s;
}
.slice:hover { transform: translate(-1px,-2px); box-shadow: var(--sh-sm); }
.slice img { height: 80px; display: block; }
.slice .n {
  position: absolute; top: 4px; left: 4px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--ink); color: var(--accent); font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center; font-family: var(--num);
}
.slice .dl { position: absolute; inset: 0; background: rgba(22,21,15,0.66); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.slice:hover .dl { opacity: 1; }

.upsell {
  width: 100%; margin-top: 12px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: 12.5px; color: var(--ink);
  padding: 12px 14px; border-radius: 14px; cursor: pointer;
  border: var(--line); background: var(--paper);
  transition: transform .1s, box-shadow .12s;
}
.upsell:hover { transform: translate(-1px,-1px); box-shadow: var(--sh-sm); }
.upsell span { flex: 1; text-align: left; color: var(--ink-2); font-weight: 600; }
.upsell b { color: var(--ink); font-weight: 800; }

/* results (slices + upsell) folded into the workspace panel */
.results { flex: none; border-top: var(--line); padding: 13px 18px 16px; }
.results-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.results-bar .spacer { flex: 1; }
.results-hint {
  font-size: 11.5px; font-weight: 700; color: var(--ink);
  background: var(--paper); border: var(--line); border-radius: 999px; padding: 3px 11px;
  white-space: nowrap;
}
.results-note { font-size: 11.5px; color: var(--ink-2); line-height: 1.6; margin-top: 11px; font-weight: 500; }
.results-note b { color: var(--ink); font-weight: 800; }

/* ---------- upgrade modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(22,21,15,0.42);
  display: grid; place-items: center; padding: 24px;
  animation: fadein .15s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: min(520px, 100%);
  background: var(--card); border: var(--line); border-radius: 24px;
  padding: 30px 28px 26px; box-shadow: 8px 8px 0 var(--ink);
  animation: pop .18s cubic-bezier(.3,1.2,.5,1);
}
@keyframes pop { from { transform: scale(.95); } to { transform: scale(1); } }
.modal-x {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 10px;
  background: var(--card); border: var(--line); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.modal-x:hover { box-shadow: var(--sh-sm); transform: translate(-1px,-1px); }
.modal-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em;
  color: #fff; padding: 5px 12px; border-radius: 999px; background: var(--ink); margin-bottom: 16px;
}
.modal-title { font-family: var(--display); font-size: 23px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.2; }
.modal-sub { font-size: 13px; color: var(--ink-2); margin-top: 9px; line-height: 1.6; font-weight: 500; }

.plan-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 16px; }
.plan { background: var(--paper); border: var(--line); border-radius: 16px; padding: 15px 15px 16px; }
.plan.pro { background: var(--accent); box-shadow: var(--sh-sm); }
.plan-name { font-size: 14px; font-weight: 900; margin-bottom: 12px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.plan li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink); font-weight: 600; }
.plan li svg { flex: none; }
.plan li.muted { color: var(--ink-3); }

.code-row { display: flex; gap: 8px; margin-top: 14px; }
.code-input {
  flex: 1; background: var(--paper); border: var(--line); border-radius: 11px;
  padding: 11px 13px; color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 600; outline: none;
}
.code-input::placeholder { color: var(--ink-3); font-weight: 500; }
.code-err { font-size: 12px; color: #E5484D; margin-top: 9px; font-weight: 700; }
.code-help { font-size: 11px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; font-weight: 500; }

/* ---------- app-wide drag overlay ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(251,246,234,0.82);
  display: grid; place-items: center; padding: 24px; animation: fadein .14s ease;
}
.drop-overlay-card {
  width: min(82%, 520px); aspect-ratio: 16/7;
  border-radius: var(--r); border: 2.5px dashed var(--ink); background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
  box-shadow: var(--sh-lg);
}

.hidden-input { display: none; }

/* ---------- SEO landing ---------- */
.seo { position: relative; z-index: 1; max-width: 940px; margin: 0 auto; padding: 88px 24px 64px; }
.seo + .seo { padding-top: 0; }
.seo h1 { font-family: var(--display); font-size: 38px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.08; }
.seo .lead { font-size: 16px; color: var(--ink-2); margin-top: 18px; line-height: 1.7; max-width: 700px; font-weight: 500; }
.seo h2 { font-family: var(--display); font-size: 26px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 24px; }
.seo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .seo-grid { grid-template-columns: 1fr; } }
.seo-card { background: var(--card); border: var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--sh-sm); }
.seo-card .num {
  font-family: var(--num); font-size: 14px; font-weight: 800; color: var(--ink);
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent); border: var(--line);
  display: grid; place-items: center; margin-bottom: 14px;
}
.seo-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.seo-card p { font-size: 13px; color: var(--ink-2); line-height: 1.65; font-weight: 500; }
.faq-item { border-top: var(--line); padding: 20px 0; }

/* ---------- seam comparison ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.cmp-card { background: var(--card); border: var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--sh-sm); }
.cmp-good { box-shadow: var(--sh); }
.cmp-tag {
  display: inline-flex; align-items: center; font-weight: 800; font-size: 12.5px;
  border: var(--line); border-radius: 999px; padding: 4px 13px; margin-bottom: 14px;
}
.cmp-tag-bad { background: #FFDFD8; }
.cmp-tag-good { background: var(--accent); }
.cmp-strip { display: flex; gap: 5px; border: var(--line); border-radius: 9px; overflow: hidden; padding: 5px; background: var(--ink); }
.cmp-strip span {
  flex: 1; aspect-ratio: 3/4; display: block; border-radius: 3px;
  background-image:
    repeating-linear-gradient(56deg, rgba(255,255,255,0) 0 20px, rgba(255,255,255,0.32) 20px 27px),
    linear-gradient(120deg, #ff9a3d, #ff3d77 52%, #7b3dff);
}
.cmp-strip-good span { background-size: 300% 100%; }
.cmp-strip-good span:nth-child(1) { background-position: 0% 50%; }
.cmp-strip-good span:nth-child(2) { background-position: 50% 50%; }
.cmp-strip-good span:nth-child(3) { background-position: 100% 50%; }
.cmp-strip-bad span { background-size: 300% 100%; }
.cmp-strip-bad span:nth-child(1) { background-position: 4% 50%; }
.cmp-strip-bad span:nth-child(2) { background-position: 40% 50%; }
.cmp-strip-bad span:nth-child(3) { background-position: 90% 50%; }
.cmp-cap { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 12px; text-align: center; }
.cmp-good .cmp-cap { color: var(--ink); }
.faq-item:last-child { border-bottom: var(--line); }
.faq-item h3 { font-size: 16px; font-weight: 800; margin-bottom: 9px; }
.faq-item p { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; font-weight: 500; }
.seo-foot { text-align: center; padding: 48px 24px 60px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }

/* scrollbars */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 12px; border: 3.5px solid var(--paper); background-clip: content-box; }

/* =====================================================================
   MOBILE  — kept at the END of the file so these rules win on source
   order (media queries do not add specificity).
   ===================================================================== */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; height: auto; }
  body { overflow-y: auto; }
  .app { height: auto; min-height: 100dvh; }

  .topbar { padding: 11px 14px; gap: 9px; }
  .topbar-link, .topbar-hint { display: none; }
  .brand-tag { display: none; }
  .brand-name { font-size: 20px; }
  .brand-mark { width: 36px; height: 36px; }

  /* single column: stage → controls → preview */
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 13px; padding: 13px; height: auto;
  }
  .col-stage { order: 1; overflow: visible; }
  .col { order: 2; gap: 13px; min-width: 0; }
  .layout .col-preview { order: 3; display: block; overflow: visible; }

  /* every column + panel must be allowed to shrink below content width */
  .col, .panel, .col-stage .panel, .col-preview .panel { min-width: 0; max-width: 100%; }
  .col-stage .panel, .col-preview .panel { flex: none; }
  .panel.scroll { overflow-y: visible; }
  .col .panel[style] { flex: none !important; }

  .stage-canvas { min-height: 46vh; padding: 14px; overflow: hidden; }
  .stage-head { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .stage-head .btn { margin-left: auto; }
  .frame { max-width: 100%; }

  /* coachmark flows in-line on mobile so it never covers the zoom row */
  .drop-coach {
    position: static; transform: none; animation: none;
    width: auto; margin: 12px 14px 0; white-space: normal;
    justify-content: center; text-align: left;
  }

  /* zoom row on its own line, full width; download a full-width row below */
  .stage-foot {
    flex-direction: column; align-items: stretch;
    gap: 11px; padding: 12px 14px;
  }
  .foot-zoom { width: 100%; }
  .stage-foot .zoomwrap { flex: 1; min-width: 0; }
  .foot-dl { width: 100%; justify-content: center; padding: 12px; }

  /* preview never wider than the screen */
  .preview-body { padding: 16px; }
  .ig-grid { width: 100%; max-width: 280px; }
  .slice img { height: 104px; }

  .seo { padding: 52px 16px 36px; }
  .seo h1 { font-size: 26px; }
  .seo h2 { font-size: 21px; }
}

/* touch devices have no hover → show the per-slice download affordance always */
@media (hover: none) {
  .slice .dl {
    opacity: 1;
    inset: auto 4px 4px auto;
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--ink); border: 2px solid var(--accent);
  }
  .slice:active { transform: translate(1px, 1px); }
}

