.coffee-filter-dialog {
  --cf-line: #aebca6;
  --cf-green: #223d32;
  width: min(680px, 95vw);
  max-width: none;
  max-height: 85dvh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--cf-green);
  background: #fffdf2;
  border: 1px solid var(--cf-line);
  border-radius: 17px;
  box-shadow: 0 24px 70px #14251d40;
}
.coffee-filter-dialog::backdrop { background: #102a20a6; }
body:has(.coffee-filter-dialog[open]) { overflow: hidden; }
.cf-sheet, .cf-form { display: flex; flex-direction: column; min-height: 0; }
.cf-sheet { max-height: calc(85dvh - 2px); }
.cf-head, .cf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; }
.cf-head { border-bottom: 1px solid var(--cf-line); }
.cf-head h2 { margin: 0; font: normal clamp(1.9rem, 5vw, 2.4rem)/1.1 var(--serif); letter-spacing: -.04em; }
.cf-sheet button { font-family: var(--sans); cursor: pointer; }
.cf-sheet button:disabled { cursor: default; }
.cf-sheet button:focus-visible, .cf-sheet input:focus-visible, .cf-sheet summary:focus-visible {
  outline: 2px solid #638265;
  outline-offset: 2px;
}
.cf-close {
  flex: 0 0 37px;
  height: 37px;
  padding: 0;
  border: 1px solid var(--cf-line);
  border-radius: 50%;
  color: var(--cf-green);
  background: #f1f4e9;
  font-size: 1.5rem;
  line-height: 1;
}
.cf-close:hover, .cf-pill:hover:not(:disabled), .cf-tile:hover:not(:disabled) { background: #eaf0df; }
.cf-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 24px 24px; }
.cf-scroll fieldset { min-width: 0; border: 0; padding: 0; margin: 22px 0 0; }
.cf-scroll fieldset:first-child { margin: 0; }
.cf-scroll legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 1rem; }
.cf-note, .cf-status { margin: 0 0 9px; color: #4c6155; font-size: .82rem; line-height: 1.45; }
.cf-status { margin: 0; }
.cf-note:last-child { margin: 8px 0 0; }
.cf-foot { border-top: 1px solid var(--cf-line); background: #fff; }
.cf-cancel {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cf-confirm { border: 0; border-radius: 9px; padding: 10px 16px; background: var(--cf-green); color: #fffdf2; font-size: .93rem; font-weight: 700; }
.cf-confirm:disabled { opacity: .5; }
.cf-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cf-tile, .cf-pill {
  border: 1px solid var(--cf-line);
  border-radius: 10px;
  color: inherit;
  background: #f1f4e9;
  font-size: .83rem;
}
.cf-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  justify-content: center;
  min-height: 98px;
  padding: 6px 4px;
  line-height: 1.15;
}
.cf-tile img { height: 52px; width: 80px; max-width: 100%; object-fit: contain; }
.cf-tile small, .cf-pill small, .cf-more small { color: #4c6155; font-size: .71rem; }
.cf-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.cf-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 10px; border-radius: 14px; }
.cf-sheet [hidden] { display: none; }
.cf-cancel:disabled { opacity: .45; }
.coffee-active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.coffee-active-filters a { display: inline-flex; gap: 8px; align-items: center; min-height: 31px; padding: 3px 10px;
  border: 1px solid #aebca6; border-radius: 15px; color: #223d32; background: #eff4e8; text-decoration: none; font-size: .8rem; }
.coffee-active-filters a:hover { background: #dfebd5; }
.coffee-active-filters a span { font-size: 1.05em; }
.cf-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.cf-pill i[style] { width: 13px; height: 13px; border: 1px solid var(--cf-line); border-radius: 50%; background: var(--swatch); }
.cf-pill[aria-pressed="true"], .cf-tile[aria-pressed="true"] { background: #e1ecd4; box-shadow: inset 0 0 0 1.5px var(--cf-green); }
.cf-pill:disabled, .cf-tile:disabled { opacity: .55; }
.cf-more { margin-top: 10px; }
.cf-more summary, .cf-advanced summary { width: fit-content; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cf-more summary { font-size: .84rem; }
.cf-more .cf-pills { margin-top: 8px; }
.cf-advanced { margin-top: 22px; }
.cf-brand { max-width: 360px; }
.cf-brand summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 13px;
  min-height: 39px;
  border: 1px solid var(--cf-line);
  border-radius: 14px;
  background: #f1f5e9;
  cursor: pointer;
  list-style: none;
}
.cf-brand summary::-webkit-details-marker { display: none; }
.cf-brand summary span { flex: 1; }
.cf-brand summary::after { content: ""; flex: 0 0 7px; height: 7px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.cf-brand[open] summary::after { transform: translateY(2px) rotate(225deg); }
.cf-brand-pop { margin-top: 6px; padding: 8px; border: 1px solid var(--cf-line); border-radius: 12px; background: #fffef9; box-shadow: 0 6px 18px #223b2914; }
.cf-brand-pop input { width: 100%; min-height: 35px; padding: 6px 9px; border: 1px solid var(--cf-line); border-radius: 8px; background: #fff; color: inherit; font: inherit; }
.cf-brand-list { max-height: 180px; margin-top: 5px; overflow-y: auto; overscroll-behavior: contain; }
.cf-brand-list .cf-pill { display: flex; width: 100%; justify-content: space-between; border: 0; border-radius: 8px; background: transparent; text-align: start; }
.cf-brand-list .cf-pill[aria-pressed="true"] { background: #e3eedc; box-shadow: none; }
.cf-brand-list .cf-pill[hidden] { display: none; }
.cf-scroll .cf-price { padding-bottom: 19px; border-bottom: 1px solid var(--cf-line); }
.cf-price legend { font: normal 1.56rem/1.2 var(--serif); letter-spacing: -.02em; margin-bottom: 5px; }
.cf-price legend span { font: 700 .7rem var(--sans); letter-spacing: .06em; margin-left: 5px; }
.cf-clear-price { font-size: .82rem; padding-top: 0; }
.cf-plot { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); align-items: end; gap: 3px; height: 72px; margin: 0 14px; }
.cf-plot i { height: var(--bar-height); border-radius: 4px 4px 1px 1px; background: #648466; }
.cf-plot i[data-outside] { background: #dbe2d5; }
.cf-slider { position: relative; height: 34px; margin-top: -5px; cursor: pointer; }
.cf-slider > span {
  position: absolute;
  top: 15px;
  left: 14px;
  right: 14px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, #dbe2d5 var(--cf-min, 0%), var(--cf-green) var(--cf-min, 0%), var(--cf-green) var(--cf-max, 100%), #dbe2d5 var(--cf-max, 100%));
}
.cf-slider input {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.cf-slider input::-webkit-slider-thumb { appearance: none; width: 28px; height: 28px; border: 1px solid #78907a; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #233c3240; pointer-events: auto; cursor: ew-resize; }
.cf-slider input::-moz-range-thumb { box-sizing: border-box; width: 28px; height: 28px; border: 1px solid #78907a; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #233c3240; pointer-events: auto; cursor: ew-resize; }
.cf-slider input:focus { z-index: 1; }
.cf-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 7px; }
.cf-prices label { display: grid; gap: 4px; min-width: 0; padding: 7px 10px 8px; border: 1px solid var(--cf-line); border-radius: 9px; background: #fff; font-size: .75rem; }
.cf-prices label span { display: flex; align-items: center; gap: 5px; }
.cf-prices label b { font-size: .95rem; font-weight: 500; }
.cf-prices input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: 600 1rem var(--sans); font-variant-numeric: tabular-nums; }
.cf-badge { display: grid; place-items: center; min-width: 1.2em; padding: 0 3px; border-radius: 12px; background: #cdddc0; font-size: .75em; }
@media (max-width: 510px) {
  .cf-head, .cf-foot, .cf-scroll { padding-inline: 15px; }
  .cf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cf-tile { min-height: 82px; }
  .cf-tile img { height: 44px; }
}
