@media (max-width: 820px) {
  .campaigns-page > .row.wrap.between:has(.campaign-analysis-filters) { display:grid; grid-template-columns:minmax(0,1fr) 44px 44px; gap:10px; align-items:end; min-width:0; }
  .campaigns-page .campaign-analysis-filters,
  .campaigns-page > .row.wrap.between:has(.campaign-analysis-filters) > .row.wrap { display:contents; }
  .campaigns-page .report-date-basis { grid-column:1; grid-row:1; min-width:0; width:100%; }
  .campaigns-page .report-date-basis > .rastro-select { min-width:0; }
  .campaigns-page .meta-refresh-btn { grid-column:2; grid-row:1; }
  .campaigns-page > .row.wrap.between:has(.campaign-analysis-filters) > .m-filter-trigger { grid-column:3; grid-row:1; }

  .page-head .actions:has(> .m-filter-trigger) { display:flex; justify-content:flex-end; align-items:center; gap:10px; }
  .page-head .actions:has(> .m-filter-trigger) > .btn { flex:none; }
  .campaign-daily-page .page-head .actions > a.btn { order:-1; margin-right:auto; }
  .page-head .actions:has(> .m-filter-trigger) > a.btn.hide-mobile { display:none !important; }

  .campaigns-page .meta-refresh-btn,
  .page-head .actions:has(> .m-filter-trigger) > button.btn:first-child,
  .m-filter-trigger { display:inline-flex; align-items:center; justify-content:center; gap:0; width:44px; height:44px; min-width:44px; min-height:44px; padding:0; border-radius:14px; font-size:0; line-height:0; box-shadow:none; flex:none; }
  .campaigns-page .meta-refresh-btn,
  .page-head .actions:has(> .m-filter-trigger) > button.btn:first-child { background:var(--brand); color:#fff; border:1px solid var(--brand); }
  .campaigns-page .meta-refresh-btn svg,
  .page-head .actions:has(> .m-filter-trigger) > button.btn:first-child svg { width:19px; height:19px; }
  .m-filter-trigger { position:relative; border:1px solid var(--line); background:var(--surface); color:var(--ink); cursor:pointer; }
  .m-filter-trigger svg { width:19px; height:19px; }
  .m-filter-trigger:focus-visible, .m-filter-close:focus-visible { outline:2px solid var(--brand); outline-offset:3px; }

  body .page .campaign-analysis-filters > .chips.m-filter-sheet,
  body .page > .page-head + .row.m-filter-sheet,
  body .campaign-daily-page .dp-tools.m-filter-sheet { display:none !important; }
  body .page .campaign-analysis-filters > .chips.m-filter-sheet.is-open,
  body .page > .page-head + .row.m-filter-sheet.is-open,
  body .campaign-daily-page .dp-tools.m-filter-sheet.is-open {
    position:fixed; z-index:111; inset:auto 0 0; display:flex !important; flex-direction:column; align-items:stretch; gap:10px;
    width:100%; max-width:none; max-height:82dvh; overflow-y:auto; box-sizing:border-box;
    padding:18px 18px calc(22px + env(safe-area-inset-bottom)); border:1px solid var(--line); border-radius:24px 24px 0 0;
    background:var(--surface); box-shadow:0 -18px 50px rgb(20 16 40 / 18%); animation:m-filter-rise 220ms ease-out; margin:0;
  }
  .m-filter-backdrop { position:fixed; z-index:110; inset:0; border:0; background:rgb(14 10 27 / 42%); }
  .m-filter-backdrop[hidden] { display:none; }
  .m-filter-heading { order:-1; display:flex; align-items:center; justify-content:space-between; min-height:40px; margin-bottom:6px; font-size:17px; font-weight:650; color:var(--ink); }
  .m-filter-close { display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--ink); font:inherit; font-size:24px; line-height:1; cursor:pointer; }
  body:has(.m-filter-sheet.is-open) { overflow:hidden; }
  .campaign-analysis-filters .m-filter-sheet > .chip,
  .page-head + .row.m-filter-sheet > .chip { display:flex; justify-content:flex-start; width:100%; min-height:48px; height:auto; padding:12px 14px; border-radius:14px; font-size:14px; text-align:left; }
  .m-filter-sheet > .chip.on::after { content:'✓'; margin-left:auto; font-size:16px; }
  .m-filter-sheet > .chip:disabled { opacity:.45; }

  body .campaign-daily-page .dp-tools.m-filter-sheet { flex-wrap:nowrap; }
  .dp-tools.m-filter-sheet .dp-filters { width:100%; display:flex; flex-direction:column; align-items:stretch; gap:12px; }
  .dp-tools.m-filter-sheet .dp-search, .dp-tools.m-filter-sheet .dp-sort { width:100%; min-width:0; flex:none; box-sizing:border-box; }
  .dp-tools.m-filter-sheet .dp-segment { display:flex; width:100%; box-sizing:border-box; }
  .dp-tools.m-filter-sheet .dp-segment button { flex:1; }
  .dp-tools.m-filter-sheet .dp-chips { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:8px; margin:8px 0 0; }
  .dp-tools.m-filter-sheet .dp-chips .chip { justify-content:center; min-height:44px; height:auto; white-space:normal; }
  .dp-tools.m-filter-sheet .dp-export { width:100%; min-height:44px; margin:0; justify-content:center; }
}
@keyframes m-filter-rise { from { transform:translateY(30px); opacity:.7; } to { transform:translateY(0); opacity:1; } }
@media (prefers-reduced-motion:reduce) { .m-filter-sheet { animation:none !important; } }
