.flyer-main { padding-block:24px 38px }
.flyer-heading { margin-bottom:21px }
.flyer-heading h1 { font-size:clamp(1.45rem,4vw,2.25rem); line-height:1.12; letter-spacing:-.04em }
.flyer-heading p { margin-top:6px; font-size:.93rem; color:var(--muted) }
.flyer-main h2 { margin-bottom:10px; font-size:1.08rem; letter-spacing:-.015em }
#flyer-picker,#flyer-editor { scroll-margin-top:72px }
.flyer-filters { display:grid; grid-template-columns:1.3fr 1fr; gap:10px }
.flyer-status { margin:9px 0; font-size:.82rem; color:var(--muted) }
.flyer-status.error { color:var(--error) }
.flyer-status:empty { display:none }
.flyer-products { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px }
.flyer-product {
  display:grid; grid-template-rows:auto 1fr; padding:0; overflow:hidden; min-width:0;
  border:1px solid var(--line); border-radius:11px; background:var(--panel); color:var(--ink); text-align:left;
}
.flyer-product:hover { border-color:var(--green-line); background:var(--green-soft) }
.flyer-product img { display:block; width:100%; aspect-ratio:1; object-fit:contain; background:var(--surface) }
.flyer-product strong { display:block; padding:8px 9px; font-size:.8rem; line-height:1.28; overflow-wrap:anywhere }
.flyer-edit-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px }
.flyer-edit-head h2 { margin:0 }
.flyer-edit-head .button,.flyer-logo-field .button { min-height:36px; padding-inline:9px; font-size:.78rem }
.flyer-workspace { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1fr); align-items:start; gap:14px }
.flyer-controls {
  display:grid; gap:12px; min-width:0; padding:14px; border:1px solid var(--line);
  border-radius:12px; background:var(--surface);
}
.flyer-controls textarea {
  width:100%; min-height:58px; resize:vertical; padding:8px 9px; border:1px solid var(--field-border);
  border-radius:8px; background:var(--panel); color:var(--ink); font:inherit; font-size:1rem;
}
.flyer-styles { display:flex; flex-wrap:wrap; gap:6px; min-width:0; margin:0; padding:0; border:0 }
.flyer-styles legend { padding:0 0 5px; font-size:.83rem; font-weight:680 }
.flyer-styles label {
  display:flex; align-items:center; gap:5px; min-height:39px; padding:6px 8px;
  border:1px solid var(--line); border-radius:8px; background:var(--panel); cursor:pointer;
}
.flyer-styles label:has(input:checked) { border-color:var(--green-line); background:var(--green-soft); color:var(--green-text) }
.flyer-styles input { width:15px; height:15px; min-height:0; margin:0; padding:0; accent-color:var(--brand) }
.flyer-background-tools { display:grid; gap:6px; justify-items:start }
.flyer-background-tools .button { min-height:39px; font-size:.84rem }
.flyer-logo-field { display:flex; flex-wrap:wrap; align-items:end; gap:5px 10px }
.flyer-logo-field label { display:block; flex:1; min-width:0 }
.flyer-logo-field .muted { font-size:.75rem; font-weight:500; margin-left:5px }
.flyer-logo-field input { display:block; max-width:100%; margin-top:5px; font-size:.84rem }
.flyer-controls .flyer-status { margin:0 }
.flyer-actions { display:flex; flex-wrap:wrap; gap:8px }
.flyer-actions .button { flex:1; font-size:.85rem }
.flyer-stage {
  display:grid; place-items:center; min-width:0; min-height:175px; padding:12px;
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
}
.flyer-stage canvas {
  display:block; width:min(100%,350px); height:auto; aspect-ratio:9 / 16; border-radius:8px;
  box-shadow:0 3px 16px #0002;
}
#flyer-placeholder { color:var(--muted); font-size:.85rem; text-align:center }
@media(max-width:960px) { .flyer-products { grid-template-columns:repeat(4,minmax(0,1fr)) } }
@media(max-width:620px) {
  .flyer-main { padding-top:15px }
  .flyer-products { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px }
  .flyer-workspace { grid-template-columns:1fr; gap:10px }
  .flyer-stage { grid-row:1; padding:8px }
  .flyer-stage canvas { width:min(100%,220px) }
  .flyer-controls { padding:11px; gap:10px }
}
