:root {
  --red: #a4161f;
  --pine: #0f5132;
  --gold: #d9a21b;
  --rate: #e08a00;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --pin-muted: #8a9a90;
  --line: rgba(60, 60, 67, 0.16);
  --bg: #f5f5f7;
  --fav: #e0245e;
  --been: #1b7f3b;
  --home: #1d1d1f;
  --accent: var(--red);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-edge: rgba(255, 255, 255, 0.6);
  --blur: saturate(180%) blur(20px);
  --radius: 14px;
  --radius-chrome: 20px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.12);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --header-h: 56px;
  --chips-bottom: calc(var(--header-h) + 28px + 56px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
  padding: 0 14px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-chrome);
  box-shadow: var(--shadow-soft);
  z-index: 1001; /* above the home sheet's scrim, so the chip closes it */
}

header h1 {
  white-space: nowrap;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--red);
}

.title-j {
  position: relative;
  display: inline-block;
}

.title-hat {
  position: absolute;
  left: -4px;
  top: -8px;
  transform: rotate(-12deg);
}

.title-star {
  margin-left: 4px;
  vertical-align: 6px;
  fill: var(--gold);
}

.legend {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.home {
  background: var(--home);
}

.garland {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 100%;
  height: 16px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.garland::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 7px;
  border-bottom: 1.5px solid var(--pine);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  opacity: 0.8;
}

.garland i {
  width: 6px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50% 50% 55% 55%;
  background: var(--red);
  box-shadow: 0 0 6px 1px currentColor;
  color: var(--red);
}

.garland i:nth-child(4n + 2) {
  background: var(--gold);
  color: var(--gold);
}

.garland i:nth-child(4n + 3) {
  background: #2f9e62;
  color: #2f9e62;
}

.garland i:nth-child(4n + 4) {
  background: #fff;
  color: #fff;
}

.garland i:nth-child(odd) {
  margin-top: 6px;
}

@media (prefers-reduced-motion: no-preference) {
  .garland i {
    animation: twinkle 2.4s ease-in-out infinite;
  }

  .garland i:nth-child(3n) {
    animation-delay: 0.5s;
  }

  .garland i:nth-child(3n + 1) {
    animation-delay: 1.1s;
  }

  .title-star {
    animation: twinkle 3.2s ease-in-out infinite;
  }
}

@keyframes twinkle {
  50% {
    opacity: 0.45;
  }
}

@media (max-width: 480px) {
  header {
    top: 6px;
    left: 6px;
    right: 6px;
    gap: 8px;
    padding: 0 10px;
    height: 48px;
  }

  header h1 {
    font-size: 16px;
  }

  .title-star {
    display: none;
  }
}

#map {
  position: absolute;
  inset: 0;
}

#status {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--header-h) + 30px);
  z-index: 600;
  font-size: 13px;
  max-width: calc(100% - 24px);
}

#status[data-state="loading"] {
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

#status[data-state="error"] {
  background: #fff4f4;
  color: #a1001c;
  border: 1px solid #ffd0d6;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

#status[data-state="ready"] {
  display: none;
}

/* markers */
.pin > svg {
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

/* popups */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.leaflet-popup-content-wrapper {
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  width: min(312px, calc(100vw - 48px)) !important;
}

.leaflet-popup-content .card {
  padding: 14px 16px;
}

.card h2 {
  font-size: 17px;
  margin: 4px 0 6px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #3a3a3c;
}

.addr {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.card ul {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: #3a3a3c;
}

.dinner {
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 8px;
}

.dinner b {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 2px;
}

.actions {
  display: flex;
  gap: 8px;
}

.btn {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.actions .share {
  flex: 0 0 44px;
  padding: 0;
}

.btn.primary {
  background: var(--accent);
  color: #fff !important;
}

.btn.secondary {
  background: #fbe9ea;
  color: var(--accent) !important;
}

.source {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.source a {
  color: var(--muted);
}

.scroll {
  max-height: 46vh;
  overflow: auto;
}

@media (max-width: 480px) {
  .scroll {
    max-height: 300px;
  }
}

/* photo at the top of the card, full bleed */
.photo {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e5e5ea;
  overflow: hidden;
  margin: -14px -16px 10px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaflet-container .photo .credit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.card.has-photo .scroll {
  max-height: 34vh;
}

/* the marks row (62 px) takes room from the scroll area too */
.card:has(.marks) .scroll {
  max-height: calc(46vh - 62px);
}

.card.has-photo:has(.marks) .scroll {
  max-height: calc(34vh - 62px);
}

@media (max-width: 480px) {
  .card:has(.marks) .scroll {
    max-height: 240px;
  }

  .card.has-photo:has(.marks) .scroll {
    max-height: 140px;
  }
}

@media (max-width: 480px) {
  .photo {
    aspect-ratio: auto;
    height: 120px;
  }

  .card.has-photo .scroll {
    max-height: 200px;
  }
}

/* close button readable over a photo */
.leaflet-container .leaflet-popup:has(.photo) a.leaflet-popup-close-button {
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  line-height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  font-size: 18px;
}

/* row icons */
.ico {
  flex: none;
  color: var(--muted);
}

.addr,
.source {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.addr .ico,
.source .ico {
  margin-top: -1px;
}

.source .ico {
  width: 13px;
  height: 13px;
}

/* one icon per offering line, tinted with the place's category */
.offer.lines ul {
  list-style: none;
  padding-left: 0;
}

.offer.lines li {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin-bottom: 2px;
}

.offer.lines li .ico {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--spa);
  flex: none;
}

.card.spa-hotel .offer.lines li .ico {
  color: var(--spa-hotel);
}

.card.kallbadhus .offer.lines li .ico {
  color: var(--kallbadhus);
}

.card.relax .offer.lines li .ico {
  color: var(--relax);
}

.card.bastu .offer.lines li .ico {
  color: var(--bastu);
}

.dinner b {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dinner b .ico {
  width: 14px;
  height: 14px;
}

/* drive time row */
.trip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 8px;
}

.trip svg {
  flex: none;
  color: var(--muted);
}

.trip b {
  font-weight: 600;
}

.trip .km {
  color: var(--muted);
}

.trip.set-home {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  text-align: left;
  cursor: pointer;
}

.trip.set-home svg {
  color: var(--home);
}

.trip.pending,
.trip.missing {
  color: var(--muted);
}

.leaflet-control-attribution {
  font-size: 11px;
}

[hidden] {
  display: none !important;
}

/* the home button: right end of the title bar */
.home-chip {
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  max-width: 230px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.home-chip::after {
  content: "";
  position: absolute;
  inset: -8px -2px; /* 46 px hit area */
}

.home-chip .ico {
  color: var(--home);
  width: 15px;
  height: 15px;
}

.home-chip b {
  font-weight: 600;
}

.home-chip .town {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.home-chip .chev {
  display: inline-flex;
}

.home-chip .chev .ico {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.home-chip.unset {
  border-color: #f0c4c7;
  background: #fdf1f1;
  font-weight: 600;
}

.home-chip:hover {
  border-color: #c7c7cc;
}

/* the home sheet: a panel under the header, a bottom sheet on phones */
#home-sheet {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  left: 16px;
  width: 380px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 80px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  font-size: 14px;
}

#home-scrim {
  position: absolute;
  inset: 0;
  z-index: 999;
  background: transparent;
}

.handle {
  display: none;
  width: 36px;
  height: 5px;
  margin: 8px auto 0;
  border-radius: 3px;
  background: #d1d1d6;
}

@media (max-width: 480px) {
  .home-chip {
    font-size: 12px;
  }

  #home-sheet {
    top: auto !important;
    left: 0 !important;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 82%;
    border-radius: 18px 18px 0 0;
  }

  #home-scrim {
    background: rgba(0, 0, 0, 0.18);
  }

  .handle {
    display: block;
  }
}

.sheet-in {
  padding: 14px 16px 16px;
  overflow: auto;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px -12px -10px 0;
  border: 0;
  border-radius: 22px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.x span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--bg);
  font-size: 15px;
}

.lead {
  margin: 2px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

form.search {
  display: flex;
  gap: 8px;
}

.field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--bg);
}

.field:focus-within {
  border-color: var(--accent);
  background: #fff;
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

.btn.small {
  flex: none;
  padding: 0 16px;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.btn.ghost {
  border: 0;
  background: none;
  color: var(--accent) !important;
  font-family: inherit;
  cursor: pointer;
}

.locate {
  width: 100%;
  gap: 6px;
  margin-top: 8px;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.locate .ico {
  color: var(--accent);
}

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.msg.err {
  padding: 8px 10px;
  border: 1px solid #ffd0d6;
  border-radius: 10px;
  background: #fff4f4;
  color: #a1001c;
}

.msg.warn {
  padding: 8px 10px;
  border: 1px solid #ffe2a8;
  border-radius: 10px;
  background: #fff8e6;
  color: #7a4b00;
}

.spinner {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border: 2px solid #d1d1d6;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

ul.results {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

ul.results li + li {
  border-top: 1px solid var(--line);
}

ul.results button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

ul.results button:hover,
ul.results button:focus-visible {
  background: #fdf1f1;
}

ul.results b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

ul.results small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.now {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.now .addr {
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--ink);
}

.credit {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}

.credit a {
  color: var(--muted);
}

/* toast after home moved; #status stays the places banner */
#home-toast {
  position: absolute;
  left: 50%;
  top: 64px;
  transform: translateX(-50%);
  z-index: 1002;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: min(420px, calc(100% - 24px));
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
  font-size: 13px;
}

#home-toast .ico {
  margin-top: 1px;
  color: var(--home);
}

#home-toast .ico.check {
  color: #1b7f3b;
}

#home-toast .share-url {
  width: 100%;
  margin-top: 6px;
  font:
    13px ui-monospace,
    monospace;
  padding: 6px 8px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
}

#home-toast.warn .ico {
  color: #b26a00;
}

#home-toast p {
  margin: 0;
  line-height: 1.35;
}

#home-toast p.warn {
  margin-top: 4px;
  color: #7a4b00;
}

#home-toast .ico.heart {
  color: var(--gold);
}

#home-toast .toast-action {
  flex: none;
  align-self: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#home-toast .tx {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -4px -4px 0 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}

@media (max-width: 480px) {
  #home-toast {
    top: auto;
    bottom: 30px;
    width: calc(100% - 24px);
    max-width: none;
  }
}

/* home popup */
.card button.btn {
  width: 100%;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

/* account control: left of the home button in the title bar */
#account-slot {
  display: contents;
}

.account-btn {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  margin-left: auto;
}

.account-btn::after {
  content: "";
  position: absolute;
  inset: -8px -4px; /* 46 px hit area */
}

.account-btn .ico {
  width: 15px;
  height: 15px;
}

.account-btn.chip {
  border-radius: 999px;
  padding: 0 11px 0 9px;
  font-weight: 600;
  color: var(--accent);
  border-color: #f0c4c7;
  background: #fdf1f1;
}

.account-btn.round {
  width: 30px;
  border-radius: 50%;
  padding: 0;
}

.account-btn.round.in {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.account-btn .on {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1b7f3b;
  border: 2px solid #fff;
}

.account-btn .count {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--gold);
  color: #3a2a05;
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

/* the pair sits 8 px apart at the right end; an empty slot leaves the home button its auto margin */
#account-slot:not(:empty) + .home-chip {
  margin-left: -8px;
}

#account-menu {
  position: absolute;
  z-index: 1002;
  right: var(--menu-right, 12px);
  width: 250px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  top: var(--menu-top, 0);
  max-height: calc(100dvh - var(--menu-top, 0px) - 12px);
  font-size: 13px;
  overflow-y: auto;
}

#account-menu .news {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

#account-menu .news h3 {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

#account-menu .news-row {
  display: grid;
  width: 100%;
  gap: 1px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#account-menu .news-row:hover,
#account-menu .news-row:focus-visible {
  background: rgba(201, 154, 60, 0.16);
}

#account-menu .news-row span {
  color: var(--muted);
  font-size: 12px;
}

#account-menu .news-row .line {
  color: #6b4e12;
}

#account-menu .who {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

#account-menu .counts {
  display: flex;
  gap: 14px;
  margin: 10px 0 4px;
  font-weight: 600;
}

#account-menu .counts > span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

#account-menu .fav .ico {
  color: #e0245e;
}

#account-menu .been .ico {
  color: #1b7f3b;
}

#account-menu .synced {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

#account-menu .my-votes h3 {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

#account-menu .my-votes {
  margin: 0 0 10px;
}

#account-menu .my-votes button {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 6px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#account-menu .my-votes .meta {
  color: var(--muted);
  font-size: 12px;
}

#account-menu .btn {
  width: 100%;
  gap: 6px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

/* the login sheet: the home sheet's look; a bottom sheet on phones */
#login-sheet {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: calc(100% - 32px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  font-size: 14px;
}

#login-sheet .lead {
  margin: 4px 0 14px;
  color: var(--ink);
  line-height: 1.4;
}

#login-sheet .btn {
  width: 100%;
  gap: 8px;
  margin-bottom: 8px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

#login-sheet .google .ico {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  color: var(--accent);
}

#login-sheet .fine {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 480px) {
  #login-sheet {
    top: auto !important;
    left: 0 !important;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    border-radius: 18px 18px 0 0;
  }

  #login-sheet .handle {
    display: block;
  }

  #account-menu {
    right: 0;
    left: 0;
    margin-inline: auto;
    width: min(280px, calc(100vw - 24px));
  }

  /* phones: the login chip is the round icon, so title, account and home stay on one row */
  .account-btn.chip {
    width: 30px;
    padding: 0;
    border-radius: 50%;
  }

  .account-btn.chip span {
    display: none;
  }
}

/* marks: the toggles row in a popup, the badges on a pin */
.marks {
  display: flex;
  gap: 8px;
  margin: 10px 0 8px;
}

.mark {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.mark .ico {
  color: var(--muted);
}

.mark.favourite[aria-pressed="true"] {
  border-color: #f5b5c8;
  background: #fdeef3;
  color: #a3123f;
}

.mark.favourite[aria-pressed="true"] .ico {
  color: var(--fav);
  fill: currentColor;
}

.mark.been[aria-pressed="true"] {
  border-color: #b5dcc2;
  background: #edf7f0;
  color: #145c2b;
}

.mark.been[aria-pressed="true"] .ico {
  color: var(--been);
}

.pin-badge {
  position: absolute;
  top: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.pin-badge.fav {
  background: var(--fav);
}

.pin-badge.been {
  background: var(--been);
}

.pin-badge.full {
  top: auto;
  bottom: 6px;
  background: var(--ink);
}

.pin-badge.right {
  right: -7px;
}

.pin-badge.left {
  left: -7px;
}

/* ratings: the average under the name, your stars above the marks row */
.status {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
  margin: 0 0 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(138, 154, 144, 0.22);
  color: #2f3d35;
}

.status b {
  font-weight: 600;
}

.status.booked {
  background: rgba(201, 154, 60, 0.18);
  color: #6b4e12;
}

.news-line,
.watch-hint {
  margin: 0 0 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.news-line {
  display: block;
  background: rgba(201, 154, 60, 0.18);
  color: #6b4e12;
  font-weight: 600;
}

.watch-hint {
  color: var(--muted);
}

.avg {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -2px 0 6px;
  font-size: 13px;
  color: var(--rate);
}

.avg b {
  color: var(--ink);
  font-weight: 600;
}

.avg span {
  color: var(--muted);
}

.rate {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  min-height: 44px;
}

.rate .label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* the five stars sit flush, as in the mock: the row's gap would squeeze the label onto two lines at 375 px */
.rate .stars {
  display: flex;
}

.star {
  width: 40px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: #c7c7cc;
  cursor: pointer;
  border-radius: 10px;
}

.star:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.star .ico {
  color: inherit;
}

.star.on {
  color: var(--rate);
}

.star.on .ico {
  fill: currentColor;
}

/* the rating row (52 px) and the average line (22 px) take room from the scroll area, like the marks row */
.card:has(.rate) .scroll {
  max-height: calc(46vh - 62px - 74px);
}

.card.has-photo:has(.rate) .scroll {
  max-height: calc(34vh - 62px - 74px);
}

@media (max-width: 480px) {
  .card:has(.rate) .scroll {
    max-height: 170px;
  }

  .card.has-photo:has(.rate) .scroll {
    max-height: 72px;
  }
}

/* search: header button, sheet and result rows */
.search-btn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.search-btn::after {
  content: "";
  position: absolute;
  inset: -8px -4px;
}
.search-btn .on {
  display: none;
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
}
.search-btn.active {
  border-color: #f0c4c7;
  background: #fdf1f1;
  color: var(--accent);
}
.search-btn.active .on {
  display: block;
}
/* the button takes the auto margin, so account and home sit right after it */
#search-btn ~ .home-chip {
  margin-left: 0;
}
#search-btn + #account-slot:not(:empty) {
  margin-left: -8px;
}
#search-btn + #account-slot:empty + .home-chip {
  margin-left: -8px;
}

/* where the title bar has room, a search bar replaces the button */
.search-bar {
  display: none;
  flex: 0 1 240px;
  min-height: 34px;
  margin-left: auto;
  border-color: var(--line);
  border-radius: 10px;
  color: var(--muted);
}
.search-bar input {
  font-size: 14px;
}
.search-bar input:focus::placeholder {
  color: transparent;
}
#search-sheet.from-bar.empty,
#search-sheet.from-bar .handle,
#search-sheet.from-bar .sheet-head,
#search-sheet.from-bar #search-form {
  display: none;
}
@media (min-width: 1200px) {
  .search-bar {
    display: flex;
  }
  .search-btn {
    display: none;
  }
  #search-btn + #account-slot:not(:empty),
  #search-btn + #account-slot:empty + .home-chip {
    margin-left: 0;
  }
}

/* the search sheet: the home sheet's look */
#search-sheet {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 80px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  font-size: 14px;
}
#search-sheet:focus,
#home-sheet:focus {
  outline: none;
}
#search-sheet .search {
  margin-top: 10px;
}
#search-out .hit {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 6px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
#search-out .hit:hover,
#search-out .hit:focus-visible,
#search-out li:first-child .hit {
  background: #f2f2f7;
}
#search-out .hit b {
  display: block;
  font-weight: 600;
}
#search-out .hit small {
  color: var(--muted);
}
#search-out ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
#search-out .none {
  margin: 12px 4px 4px;
  color: var(--muted);
}
#search-out .count {
  margin: 10px 4px 0;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 480px) {
  #search-sheet {
    top: auto !important;
    left: 0 !important;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 60%;
    border-radius: 18px 18px 0 0;
  }
}

/* gray-out */
.pin.dim svg > path:first-child {
  fill: #aeaeb2;
}

.pin.dim .pin-badge {
  filter: grayscale(1);
  opacity: 0.8;
}

/* season, price and seats: label column and value */
.card .row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-top: 0.5px solid var(--line);
  font-size: 13px;
}

.card .row b {
  flex: none;
  width: 88px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 500;
}

/* facet rows */
.facets {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin: 3px 0;
  font-size: 11px;
}

.facets b {
  color: var(--muted);
  font-weight: 600;
}

.facets .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.facets .chip {
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

/* Christmas chrome: glass, red, spring */
.leaflet-popup-content-wrapper,
#home-sheet,
#search-sheet,
#login-sheet,
#refresh-sheet,
#account-menu,
#home-toast {
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}

#home-sheet,
#search-sheet,
#login-sheet,
#refresh-sheet,
#account-menu {
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-chrome);
}

.leaflet-popup-tip {
  background: var(--glass-strong);
}

.home-chip,
.account-btn,
.search-btn {
  background: var(--glass);
  border-color: var(--glass-edge);
  transition:
    transform 0.35s var(--spring),
    background-color 0.2s;
}

.home-chip:active,
.account-btn:active,
.search-btn:active {
  transform: scale(0.94);
}

.home-chip,
.account-btn,
.search-btn,
.account-btn.round {
  height: 36px;
}

.search-btn,
.account-btn.round {
  width: 36px;
}

.search-btn .long {
  display: none;
}

@media (min-width: 481px) {
  .search-btn:has(.long) {
    width: auto;
    gap: 6px;
    padding: 0 14px 0 11px;
    border-radius: 999px;
  }

  .search-btn .long {
    display: inline;
    font-size: 13px;
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  .home-chip {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .home-chip > :not(.ico):not(svg),
  .account-btn.chip > span {
    display: none;
  }

  .account-btn.chip {
    width: 36px;
    padding: 0;
  }

  .home-chip svg,
  .account-btn svg {
    width: 18px;
    height: 18px;
  }

  #filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  /* phones pinch to zoom; the buttons would sit on an open popup */
  .leaflet-control-zoom {
    display: none;
  }
}

#filter-chips {
  position: absolute;
  top: calc(var(--header-h) + 28px);
  left: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-chrome);
  z-index: 1000;
}

.leaflet-top {
  top: var(--chips-bottom);
}

.btn.primary {
  background: var(--red);
}

/* map pins */
.pin > svg {
  overflow: visible;
  transform-origin: 50% 100%;
  transition:
    transform 0.4s var(--spring),
    opacity 0.25s;
}

.pin {
  transition: opacity 0.25s;
}

.pin:hover > svg {
  transform: scale(1.08);
}

.pin[data-season="waiting"] > svg,
.pin[data-season="ended"] > svg,
.pin[data-season="off"] > svg {
  transform: scale(0.85);
}

.pin[data-season="waiting"]:not(.dim) > svg > path:first-child,
.pin[data-season="ended"]:not(.dim) > svg > path:first-child,
.pin[data-season="off"]:not(.dim) > svg > path:first-child {
  fill: var(--pin-muted);
}

.pin[data-season="waiting"] .pin-hat,
.pin[data-season="ended"] .pin-hat,
.pin[data-season="off"] .pin-hat {
  display: none;
}

.pin.gone {
  opacity: 0;
  pointer-events: none;
}

.pin.gone > svg {
  transform: scale(0.3);
}

/* cluster bubbles */
.cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--red) 82%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 2px solid var(--glass-edge);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--red) 25%, transparent),
    var(--shadow-soft);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  transition: opacity 0.25s;
}

.cluster-s {
  font-size: 14px;
}

.cluster-m {
  font-size: 16px;
}

.cluster-l {
  font-size: 18px;
}

.cluster.dim {
  background: color-mix(in srgb, #aeaeb2 82%, transparent);
}

/* snow: one layer inside the map's own pane, three depths */
.leaflet-snow-pane {
  z-index: 650;
  pointer-events: none;
}

.snow {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.snow .flakes i {
  position: absolute;
  left: var(--x);
  top: -24px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(95, 120, 160, 0.35);
  animation:
    snow-fall var(--fall) linear var(--delay) infinite,
    snow-sway calc(var(--fall) / 3) ease-in-out var(--delay) infinite alternate;
}

.snow .near i {
  opacity: 0.95;
}

.snow .mid i {
  opacity: 0.8;
}

.snow .far i {
  opacity: 0.6;
}

@keyframes snow-fall {
  to {
    transform: translateY(calc(100vh + 48px));
  }
}

@keyframes snow-sway {
  from {
    translate: calc(var(--sway) * -1) 0;
  }
  to {
    translate: var(--sway) 0;
  }
}

#filter-chips .chip-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

#filter-chips .chip-group + .chip-group {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

#filter-chips .chip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, var(--ink));
  white-space: nowrap;
}

#filter-chips .chip {
  flex: none;
  min-height: 28px;
  padding: 0 11px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.3s var(--spring),
    background 0.2s,
    color 0.2s;
}

#filter-chips .chip:active {
  transform: scale(0.95);
}

#filter-chips .chip[aria-pressed="true"] {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

#filter-chips .chip:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

#filter-count {
  flex: none;
  margin-left: auto;
  padding-left: 10px;
  align-self: center;
  font-size: 12px;
  white-space: nowrap;
}

#filter-empty {
  position: absolute;
  top: var(--chips-bottom);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-chrome);
  box-shadow: var(--shadow);
  z-index: 1000;
}

#filter-empty[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  #filter-chips .chip,
  .cluster {
    transition: none;
  }
}

/* the vote being put together: a pill over the map's bottom edge and its sheet above it */
.draft-pill {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1001;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  box-shadow: var(--shadow);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.draft-pill[hidden] {
  display: none;
}

#draft-sheet {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  width: 380px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 160px);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-chrome);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  font-size: 14px;
}

#draft-sheet .lead {
  margin: 4px 0 12px;
  line-height: 1.4;
}

#draft-sheet .btn {
  width: 100%;
  margin-bottom: 8px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

#draft-sheet .btn:disabled {
  opacity: 0.45;
  cursor: default;
}

#draft-sheet .fine {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

#draft-sheet .fine[hidden] {
  display: none;
}

.draft-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.draft-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.draft-row .n {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.draft-row .name {
  flex: 1;
  font-weight: 600;
}

.draft-row .remove {
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.draft-field {
  display: block;
  margin-bottom: 12px;
}

.draft-field span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.draft-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.share-link {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}

@media (max-width: 480px) {
  .draft-pill {
    bottom: 20px;
  }

  #draft-sheet {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    max-width: none;
    max-height: 82%;
    border-radius: 18px 18px 0 0;
  }

  #draft-sheet .handle {
    display: block;
  }
}

/* vote mode: only the list's pins, the panel docked left (a bottom sheet on phones), no chips and no draft pill */
body.voting #filter-chips,
body.voting #filter-empty,
body.voting .draft-pill {
  display: none;
}

body.voting .leaflet-top.leaflet-left {
  top: calc(var(--header-h) + 20px);
  left: auto;
  right: 0;
}

.leave-vote {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.leave-vote[hidden] {
  display: none;
}

.leave-vote:not([hidden]) ~ .search-bar,
.leave-vote:not([hidden]) ~ .search-btn {
  margin-left: 0;
}

.leave-vote .long {
  display: none;
}

@media (max-width: 899px) {
  body.voting header .legend {
    display: none;
  }
}

@media (min-width: 900px) {
  .leave-vote {
    width: auto;
    padding: 0 14px 0 11px;
  }

  .leave-vote .long {
    display: inline;
    font-size: 13px;
    font-weight: 600;
  }
}

#vote-panel {
  position: absolute;
  top: calc(var(--header-h) + 20px);
  left: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-height: calc(100% - var(--header-h) - 40px);
  padding: 14px 16px;
  overflow-y: auto;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-chrome);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  font-size: 14px;
}

#vote-panel[hidden],
#vote-panel [hidden] {
  display: none;
}

.vote-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vote-head h2 {
  flex: 1;
  margin: 0;
  font-size: 18px;
}

.vote-collapse {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.vote-collapse[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

.vote-total {
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.vote-closed {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fbe9ea;
  color: var(--red);
  font-weight: 600;
}

.vote-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vote-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.vote-top,
.vote-meta,
.vote-bar {
  grid-column: 1 / -1;
}

.vote-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.vote-name {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.vote-row.missing .vote-name {
  color: var(--muted);
  cursor: default;
}

.vote-meta,
.vote-count {
  color: var(--muted);
  font-size: 13px;
}

.vote-meta .avg {
  display: inline-flex;
  margin: 0;
}

.vote-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#vote-panel.closed .vote-tag {
  background: var(--red);
}

.vote-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.vote-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--pine);
  transition: width 0.4s var(--spring);
}

.vote-row.mine .vote-bar i {
  background: var(--red);
}

.vote-row .btn.small {
  min-height: 36px;
  font-size: 13px;
}

.vote-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .vote-bar i {
    transition: none;
  }
}

@media (max-width: 480px) {
  #vote-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 60%;
    border-radius: 18px 18px 0 0;
  }

  .vote-collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #vote-panel.collapsed #vote-body {
    display: none;
  }
}

#refresh-sheet {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 100px);
  overflow-y: auto;
  font-size: 14px;
}

#refresh-sheet .sub {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

#refresh-sheet .error {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 13px;
}

#refresh-sheet .btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

#refresh-sheet .btn.primary {
  width: 100%;
  margin-bottom: 4px;
}

#refresh-sheet .bar {
  height: 8px;
  margin: 10px 0 6px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
}

#refresh-sheet .bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--pine);
}

#refresh-sheet .now {
  font-size: 13px;
}

#refresh-sheet .counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

#refresh-sheet .counts div {
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

#refresh-sheet .counts b {
  display: block;
  font-size: 20px;
  color: var(--ink);
}

#refresh-sheet details {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
}

#refresh-sheet summary {
  cursor: pointer;
  font-weight: 600;
}

#refresh-sheet .chg {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}

#refresh-sheet .chg:first-of-type {
  border-top: 0;
}

#refresh-sheet .f {
  color: var(--muted);
}

#refresh-sheet .old {
  color: var(--muted);
  text-decoration: line-through;
}

#refresh-sheet .q {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

#refresh-sheet .pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(200, 16, 46, 0.12);
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
}

#refresh-sheet .foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

#refresh-sheet .confirm {
  padding: 10px;
  border-radius: 12px;
  background: #fff7e6;
  font-size: 13px;
}

#account-menu .owner-item {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--red);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

@media (max-width: 480px) {
  #refresh-sheet {
    top: auto !important;
    left: 0 !important;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 82%;
    border-radius: 18px 18px 0 0;
  }

  #refresh-sheet .handle {
    display: block;
  }
}
