/* Shopfront: store screenshot maker. Shared tokens from site.css; everything here is prefixed sf-. */
.sf { --sf: #2E6BE6; --sf-ink: #2457C4; padding-bottom: 72px; }
@media (prefers-color-scheme: dark) { .sf { --sf: #6E9BFF; --sf-ink: #8DB0FF; } }
.sf-head-chips { margin-top: 18px; }
.sf-noscript { padding: 14px 18px; border-radius: var(--r-m); background: var(--raised); }

.sf-workspace { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.sf-side, .sf-main { display: grid; gap: 20px; min-width: 0; }
.sf-under { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1100px) { .sf-under { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  /* on a phone: the set, then the screenshot being edited, then the look, the files, the checks */
  .sf-workspace { grid-template-columns: minmax(0, 1fr); }
  .sf-side, .sf-main { display: contents; }
  .sf-stage-card { order: 1; } .sf-slide-card { order: 2; } .sf-look-card { order: 3; } .sf-shots-card { order: 4; } .sf-under { order: 5; }
}

.sf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; box-shadow: var(--shadow-1); min-width: 0; }
.sf-card-title { font-size: 1.05rem; letter-spacing: -0.01em; margin: 0 0 14px; }
.sf-card-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sf-card-bar .sf-card-title { margin: 0; }
.sf-label { display: block; font: 650 .8rem/1.2 var(--sans); color: var(--muted); margin: 0 0 8px; padding: 0; }
.sf-opt { font-weight: 500; color: var(--faint); }
.sf-fine { font-size: .84rem; line-height: 1.45; color: var(--muted); margin: 0; }
.sf-error { margin: 10px 0 0; color: #C2341B; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .sf-error { color: #FF8A70; } }
.sf-file { display: none; }

/* drop zone */
.sf-drop { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 22px 16px; border: 2px dashed var(--line);
  border-radius: var(--r-m); background: var(--bg); transition: border-color .15s, background .15s; }
.sf-drop.over { border-color: var(--sf); background: color-mix(in srgb, var(--sf) 8%, var(--bg)); }
.sf-drop-lead { margin: 0; }
.sf-btn-sm { min-height: 38px; padding: 6px 14px; font-size: .92rem; }
.sf-sample-note { margin-top: 12px; }

/* small buttons */
.sf-mini-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-mini { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 .84rem/1 var(--sans); cursor: pointer; transition: background .15s, border-color .15s; }
.sf-mini:hover:not(:disabled) { background: var(--raised); }
.sf-mini:disabled { opacity: .4; cursor: default; }
.sf-mini svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* fields */
.sf-field { display: grid; gap: 0; margin-bottom: 14px; }
.sf-field:last-child { margin-bottom: 0; }
.sf-field .sf-fine { margin-top: 6px; }
.sf-text { width: 100%; box-sizing: border-box; font: 500 1rem/1.4 var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 10px 12px; resize: vertical; }
.sf-text:focus { border-color: var(--sf); outline: 2px solid color-mix(in srgb, var(--sf) 30%, transparent); outline-offset: 0; }
.sf-group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.sf-group:last-child { margin-bottom: 0; }

.sf-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: var(--raised); }
.sf-seg + .sf-seg { margin-top: 8px; }
.sf-seg-wrap { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-seg button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 .86rem/1.1 var(--sans);
  cursor: pointer; padding: 6px 8px; transition: background .15s, color .15s, box-shadow .15s; }
.sf-seg button:hover { color: var(--ink); }
.sf-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.sf-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.sf-swatch { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; cursor: pointer; padding: 0; background: var(--sw);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 8%); transition: transform .15s var(--spring); }
.sf-swatch:hover { transform: translateY(-2px); }
.sf-swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--surface); }
.sf-colors { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0; }
.sf-colors label { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); cursor: pointer; }
.sf-colors input { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.sf-check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.sf-check input { width: 18px; height: 18px; accent-color: var(--sf); }
.sf-range-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.sf-range-row .sf-label { margin: 0; }
.sf-range-row output { font: 600 .84rem/1 var(--mono); color: var(--muted); }
.sf-range { width: 100%; accent-color: var(--sf); margin: 8px 0 0; }

/* stage */
.sf-select { font: 600 .9rem/1.2 var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 32px 8px 14px; max-width: 100%; cursor: pointer; }
.sf-target { min-width: 0; max-width: 100%; }
.sf-stage-help { margin-bottom: 14px; }
.sf-strip { display: flex; gap: 6px; overflow-x: auto; padding: 14px; margin: 0 -6px; border-radius: var(--r-m); scroll-snap-type: x proximity;
  background: repeating-conic-gradient(var(--raised) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px; scrollbar-width: thin; }
.sf-strip:focus-visible { outline-offset: 2px; }
.sf-shot { position: relative; flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: pointer; scroll-snap-align: center; border-radius: 6px; }
.sf-shot canvas { display: block; width: var(--w); height: auto; border-radius: 4px; box-shadow: 0 6px 20px rgb(0 0 0 / 16%); transition: transform .2s var(--ease-out); }
.sf-shot::after { content: ""; position: absolute; inset: -5px; border-radius: 9px; border: 3px solid var(--sf); opacity: 0; transition: opacity .15s; pointer-events: none; }
.sf-shot[aria-selected="true"]::after { opacity: 1; }
.sf-shot:hover canvas { transform: translateY(-3px); }
.sf-shot .sf-n { position: absolute; left: 8px; bottom: 8px; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 99px;
  background: rgb(0 0 0 / 55%); color: #fff; font: 700 .72rem/1 var(--sans); }
.sf-add { flex: 0 0 auto; display: grid; place-items: center; align-content: center; gap: 6px; width: 92px; border: 2px dashed var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted); font: 600 .82rem/1.2 var(--sans); cursor: pointer; }
.sf-add:hover { color: var(--ink); border-color: var(--sf); }
.sf-add svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.sf-dl-status { margin-top: 10px; min-height: 1.2em; }

/* checks */
.sf-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sf-checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: .9rem; line-height: 1.4; }
.sf-checks .ic { width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; font: 800 .75rem/1 var(--sans); color: #fff; }
.sf-checks .ok .ic { background: var(--leaf); }
.sf-checks .warn .ic { background: #E08A00; }
.sf-checks .info .ic { background: var(--faint); }
.sf-checks small { display: block; color: var(--muted); font-size: .82rem; }

/* search result sketch */
.sf-search { border-radius: var(--r-m); background: var(--bg); border: 1px solid var(--line); padding: 14px; margin-bottom: 12px; }
.sf-search-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.sf-search-icon { width: 52px; height: 52px; border-radius: 12px; }
.sf-search-name { display: grid; gap: 2px; min-width: 0; }
.sf-inline { font: 650 .98rem/1.2 var(--sans); color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 2px 4px;
  margin-left: -5px; width: 100%; min-width: 0; box-sizing: border-box; }
.sf-inline-sub { font-weight: 500; font-size: .84rem; color: var(--muted); }
.sf-inline:hover { border-color: var(--line); }
.sf-inline:focus { border-color: var(--sf); outline: none; }
.sf-get { font: 700 .84rem/1 var(--sans); padding: 8px 16px; border-radius: 999px; background: color-mix(in srgb, var(--sf) 14%, var(--surface)); color: var(--sf-ink); }
.sf-search-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sf-search-shots canvas { width: 100%; height: auto; border-radius: 8px; display: block; border: 1px solid var(--line); }

/* notes */
.sf-notes { margin-top: 56px; }
.sf-notes h2 { font-size: 1.6rem; }
.sf-notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.sf-note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; }
.sf-note h3 { font-size: 1.05rem; }
.sf-note p { font-size: .94rem; color: var(--muted); }
.sf-note code { font-size: .84em; background: var(--raised); padding: .1em .35em; border-radius: 5px; }
.sf-src { font-size: .82rem !important; margin: 0; }

@media (max-width: 480px) {
  .sf-card { padding: 16px; border-radius: var(--r-m); }
  .sf-actions .btn { flex: 1 1 100%; }
  .sf-swatches { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-shot canvas, .sf-swatch, .sf-drop, .sf-shot::after { transition: none; }
  .sf-shot:hover canvas, .sf-swatch:hover { transform: none; }
}
