:root {
  --sage-900: #201D18;
  --sage-800: #3C3428;
  --sage-700: #8A6E36;
  --sage-600: #B8904C;
  --sage-500: #D0AB61;
  --sage-300: #E2C98F;
  --sage-200: #EFE1BF;
  --sage-100: #F8F1E2;
  --yellow-500: #D8B66B;
  --yellow-300: #ECD49C;
  --yellow-100: #FFF7E4;
  --paper: #F7F4ED;
  --white: #FFFFFF;
  --ink: #1E1B17;
  --muted: #6D675E;
  --line: #E3DAC8;
  --danger: #A35353;
  --danger-bg: #FFF0F0;
  --shadow: 0 14px 40px rgba(43, 34, 21, 0.10);
  --shadow-soft: 0 8px 24px rgba(43, 34, 21, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1500px;
  font-synthesis-weight: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 0%, rgba(244, 216, 138, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(143, 165, 143, 0.15), transparent 32rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.app-shell { min-height: 100vh; }
.topbar {
  width: min(calc(100% - 32px), var(--max));
  margin: 16px auto 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px 16px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(221,228,220,.95);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 12px;
  z-index: 50;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 190px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, #171512, #3C3020);
  color: #F4D28A;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(244,210,138,.34), 0 8px 22px rgba(45,34,18,.16);
}
.brand-mark.has-image {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-mark-image { width:100%; height:100%; display:block; object-fit:contain; object-position:center; }
.brand-mark-fallback { display:grid; place-items:center; width:100%; height:100%; }
.brand-copy { min-width:0; display:block; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 1px; }
.brand-logo-image { display:block; width:auto; max-width:170px; height:30px; object-fit:contain; object-position:left center; }
.brand-logo-image[hidden], .brand-mark-image[hidden], .brand-text[hidden], .brand-mark[hidden] { display:none !important; }
.topnav { display: flex; justify-content: center; gap: 6px; }
.topnav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 10px;
}
.topnav a:hover { background: var(--sage-100); color: var(--sage-900); }
.topbar-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--sage-100);
  color: var(--sage-800);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage-600); box-shadow: 0 0 0 4px rgba(119,139,120,.12); }

main { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.hero {
  margin: 34px 0 22px;
  padding: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 40px;
  align-items: end;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(248,241,226,.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(244,216,138,.28);
  position: absolute;
  right: -100px;
  top: -130px;
  pointer-events: none;
}
.eyebrow, .section-kicker {
  color: var(--sage-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero h1 { margin: 8px 0 12px; max-width: 900px; font-size: clamp(30px, 4vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
.hero p { margin: 0; max-width: 880px; color: var(--muted); font-size: 16px; }
.hero-points { display: grid; grid-template-columns: repeat(3, minmax(86px, 1fr)); gap: 10px; min-width: 330px; }
.hero-points div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.82); text-align: center; }
.hero-points strong { display: block; font-size: 20px; color: var(--sage-800); }
.hero-points span { color: var(--muted); font-size: 11px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(360px, .78fr); gap: 20px; align-items: start; }
.builder { display: grid; gap: 16px; }
.card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}
.card-accent { border-top: 4px solid var(--sage-500); }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.card-heading h2 { margin: 3px 0 3px; font-size: 21px; letter-spacing: -.015em; }
.card-heading p { margin: 0; color: var(--muted); font-size: 13px; max-width: 680px; }
.compact-heading { margin-bottom: 14px; align-items: center; }
.badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.badge-sage { background: var(--sage-100); color: var(--sage-800); }
.badge-yellow { background: var(--yellow-100); color: #7B6224; }
.badge-outline { border: 1px solid var(--line); color: var(--muted); background: white; }

.field { min-width: 0; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
label, legend { font-size: 13px; font-weight: 750; }
legend { margin-bottom: 8px; }
fieldset { border: 0; padding: 0; min-width: 0; }
input[type="text"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid #D6DED6;
  border-radius: 11px;
  background: #FCFDFB;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { resize: vertical; min-height: 78px; }
input:focus, select:focus, textarea:focus { border-color: var(--sage-500); box-shadow: 0 0 0 4px rgba(143,165,143,.13); background: white; }
input.invalid { border-color: #C97070; box-shadow: 0 0 0 4px rgba(201,112,112,.10); }
.hint, .field-meta { color: var(--muted); font-size: 11px; }
.hint { display: block; margin-top: 6px; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.validation-text.ok { color: var(--sage-700); font-weight: 700; }
.validation-text.bad { color: var(--danger); font-weight: 700; }
.counter { float: right; color: var(--muted); font-size: 10px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 16px; color: var(--sage-700); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content:""; height: 1px; background: var(--line); flex: 1; }

.input-with-action { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.input-suffix { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid #D6DED6; border-radius: 11px; background: #FCFDFB; overflow: hidden; }
.input-suffix input { border: 0; border-radius: 0; box-shadow: none !important; }
.input-suffix span { padding: 0 12px; color: var(--muted); font-size: 12px; }
.color-field { display: grid; grid-template-columns: 46px 1fr; gap: 8px; }
.color-field input[type="color"] { width: 46px; height: 44px; padding: 4px; border: 1px solid #D6DED6; border-radius: 11px; background: white; }

.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.choice-card { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #FCFDFB; cursor: pointer; transition: .18s ease; min-height: 116px; }
.choice-card:hover { border-color: var(--sage-300); transform: translateY(-1px); }
.choice-card.active { border-color: var(--sage-500); background: var(--sage-100); box-shadow: inset 0 0 0 1px var(--sage-500); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { font-size: 13px; margin-top: 8px; }
.choice-card small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.choice-icon { display: inline-grid; place-items: center; min-width: 40px; height: 30px; padding: 0 8px; border-radius: 8px; background: white; border: 1px solid var(--line); color: var(--sage-800); font-size: 10px; font-weight: 900; }

.image-preview { margin-top: 10px; padding: 10px; border-radius: 12px; background: var(--sage-100); border: 1px solid var(--sage-200); display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; }
.image-preview[hidden] { display: none; }
.image-preview img { width: 112px; height: 62px; object-fit: cover; border-radius: 9px; background: #E8ECE8; }
.image-preview strong, .image-preview small { display: block; }
.image-preview small { color: var(--muted); margin-top: 2px; font-size: 11px; word-break: break-word; }

.inline-controls { display: flex; gap: 10px; align-items: center; }
.inline-controls.wrap { flex-wrap: wrap; }
.inline-controls select { max-width: 230px; }
.inline-controls > input[type="text"] { flex: 1; min-width: 220px; }
.switch-row { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 650; white-space: nowrap; }
.switch-row input { position: absolute; opacity: 0; }
.switch { width: 40px; height: 22px; border-radius: 999px; background: #CBD3CB; position: relative; transition: .2s; }
.switch::after { content:""; position:absolute; width:16px; height:16px; border-radius:50%; left:3px; top:3px; background:white; box-shadow: 0 1px 4px rgba(0,0,0,.16); transition:.2s; }
.switch-row input:checked + .switch { background: var(--sage-600); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }

.permissions-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-bottom:18px; }
.check-card { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:flex-start; border:1px solid var(--line); border-radius:12px; padding:11px; background:#FCFDFB; cursor:pointer; }
.check-card input { margin-top: 3px; accent-color: var(--sage-700); }
.check-card strong, .check-card small { display:block; }
.check-card strong { font-size:12px; }
.check-card small { color:var(--muted); font-size:10px; margin-top:1px; }

.notice { padding: 12px 13px; border-radius: 12px; display: flex; gap: 8px; align-items: flex-start; font-size: 11px; }
.notice strong { white-space: nowrap; }
.notice-yellow { background: var(--yellow-100); border: 1px solid var(--yellow-300); color: #66531D; }

.button { border: 1px solid transparent; border-radius: 10px; padding: 10px 14px; font-weight: 750; font-size: 12px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; display:inline-flex; align-items:center; justify-content:center; gap:7px; text-decoration:none; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.button-primary { background: var(--sage-700); color:white; box-shadow:0 8px 20px rgba(101,121,101,.18); }
.button-primary:hover { background: var(--sage-800); }
.button-secondary { background: var(--yellow-100); color:#5F4D1D; border-color:var(--yellow-300); }
.button-ghost { background:white; color:var(--sage-800); border-color:var(--line); }
.button-danger-ghost { background:white; color:var(--danger); border-color:#E8CACA; }
.button-large { min-height: 44px; padding-inline: 20px; }
.button.compact { padding: 8px 11px; }
.link-button { border:0; padding:0; background:transparent; color:var(--sage-700); font-weight:800; font-size:11px; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.icon-button { width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--line); border-radius:9px; background:white; cursor:pointer; font-size:17px; }
.file-button { position:relative; overflow:hidden; }

.project-actions { display:flex; flex-wrap:wrap; gap:8px; }
.sticky-generate { position:sticky; bottom:12px; z-index:25; background:rgba(38,48,42,.93); color:white; border:1px solid rgba(255,255,255,.12); backdrop-filter:blur(12px); border-radius:16px; padding:12px; display:flex; justify-content:space-between; align-items:center; gap:16px; box-shadow:0 14px 40px rgba(38,48,42,.22); }
.sticky-generate strong, .sticky-generate span { display:block; }
.sticky-generate strong { font-size:13px; }
.sticky-generate span { font-size:10px; color:#DDE5DE; margin-top:2px; }

.preview-column { display:grid; gap:16px; }
.sticky-card { position:sticky; top:104px; z-index:10; }
.device-switcher { display:flex; gap:4px; background:var(--sage-100); padding:4px; border-radius:9px; }
.device-btn { width:29px; height:27px; border:0; border-radius:7px; background:transparent; color:var(--muted); font-size:10px; font-weight:900; cursor:pointer; }
.device-btn.active { background:white; color:var(--sage-800); box-shadow:0 2px 7px rgba(53,68,56,.08); }
.preview-toolbar { height:38px; display:flex; justify-content:space-between; align-items:center; gap:12px; background:#EEF2ED; border:1px solid var(--line); border-bottom:0; border-radius:12px 12px 0 0; padding:0 8px 0 12px; font-size:10px; color:var(--muted); }
.preview-toolbar > span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.preview-toolbar div { display:flex; gap:4px; }
.preview-toolbar .icon-button { width:26px; height:26px; font-size:13px; border-radius:7px; }
.device-frame { position:relative; margin:0 auto; background:white; border:1px solid var(--line); overflow:hidden; transition:width .25s ease; min-height:540px; height:62vh; max-height:720px; }
.device-frame.desktop { width:100%; }
.device-frame.tablet { width:min(100%, 520px); }
.device-frame.mobile { width:min(100%, 330px); }
.device-frame iframe { width:100%; height:100%; border:0; background:white; }
.preview-empty, .preview-loader { position:absolute; inset:0; display:grid; place-content:center; justify-items:center; text-align:center; padding:24px; background:linear-gradient(160deg,#FBFCF9,#F0F4EF); color:var(--muted); }
.preview-empty strong { color:var(--ink); font-size:13px; }
.preview-empty p { margin:5px 0 0; font-size:11px; max-width:240px; }
.empty-icon { width:42px; height:42px; display:grid; place-items:center; background:var(--sage-100); border-radius:13px; color:var(--sage-700); margin-bottom:10px; font-size:20px; }
.preview-loader[hidden], .preview-empty[hidden] { display:none; }
.spinner { width:30px; height:30px; border-radius:50%; border:3px solid var(--sage-200); border-top-color:var(--sage-700); animation:spin .8s linear infinite; margin-bottom:8px; }
@keyframes spin { to { transform:rotate(360deg); } }
.preview-note { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 3px 0; font-size:10px; color:var(--muted); }

.seo-check-card { padding-bottom:16px; }
.checklist { list-style:none; padding:0; margin:0; display:grid; gap:7px; }
.checklist li { display:flex; gap:9px; align-items:center; font-size:11px; color:var(--muted); padding:7px 9px; border-radius:9px; background:#FAFBF8; border:1px solid #EDF0EB; }
.checklist li span { font-size:14px; width:16px; text-align:center; }
.checklist li.pass { color:var(--sage-800); background:var(--sage-100); border-color:var(--sage-200); }
.checklist li.warn { color:#7A6226; background:var(--yellow-100); border-color:var(--yellow-300); }


.badge-gold { background:linear-gradient(135deg,#FFF6DE,#F4E0AC); color:#76591F; border:1px solid #E7CC8C; }
.tracking-card { position:relative; overflow:hidden; }
.tracking-card::before { content:""; position:absolute; width:190px; height:190px; border-radius:50%; right:-90px; top:-100px; background:rgba(208,171,97,.10); pointer-events:none; }
.tracking-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tracking-provider { border:1px solid var(--line); border-radius:15px; padding:15px; background:linear-gradient(145deg,#FFF,#FCF9F2); min-width:0; }
.tracking-provider-wide { grid-column:1 / -1; }
.tracking-provider-head { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; margin-bottom:14px; }
.tracking-provider-head strong, .tracking-provider-head small { display:block; }
.tracking-provider-head strong { font-size:13px; }
.tracking-provider-head small { color:var(--muted); font-size:10px; margin-top:1px; }
.tracking-logo { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; font-size:16px; font-weight:900; background:#181818; color:white; box-shadow:0 6px 14px rgba(0,0,0,.12); }
.meta-logo { background:linear-gradient(145deg,#1877F2,#0F5CC4); }
.tiktok-logo { background:linear-gradient(145deg,#111,#262626); text-shadow:2px 0 #25F4EE,-2px 0 #FE2C55; }
.google-logo { background:linear-gradient(145deg,#FFF,#F4E5C3); color:#A97824; border:1px solid #E6CD94; }
.tracking-field { margin-bottom:0; }
.tracking-provider .field { margin-bottom:0; }
.compact-switch { margin:0; }
.optional-label { color:var(--muted); font-size:10px; font-weight:600; }
.notice-gold { background:#FFF8E8; border-color:#ECD49C; color:#695426; }
.tracking-notice { margin-top:12px; }
input:disabled, select:disabled, textarea:disabled { opacity:.58; cursor:not-allowed; background:#F3F0E9; }

.output-section { margin:26px 0 20px; padding:30px; background:rgba(255,255,255,.72); border:1px solid var(--line); border-radius:var(--radius-xl); box-shadow:var(--shadow-soft); }
.section-title-row { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:18px; }
.section-title-row h2 { margin:4px 0 3px; font-size:28px; letter-spacing:-.025em; }
.section-title-row p { margin:0; color:var(--muted); font-size:12px; }
.output-actions { display:flex; gap:8px; }
.output-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,.45fr); gap:16px; }
.code-card { min-width:0; background:#202923; border-radius:16px; overflow:hidden; box-shadow:0 15px 35px rgba(32,41,35,.16); }
.code-toolbar { min-height:46px; padding:7px 10px; display:flex; justify-content:space-between; align-items:center; gap:10px; border-bottom:1px solid rgba(255,255,255,.08); color:#BFC9C0; font-size:10px; }
.output-tabs { display:flex; gap:4px; }
.output-tab { border:0; background:transparent; color:#9EAAA0; padding:7px 9px; border-radius:8px; font-size:10px; font-weight:800; cursor:pointer; }
.output-tab.active { background:rgba(255,255,255,.08); color:white; }
.code-card pre { margin:0; padding:18px; max-height:640px; min-height:420px; overflow:auto; color:#E5ECE6; font-size:11px; line-height:1.65; tab-size:2; }
.code-card code { white-space:pre; }
.publish-guide h3 { margin:5px 0 9px; font-size:18px; }
.publish-guide p, .publish-guide li { color:var(--muted); font-size:11px; }
.publish-guide ol, .publish-guide ul { padding-left:18px; }
.publish-guide code { background:var(--sage-100); color:var(--sage-800); padding:2px 5px; border-radius:5px; }
.guide-callout { margin-top:12px; padding:10px; border-radius:10px; background:var(--yellow-100); border:1px solid var(--yellow-300); color:#67551F; font-size:10px; }

.info-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.info-strip > div { padding:16px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.68); }
.info-strip strong, .info-strip span { display:block; }
.info-strip strong { font-size:12px; }
.info-strip span { margin-top:3px; color:var(--muted); font-size:10px; }
.footer { width:min(calc(100% - 32px), var(--max)); margin:0 auto 24px; display:flex; justify-content:center; gap:20px; color:var(--muted); font-size:11px; padding:14px 4px; text-align:center; }
.footer-credit { display:inline-flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:5px; }
.footer-credit strong { color:var(--ink); font-weight:800; }
.footer-credit a { color:var(--sage-700); font-weight:800; text-decoration:none; transition:color .18s ease, text-decoration-color .18s ease; }
.footer-credit a:hover { color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.footer-heart { color:#d66b78; font-size:13px; line-height:1; transform:translateY(-1px); }
.footer-separator { color:var(--line); margin:0 2px; }

.modal { border:0; padding:0; border-radius:18px; width:min(560px, calc(100% - 28px)); box-shadow:0 30px 90px rgba(38,48,42,.3); }
.modal::backdrop { background:rgba(38,48,42,.45); backdrop-filter:blur(5px); }
.modal-card { padding:20px; }
.modal-header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:14px; }
.modal-header h2 { margin:3px 0 0; }

.saved-projects { display:grid; gap:8px; max-height:420px; overflow:auto; }
.saved-project-item { border:1px solid var(--line); border-radius:12px; padding:11px; display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; }
.saved-project-item strong, .saved-project-item small { display:block; }
.saved-project-item small { color:var(--muted); font-size:10px; margin-top:2px; }
.saved-project-actions { display:flex; gap:5px; }
.saved-project-actions .button { padding:7px 9px; }
.empty-state-small { text-align:center; padding:28px 10px; color:var(--muted); font-size:12px; }

.toast-stack { position:fixed; right:18px; bottom:18px; display:grid; gap:8px; z-index:100; width:min(360px,calc(100% - 36px)); }
.toast { background:#26302A; color:white; border:1px solid rgba(255,255,255,.1); border-radius:12px; padding:11px 13px; box-shadow:0 14px 36px rgba(0,0,0,.2); font-size:11px; animation:toastIn .18s ease-out; }
.toast.error { background:#663D3D; }
.toast.success { background:#425646; }
@keyframes toastIn { from { transform:translateY(8px); opacity:0; } }

@media (max-width: 1120px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .preview-column { grid-row: auto; }
  .sticky-card { position:static; }
  .device-frame { height:560px; }
  .output-grid { grid-template-columns:1fr; }
}

@media (max-width: 820px) {
  .topbar { grid-template-columns:1fr auto; }
  .topnav { grid-column:1 / -1; display:flex; justify-content:flex-start; width:100%; overflow-x:auto; padding-top:6px; border-top:1px solid var(--line); scrollbar-width:none; }
  .topnav::-webkit-scrollbar { display:none; }
  .topnav a { flex:0 0 auto; }
  .hero { grid-template-columns:1fr; padding:26px; }
  .hero-points { min-width:0; width:100%; }
  .two-col, .three-col { grid-template-columns:1fr; gap:0; }
  .platform-grid { grid-template-columns:1fr; }
  .choice-card { min-height:0; display:grid; grid-template-columns:auto 1fr; column-gap:10px; align-items:center; }
  .choice-card .choice-icon { grid-row:1 / span 2; }
  .choice-card strong { margin:0; }
  .permissions-grid { grid-template-columns:1fr; }
  .tracking-grid { grid-template-columns:1fr; }
  .tracking-provider-wide { grid-column:auto; }
  .info-strip { grid-template-columns:1fr; }
  .section-title-row { align-items:flex-start; flex-direction:column; }
  .output-actions { width:100%; }
  .output-actions .button { flex:1; }
}

@media (max-width: 560px) {
  main, .topbar, .footer { width:min(calc(100% - 20px), var(--max)); }
  .topbar { margin-top:10px; min-height:62px; padding:9px 10px; top:7px; }
  .brand small, .privacy-pill { display:none; }
  .brand { min-width:0; }
  .brand-mark { width:37px; height:37px; flex-basis:37px; }
  .hero { margin-top:18px; padding:22px; }
  .hero h1 { font-size:31px; }
  .hero-points { grid-template-columns:repeat(3,1fr); }
  .hero-points div { padding:10px 6px; }
  .card { padding:17px; }
  .card-heading { flex-direction:column; gap:8px; }
  .card-heading .badge { align-self:flex-start; }
  .input-with-action { grid-template-columns:1fr; }
  .field-meta { flex-direction:column; gap:3px; }
  .inline-controls { align-items:stretch; flex-direction:column; }
  .inline-controls select { max-width:none; }
  .project-actions .button { width:100%; }
  .sticky-generate { align-items:stretch; flex-direction:column; }
  .sticky-generate .button { width:100%; }
  .device-frame { height:500px; min-height:460px; }
  
.output-section { padding:18px; }
  .footer { flex-direction:column; gap:3px; }
  .image-preview { grid-template-columns:88px 1fr; }
  .image-preview img { width:88px; height:50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; }
}


/* v2.1.6 Public user guide */
.public-guide{margin:22px 0;padding:28px;background:linear-gradient(145deg,rgba(255,255,255,.97),rgba(248,241,226,.88));border:1px solid var(--line);border-radius:var(--radius-xl);box-shadow:var(--shadow-soft);scroll-margin-top:108px}
.public-guide-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:20px}
.public-guide-hero h2{margin:5px 0 6px;font-size:30px;letter-spacing:-.025em}
.public-guide-hero p{margin:0;max-width:820px;color:var(--muted);font-size:13px}
.public-guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.public-guide-card{display:grid;grid-template-columns:38px 1fr;gap:12px;align-items:start;padding:16px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.86)}
.public-guide-number{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:var(--sage-100);border:1px solid var(--sage-300);color:var(--sage-800);font-size:12px;font-weight:900}
.public-guide-card h3{margin:1px 0 4px;font-size:14px}
.public-guide-card p{margin:0;color:var(--muted);font-size:11px}
.public-guide-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.public-guide-details details{border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.78);padding:12px 14px}
.public-guide-details summary{cursor:pointer;font-size:12px;font-weight:800;color:var(--sage-800)}
.public-guide-details p{margin:8px 0 0;color:var(--muted);font-size:11px}
.public-guide-note{margin-top:14px;padding:12px 14px;border-radius:13px;background:var(--yellow-100);border:1px solid var(--yellow-300);color:#67551F;font-size:11px}
@media(max-width:980px){.public-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.public-guide{padding:20px}.public-guide-hero{align-items:flex-start;flex-direction:column}.public-guide-hero .button{width:100%}.public-guide-details{grid-template-columns:1fr}}
@media(max-width:560px){.public-guide-grid{grid-template-columns:1fr}.public-guide-hero h2{font-size:25px}}
