/* Playable Studio: dashboard design system.
   Warm paper, graphite ink, one ink-green accent. Tactile controls, quiet motion. */
:root {
  --paper: #f5f3ee;
  --paper-2: #efece5;
  --surface: #ffffff;
  --ink: #17160f;
  --ink-2: #3a3830;
  --muted: #6d695f;
  --line: #e3dfd5;
  --line-2: #d6d1c4;
  --accent: #136f50;
  --accent-ink: #0d5a40;
  --accent-soft: #e3efe9;
  --warn: #9a5b00;
  --warn-soft: #fbf0dc;
  --danger: #b4232c;
  --danger-soft: #fbe7e8;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow-1: 0 1px 0 rgba(23, 22, 15, 0.04), 0 1px 2px rgba(23, 22, 15, 0.06);
  --shadow-2: 0 1px 0 rgba(23, 22, 15, 0.04), 0 6px 18px -6px rgba(23, 22, 15, 0.14);
  --shadow-press: inset 0 1px 2px rgba(23, 22, 15, 0.12);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 140ms;
  --t: 260ms;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: var(--ease); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
a { color: var(--accent-ink); text-underline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: 30px; font-weight: 680; }
h2 { font-size: 22px; font-weight: 650; }
.h3, h3 { font-size: 16px; font-weight: 640; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 60px; padding: 0 max(20px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 660; letter-spacing: -0.01em; }
.logo { width: 26px; height: 26px; color: var(--ink); transition: transform var(--t) var(--spring); }
.brand:hover .logo { transform: rotate(-8deg) scale(1.05); }
.nav { display: flex; gap: 4px; }
.nav-link {
  position: relative; padding: 7px 12px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-weight: 520;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }
.nav-link.is-active { background: var(--ink); color: var(--paper); }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who-name { color: var(--muted); font-size: 14px; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { max-width: 1160px; margin: 0 auto; padding: 32px 24px 80px; }
.is-bare .main { max-width: none; padding: 0; }

/* ── Buttons: tactile */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 560 14px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn:hover { border-color: #c7c1b2; box-shadow: var(--shadow-2); }
.btn:active { transform: scale(0.97); box-shadow: var(--shadow-press); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: #2a2820; border-color: #2a2820; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-quiet:hover { background: var(--paper-2); border-color: transparent; box-shadow: none; }
.btn-danger { color: var(--danger); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.link-quiet { color: var(--ink-2); text-decoration: none; font-weight: 540; }
.link-quiet:hover { color: var(--ink); text-decoration: underline; }

/* ── Forms */
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span { font-size: 13px; font-weight: 560; color: var(--ink-2); }
.field small, .hint { color: var(--muted); font-size: 12.5px; }
input, select, textarea {
  width: 100%; min-height: 40px; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink);
  font: 15px/1.35 var(--font);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
textarea { resize: vertical; min-height: 72px; }
input:hover, select:hover, textarea:hover { border-color: #c7c1b2; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type='color'] { padding: 4px; width: 48px; height: 40px; cursor: pointer; }
input[type='checkbox'] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.form-row .field { flex: 1 1 180px; }
.form-row .field-grow { flex: 3 1 320px; }
.form-row .field-sm { flex: 0 1 100px; }
.alert { padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 14px; }

/* ── Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 10% -10%, #ebe6db 0%, transparent 60%), var(--paper); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-2); animation: rise 420ms var(--ease) both; }
.auth-card h1 { font-size: 26px; margin: 22px 0 6px; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 660; text-decoration: none; }
.auth-foot { margin-top: 20px; color: var(--muted); font-size: 14px; }

/* ── Page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-head .muted { margin-top: 6px; }
.back { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }

/* ── Cards & tiles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-1); margin-bottom: 18px; }
.card > .h3 + .muted { margin-top: 6px; margin-bottom: 14px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); animation: rise 380ms var(--ease) both; }
.tile:nth-child(2) { animation-delay: 40ms; } .tile:nth-child(3) { animation-delay: 80ms; } .tile:nth-child(4) { animation-delay: 120ms; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tile-main { display: flex; align-items: center; gap: 14px; padding: 18px; color: inherit; text-decoration: none; }
.tile-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.tile-text strong { font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-text .muted { font-size: 13px; }
.tile-foot { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fcfbf8; font-size: 13.5px; color: var(--ink-2); }
.tile-foot b { font-variant-numeric: tabular-nums; font-weight: 640; color: var(--ink); }
.tile-foot .link-quiet { margin-left: auto; }

/* Glyphs per template (original, CSS-only) */
.glyph { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; position: relative; }
.glyph i { display: block; }
.glyph-quiz { gap: 3px; align-content: center; }
.glyph-quiz i { width: 22px; height: 5px; border-radius: 3px; background: var(--ink-2); }
.glyph-quiz i:nth-child(2) { background: var(--accent); width: 26px; }
.glyph-spin i:first-child { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(var(--ink-2) 0 25%, var(--accent) 0 50%, #c9c3b4 0 75%, var(--ink-2) 0); }
.glyph-spin i:nth-child(n + 2) { display: none; }
.glyph-color { grid-auto-flow: column; gap: 3px; }
.glyph-color i { width: 9px; height: 22px; border-radius: 5px; background: var(--ink-2); }
.glyph-color i:nth-child(2) { background: var(--accent); } .glyph-color i:nth-child(3) { background: #c9a227; }
.glyph-link i:first-child { width: 22px; height: 10px; border: 3px solid var(--ink-2); border-radius: 6px; }
.glyph-link i:nth-child(n + 2) { display: none; }

/* Status pills (always icon + label) */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-live { background: var(--accent-soft); color: var(--accent-ink); }
.pill-live i { box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s var(--ease) infinite; }
.pill-paused { background: var(--warn-soft); color: var(--warn); }

/* Empty state */
.empty { text-align: center; padding: 64px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: #fbfaf7; }
.empty h2 { margin-top: 18px; }
.empty p { color: var(--muted); max-width: 44ch; margin: 8px auto 20px; }
.empty-mark { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; background: var(--ink); position: relative; animation: float 4s ease-in-out infinite; }
.empty-mark::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 16px solid var(--paper); border-top: 10px solid transparent; border-bottom: 10px solid transparent; transform: translateX(3px); }

/* ── Template picker */
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pick { margin: 0; }
.pick-btn { width: 100%; height: 100%; text-align: left; display: grid; gap: 8px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); cursor: pointer; font: inherit; color: inherit;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease); }
.pick-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.pick-btn:active { transform: translateY(-1px) scale(0.985); }
.pick-name { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.pick-desc { color: var(--muted); font-size: 14px; }
.pick-art { height: 150px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; position: relative; overflow: hidden; margin-bottom: 6px; }
.qa { display: grid; gap: 8px; width: 60%; }
.qa b { height: 26px; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-1); transition: transform var(--t) var(--spring), background var(--t) var(--ease); }
.pick-btn:hover .qa b:nth-child(2) { background: var(--accent); transform: translateX(6px); }
.wheel { width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(var(--ink) 0 60deg, var(--accent) 0 120deg, #d8d2c4 0 180deg, var(--ink-2) 0 240deg, #b9b19f 0 300deg, var(--accent-ink) 0); box-shadow: 0 0 0 6px var(--surface), var(--shadow-2); transition: transform 900ms var(--ease); }
.pick-btn:hover .wheel { transform: rotate(200deg); }
.pin { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 14px solid var(--ink); }
.sw { display: flex; gap: 10px; }
.sw b { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--surface), var(--shadow-1); transition: transform var(--t) var(--spring); }
.sw b:nth-child(2) { background: var(--accent); } .sw b:nth-child(3) { background: #c9a227; } .sw b:nth-child(4) { background: #b8b1a3; }
.pick-btn:hover .sw b:nth-child(2) { transform: scale(1.22); }

/* ── Editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.editor-head { margin-bottom: 18px; }
.editor-title-row { display: flex; align-items: center; gap: 12px; }
.title-input { font: 680 26px/1.2 var(--font-display); letter-spacing: -0.02em; border-color: transparent; background: transparent; padding: 4px 8px; margin-left: -8px; }
.title-input:hover { border-color: var(--line-2); background: var(--surface); }
.save-state { font-size: 13px; margin-top: 4px; transition: color var(--t) var(--ease); }
.save-state.is-saving { color: var(--ink-2); }
.save-state.is-error { color: var(--danger); }
.editor-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.phone { position: relative; width: 340px; height: 680px; margin: 0 auto; border-radius: 46px; padding: 12px; background: #1b1a15; box-shadow: 0 0 0 1px #000, 0 30px 60px -20px rgba(23, 22, 15, 0.45), inset 0 0 0 2px #3a3830; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 36px; background: var(--paper); }
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 14px; background: #1b1a15; z-index: 2; pointer-events: none; }

.section { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); margin-bottom: 14px; box-shadow: var(--shadow-1); }
.section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.section > header p { font-size: 13px; }
.section-body { padding: 16px 18px 18px; display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.item { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 12px; background: #fcfbf8; animation: rise 280ms var(--ease) both; }
.item-head { display: flex; align-items: center; gap: 10px; }
.item-head strong { font-size: 14px; flex: 1; }
.item-num { width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 12px; font-weight: 650; }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--paper-2); border: 1px solid var(--line); flex: none; }
.with-thumb { display: flex; gap: 12px; align-items: flex-end; }
.with-thumb .field { flex: 1; }
.add-btn { border-style: dashed; box-shadow: none; width: 100%; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; cursor: pointer; user-select: none; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.chip:active { transform: scale(0.96); }
.chip input { width: 14px; height: 14px; }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.prefill { display: flex; gap: 8px; }
.prefill input { flex: 1; }

.publish h3 { margin-bottom: 8px; }
.problems { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; display: grid; gap: 4px; }
.share { display: flex; gap: 8px; margin: 12px 0; }
.share input { font-family: var(--mono); font-size: 13px; }
.attest { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 12px 0; }
.attest input { margin-top: 2px; flex: none; }
.publish-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Stats */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 2px; box-shadow: var(--shadow-1); }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 540; }
.kpi-value { font: 680 30px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-note { font-size: 12.5px; color: var(--muted); }
.funnel { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.funnel li { display: grid; grid-template-columns: 190px 1fr 70px; align-items: center; gap: 14px; font-size: 14px; }
.funnel-track { height: 12px; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.funnel-bar { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 6px; animation: grow 700ms var(--ease) both; transform-origin: left; }
.funnel-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.chart { margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1); position: relative; }
.chart figcaption { font-weight: 640; font-size: 15px; margin-bottom: 10px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .hit { fill: transparent; }
.chart .bar { fill: var(--accent); transition: opacity var(--t-fast) var(--ease); }
.chart-ink .bar { fill: var(--ink-2); }
.chart svg:hover .bar, .chart svg:focus-within .bar { opacity: 0.45; }
.chart .col:hover .bar, .chart .col:focus .bar { opacity: 1; }
.chart .col:focus { outline: none; }
.chart-empty { padding: 30px 0; text-align: center; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 12.5px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -120%); opacity: 0; transition: opacity var(--t-fast) var(--ease); z-index: 5; }
.tooltip.is-on { opacity: 1; }
.table-view summary { cursor: pointer; font-weight: 560; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.table th { text-align: left; font-weight: 560; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { text-align: right; white-space: nowrap; }
.manual { margin-top: 14px; }
.manual summary { cursor: pointer; font-weight: 560; color: var(--ink-2); }
.compare { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.compare header { display: flex; align-items: center; justify-content: space-between; }
.compare .small { margin-top: 8px; }
.secret { margin-top: 14px; padding: 14px; border-radius: var(--r); background: var(--warn-soft); color: var(--ink); font-size: 14px; display: grid; gap: 8px; }
.secret code { word-break: break-all; background: var(--surface); padding: 8px; border-radius: 8px; display: block; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--spring); z-index: 50; box-shadow: var(--shadow-2); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }

@media (max-width: 980px) {
  .editor { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}
@media (max-width: 680px) {
  .topbar { gap: 12px; padding: 0 14px; overflow-x: auto; }
  .brand span, .who-name { display: none; }
  .main { padding: 22px 16px 60px; }
  h1 { font-size: 25px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .grid-2 { grid-template-columns: 1fr; }
  .phone { width: 300px; height: 600px; }
  .funnel li { grid-template-columns: 1fr 60px; }
  .funnel-track { grid-column: 1 / -1; grid-row: 2; }
  .table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  @view-transition { navigation: none; }
}

/* ════════════════ v2 · SaaS shell ════════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.has-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; border-right: 1px solid var(--line); background: #faf8f4; }
.side .brand { padding: 4px 8px; }
.side-new { margin: 4px 0 2px; }
.side-nav { display: grid; gap: 14px; }
.side-label { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 4px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 520; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.side-link:hover { background: var(--paper-2); color: var(--ink); }
.side-link:active { transform: scale(.98); }
.side-link.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 620; }
.side-link.is-active .ico { color: var(--accent); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico-lg { width: 30px; height: 30px; }
.side .who { margin: auto 0 0; padding: 10px 6px 0; border-top: 1px solid var(--line); gap: 8px; }
.who-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 13px; font-weight: 650; flex: none; }
.side .who-name { flex: 1; }
.side-toggle { display: none; }
.has-shell .main { max-width: 1180px; width: 100%; margin: 0 auto; padding: 30px 32px 80px; }
.has-shell .main-wide { max-width: 1480px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions .ico { margin-right: 2px; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); font-size: 12px; font-weight: 560; white-space: nowrap; }
.tag-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-fail { background: var(--danger-soft); color: var(--danger); }
.notice-quiet { background: #f1efe8; color: var(--ink-2); margin-bottom: 18px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .table { margin: 0; }
.card-flush > .h3.card-pad, .card-pad { padding: 18px 20px 6px; display: block; }
.card-tight { padding: 14px 16px; }
.block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.block-head .muted { margin-top: 4px; max-width: 70ch; }
.section-block { margin-top: 34px; }
.field-label { font-size: 13px; font-weight: 560; color: var(--ink-2); margin-bottom: 6px; }
.field-inline { display: flex; align-items: center; gap: 8px; }
.ok-line { color: var(--accent-ink); font-size: 14px; font-weight: 560; padding: 6px 2px; }

/* segmented control */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--paper-2); border-radius: 11px; flex-wrap: wrap; }
.seg-btn { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: 560 13px/1.2 var(--font); color: var(--ink-2); cursor: pointer; text-decoration: none; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); white-space: nowrap; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg-sm .seg-btn { padding: 5px 10px; }
.filters { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.search input { width: 240px; height: 36px; }

/* hero / showcase */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.hero h1 { font-size: 34px; }
.hero-sub { max-width: 64ch; margin-top: 8px; }
.hero-stats { display: flex; gap: 8px; }
.hero-stats a { display: grid; justify-items: center; min-width: 82px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); transition: transform var(--t) var(--spring); }
.hero-stats a:hover { transform: translateY(-2px); }
.hero-stats b { font: 680 22px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 12px; color: var(--muted); }
.showcase { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.sc-rail { display: grid; gap: 12px; position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow: auto; padding-right: 4px; }
.sc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sc-item { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; font: inherit; color: inherit; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.sc-item:hover { background: var(--surface); border-color: var(--line); }
.sc-item:active { transform: scale(.985); }
.sc-item.is-on { background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.sc-item b { display: block; font-size: 14px; font-weight: 620; }
.sc-item small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.35; }
.sc-thumb { width: 44px; height: 60px; border-radius: 9px; object-fit: cover; object-position: top; flex: none; background: var(--paper-2); border: 1px solid var(--line); }
.sc-stage { display: grid; gap: 10px; min-width: 0; }
.sc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-tools { display: flex; gap: 4px; }
.sc-size { text-align: center; }
.device-wrap { position: relative; height: min(calc(100vh - 210px), 860px); min-height: 460px; overflow: hidden; border-radius: 22px; background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--paper-2) 70%); border: 1px solid var(--line); }
.device-wrap-side { height: min(calc(100vh - 250px), 760px); }
.device { position: absolute; left: 50%; top: 50%; flex: none; padding: var(--bezel, 14px); border-radius: 52px; background: #1a1914; box-shadow: 0 0 0 1px #000, inset 0 0 0 2px #3a3830, 0 40px 80px -30px rgba(23,22,15,.55); transform-origin: center; transition: width var(--t) var(--ease), height var(--t) var(--ease), transform var(--t) var(--ease), border-radius var(--t) var(--ease); }
.device.is-tablet { border-radius: 34px; }
.device::before { content: ''; position: absolute; top: calc(var(--bezel, 14px) + 9px); left: 50%; width: 96px; height: 26px; margin-left: -48px; border-radius: 14px; background: #1a1914; z-index: 2; pointer-events: none; }
.device.is-landscape::before { top: 50%; left: calc(var(--bezel, 14px) + 9px); width: 26px; height: 96px; margin: -48px 0 0; }
.device.is-tablet::before { width: 8px; height: 8px; margin-left: -4px; top: 6px; }
.device.is-tablet.is-landscape::before { top: 50%; left: 6px; margin: -4px 0 0; }
.device-screen { width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: var(--paper); }
.device.is-tablet .device-screen { border-radius: 18px; }
.device iframe { border: 0; display: block; background: var(--paper); }
.sc-panel { position: sticky; top: 18px; display: grid; gap: 14px; }
.sc-panel h2 { font-size: 22px; }
.sc-group { display: grid; gap: 8px; }
.sc-label { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pal { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font: 560 12.5px var(--font); cursor: pointer; transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.pal:active { transform: scale(.95); }
.pal.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pal-dots { display: inline-flex; }
.pal-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -4px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.pal-dots i:first-child { margin-left: 0; }
.ctl { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.ctl select { width: auto; max-width: 150px; height: 32px; padding: 0 8px; }
.ctl input[type="color"], .field-color input[type="color"] { width: 38px; height: 30px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.range { display: flex; align-items: center; gap: 8px; }
.range input { width: 120px; accent-color: var(--accent); padding: 0; height: auto; border: 0; box-shadow: none; background: none; }
.range output { min-width: 2ch; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.sc-cta-note { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }
.sc-use { margin: 0; }

/* template cards */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tcard { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); animation: rise 360ms var(--ease) both; }
.tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tcard-media { position: relative; display: block; aspect-ratio: 4 / 3.2; background: var(--paper-2); overflow: hidden; }
.thumb, .tcard-media .thumb { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; border: 0; border-radius: 0; }
.tcard-media .thumb { transition: transform 600ms var(--ease); }
.tcard:hover .tcard-media .thumb { transform: scale(1.04); }
.thumb-empty { display: block; background: linear-gradient(135deg, var(--paper-2), #e7e2d7); }
.tcard-try { position: absolute; right: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity var(--t) var(--ease), transform var(--t) var(--spring); }
.tcard:hover .tcard-try, .tcard-media:focus-visible .tcard-try { opacity: 1; transform: none; }
.tcard-body { padding: 14px 16px 16px; display: grid; gap: 8px; align-content: start; }
.tcard-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tcard-head h3 { font-size: 15.5px; }
.tcard-actions { display: flex; gap: 6px; margin: 4px 0 0; flex-wrap: wrap; }
.tcard-compact .tcard-media { aspect-ratio: 16 / 10; }

/* projects */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); animation: rise 360ms var(--ease) both; }
.project:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.project-main { display: flex; gap: 14px; align-items: center; padding: 14px; color: inherit; text-decoration: none; }
.project-thumb { width: 52px; height: 72px; border-radius: 10px; object-fit: cover; object-position: top; flex: none; background: var(--paper-2); border: 1px solid var(--line); }
.project-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.project-text strong { font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-text .muted { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-foot { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fcfbf8; font-size: 13.5px; color: var(--ink-2); }
.project-foot b { font-variant-numeric: tabular-nums; color: var(--ink); }
.project-foot .link-quiet { margin-left: auto; }
.table-rows td { padding: 10px 14px; }
.table-rows th { padding: 10px 14px; }
.row-title { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.row-title span { display: grid; }
.row-title:hover b { text-decoration: underline; }
.row-thumb { width: 30px; height: 42px; border-radius: 7px; object-fit: cover; object-position: top; flex: none; background: var(--paper-2); border: 1px solid var(--line); }

/* workflow stepper */
.flow { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: f; }
.flow li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.flow li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: 11.5px; font-weight: 650; }
.flow li.is-on span, .flow li.is-done span { background: var(--accent); color: #fff; }
.flow li.is-done { color: var(--ink); }
.flow-compact { margin: 12px 0 0; gap: 4px; }
.flow-compact li { padding: 0; border: 0; background: none; }
.flow-compact a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; color: inherit; text-decoration: none; border: 1px solid var(--line); background: var(--surface); transition: border-color var(--t-fast) var(--ease); }
.flow-compact a:hover { border-color: var(--line-2); }
.flow-compact li + li::before { content: ''; width: 10px; height: 1px; background: var(--line-2); }

/* workspace */
.ws-head { margin-bottom: 16px; }
.ws-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ws-title-row .title-input { flex: 1 1 280px; max-width: 560px; }
.tabs { display: flex; gap: 2px; margin-top: 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 560; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.ws-panel { animation: rise 260ms var(--ease) both; }
.editor { grid-template-columns: minmax(0, 1fr) minmax(360px, 46%); }
.editor-side { top: 18px; }
details.section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-weight: 640; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after { content: ''; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform var(--t) var(--ease); margin-left: 10px; }
details.section[open] > summary::after { transform: rotate(-135deg); }
.section-title { flex: 1; }
details.section .section-body { padding: 0 18px 18px; }
.group { display: grid; gap: 14px; }
.list { display: grid; gap: 10px; }
details.item { padding: 0; }
details.item > summary { list-style: none; cursor: pointer; padding: 10px 12px; }
details.item > summary::-webkit-details-marker { display: none; }
.item-body { display: grid; gap: 12px; padding: 0 14px 14px; }
.color-row { display: flex; align-items: center; gap: 10px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background var(--t) var(--ease); flex: none; }
.switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform var(--t) var(--spring); }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.image-field { position: relative; }
.image-field .with-thumb { align-items: center; }
.image-field .with-thumb input { flex: 1; }
.thumb-art { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line); flex: none; }
.thumb-art svg, .pick-art svg { width: 80%; height: 80%; }
.with-thumb .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.picker-pop { position: static; margin-top: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 20px 40px -18px rgba(23,22,15,.35); padding: 12px; display: grid; gap: 10px; max-height: 420px; overflow: auto; overscroll-behavior: contain; animation: rise 200ms var(--ease) backwards; }
.pick-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.pick-cell { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; display: grid; place-items: center; padding: 4px; overflow: hidden; transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.pick-cell:hover { border-color: var(--ink); }
.pick-cell:active { transform: scale(.95); }
.pick-cell img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.pick-art { display: grid; place-items: center; width: 100%; height: 100%; }

/* QA + export */
.qa-running { display: flex; align-items: center; gap: 10px; padding: 16px 0; color: var(--ink-2); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 800ms linear infinite; }
.qa-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.check { display: grid; grid-template-columns: 26px 220px 1fr; gap: 10px; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.check:last-child { border-bottom: 0; }
.check-mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); align-self: center; }
.check-warn .check-mark { background: var(--warn); }
.check-fail .check-mark { background: var(--danger); }
.shots { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 4px; }
.shot { margin: 0; flex: none; display: grid; gap: 6px; }
.shot img { height: 300px; width: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-1); background: var(--paper-2); }
.shot-landscape img { height: 160px; }
.shot figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 14px 0; }
.preset { text-align: left; display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: inherit; }
.preset h3 { font-size: 15px; }
.preset .tag { justify-self: start; }
.preset-btn { cursor: pointer; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.preset-btn:hover { border-color: var(--line-2); }
.preset-btn:active { transform: scale(.985); }
.preset-btn.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.presets-static { margin-top: 0; }
.publish-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { width: 220px; }
.checklist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: grid; gap: 2px; padding-left: 26px; position: relative; font-size: 14px; }
.checklist li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.checklist span { color: var(--muted); }
.kpis-sm { margin: 4px 0 14px; }
.kpis-sm .kpi-value { font-size: 24px; }
.kpi-accent .kpi-value { color: var(--accent-ink); }
.kpi-muted .kpi-value { color: var(--ink-2); }

/* create */
.create { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 20px; align-items: start; }
.create-form { display: grid; gap: 14px; }
.seg-field { display: grid; gap: 6px; }
.empty-sm { padding: 40px 20px; }
.concepts { display: grid; gap: 12px; margin-top: 14px; }
.concept { display: flex; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); animation: rise 320ms var(--ease) both; }
.concept.is-top { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-1); }
.concept:nth-child(2) { animation-delay: 60ms; } .concept:nth-child(3) { animation-delay: 120ms; } .concept:nth-child(4) { animation-delay: 180ms; }
.concept-thumb { width: 84px; height: 116px; border-radius: 12px; object-fit: cover; object-position: top; flex: none; border: 1px solid var(--line); }
.concept-body { display: grid; gap: 8px; flex: 1; align-content: start; }
.reasons { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }

/* assets */
.drop { display: grid; place-items: center; text-align: center; padding: 34px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: #fbfaf7; cursor: pointer; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); margin-bottom: 18px; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop span { display: grid; gap: 6px; justify-items: center; }
.assets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.asset { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); display: grid; }
.asset img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper-2); }
.asset-meta { padding: 8px 10px 0; display: grid; }
.asset-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-actions { display: flex; padding: 4px 4px 6px; }
.artgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.art-tile { width: 100%; display: grid; gap: 4px; justify-items: center; padding: 10px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; font: inherit; color: var(--ink-2); transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.art-tile:hover { border-color: var(--ink); }
.art-tile:active { transform: scale(.96); }
.art-slot { width: 56px; height: 56px; display: grid; place-items: center; }
.art-slot svg { width: 100%; height: 100%; }
.art-tile small { font-size: 11.5px; }

/* campaigns */
.campaign.is-archived { opacity: .65; }
.linkbuilder { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 10px; }
.linkbuilder .field { flex: 1 1 200px; }
.lb-out { flex: 3 1 360px; display: flex; gap: 8px; align-items: center; }
.lb-out code { flex: 1; padding: 9px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; word-break: break-all; font-size: 12.5px; }

/* agents */
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.agent { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow-1); }
.agent-off { background: #fbfaf7; }
.agent-head { display: flex; gap: 12px; align-items: center; }
.agent-head > div { flex: 1; }
.agent-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--paper-2); display: grid; place-items: center; }
.agent-active .agent-mark { background: var(--accent-soft); color: var(--accent-ink); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
  .showcase { grid-template-columns: 240px minmax(0, 1fr); }
  .sc-panel { grid-column: 1 / -1; position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .create { grid-template-columns: 1fr; }
  .publish-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .has-shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform var(--t) var(--ease); box-shadow: var(--shadow-2); }
  .side-open .side { transform: none; }
  .side-toggle { display: inline-flex; position: fixed; z-index: 41; top: 12px; right: 12px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font: 560 13px var(--font); box-shadow: var(--shadow-1); }
  .has-shell .main { padding: 56px 16px 60px; }
  .showcase { grid-template-columns: 1fr; }
  .sc-rail { position: static; max-height: none; }
  .sc-list { grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; }
  .hero { flex-direction: column; align-items: flex-start; }
  .check { grid-template-columns: 26px 1fr; }
  .check .muted { grid-column: 2; }
}

/* Categories */
.cat-ideas { margin-top: 12px; }
.cat-ideas .chip small { font-size: 11px; }
.cat-section { display: grid; gap: 12px; margin-top: 8px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.cat-card { display: grid; gap: 12px; align-content: start; border-top: 4px solid var(--cc); }
.cat-head { display: flex; gap: 10px; align-items: flex-start; }
.cat-head > div { flex: 1; min-width: 0; }
.cat-head h3 { margin: 0; font-size: 17px; }
.cat-dot { width: 14px; height: 14px; border-radius: 5px; background: var(--cc); margin-top: 4px; flex: none; }
.concepts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.concept { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--paper-2); }
.concept > div:first-child { display: grid; gap: 2px; min-width: 0; }
.concept-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.concept-add summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.concept-form { margin-top: 10px; }
.cat-items { display: grid; gap: 6px; }
.cat-item { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; font-size: 14px; }
.cat-item span { flex: 1; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.genre { display: grid; gap: 6px; align-content: start; }
.genre h3 { margin: 0; font-size: 16px; }
.genre-kinds { display: grid; gap: 6px; margin-top: 4px; }
.genre-kind { display: flex; gap: 8px; align-items: center; text-decoration: none; color: inherit; font-size: 13.5px; font-weight: 560; }

/* Affiliate presets */
.aff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 14px; }
.aff { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.aff-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.aff-head h3 { margin: 0; font-size: 16px; }
.aff-dl { margin: 0; display: grid; gap: 8px; }
.aff-dl dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.aff-dl dd { margin: 2px 0 0; }
.aff-tpl { display: block; word-break: break-all; font-size: 12px; padding: 8px; border-radius: 8px; background: var(--paper-2); margin-bottom: 4px; }
.tag-high { background: #dcf7ec; color: #08734e; }
.tag-medium { background: #fff3d6; color: #8a5a00; }
.tag-low { background: #ffe7df; color: #b23a17; }
/* Export presets: spec details */
.preset .spec { display: flex; flex-wrap: wrap; gap: 4px; }
.preset-sunset { opacity: .85; }
.preset-group { margin: 18px 0 8px; font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.adv { margin-top: 4px; }
.adv summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.adv-dl { margin: 8px 0 0; display: grid; gap: 6px; font-size: 12.5px; }
.adv-dl div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.adv-dl dt { color: var(--muted); }
.adv-dl dd { margin: 0; word-break: break-word; }

/* ── v5 Modern edge-to-edge device frames: no speaker/notch cut-out ── */
.phone-notch, .device::before { display: none !important; }
.phone { padding: 8px; }
.phone iframe { border-radius: 38px; }

/* Premium badge */
.prem { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: linear-gradient(135deg, #b66ff3, #5d31df); color: #fff; font: 800 9.5px/1.4 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; font-style: normal; }

/* Studio showcase rail: badge on its own line, no overflow */
.sc-list { overflow-x: hidden; }
.sc-item > span { display: grid; gap: 2px; min-width: 0; }
.sc-item .prem { justify-self: start; margin: 0; }
@media (max-width: 860px) { .sc-list { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; } .sc-list > li { scroll-snap-align: start; } }

/* v7: list cards keep no transform after their entry animation, so nothing creates a stacking context over a neighbour */
.item, details.item { animation-fill-mode: backwards; }
[hidden] { display: none !important; }
.pick-actions { display: flex; gap: 6px; align-items: center; }
.preset { min-width: 0; overflow: hidden; }
.adv-dl div { grid-template-columns: 90px minmax(0, 1fr); }
.adv-dl dd, .adv-dl code { overflow-wrap: anywhere; word-break: normal; }
.adv-dl div { grid-template-columns: minmax(0, 1fr); gap: 1px; }
.adv-dl dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.adv-dl .tag { white-space: normal; }
/* Copy Agent suggestions */
.copy-agent .section-body { display: grid; gap: 10px; }
.copy-opt { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.copy-opt dl { margin: 0; display: grid; gap: 4px; font-size: 13.5px; }
.copy-opt dl div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.copy-opt dt { color: var(--muted); }
.copy-opt dd { margin: 0; overflow-wrap: anywhere; }
.copy-opt .btn { justify-self: start; }
