/* HowLocal app styles */

:root {
  /* HowLocal: a navy street at night, white storefront cards under striped awnings, one yellow accent.
     Layout: one-screen app. Quiet header, a single card stage, thumb-reach actions, two tabs. */
  --navy-deep: #101A2E; /* page ground, from the logo's edge */
  --navy: #14203A; /* raised ground, from the logo's center */
  --navy-rise: #1D2C4F; /* controls and panels */
  --navy-line: #2B3B62; /* hairlines and quiet borders */
  --yellow: #FEC300; /* the one accent: save, active, brand */
  --paper: #F4F6FB; /* storefront wall: white with a navy bias */
  --white: #FFFFFF;
  --ink: #101A2E; /* text on paper */
  --ink-soft: #515C78; /* secondary text on paper */
  --mist: #AAB5CE; /* secondary text on navy */
  --pass: #FF6B5E; /* pass and errors */

  --font-display: "Poppins", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Poppins", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --radius-card: 28px;
  --radius-ctl: 14px;
  --gutter: 20px;

  color-scheme: dark;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: var(--navy-deep);
  background-image: radial-gradient(120% 70% at 50% 28%, var(--navy) 0%, var(--navy-deep) 72%);
  color: var(--white);
  font: 500 16px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

fieldset {
  min-width: 0;
  border: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  display: inline-grid;
  flex: none;
  width: 1.25em;
  height: 1.25em;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- App frame ---------- */

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

.app[data-view="start"] .topbar,
.app[data-view="start"] .tabbar,
.app[data-view="start"] .preview-note {
  display: none;
}

.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: auto;
}

.brand__word {
  display: inline-flex;
  font: 800 19px/1 var(--font-display);
  letter-spacing: 0.01em;
}

.brand__local {
  color: var(--yellow);
}

.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 10px;
  border: 1.5px solid var(--navy-line);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.area-chip .icon {
  width: 18px;
  height: 18px;
  color: var(--yellow);
}

.area-chip__radius {
  color: var(--mist);
  font-weight: 500;
}

.preview-note {
  flex: none;
  margin: 0 var(--gutter) 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--navy-rise);
  color: var(--mist);
  font-size: 12.5px;
  text-align: center;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

.view {
  height: 100%;
}

/* ---------- Awning: the brand motif, built from striped scallops ---------- */

.awning {
  --awning-drop: 30px;
  flex: none;
  display: flex;
  filter: drop-shadow(0 5px 4px rgba(16, 26, 46, 0.22));
}

.awning span {
  --c: var(--hue, var(--yellow));
  flex: 1;
  display: flex;
  flex-direction: column;
}

.awning span:nth-child(even) {
  --c: var(--white);
}

.awning span::before {
  content: "";
  height: var(--awning-drop);
  background: var(--c);
}

.awning span::after {
  content: "";
  aspect-ratio: 2 / 1;
  margin-top: -1px; /* overlap, so no seam shows where the scallop meets the stripe */
  border-radius: 0 0 999px 999px;
  background: var(--c);
}

/* Start screen: white first, like the logo, and long enough to hang from the top of the screen. */
.awning--start {
  --awning-drop: calc(26px + env(safe-area-inset-top));
  margin-top: calc(-1 * env(safe-area-inset-top));
  filter: drop-shadow(0 8px 10px rgba(4, 8, 18, 0.5));
}

.awning--start span {
  --c: var(--white);
}

.awning--start span:nth-child(even) {
  --c: var(--yellow);
}

.awning--sheet {
  --awning-drop: 22px;
}

.awning--mini {
  --awning-drop: 12px;
  width: 112px;
  filter: none;
}

/* ---------- Start ---------- */

.view--start {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.start {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px var(--gutter) 32px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  font: 800 clamp(3rem, 17.5vw, 5rem) / 0.92 var(--font-display);
  letter-spacing: -0.02em;
}

.wordmark__local {
  color: var(--yellow);
}

.wordmark__la {
  margin-top: 0.22em;
  font-size: 0.42em;
  letter-spacing: 0;
}

.start__pitch {
  max-width: 32ch;
  color: var(--mist);
  font-size: 17px;
}

.start__foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.start__credit {
  color: var(--mist);
  font-size: 12.5px;
}

.start__credit a,
.panel__text a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Area form ---------- */

.area-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > label,
.field > legend,
.field__head label {
  color: var(--mist);
  font-size: 14px;
  font-weight: 600;
}

.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field__head output {
  font: 800 20px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

.zip-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--navy-line);
  border-radius: var(--radius-ctl);
  background: var(--navy-rise);
  font: 800 30px/1.2 var(--font-display);
  letter-spacing: 0.12em;
}

.zip-input::placeholder {
  color: var(--navy-line);
}

.zip-input[aria-invalid] {
  border-color: var(--pass);
}

.field__msg {
  color: var(--pass);
  font-size: 13.5px;
  font-weight: 600;
}

.field__msg:empty {
  display: none;
}

input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--navy-line);
}

input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border: 3px solid var(--navy-deep);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 1.5px var(--yellow);
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--navy-line);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid var(--navy-deep);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 1.5px var(--yellow);
}

.range-ends {
  display: flex;
  justify-content: space-between;
  color: var(--mist);
  font-size: 12px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1.5px solid var(--navy-line);
  border-radius: var(--radius-ctl);
  background: var(--navy-rise);
}

.segmented__item {
  position: relative;
  display: block;
}

.segmented input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented label {
  display: block;
  padding: 10px 4px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.segmented input:checked + label {
  background: var(--yellow);
  color: var(--ink);
}

.segmented input:focus-visible + label {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-ctl);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn--yellow {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}

.btn--ghost {
  border-color: var(--navy-line);
  background: transparent;
  color: var(--white);
}

.btn--ink {
  background: var(--navy-deep);
  color: var(--white);
}

.btn--line {
  border-color: rgba(16, 26, 46, 0.28);
  background: transparent;
  color: var(--ink);
}

.btn--big {
  min-height: 58px;
  font-size: 18px;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---------- Swipe screen ---------- */

.view--swipe {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px var(--gutter) 14px;
}

.deck-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}

.deck {
  position: absolute;
  inset: 0;
  container-type: size;
}

.deck-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.card {
  --save: 0;
  --pass: 0;
  --awning-drop: clamp(20px, 7cqh, 42px);
  position: absolute;
  inset: 0 0 26px 0;
  display: flex;
  flex-direction: column;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 1.5px var(--navy-line), 0 16px 36px rgba(3, 8, 20, 0.5);
  transform-origin: 50% 100%;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1), filter 0.28s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.card[data-pos="1"] {
  transform: translateY(12px) scale(0.955);
  filter: brightness(0.9);
}

.card[data-pos="2"] {
  transform: translateY(24px) scale(0.91);
  filter: brightness(0.8);
}

.card.is-dragging {
  transition: none;
  cursor: grabbing;
}

.card.is-leaving {
  transition: transform 0.38s cubic-bezier(0.3, 0.6, 0.4, 1), opacity 0.38s ease-in;
  pointer-events: none;
}

.card .awning {
  --awning-drop: inherit;
}

.stamp {
  position: absolute;
  top: 27%;
  z-index: 2;
  padding: 2px 16px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(16, 26, 46, 0.25);
  font: 800 30px/1.3 var(--font-display);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.stamp--save {
  left: 18px;
  background: var(--yellow);
  color: var(--ink);
  opacity: var(--save);
  transform: rotate(-8deg);
}

.stamp--pass {
  right: 18px;
  background: var(--pass);
  color: var(--white);
  opacity: var(--pass);
  transform: rotate(8deg);
}

.card__body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 22px 14px;
  overflow: hidden;
}

.card__body > * {
  position: relative; /* text sits above the category drawing */
}

.card__body > .card__art {
  position: absolute;
  right: -7%;
  bottom: -6%;
  width: 58%;
  aspect-ratio: 1;
  color: var(--hue);
  opacity: 0.14;
  pointer-events: none;
}

.card__art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.card__kind {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--hue, var(--navy-rise));
  color: var(--white);
}

.tile svg {
  width: 20px;
  height: 20px;
}

.sample-tag {
  margin-left: auto;
  padding: 2px 9px;
  border: 1.5px dashed currentColor;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.card__name {
  font-family: var(--font-display);
  font-size: 2.1rem; /* for older browsers that don't know the container units below */
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.card__name--s {
  font-size: clamp(2.5rem, 15cqw, 4.2rem);
}

.card__name--m {
  font-size: clamp(2.05rem, 11.5cqw, 3.3rem);
}

.card__name--l {
  font-size: clamp(1.65rem, 9cqw, 2.5rem);
}

.card__name--xl {
  font-size: clamp(1.35rem, 7cqw, 1.9rem);
}

.card__where {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
}

.card__dist {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}

.card__addr {
  padding-left: 26px;
  color: var(--ink-soft);
  font-size: 14px;
}

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.perks li {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 26, 46, 0.07);
  font-size: 12.5px;
}

.card__base {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 22px;
  background: var(--navy-deep);
  color: var(--white);
  font-size: 13.5px;
}

.card__hours {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--mist);
}

.card__more {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--yellow);
  font-weight: 600;
}

@container (max-height: 440px) {
  .card__body {
    gap: 7px;
    padding-top: 10px;
  }

  .card .perks {
    display: none;
  }

  .card__body > .card__art {
    width: 42%;
  }

  .card__name--s {
    font-size: clamp(2rem, 12cqw, 3rem);
  }

  .card__name--m {
    font-size: clamp(1.7rem, 9.5cqw, 2.5rem);
  }

  .card__name--l {
    font-size: clamp(1.4rem, 7.5cqw, 2rem);
  }

  .card__name--xl {
    font-size: clamp(1.15rem, 6cqw, 1.6rem);
  }
}

@container (max-height: 330px) {
  .card__addr {
    display: none;
  }
}

.actions {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.act {
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.5px solid var(--navy-line);
  border-radius: 50%;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s ease;
}

.act:active {
  transform: scale(0.92);
}

.act:disabled {
  opacity: 0.35;
  cursor: default;
}

.act--small {
  width: 48px;
  height: 48px;
}

.act--small svg {
  width: 22px;
  height: 22px;
}

.act--pass {
  width: 66px;
  height: 66px;
  background: var(--navy-rise);
  color: var(--pass);
}

.act--pass svg {
  width: 30px;
  height: 30px;
}

.act--save {
  width: 76px;
  height: 76px;
  border-color: transparent;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(254, 195, 0, 0.25);
}

.act--save svg {
  width: 34px;
  height: 34px;
}

/* Loading, nothing left, or a problem */

.deck-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 330px;
  padding: 8px;
}

.deck-msg__title {
  font: 800 26px/1.1 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.deck-msg__text {
  color: var(--mist);
}

.deck-msg__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.deck-msg__note {
  color: var(--mist);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.deck-msg--busy .awning--mini {
  transform-origin: 50% 0;
  animation: sway 1.5s ease-in-out infinite;
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

/* ---------- Saved ---------- */

.view--saved {
  overflow-y: auto;
  padding: 10px var(--gutter) 28px;
}

.saved-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 10px;
}

.saved-head h1 {
  font: 800 30px/1.1 var(--font-display);
  letter-spacing: -0.02em;
}

.saved-head p {
  color: var(--mist);
  font-size: 14px;
}

.saved-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--navy-line);
  background: none;
  text-align: left;
  cursor: pointer;
}

.saved-row .tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.saved-row .tile svg {
  width: 24px;
  height: 24px;
}

.saved-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.saved-row__name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.saved-row__label,
.saved-row__dist {
  color: var(--mist);
  font-size: 13.5px;
}

.saved-row__dist {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.saved-row > .icon {
  width: 18px;
  height: 18px;
  color: var(--mist);
}

.saved-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px 0;
}

.saved-empty__title {
  font: 800 22px/1.2 var(--font-display);
}

.saved-empty__text {
  max-width: 30ch;
  margin-bottom: 8px;
  color: var(--mist);
}

/* ---------- Tabs ---------- */

.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--navy-line);
  background: var(--navy-deep);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 0 12px;
  color: var(--mist);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab[aria-current="page"] {
  color: var(--yellow);
}

.tab__count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* ---------- Sheets ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 9, 18, 0.62);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.scrim.is-on {
  opacity: 1;
}

.sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  max-width: 480px;
  max-height: 90%;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 24px 24px 0 0;
  outline: none;
  transform: translateY(102%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.sheet.is-open {
  transform: none;
}

.sheet--navy {
  border-top: 1px solid var(--navy-line);
  background: var(--navy);
  color: var(--white);
}

.sheet--paper {
  background: var(--paper);
  color: var(--ink);
}

.sheet--paper :focus-visible {
  outline-color: var(--navy-deep);
}

.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy-rise);
  color: var(--white);
  cursor: pointer;
}

.sheet--paper .sheet__close {
  top: auto;
  margin-top: 64px;
  background: var(--navy-deep);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px var(--gutter) 26px;
}

.panel__title {
  padding-right: 44px;
  font: 800 24px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}

.panel__section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--navy-line);
}

.panel__sub {
  font-size: 16px;
  font-weight: 800;
}

.panel__text {
  max-width: 46ch;
  color: var(--mist);
  font-size: 14.5px;
}

.panel__text--quiet {
  font-size: 12.5px;
}

/* ---------- Get the app ---------- */

.getapp__stores {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.getapp__install {
  gap: 10px;
}

.getapp__steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.getapp__step {
  display: grid;
  grid-template-columns: 28px 40px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-ctl);
  background: var(--navy-rise);
  font-size: 15px;
  counter-increment: step;
}

.getapp__step::before {
  content: counter(step);
  color: var(--yellow);
  font: 800 20px/1 var(--font-display);
}

.getapp__step .icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy-deep);
  color: var(--yellow);
}

.getapp__step .icon svg {
  width: 22px;
  height: 22px;
}

.getapp__link {
  padding: 12px 14px;
  border-radius: var(--radius-ctl);
  background: var(--navy-rise);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* The small note above the deck that counts free swipes in try mode. */
.preview-note--try {
  color: var(--yellow);
}

.details__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 22px 24px;
}

.details__body .card__kind {
  padding-right: 52px; /* clear of the close button */
}

.details__name {
  padding-right: 48px;
  font: 800 clamp(1.8rem, 8vw, 2.4rem) / 1.05 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.details__dist {
  color: var(--ink-soft);
  font-weight: 600;
}

.details__empty {
  color: var(--ink-soft);
}

.facts {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(16, 26, 46, 0.12);
}

.fact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(16, 26, 46, 0.12);
}

.fact dt {
  display: flex;
  align-items: center;
  align-self: start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.fact dd {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.fact__line {
  display: block;
}

.fact a,
.details__source a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.details__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.details__source {
  color: var(--ink-soft);
  font-size: 12.5px;
}

/* ---------- Messages ---------- */

.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 8px);
  left: 50%;
  z-index: 60;
  max-width: min(88vw, 420px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(3, 8, 20, 0.45);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* "Get directions" with a choice of map app. */
.details__label {
  margin-bottom: -4px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.details__maps .btn {
  gap: 8px;
  padding-inline: 10px;
  font-size: 15px;
  white-space: nowrap;
}

/* ---------- Real places: photo or street map on the card ---------- */

.card__media {
  position: relative;
  flex: 1 1 54%;
  min-height: 110px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--hue) 16%, #f4f6fb), #e4e9f3);
}

.card__media > .card__art {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34%;
  aspect-ratio: 1;
  color: var(--hue);
  opacity: 0.22;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.card__media.has-map > .card__art,
.card__media.has-photo > .card__art {
  display: none;
}

.card__mapimg,
.card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card__media.has-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(16, 26, 46, 0.35));
  pointer-events: none;
}

.card__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 4px 4px rgba(16, 26, 46, 0.35));
  pointer-events: none;
}

.card__pin svg {
  display: block;
  width: 100%;
}

.card__credit {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 1;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: rgba(16, 26, 46, 0.78);
  font-size: 10.5px;
  pointer-events: none;
}

.card__credit--photo {
  background: rgba(16, 26, 46, 0.55);
  color: rgba(255, 255, 255, 0.92);
}

.card__media > .card__kind {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(16, 26, 46, 0.18);
  font-size: 14px;
}

.card__media > .card__kind .tile {
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.card__media > .card__kind .tile svg {
  width: 16px;
  height: 16px;
}

.card .card__body {
  flex: 0 1 auto;
  gap: 8px;
  padding-top: 14px;
}

.card .card__where {
  margin-top: 0;
}

.card .card__name--s {
  font-size: clamp(2rem, 10.5cqw, 3rem);
}

.card .card__name--m {
  font-size: clamp(1.7rem, 8.5cqw, 2.5rem);
}

.card .card__name--l {
  font-size: clamp(1.45rem, 7cqw, 2rem);
}

.card .card__name--xl {
  font-size: clamp(1.2rem, 5.6cqw, 1.6rem);
}

.stamp {
  top: 18%;
  z-index: 3;
}

@container (max-height: 440px) {
  .card .perks {
    display: none;
  }
}

/* Details sheet: the photo and a map people can move around. */
.details__photo {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
}

.details__photo img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.details__photo figcaption {
  padding: 4px 2px 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.details__owner {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.details__owner a {
  color: inherit;
}

.details__street {
  margin: 0;
}

.details__street[hidden] {
  display: none;
}

.details__street img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 16px;
}

.details__street figcaption {
  padding: 4px 2px 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.details__street figcaption a {
  color: inherit;
}

.details__map {
  height: 190px;
  overflow: hidden;
  border-radius: 16px;
  background: #e4e9f3;
}

.details__map.is-off {
  display: none;
}
