.lfp-dialog {
  --lfp-paper: var(--paper, #f8f6ef);
  --lfp-ink: var(--ink, #23231e);
  --lfp-line: var(--line, #cecbbf);
  --lfp-muted: var(--muted, #636358);
  --lfp-accent: var(--accent, #a96120);
  --lfp-serif: var(--serif, Georgia, serif);
  --lfp-sans: var(--sans, Arial, sans-serif);
  color: var(--lfp-ink);
  background: var(--lfp-paper);
  font-family: var(--lfp-sans);
  color-scheme: inherit;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh;
  width: min(32rem, 100%);
  max-height: 100%;
  max-width: 100%;
  border: 0;
  border-inline-start: 1px solid var(--lfp-line);
  overflow: hidden;
  box-sizing: border-box;
}
.lfp-dialog[open] { animation: lfp-drawer-in 230ms cubic-bezier(.2,.76,.3,1) both; }
.lfp-dialog.lfp-wide { width: min(46rem, 100%); }
.lfp-dialog::backdrop { background: rgb(18 19 16 / 52%); }
.lfp-dialog[open]::backdrop { animation: lfp-backdrop-in 180ms ease both; }
@keyframes lfp-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes lfp-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.lfp-dialog *, .lfp-dialog *::before, .lfp-dialog *::after { box-sizing: border-box; }
.lfp-dialog :is(button, a, select):focus-visible { outline: 2px solid var(--lfp-accent); outline-offset: 3px; }
.lfp-dialog svg { width: 1.15rem; height: 1.15rem; display: block; flex: none; }
.lfp-dialog a { color: inherit; text-decoration: none; }
.lfp-dialog button, .lfp-dialog select { font: inherit; }
.lfp-dialog button { cursor: pointer; }
.lfp-inner { display: flex; flex-direction: column; height: 100%; }
.lfp-head {
  display: flex; flex: none; justify-content: space-between; align-items: center;
  gap: .75rem; padding: 1.2rem clamp(1rem, 4vw, 2.2rem); border-bottom: 1px solid var(--lfp-line);
}
.lfp-head > div { display: flex; gap: .65rem; align-items: center; }
.lfp-head h2 { margin: 0; font: 400 clamp(2rem, 4vw, 2.65rem)/1.05 var(--lfp-serif); letter-spacing: -.045em; }
.lfp-head-icon { color: var(--lfp-accent); display: inline-flex; }
.lfp-head-icon svg { width: 1.25rem; height: 1.25rem; }
.lfp-icon-btn {
  display: inline-grid; flex: 0 0 auto; place-items: center; width: 2.75rem; height: 2.75rem;
  padding: 0; color: var(--lfp-ink); background: transparent; border: 1px solid var(--lfp-line);
  border-radius: 50%; line-height: 1;
}
.lfp-icon-btn:hover, .lfp-select:hover select, .lfp-small:hover { border-color: var(--lfp-ink); }
.lfp-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem clamp(1rem, 4vw, 2.2rem) max(2rem, env(safe-area-inset-bottom)); }
.lfp-empty { text-align: center; margin: clamp(3rem, 13vh, 8rem) auto; max-width: 20rem; }
.lfp-empty-icon {
  width: 4.7rem; height: 4.7rem; border: 1px solid var(--lfp-line); border-radius: 50%;
  color: var(--lfp-accent); display: grid; place-items: center; margin: auto auto 1.25rem;
}
.lfp-empty-icon svg { width: 2rem; height: 2rem; }
.lfp-empty h3 { font: 400 2rem/1.15 var(--lfp-serif); letter-spacing: -.03em; margin: 0 0 .6rem; }
.lfp-empty p { color: var(--lfp-muted); font-size: 1rem; margin: 0 0 1.4rem; line-height: 1.5; }
.lfp-dialog .lfp-primary {
  color: var(--action-ink, #fffdf6); background: var(--action, #282c22); border: 1px solid var(--action, #282c22);
  padding: .75rem 1.2rem; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2rem; font: 500 .9rem/1.2 var(--lfp-sans); text-align: center;
}
.lfp-primary:hover { box-shadow: inset 0 0 0 2px var(--lfp-accent); }
.lfp-saved-list { padding: 0; margin: 0; list-style: none; }
.lfp-saved-row {
  min-width: 0; position: relative; display: grid; grid-template-columns: clamp(5rem, 21vw, 7rem) minmax(0,1fr) auto;
  gap: .9rem; align-items: start; padding: 1.2rem 0; border-bottom: 1px solid var(--lfp-line);
}
.lfp-saved-row:first-child { padding-top: 0; }
.lfp-row-photo, .lfp-photo { background: color-mix(in srgb, var(--lfp-paper), var(--lfp-ink) 6%); overflow: hidden; }
.lfp-row-photo { display: grid; place-items: center; aspect-ratio: 1; }
.lfp-row-photo img, .lfp-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lfp-initial { align-self: center; justify-self: center; font: 400 2rem var(--lfp-serif); color: var(--lfp-muted); }
.lfp-row-details { min-width: 0; }
.lfp-dialog .lfp-row-name { font: 400 1.8rem/1.05 var(--lfp-serif); letter-spacing: -.035em; }
.lfp-dialog .lfp-row-name:hover { text-decoration: underline; text-underline-offset: .15em; }
.lfp-row-details p, .lfp-compare-card > p { font-size: .9rem; line-height: 1.4; color: var(--lfp-muted); margin: .4rem 0; }
.lfp-price { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lfp-compare-action, .lfp-text { color: var(--lfp-ink); border: 0; background: none; padding: 0; }
.lfp-compare-action { display: flex; align-items: center; gap: .35rem; min-height: 2.5rem; margin-top: .1rem; font-size: .875rem !important; }
.lfp-compare-action svg { width: .9rem; height: .9rem; }
.lfp-compare-action[aria-pressed="true"] { color: var(--lfp-accent); }
.lfp-compare-action:hover, .lfp-text:hover { text-decoration: underline; }
.lfp-remove { border-color: transparent; width: 2.5rem; height: 2.5rem; }
.lfp-remove:hover { border-color: var(--lfp-line); }
.lfp-compare-grid, .lfp-buy-grid, .lfp-spec > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(.65rem, 3vw, 1.4rem); }
.lfp-compare-card { min-width: 0; }
.lfp-select { position: relative; margin-bottom: .8rem; }
.lfp-select select {
  border: 1px solid var(--lfp-line); padding: .65rem 2.1rem .65rem .8rem; width: 100%; min-height: 2.75rem;
  color: var(--lfp-ink); background: var(--lfp-paper); border-radius: .15rem; appearance: none; cursor: pointer;
}
.lfp-select select:disabled { opacity: .62; cursor: default; }
.lfp-select option { color: var(--lfp-ink); background: var(--lfp-paper); }
.lfp-select svg { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.lfp-photo { aspect-ratio: 1.1; position: relative; }
.lfp-photo > a { width: 100%; height: 100%; display: grid; }
.lfp-photo-remove { position: absolute; right: .45rem; top: .45rem; background: var(--lfp-paper); width: 2.5rem; height: 2.5rem; }
.lfp-photo-remove svg { width: 1rem; height: 1rem; }
.lfp-no-photo { display: grid; place-items: center; border: 1px dashed var(--lfp-line); color: var(--lfp-muted); background: transparent; }
.lfp-no-photo svg { width: 1.5rem; height: 1.5rem; opacity: .7; }
.lfp-compare-summary { display: flex; flex-wrap: wrap; gap: .3rem .8rem; justify-content: space-between; align-items: baseline; margin-top: .85rem; }
.lfp-specs { margin-top: 1.3rem; }
.lfp-spec { border-top: 1px solid var(--lfp-line); padding: .9rem 0; }
.lfp-spec h3 { color: var(--lfp-muted); font: 600 .875rem/1.4 var(--lfp-sans); margin: 0 0 .35rem; }
.lfp-spec p { margin: 0; font-size: .975rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.lfp-buy-grid { margin-top: .9rem; }
.lfp-buy-grid .lfp-primary { width: 100%; }
.lfp-replace { padding: 1rem; border: 1px solid var(--lfp-line); margin-bottom: 1rem; }
.lfp-replace p { margin: 0 0 .5rem; }
.lfp-replace > div { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.lfp-small { padding: .4rem .8rem; border: 1px solid var(--lfp-line); background: transparent; border-radius: 2rem; color: var(--lfp-ink); min-height: 2.75rem; }
.lfp-text { min-height: 2.75rem; padding: .3rem; }
@media(max-width: 420px) {
  .lfp-head, .lfp-content { padding-inline: .9rem; }
  .lfp-compare-card .lfp-row-name { font-size: 1.5rem; }
  .lfp-saved-row { gap: .5rem; }
  .lfp-photo-remove { width: 2.2rem; height: 2.2rem; }
  .lfp-buy-grid .lfp-primary { padding-inline: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lfp-dialog[open], .lfp-dialog[open]::backdrop { animation: none; }
}
