/* The app frame on the product kit. One column, the tool first; the what/who/price strip sits in the header and
   shortens to the price alone on phones. Motion only on the "Done" line (200 ms), none under "reduce motion". */
body { margin: 0; }
.as-header { flex-wrap: wrap; row-gap: 6px; }
.as-brand { font-weight: 650; text-decoration: none; color: var(--sk-text); white-space: nowrap; }
.as-brand::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 3px; background: var(--sk-accent); vertical-align: 1px; }
.as-strip { display: flex; gap: 6px 14px; flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--sk-text-muted); text-decoration: none; overflow: hidden; }
.as-strip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-strip__price { color: var(--sk-accent); flex: none; }
.as-strip--pro .as-strip__price { visibility: hidden; } /* Pro: no price, same space, so the header never jumps (gate.js paintStrip) */
.as-strip:hover .as-strip__what { color: var(--sk-text); text-decoration: underline; }
.as-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.as-main { max-width: 760px; width: 100%; margin: 0 auto; padding: 24px; box-sizing: border-box; }
.as-tool { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.as-input { width: 100%; box-sizing: border-box; min-height: 160px; resize: vertical; font-family: var(--sk-mono); font-size: 14px; }
.as-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.as-row--fill .sk-input { flex: 1 1 200px; min-width: 0; }
.as-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--sk-text-muted); }
.as-msg { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--sk-text-muted); }
.as-msg[data-kind="done"] { color: var(--sk-success); font-weight: 600; }
.as-msg[data-kind="error"] { color: var(--sk-danger); }
.as-land { animation: as-land 200ms var(--sk-ease) both; }
.as-out { margin: 0; padding: 12px; max-height: 320px; overflow: auto; border: 1px solid var(--sk-line); border-radius: 8px; background: var(--sk-bg); font-family: var(--sk-mono); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.as-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.as-h1 { margin: 0; font-size: 22px; letter-spacing: -0.015em; }
.as-h3 { margin: 16px 0 8px; font-size: 15px; }
.as-card { margin-bottom: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.as-card p { margin: 0; line-height: 1.45; }
.as-compare { margin: 0; padding-left: 18px; line-height: 1.5; }
.as-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding: 16px 24px; border-top: 1px solid var(--sk-line); font-size: 13px; color: var(--sk-text-muted); }
.as-foot a { color: var(--sk-text-muted); }
@keyframes as-land { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .as-strip__what, .as-strip__who { display: none; } .as-main { padding: 16px; } }
@media (max-width: 360px) { .as-header { padding: 8px 12px; } .as-end .sk-btn { padding-left: 10px; padding-right: 10px; } }
@media (prefers-reduced-motion: reduce) { .as-land { animation: none; } }

/* ---- The product: drop, preview, grid, panels. Two columns from 960 px, one below. Motion 150 to 250 ms, none under
   reduce motion. The signature moment: the mark fades onto every photo in the grid, one after another, as you type. */
.as-main:has(.mw) { max-width: 1240px; }
.mw { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr; gap: 20px; align-items: start; }
.mw-main { min-width: 0; grid-column: 1; grid-row: 1; }
.mw-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; grid-column: 2; grid-row: 1 / span 2; }
/* Export under the photos at desktop width, its settings two-up, Download by the grid. */
.mw-export { grid-column: 1; grid-row: 2; min-width: 0; }
@media (min-width: 961px) {
  .mw .mw-export { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; align-items: start; } /* beats .mw-panel flex */
  .mw-export > :not(.mw-half) { grid-column: 1 / -1; }
  .mw-export > [hidden] { display: none; }
}
.mw-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.mw-panel__title { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.mw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mw-field__row { display: flex; align-items: center; gap: 10px; }
.mw-field__row > :first-child { flex: 1 1 auto; min-width: 0; }
.mw-two { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: end; }
.mw-out { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--sk-text-muted); }
.mw-text { font-size: 15px; }
.mw-range { width: 100%; accent-color: var(--sk-accent); }
.mw-colour { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--sk-line); border-radius: var(--sk-radius-sm); background: var(--sk-bg); cursor: pointer; }
.mw-pos { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.mw-pos__dot { width: 34px; height: 26px; display: grid; place-items: center; border: 1px solid var(--sk-line); border-radius: 6px; background: var(--sk-bg); cursor: pointer; transition: border-color 150ms var(--sk-ease), background-color 150ms var(--sk-ease); }
.mw-pos__dot span { width: 6px; height: 6px; border-radius: 50%; background: var(--sk-text-faint); transition: transform 150ms var(--sk-ease), background-color 150ms var(--sk-ease); }
.mw-pos__dot:hover { border-color: var(--sk-line-strong); }
.mw-pos__dot[aria-checked="true"] { border-color: var(--sk-accent); background: var(--sk-accent-soft); }
.mw-pos__dot[aria-checked="true"] span { background: var(--sk-accent); transform: scale(1.4); }
.mw-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sk-text-muted); cursor: pointer; }
.mw-switch input { accent-color: var(--sk-accent); }
.mw-pro { margin-left: auto; }
.mw-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--sk-line); border-radius: var(--sk-radius-sm); overflow: hidden; }
.mw-seg__btn { padding: 7px 0; border: 0; background: transparent; color: var(--sk-text-muted); font: inherit; font-size: 13px; cursor: pointer; transition: background-color 150ms var(--sk-ease), color 150ms var(--sk-ease); }
.mw-seg__btn + .mw-seg__btn { border-left: 1px solid var(--sk-line); }
.mw-seg__btn[aria-checked="true"] { background: var(--sk-accent-soft); color: var(--sk-text); }
.mw-note { margin: 0; }
.mw-link { padding: 0; border: 0; background: none; color: var(--sk-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.mw-go { margin-top: 2px; }
.mw-bar { height: 4px; border-radius: var(--sk-radius-pill); background: var(--sk-bg-sunken, var(--sk-line)); overflow: hidden; }
.mw-bar__fill { display: block; height: 100%; width: 0; background: var(--sk-accent); transition: width 200ms var(--sk-ease); }
.mw-msg { overflow-wrap: anywhere; }
.mw-tpl-note:empty { display: none; }
.mw-tpl-note { margin: 0; overflow-wrap: anywhere; }
.mw-tpl-note .mw-undo { margin-left: 2px; vertical-align: baseline; }
.mw-tpl-remove { flex: none; }
.mw-tpl-remove[hidden] { display: none; }
/* Step 2: mark type, logo, exact placement, nudge, templates, shop sizes, name pattern. Kit tokens only. */
.mw-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mw-panel__head .mw-seg { flex: 0 0 140px; }
.mw-seg--2 { grid-template-columns: repeat(2, 1fr); }
.mw-pad { display: flex; gap: 8px; align-items: center; }
.mw-pad .mw-seg { flex: 1 1 auto; }
.mw-pad .mw-colour { flex: 0 0 44px; }
.mw-kind-text, .mw-kind-logo, .mw-exact { display: flex; flex-direction: column; gap: 14px; }
.mw-logo { display: flex; align-items: center; gap: 10px; }
.mw-logo__thumb { width: 72px; height: 40px; border: 1px solid var(--sk-line); border-radius: var(--sk-radius-sm); background: repeating-conic-gradient(var(--sk-surface) 0 25%, var(--sk-bg) 0 50%) 0 0 / 10px 10px; }
.mw-two--even { grid-template-columns: 1fr 1fr; align-items: start; }
.mw-num { width: 100%; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.mw-nudge__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mw-nudge__btn { min-width: 34px; justify-content: center; }
.mw-nudge__row .mw-out { min-width: 4.5em; text-align: center; }
.mw-mono { font-family: var(--sk-mono); font-size: 14px; }
.mw-names { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.mw-location { color: var(--sk-success); }
.mw-location::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--sk-success); vertical-align: 2px; }

.mw-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 420px; padding: 32px 20px; text-align: center; border: 1.5px dashed var(--sk-line-strong); border-radius: var(--sk-radius-lg); background: var(--sk-surface); transition: border-color 200ms var(--sk-ease), background-color 200ms var(--sk-ease); }
.mw.is-over .mw-drop, .mw.is-over .mw-stage { border-color: var(--sk-accent); background: var(--sk-accent-soft); }
.mw-drop__mark { width: 56px; height: 42px; border-radius: 8px; border: 1.5px solid var(--sk-line-strong); position: relative; margin-bottom: 6px; }
.mw-drop__mark::after { content: ""; position: absolute; right: 7px; bottom: 7px; width: 18px; height: 4px; border-radius: var(--sk-radius-pill); background: var(--sk-accent); }
.mw-drop__title { margin: 0; font-size: 20px; letter-spacing: -0.015em; }
.mw-drop__body { margin: 0; max-width: 34ch; color: var(--sk-text-muted); line-height: 1.45; }
.mw-drop__alt { margin: 6px 0 0; font-size: 14px; }
.mw-drop__try { font-size: 14px; }
.mw-drop__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }

.mw-stage { display: flex; flex-direction: column; gap: 12px; border: 1px solid transparent; border-radius: var(--sk-radius-lg); transition: border-color 200ms var(--sk-ease); }
.mw-preview { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: var(--sk-radius-lg); background: var(--sk-bg-sunken, var(--sk-surface)); border: 1px solid var(--sk-line); }
.mw-preview__canvas { display: block; max-width: 100%; max-height: 56vh; height: auto; border-radius: 6px; box-shadow: var(--sk-shadow-2); }
.mw-preview__msg { margin: 0; font-size: 13px; }
.mw-preview.is-bad .mw-preview__msg { color: var(--sk-danger); }
.mw-gridbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mw-gridbar__end { display: flex; gap: 8px; }
.mw-count { font-size: 14px; color: var(--sk-text-muted); font-variant-numeric: tabular-nums; }
.mw-skipped { margin: 0; font-size: 13px; }
.mw-grid { list-style: none; margin: 0; padding: 3px; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; max-height: min(60vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.mw-tile__btn { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--sk-line); border-radius: 8px; overflow: hidden; background: var(--sk-surface); cursor: pointer; transition: border-color 150ms var(--sk-ease), transform 150ms var(--sk-ease); }
.mw-tile__btn:hover { border-color: var(--sk-line-strong); }
.mw-tile.is-on .mw-tile__btn { border-color: var(--sk-accent); box-shadow: 0 0 0 1px var(--sk-accent); }
.mw-tile__img, .mw-tile__mark { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mw-tile.is-loading .mw-tile__btn { background: linear-gradient(90deg, var(--sk-surface), var(--sk-surface-raised), var(--sk-surface)); background-size: 200% 100%; animation: mw-wait 1.2s linear infinite; }
.mw-tile__bad { position: absolute; inset: auto 6px 6px; font-size: 12px; color: var(--sk-danger); }
.mw-tile__mark { opacity: 0; transition: opacity 200ms var(--sk-ease); transition-delay: calc(var(--i, 0) * 18ms); }
.mw--marked .mw-tile__mark { opacity: 1; }
.mw.is-busy .mw-side .mw-panel:first-child { opacity: 0.6; pointer-events: none; transition: opacity 150ms var(--sk-ease); }
@keyframes mw-wait { to { background-position: -200% 0; } }

@media (max-width: 960px) {
  .mw { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .mw-main, .mw-side, .mw-export { grid-column: auto; grid-row: auto; }
  .mw-side { position: static; }
  .mw-drop { min-height: 260px; }
}
@media (max-width: 400px) {
  .as-main:has(.mw) { padding: 14px; }
  .mw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-two, .mw-two--even { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mw *, .mw *::before, .mw *::after { transition: none !important; animation: none !important; }
}
