/* Infographic Creator Kit — application UI */
:root {
  --bg: #0a0c10;
  --bg-2: #0e1117;
  --surface: #12161e;
  --surface-2: #171c26;
  --line: #222a37;
  --line-2: #2c3646;
  --text: #e8eef8;
  --muted: #8b97aa;
  --faint: #5d6a7e;
  --blue: #2f8cff;
  --blue-2: #0475ff;
  --cyan: #38c6ff;
  --lime: #d9ff1f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(4, 117, 255, .12), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(4, 117, 255, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 12, 16, .86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brandbar {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 64px;
  background:
    linear-gradient(90deg, rgba(217, 255, 31, .0), rgba(217, 255, 31, .07) 50%, rgba(217, 255, 31, 0)),
    linear-gradient(180deg, #11140c, #0b0d0a);
  border-bottom: 1px solid rgba(217, 255, 31, .14);
  overflow: hidden;
}
.brandbar::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 255, 31, .7), transparent);
}
.wordmark {
  margin: 0;
  font: 900 30px/1 "Montserrat", "Inter", sans-serif;
  letter-spacing: .08em;
  background: linear-gradient(180deg, #f4ffb0 0%, #d9ff1f 55%, #a9c90c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(217, 255, 31, .28));
  white-space: nowrap;
}
.toolbar {
  display: flex; gap: 12px; align-items: center;
  max-width: 1440px; margin: 0 auto; padding: 16px 24px 12px;
}
.search {
  flex: 1; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search:focus-within { border-color: rgba(47, 140, 255, .6); box-shadow: 0 0 0 4px rgba(47, 140, 255, .12); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.search kbd {
  font: 600 11px/1 "Inter", sans-serif; color: var(--faint);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 7px;
}
.btn-brand {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 16px 0 14px;
  background: #050608; border: 1px solid var(--line-2); border-radius: 12px;
  font-weight: 700; letter-spacing: .01em;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.btn-brand:hover { border-color: rgba(47, 140, 255, .6); }
.btn-brand svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.btn-brand svg circle { fill: currentColor; stroke: none; }
.brand-dots { display: inline-flex; margin-left: 2px; }
.brand-dots b { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #050608; margin-left: -4px; }

.categories {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  max-width: 1440px; margin: 0 auto; padding: 4px 24px 16px;
}
.categories::-webkit-scrollbar { display: none; }
.cat {
  flex: 1 0 auto; min-width: 120px;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 36px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 13px;
  transition: all .18s var(--ease);
}
.cat:hover { color: var(--text); border-color: var(--line-2); }
.cat .n { font-size: 11px; color: var(--faint); background: rgba(255, 255, 255, .04); padding: 2px 7px; border-radius: 20px; }
.cat[aria-pressed="true"] {
  color: #fff; background: linear-gradient(180deg, rgba(47, 140, 255, .22), rgba(47, 140, 255, .1));
  border-color: rgba(47, 140, 255, .55);
}
.cat[aria-pressed="true"] .n { color: #cfe3ff; background: rgba(47, 140, 255, .25); }

/* ---------- Gallery ---------- */
.gallery-wrap { max-width: 1440px; margin: 0 auto; padding: 18px 24px 64px; }
.gallery-meta { color: var(--faint); font-size: 12px; margin: 0 2px 12px; letter-spacing: .02em; }
.gallery {
  display: grid; gap: 22px 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: none; border: 0; padding: 0; text-align: left;
  animation: rise .35s var(--ease) both;
}
.card .thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; border: 1px solid rgba(56, 198, 255, .28);
  background: #050a14;
  box-shadow: 0 10px 30px -18px rgba(4, 117, 255, .6);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card .thumb svg { width: 100%; height: 100%; }
.card .thumb:empty { background: linear-gradient(110deg, #07101f 30%, #0d1a30 50%, #07101f 70%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card .thumb::after {
  content: "Customize"; position: absolute; right: 10px; bottom: 10px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(4, 117, 255, .9); padding: 6px 11px; border-radius: 8px;
  opacity: 0; transform: translateY(6px); transition: all .22s var(--ease);
}
.card:hover .thumb, .card:focus-visible .thumb {
  transform: translateY(-3px); border-color: rgba(56, 198, 255, .7);
  box-shadow: 0 18px 40px -16px rgba(4, 117, 255, .65);
}
.card:hover .thumb::after, .card:focus-visible .thumb::after { opacity: 1; transform: none; }
.card:focus-visible { outline: none; }
.card .meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.card .name { font-weight: 600; font-size: 14.5px; color: var(--text); }
.card .tag { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, #2f8cff, #0469e6); color: #fff; font-weight: 700;
  box-shadow: 0 8px 22px -10px rgba(4, 117, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: filter .15s, transform .15s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-primary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost {
  height: 36px; padding: 0 14px; border-radius: 9px;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; font-size: 13px;
}
.btn-ghost:hover { color: var(--text); border-color: #3a475b; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, .72); backdrop-filter: blur(6px); animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.editor, .panel {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #121722, #0d1118);
  border: 1px solid rgba(56, 198, 255, .35); border-radius: 20px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, .4), 0 0 60px -20px rgba(4, 117, 255, .45);
  animation: pop .28s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.editor { width: min(1320px, 100%); max-height: calc(100vh - 48px); }
.panel { width: min(460px, 100%); max-height: calc(100vh - 48px); }
.editor-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.editor-head h2 { margin: 2px 0 0; font: 800 20px/1.1 "Montserrat", sans-serif; letter-spacing: .01em; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.editor-body { display: grid; grid-template-columns: 340px 1fr; min-height: 0; flex: 1; }
.controls {
  overflow-y: auto; padding: 16px 16px 20px 20px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: #2a3446 transparent;
}
.preview-col { display: flex; flex-direction: column; gap: 12px; padding: 20px; min-width: 0; overflow-y: auto; }
.preview-frame {
  aspect-ratio: 16 / 9; width: 100%; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(56, 198, 255, .35); background: #050a14;
  box-shadow: 0 20px 50px -24px rgba(4, 117, 255, .55);
}
.preview-frame svg { width: 100%; height: 100%; }
.preview-frame [data-item] { cursor: pointer; }
.limit-note { margin: 0; font-size: 12px; color: var(--muted); }
.preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.export-group { display: flex; gap: 8px; }
.export-group select {
  height: 40px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); font-size: 13px;
}

/* ---------- Controls ---------- */
.group { display: flex; flex-direction: column; gap: 8px; }
.group + .group { padding-top: 14px; border-top: 1px solid var(--line); }
.group-title { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.group-title small { font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--faint); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.input-wrap {
  display: flex; align-items: center; gap: 6px;
  background: #0a0d13; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 0 6px 0 11px; transition: border-color .15s, box-shadow .15s;
}
.input-wrap:focus-within { border-color: rgba(47, 140, 255, .7); box-shadow: 0 0 0 3px rgba(47, 140, 255, .12); }
.input-wrap input, .input-wrap textarea, .input-wrap select {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 9px 0; font-size: 13.5px;
}
.input-wrap textarea { resize: vertical; min-height: 58px; line-height: 1.4; font-size: 12.5px; }
.input-wrap select option { background: #0a0d13; }
.swatch-btn {
  position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
  overflow: hidden; cursor: pointer;
}
button.swatch-btn { padding: 0; }
.swatch-btn:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 0 0 4px rgba(47, 140, 255, .35); }
.swatch-btn[aria-expanded="true"], .chip[aria-expanded="true"], .swatches .custom[aria-expanded="true"] { box-shadow: 0 0 0 2px #06080c, 0 0 0 4px var(--blue); }
.swatch-btn.is-override::after {
  content: ""; position: absolute; right: -1px; top: -1px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 0 1.5px #0a0d13;
}

/* Item count stepper */
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 16px; line-height: 1; color: var(--text);
}
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper input[type=range] { flex: 1; accent-color: var(--blue); }
.stepper output { min-width: 22px; text-align: center; font-weight: 800; font-size: 15px; }

.tabs { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.tabs button {
  height: 28px; border-radius: 7px; border: 1px solid var(--line); background: #0a0d13;
  font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 0;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: rgba(47, 140, 255, .18); border-color: rgba(47, 140, 255, .7); color: #fff; }
.item-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line); }
.item-card .item-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--text); }
.item-card .nav { display: flex; gap: 4px; }
.item-card .nav button { width: 26px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 12px; }
.item-card .nav button:disabled { opacity: .3; }

/* Background picker */
.bg-box { padding: 12px; border-radius: 12px; background: #06080c; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.bg-row { display: flex; align-items: center; justify-content: space-between; }
.bg-row b { font-size: 12.5px; }
.bg-row em { font-style: normal; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; justify-content: space-between; }
.swatches button {
  position: relative; width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); transition: transform .15s var(--ease);
}
.swatches button:hover { transform: scale(1.1); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px #06080c, 0 0 0 4px #fff; }
.swatches .custom { background: conic-gradient(#ef4444, #eab308, #22c55e, #14b8a6, #0475ff, #8b5cf6, #ec4899, #ef4444); }
.swatches .custom::after { content: "#"; position: absolute; inset: 4px; border-radius: 50%; background: #06080c; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #0a0d13; border: 1px solid var(--line); border-radius: 9px; }
.seg button { height: 26px; padding: 0 12px; border: 0; border-radius: 7px; background: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.hex-row { display: flex; gap: 8px; align-items: center; }
.hex-row .chip { position: relative; width: 36px; height: 34px; border-radius: 8px; flex: none; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.hex-row .chip { border: 0; padding: 0; cursor: pointer; }

/* HEX-first color picker popover */
.cp {
  position: fixed; z-index: 90; width: 236px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: #0f131b; border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, .4);
  animation: pop .16s var(--ease) both;
}
.cp-hexrow { display: flex; gap: 8px; align-items: center; }
.cp-chip { width: 34px; height: 34px; border-radius: 9px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.cp-hex {
  flex: 1; display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 10px;
  background: #0a0d13; border: 1px solid rgba(47, 140, 255, .6); border-radius: 9px;
  box-shadow: 0 0 0 3px rgba(47, 140, 255, .12);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px;
}
.cp-hex span { color: var(--faint); }
.cp-hex input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; letter-spacing: .06em; text-transform: uppercase; }
.cp-hex.invalid { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
.cp-sv { position: relative; height: 132px; border-radius: 9px; cursor: crosshair; touch-action: none; overflow: hidden; }
.cp-sv-white, .cp-sv-black { position: absolute; inset: 0; }
.cp-sv-white { background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); }
.cp-sv-black { background: linear-gradient(0deg, #000, rgba(0, 0, 0, 0)); }
.cp-knob, .cp-hue-knob {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%);
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .4); pointer-events: none;
}
.cp-hue {
  position: relative; height: 12px; border-radius: 6px; cursor: pointer; touch-action: none;
  background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00);
}
.cp-hue-knob { top: 50%; background: transparent; }
.cp-quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cp-quick button { height: 22px; border-radius: 6px; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.cp-quick button:hover { transform: scale(1.08); }
.cp-quick button[aria-pressed="true"] { box-shadow: 0 0 0 2px #0f131b, 0 0 0 3.5px #fff; }
.hex-row { min-width: 0; }
.hex-row .input-wrap { flex: 1; min-width: 0; }
.panel-body { overflow-x: hidden; }
.panel-body > * { flex: none; }
.hex-row input.hex { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.input-wrap.invalid { border-color: #e5484d; }
.link-btn { background: none; border: 0; padding: 0; color: var(--cyan); font-size: 11.5px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* Master Customizer additions */
.field-label { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.field-label small { font-size: 11px; color: var(--faint); font-weight: 500; }
.field-label .reset { margin-left: auto; font-size: 11px; }
.block-color {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--radius-sm); background: #0a0d13; border: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 600; color: var(--text);
}
.block-color .reset { margin-left: auto; }
.tabs button { position: relative; }
.tabs button::after {
  content: ""; position: absolute; left: 7px; right: 7px; bottom: 3px; height: 3px; border-radius: 2px;
  background: var(--dot, transparent); opacity: .9;
}
details.options { border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .015); }
details.options summary { cursor: pointer; padding: 9px 12px; font-size: 12px; font-weight: 600; color: var(--muted); list-style: none; display: flex; justify-content: space-between; }
details.options summary::-webkit-details-marker { display: none; }
details.options summary::after { content: "+"; color: var(--faint); }
details.options[open] summary::after { content: "−"; }
details.options .options-body { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.seg-wide { display: flex; }
.seg-wide button { flex: 1; height: 32px; font-size: 12.5px; }

/* Colors grid */
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.color-cell { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: #0a0d13; border: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 600; }
.color-cell .swatch-btn { width: 20px; height: 20px; }

/* Brand panel */
.panel-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.brand-row { display: grid; grid-template-columns: minmax(0, 1fr) 176px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.brand-row:last-of-type { border-bottom: 0; }
.brand-row label { font-weight: 600; font-size: 13px; }
.brand-row small { display: block; color: var(--faint); font-size: 11.5px; font-weight: 500; }
.brand-preview { flex: none; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); }
.brand-preview svg { width: 100%; height: 100%; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.hint { font-size: 11.5px; color: var(--faint); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80;
  background: #0f1a2b; border: 1px solid rgba(56, 198, 255, .45); color: #e8f2ff;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow); animation: pop .25s var(--ease) both;
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .editor-body { grid-template-columns: 1fr; overflow-y: auto; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); order: 2; overflow: visible; }
  .preview-col { order: 1; overflow: visible; }
  .editor { overflow-y: auto; }
}
@media (max-width: 640px) {
  .wordmark { font-size: 18px; }
  .brandbar { height: 52px; }
  .toolbar, .categories, .gallery-wrap { padding-left: 14px; padding-right: 14px; }
  .btn-brand span { display: none; }
  .search kbd { display: none; }
  .modal { padding: 0; }
  .editor, .panel { border-radius: 0; max-height: 100vh; height: 100vh; }
  .preview-actions { flex-direction: column-reverse; align-items: stretch; }
  .export-group { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
