.flyers-page{padding:28px 0 64px}
.flyers-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin-bottom:22px}
.flyers-free{display:inline-block;background:#edf5ff;color:var(--blue);border-radius:20px;padding:6px 12px;font-size:13px;font-weight:700;margin:0 0 10px}
.flyers-head p{color:var(--muted);line-height:1.6;max-width:640px}
.flyers-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:28px;align-items:start}
.flyers-filters{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;position:sticky;top:16px}
.flyers-filters h2{font-size:16px;margin:16px 0 8px}
.flyers-filters h2:first-child{margin-top:0}
.filter-chip,.area-choice{display:flex!important;align-items:center;gap:10px;font-size:15px;font-weight:600;line-height:1.35;margin:0 0 8px;padding:10px 12px;min-height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer}
.filter-chip input,.area-choice input{display:inline-block;width:22px;min-width:22px;height:22px;margin:0;padding:0;border:0;flex:0 0 22px;accent-color:var(--blue)}
.area-choice:has(input:checked),.filter-chip:has(input:checked){border-color:var(--blue);background:#eef4fd;box-shadow:inset 0 0 0 1px var(--blue)}
#area-choices,#area-filters{display:grid;gap:8px}
form#area-picker label.area-choice{margin-bottom:0}
.flyers-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.flyer-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column}
.flyer-open{display:block;width:100%;padding:0;border:0;background:#f4f7fb;cursor:zoom-in}
.flyer-card img{width:100%;height:320px;object-fit:contain;background:#f4f7fb}
.pdf-preview{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:320px;background:#f4f7fb}
.pdf-preview canvas{display:block;max-width:100%;max-height:320px;background:#fff}
.pdf-status{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:16px;text-align:center;font-size:14px;font-weight:700;line-height:1.45;color:#10233f}
.pdf-error{color:#7a1b1b}
.viewer-page{font-weight:700;font-size:14px;min-width:92px;text-align:center;color:#10233f}
.viewer-stage .pdf-status{position:static;min-height:160px;color:#fff}
.viewer-stage .pdf-error{color:#ffd0d0}
.flyer-card .body{padding:14px;display:flex;flex-direction:column;gap:6px;font-size:14px}
.flyer-card h3{font-size:16px;margin:0}
.flyer-meta{color:var(--muted);font-size:13px}
.flyer-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.download-flyer,.share-flyer,.zoom-btn,#viewer-close{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border-radius:8px;font-weight:700;font-size:15px;text-decoration:none;cursor:pointer}
.download-flyer{background:#0066db;color:#fff;border:0}
.share-flyer,.zoom-btn{background:#fff;color:#10233f;border:2px solid #0066db}
#viewer-close{background:#10233f;color:#fff;border:0;margin-left:auto}
#area-picker button[type=submit],#activate-gallery{background:#0066db;color:#fff;border:0;border-radius:10px;min-height:48px;padding:12px 18px;font-weight:700;cursor:pointer}
#gallery-activate h2{color:#10233f;margin:0 0 8px}
#activate-error{color:#7a1b1b;font-weight:700}
#skip-areas{min-height:48px;margin-left:12px;background:transparent;color:#0066db;border:0;font-weight:700;text-decoration:underline;cursor:pointer}
#area-error{color:#7a1b1b;font-weight:700}
#gallery-saved{color:#10233f;font-weight:700;margin-bottom:12px}
.area-choice:has(input:checked){color:#0066db}
.flyers-note,.flyers-empty{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;color:var(--muted);line-height:1.6}
.area-picker{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px;max-width:640px}
.share-note,.share-fallback{font-size:14px;color:var(--muted);margin-top:12px;line-height:1.5}
.share-fallback{color:#10233f;background:#fff7e8;border:1px solid #e6c200;border-radius:8px;padding:10px 12px;margin:0 12px 8px}
#flyer-viewer{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;margin:0;padding:0;border:0;background:#071525}
#flyer-viewer::backdrop{background:rgba(7,21,37,.72)}
.viewer-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 12px;background:#fff}
.viewer-stage{overflow:auto;height:calc(100dvh - 76px);display:flex;align-items:flex-start;justify-content:center;background:#0b1f3a;touch-action:pan-x pan-y pinch-zoom}
.viewer-media{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;background:#fff}
.viewer-stage canvas.viewer-media{max-width:none;max-height:none;background:#fff}
.viewer-stage iframe.viewer-media{width:100%;height:100%;border:0;background:#fff}
@media(max-width:800px){.flyers-layout{grid-template-columns:1fr}.flyers-filters{position:static}.flyers-head{flex-direction:column;align-items:flex-start}.viewer-bar{position:sticky;top:0;z-index:2}}
