.filter-drawer { grid-template-rows: minmax(0, 1fr) auto auto !important; gap: 8px; padding: 9px !important; }
.filter-pane { order: 1 !important; padding: 2px 0 8px !important; }
.selected-editorial { order: 2 !important; min-height: 44px !important; border-radius: 13px !important; background: #ffffff09 !important; color: #f6deea !important; border: 1px solid #f4bcd84d !important; }
.selected-editorial.active { color: #2c1829 !important; background: linear-gradient(120deg, #ffefb8, #eda6b2) !important; }
.filter-tabs { order: 3 !important; gap: 6px !important; padding: 0 !important; border: 0 !important; background: none !important; }
.filter-tabs button, .filter-pane .chronicle-filters button, .filter-pane .chronicle-row button { position: relative; isolation: isolate; min-height: 62px !important; border: 1px solid #ffffff38 !important; border-radius: 15px !important; color: #fff2fb !important; background: linear-gradient(145deg, #35223f, #64466a) !important; font-size: 14px !important; font-weight: 700; line-height: 1.25 !important; box-shadow: inset 0 1px 0 #fff1; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.filter-tabs button:active, .filter-pane button:active { transform: scale(.965); }
.filter-tabs button[data-filter-tab="all"], #chronicleFilters button[data-kind="all"] { background: linear-gradient(145deg, #735529, #a58445) !important; }
.filter-tabs button[data-filter-tab="location"], #locationFilters button { background: linear-gradient(145deg, #613052, #a6547a) !important; }
.filter-tabs button[data-filter-tab="show"], #mapLayers button, #artistTypes button { background: linear-gradient(145deg, #214957, #3f8291) !important; }
.filter-tabs button[data-filter-tab="activity"], #activityFilters button { background: linear-gradient(145deg, #3f2b69, #7554a2) !important; }
#chronicleFilters button[data-kind="photo"], #locationFilters button[data-location-kind="PARK"] { background: linear-gradient(145deg, #173f35, #3b7b5a) !important; }
#chronicleFilters button[data-kind="video"] { background: linear-gradient(145deg, #512030, #8d384a) !important; }
#chronicleFilters button[data-kind="voice"] { background: linear-gradient(145deg, #173d5b, #316f80) !important; }
#chronicleFilters button[data-kind="event"] { background: linear-gradient(145deg, #6d401d, #a86f2c) !important; }
#chronicleFilters button[data-kind="project"] { background: linear-gradient(145deg, #37204f, #644083) !important; }
.filter-tabs button.active, .filter-pane button.active { border-color: #ffeec5 !important; box-shadow: inset 0 0 0 1px #ffeec5, 0 5px 20px #fff2 !important; }
.filter-tabs button::before { display: block; margin-bottom: 4px; font: 700 20px/1.1 system-ui; }
.filter-tabs button[data-filter-tab="all"]::before { content: "◷"; }
.filter-tabs button[data-filter-tab="location"]::before { content: "⌖"; }
.filter-tabs button[data-filter-tab="show"]::before { content: "✦"; }
.filter-tabs button[data-filter-tab="activity"]::before { content: "⚡"; }
.filter-pane .chronicle-filters, .filter-pane .chronicle-row { gap: 8px !important; }
.filter-tabs button { min-height: 70px !important; font-size: clamp(11px, 2.5vw, 14px) !important; }
.filter-drawer [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .filter-tabs button, .filter-pane button { transition: none; } }

/* All choices are visible together. Only a genuinely short viewport scrolls. */
#filterPanel {
  inset:auto 8px calc(72px + env(safe-area-inset-bottom)) !important;
  width:min(560px,calc(100% - 16px)) !important;
  height:auto !important; max-height:calc(100dvh - 132px) !important;
  padding:10px !important; overflow-y:auto !important; overscroll-behavior:contain;
  border-radius:22px !important;
}
#filterPanel .chronicle-head {
  position:static; display:grid !important; grid-template-columns:minmax(0,1fr) 32px;
  align-items:center; gap:5px; min-height:34px; margin:0 0 8px;
  padding:0 !important; border:0; background:none; backdrop-filter:none;
}
#filterPanel .filter-summary { gap:4px !important; }
#filterPanel .filter-summary > span { min-height:28px !important; padding:4px !important; font-size:9px !important; border-radius:9px; }
#filterPanel .filter-summary b { font-size:11px !important; }
#filterToggle { position:static !important; display:grid !important; place-items:center; width:32px; height:32px; padding:0; border-radius:50%; font-size:22px; }
#filterDrawer { display:grid !important; grid-template-rows:auto auto auto !important; height:auto !important; max-height:none !important; gap:8px; padding:0 !important; overflow:visible !important; }
#filterPanel .filter-tabs { order:0 !important; display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px !important; }
#filterPanel .filter-tabs button { min-height:48px !important; padding:5px 2px !important; font-size:10px !important; }
#filterPanel .filter-tabs button::before { font-size:17px; margin-bottom:3px; }
#filterPanel .filter-pane { order:1 !important; padding:0 !important; overflow:visible !important; min-height:0; }
#filterPanel .filter-pane :is(.chronicle-filters,.chronicle-row) {
  display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  grid-auto-rows:minmax(44px,auto); gap:5px !important; width:100%;
  max-height:none !important; padding:0 !important; margin:0 !important; overflow:visible !important;
}
#filterPanel .filter-pane :is(.chronicle-filters,.chronicle-row) button {
  min-width:0 !important; width:auto !important; min-height:44px !important;
  padding:7px 3px !important; font-size:11px !important; line-height:1.2 !important;
  white-space:normal !important; text-wrap:balance; border-radius:12px !important;
}
#filterPanel #locationFilters { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
#filterPanel #locationFilters button { font-size:10px !important; }
#filterPanel #artistTypes { margin-top:5px !important; }
#filterPanel .selected-editorial { order:2 !important; width:100%; min-height:34px !important; padding:5px !important; font-size:10px !important; margin:0 !important; }
#filterPanel [hidden] { display:none !important; }

#createPanel {
  inset:auto 8px calc(72px + env(safe-area-inset-bottom)) !important;
  width:min(560px,calc(100% - 16px)) !important; height:auto !important;
  max-height:calc(100dvh - 132px) !important; overflow-y:auto !important;
  padding:10px !important; overscroll-behavior:contain;
}
#createPanel .panel-head {
  display:flex !important; position:static !important; margin:0 0 8px !important;
  padding:0 !important; min-height:32px; background:none; border:0; backdrop-filter:none;
}
#createPanel .panel-head > div { text-align:left !important; }
#createPanel .panel-head b { font:800 16px/1.2 system-ui !important; }
#createPanel .panel-head small { margin-top:3px; font-size:8px !important; letter-spacing:.04em !important; }
#createClose { display:grid !important; place-items:center; width:32px; height:32px; flex:0 0 32px; padding:0; border-radius:50%; font-size:22px; }
#createPanel .create-grid { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px !important; padding:0; overflow:visible; }
#createPanel .map-action { min-height:62px !important; height:62px !important; padding:6px !important; border-radius:14px !important; }
#createPanel .map-action span { font-size:23px !important; }
#createPanel .map-action small { font-size:10px !important; letter-spacing:.025em !important; }
#createPanel .voice-action { order:-1; grid-column:1/-1; min-height:44px !important; height:44px !important; display:flex !important; align-items:center; justify-content:center; gap:9px; }
#createPanel .voice-action small { font-size:12px !important; }
#createPanel[hidden],#filterPanel[hidden] { display:none !important; }
html.uov-embedded .map-palette { display:none !important; }
@media(max-height:420px) {
  #filterPanel,#createPanel { max-height:calc(100dvh - 92px) !important; }
  #filterPanel .filter-pane :is(.chronicle-filters,.chronicle-row) { grid-template-columns:repeat(6,minmax(0,1fr)) !important; }
  #createPanel .create-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
  #createPanel .voice-action { grid-column:1/-1; }
}
