/* Hallmark · macrostructure: Ecosystem Index · tone: warm/playful · anchor hue: clay
 * genre: playful · theme: Warm Uthai (locked project system)
 * enrichment: generated Uthai photography · nav: locked app header + bottom bar · footer: n/a app screen
 * Hallmark · pre-emit critique: P5 H5 E4 S5 R4 V4
 * gates: contrast pass · slop source-pass · mobile source-pass (render gap disclosed)
 */
@import url("./tokens.css?v=18");

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

html,
body {
  min-height: 100%;
  overflow-x: clip;
}

html {
  background: var(--color-canvas);
}

body {
  margin: 0;
  background: linear-gradient(135deg, var(--color-page-backdrop-a), var(--color-page-backdrop-b));
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-style: normal;
}

.app-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  width: min(100%, 26.875rem);
  min-height: 100svh;
  margin-inline: auto;
  padding-block-end: calc(var(--size-nav) + env(safe-area-inset-bottom));
  flex-direction: column;
  overflow-x: clip;
  background: var(--color-canvas);
}

.svg-library {
  position: absolute;
  overflow: hidden;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pressable {
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out),
    opacity var(--dur-short) var(--ease-out);
}

/* The keyboard ring has to be visible without looking like a rendering fault. A 3 px
 * dark-teal ring offset 3 px read as a stray frame on the cream header, and on controls
 * that sit against the shell edge the offset put part of the ring outside the clip, so
 * it appeared with a side missing. Two changes: the ring takes the brand's own colour at
 * 2 px, and controls that hug an edge draw it just inside themselves, where nothing can
 * crop it. */
.pressable:focus-visible,
.carousel-dot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.icon-button:focus-visible,
.nav-item:focus-visible,
.save-heart:focus-visible,
.carousel-dot:focus-visible,
.switch:focus-visible {
  outline-offset: -2px;
}

/* A round control reads better with the ring following its edge. */
.icon-button:focus-visible,
.save-heart:focus-visible {
  outline-offset: -3px;
}

/* Anything living inside a horizontally scrolling row — the lane tiles, the filter
 * chips, the cards in a rail — cannot use an outward ring: `overflow-x: auto` clips
 * both axes, so the ring lost its top edge and looked like a rendering fault. These
 * draw the ring just inside themselves instead, where nothing can crop it. */
.lane-button:focus-visible {
  outline: none;
}

.lane-button:focus-visible .lane-icon {
  outline: 2px solid var(--color-primary);
  outline-offset: -3px;
}

.filter-chip:focus-visible,
.place-link:focus-visible,
.place-row__link:focus-visible,
.place-lead:focus-visible,
.view-button:focus-visible,
.carousel-toggle:focus-visible {
  outline-offset: -2px;
}

.pressable:active,
.carousel-dot:active {
  transform: translateY(1px) scale(0.98);
}

.pressable:disabled,
.pressable[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

.pressable[aria-busy="true"] {
  cursor: wait;
  opacity: 0.72;
}

.pressable[data-state="error"] {
  outline: 2px solid var(--color-danger);
  outline-offset: 2px;
}

.pressable[data-state="success"] {
  outline: 2px solid var(--color-success);
  outline-offset: 2px;
}

/* Opaque, not transparent: the collage breathes slightly larger than its own box, and the
 * header is what hides the few pixels that rise past the top edge. */
.app-header {
  position: relative;
  z-index: var(--z-raised);
  display: grid;
  min-height: 4.75rem;
  padding-block-start: max(1.125rem, env(safe-area-inset-top));
  padding-inline: var(--space-gutter);
  background: var(--color-canvas);
  grid-template-columns: var(--size-control) minmax(0, 1fr) var(--size-control);
  align-items: center;
}

.icon-button {
  display: grid;
  width: var(--size-control);
  height: var(--size-control);
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
  cursor: pointer;
}

.wordmark {
  position: relative;
  justify-self: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-wordmark);
  font-weight: 700;
  line-height: var(--lh-hero);
  letter-spacing: -0.02em;
}

.wordmark::after {
  position: absolute;
  inset-inline-start: 27%;
  inset-block-end: -0.36rem;
  width: 45%;
  height: 0.55rem;
  border-block-start: 0.15rem solid var(--color-ink);
  border-radius: 50%;
  content: "";
  transform: rotate(-4deg);
}

.wordmark__city {
  color: var(--color-ink);
}

.wordmark__uthai {
  color: var(--color-primary-bright);
}

.wordmark__sparkles {
  position: absolute;
  inset-block-start: -0.7rem;
  inset-inline-end: -1.6rem;
  width: clamp(1.35rem, 5.5vw, 1.9rem);
  fill: none;
  stroke: var(--color-primary-bright);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(8deg);
}

.notification-button {
  position: relative;
}

.notification-dot {
  position: absolute;
  inset-block-start: 0.18rem;
  inset-inline-end: 0.2rem;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  background: var(--color-primary-bright);
}

.notification-button[data-read="true"] .notification-dot {
  opacity: 0;
}

/* The reference collage is full-bleed photography divided by thin cream ribbons, not
 * four floating cards. Every figure therefore spans the whole collage box and carries a
 * clip path measured in that same box, which is what makes the ribbons line up. Each
 * photograph is then placed inside its own quadrant, also measured from the reference. */
.hero-collage {
  position: relative;
  z-index: var(--z-base);
  width: 100%;
  aspect-ratio: 552 / 488;
  overflow: visible;
}

.collage-layer,
.collage-breath {
  position: absolute;
  inset: 0;
}

.hero-shot {
  position: absolute;
  overflow: hidden;
}

/* Each photograph owns a plain rectangle of the collage and simply fills it. The seams
 * are painted on afterwards, so nothing here has to line up with anything else. */
.hero-shot img {
  position: static;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.hero-shot--raft {
  inset: 0 45% 47% 0;
}

.hero-shot--raft img {
  object-position: 50% 62%;
}

.hero-shot--temple {
  inset: 0 0 47% 53%;
}

.hero-shot--temple img {
  object-position: 52% 46%;
}

.hero-shot--oldtown {
  inset: 51% 45% 0 0;
}

.hero-shot--oldtown img {
  object-position: 38% 55%;
}

.hero-shot--market {
  inset: 51% 0 0 53%;
}

.hero-shot--market img {
  object-position: 55% 45%;
}

/* The ribbons: one stroke colour, one width, drawn last. */
.collage-seams {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.seam {
  fill: none;
  stroke: var(--color-canvas);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.seam-edge {
  fill: var(--color-canvas);
  stroke: none;
}

/* Centred on the collage rather than offset: the reference's asymmetric placement reads as
 * a mistake on a scrolling screen, and the old 67% width clipped the nowrap title by 3 px. */
.speech-bubble {
  position: absolute;
  z-index: var(--z-raised);
  inset-block-start: 40%;
  inset-inline: 14%;
  padding: 0.5rem 0.75rem 0.75rem;
  border-radius: 49% 51% 45% 55% / 44% 47% 53% 56%;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.speech-bubble::after {
  position: absolute;
  z-index: -1;
  inset-inline-end: 17%;
  inset-block-end: -0.3rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.2rem 0.8rem 0.2rem 0.8rem;
  background: var(--color-surface);
  content: "";
  transform: rotate(34deg);
}

/* 5.35vw, not 5.6: the title is nowrap, and at 5.6 it needed exactly the 235 px the bubble
 * offers on a 360 px phone — no slack at all for a font that falls back. */
.speech-bubble h2 {
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 5.35vw, 1.5rem);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: -0.01em;
}

.speech-bubble p {
  width: max-content;
  max-width: calc(100% + var(--space-md));
  margin-block-end: -1.65rem;
  margin-inline: auto;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  white-space: nowrap;
  font-size: clamp(0.72rem, 3.45vw, 1rem);
  font-weight: 600;
  line-height: 1.5;
}

.doodle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doodle-heart {
  position: absolute;
  z-index: var(--z-raised);
  inset-block-start: 35%;
  inset-inline-start: 88%;
  width: clamp(1.25rem, 5.5vw, 1.6rem);
  color: var(--color-surface);
  transform: rotate(12deg);
}

.lanes {
  position: relative;
  z-index: var(--z-raised);
  padding-block: var(--space-xs) var(--space-xs);
  background: var(--color-canvas);
}

.section-heading {
  position: relative;
  width: max-content;
  max-width: calc(100% - (2 * var(--space-reference-heading)));
  margin-inline-start: var(--space-reference-heading);
  margin-block-end: var(--space-xs);
}

/* One heading size for every section. The first heading used to be 24 px against 19 px
 * everywhere else, which read as a second page title rather than a section. */
.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 4.2vw, 1.1875rem);
  font-weight: 700;
  line-height: var(--lh-title);
  letter-spacing: 0;
}

.section-swash {
  width: 3.75rem;
  height: 0.8rem;
  margin-block-start: var(--space-2xs);
  color: var(--color-primary-bright);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.section-sparkle {
  position: absolute;
  inset-block-start: 0.1rem;
  inset-inline-start: calc(100% + 0.35rem);
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--color-primary-bright);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lane-scroller {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  padding-inline: var(--space-md);
  padding-block-end: var(--space-2xs);
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  overscroll-behavior-inline: contain;
}

.lane-scroller::-webkit-scrollbar {
  display: none;
}

.lane-button {
  display: grid;
  width: var(--size-lane);
  min-width: var(--size-lane);
  padding: 0;
  gap: var(--space-2xs);
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  scroll-snap-align: start;
}

.lane-icon {
  display: grid;
  width: var(--size-lane);
  height: var(--size-lane);
  place-items: center;
  border: var(--rule-hair) solid transparent;
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow-control);
}

.lane-button .icon {
  width: 1.75rem;
  height: 1.75rem;
  stroke-width: 1.75;
}

/* Capped at 11 px: at 12 px the longest label (หามุมถ่ายรูป, 62.8 px) is wider than the
 * 59 px tile and closes the gap to its neighbour to 2 px. */
.lane-button > span:last-child {
  white-space: nowrap;
  font-size: clamp(0.65rem, 2.8vw, 0.6875rem);
  font-weight: 600;
  line-height: 1.4;
}

.lane-button[aria-pressed="true"] .lane-icon {
  border-color: var(--color-ink);
}

.lane-button--food .lane-icon { background: var(--color-tint-food); }
.lane-button--coffee .lane-icon { background: var(--color-tint-coffee); }
.lane-button--chill .lane-icon { background: var(--color-tint-chill); }
.lane-button--merit .lane-icon { background: var(--color-tint-merit); }
.lane-button--oldtown .lane-icon { background: var(--color-tint-oldtown); }
.lane-button--photo .lane-icon { background: var(--color-tint-photo); }

.featured {
  position: relative;
  padding-inline: var(--space-reference-card-inset);
  padding-block: var(--space-reference-feature-top) 0;
  background: var(--color-canvas);
}

/* Cross-fade rather than a 400%-wide translated track: no long rewind between the last
 * slide and the first, only two layers ever painted during the 220 ms change, and each
 * slide's photo can be fetched exactly when it is needed. */
.trip-carousel {
  display: grid;
}

.trip-track {
  display: grid;
  margin: 0;
  padding: 0;
  grid-row: 1;
  list-style: none;
}

.trip-slide {
  min-width: 0;
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--dur-short) var(--ease-out),
    visibility 0s linear var(--dur-short);
}

.trip-slide[data-active] {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--dur-short) var(--ease-out),
    visibility 0s;
}

.trip-slide[data-leaving] {
  z-index: 1;
  visibility: visible;
}

/* Three columns so the dots sit on the card's centre line rather than being pushed off it
 * by the width of the pause control. */
.carousel-controls {
  display: grid;
  min-height: 2rem;
  padding-block-start: var(--space-3xs);
  gap: var(--space-2xs);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.carousel-toggle {
  grid-column: 1;
  justify-self: start;
}

.carousel-dots {
  grid-column: 2;
}

.carousel-toggle {
  display: grid;
  min-width: 3.25rem;
  min-height: var(--size-control);
  padding-inline: var(--space-sm);
  place-items: center;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
  font-weight: 600;
  cursor: pointer;
}

html[data-ambient="off"] .trip-slide,
html[data-easy="on"] .trip-slide,
html[data-season="royal"] .trip-slide,
html[data-season="mourning"] .trip-slide {
  transition: none;
}

/* min-height, not height: the copy column is the tallest thing in the card and a fixed
 * height clipped the call to action by 8 px as soon as a title wrapped to two lines. All
 * four slides share one grid area, so the row still settles on a single height. */
.trip-card {
  display: grid;
  min-height: 11.5rem;
  overflow: hidden;
  grid-template-columns: minmax(0, 45%) minmax(0, 55%);
  border: var(--rule-card) solid var(--color-surface);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.trip-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  padding: var(--space-sm) var(--space-2xs) var(--space-sm) var(--space-md);
  flex-direction: column;
  align-items: flex-start;
}

.trip-badge {
  display: inline-flex;
  padding: var(--space-2xs) var(--space-sm);
  gap: var(--space-2xs);
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  white-space: nowrap;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
}

.trip-badge .icon {
  width: var(--text-xs);
  height: var(--text-xs);
  fill: currentColor;
  stroke: none;
}

/* Titles wrap: the longest trip name does not fit the 45% copy column on one line, and
 * nowrap pushed it under the photograph. */
.trip-copy h3 {
  margin-block-start: var(--space-2xs);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(1rem, 4.2vw, 1.125rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* Thai has no spaces inside a phrase, so the browser's dictionary is free to break
 * เรือนแพ into เรือน|แพ. Each phrase is its own nowrap span, which leaves the spaces
 * between them as the only break opportunities. */
.trip-copy h3 span {
  white-space: nowrap;
}

.title-heart {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-inline-start: 0.12em;
  fill: none;
  stroke: var(--color-primary-bright);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.12em;
}

.trip-description {
  margin-block-start: var(--space-2xs);
  color: var(--color-ink);
  font-size: clamp(0.72rem, 3.15vw, 0.875rem);
  line-height: 1.5;
}

.trip-cta {
  display: inline-flex;
  min-width: 6.7rem;
  min-height: var(--size-control);
  margin-block-start: auto;
  padding-inline: var(--space-md) var(--space-sm);
  gap: var(--space-xs);
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  white-space: nowrap;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
}

.trip-cta .icon {
  width: 1.2rem;
  height: 1.2rem;
}

.trip-photo {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
}

.trip-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 43% center;
}

.photo-sticker {
  position: absolute;
  inset-block-start: 1.5rem;
  inset-inline-end: 0.625rem;
  color: var(--color-on-primary);
  font-family: var(--font-display);
  font-size: clamp(0.6875rem, 3.15vw, 0.875rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: end;
  paint-order: stroke fill;
  -webkit-text-stroke: 2px var(--color-sticker-stroke);
  transform: rotate(-4deg);
}

.doodle-sun {
  position: absolute;
  inset-inline-end: var(--space-xs);
  inset-block-end: var(--space-sm);
  width: clamp(2.2rem, 10vw, 2.75rem);
  color: var(--color-on-primary);
}

.carousel-dots {
  display: flex;
  min-height: 1.25rem;
  gap: 0.625rem;
  align-items: center;
  justify-content: center;
}

/* The visible mark stays 8 px; the button itself is a full 44 px target. */
.carousel-dot {
  display: grid;
  width: var(--size-control);
  height: var(--size-control);
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.carousel-dot::after {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-ink-muted) 42%, var(--color-canvas));
  content: "";
  transition:
    background-color var(--dur-short) var(--ease-out),
    transform var(--dur-short) var(--ease-out);
}

.carousel-dot.is-active::after {
  background: var(--color-primary-bright);
  transform: scale(1.25);
}

.carousel-dot:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Fixed, not sticky: the home screen scrolls now, and a sticky bar inside the flow only
 * pins itself once the reader is already at the bottom. */
.bottom-nav {
  position: fixed;
  z-index: var(--z-sticky);
  inset-block-end: 0;
  inset-inline: 0;
  display: grid;
  width: min(100%, 26.875rem);
  min-height: calc(var(--size-nav) + env(safe-area-inset-bottom));
  margin-inline: auto;
  padding-block: var(--space-sm) max(var(--space-xs), env(safe-area-inset-bottom));
  padding-inline: var(--space-2xs);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--color-surface);
  box-shadow: 0 -0.18rem 1rem var(--color-shadow-soft);
}

.nav-item {
  display: grid;
  min-width: 0;
  min-height: 3.75rem;
  padding: var(--space-2xs);
  gap: var(--space-2xs);
  place-items: center;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-ink-muted);
  cursor: pointer;
}

.nav-item .icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 1.8;
}

.nav-item span {
  min-width: 0;
  white-space: nowrap;
  font-size: clamp(0.64rem, 2.8vw, var(--text-xs));
  font-weight: 600;
  line-height: 1.35;
}

.nav-item.is-active {
  color: var(--color-primary-bright);
}

.nav-item.is-active .icon {
  fill: currentColor;
  stroke-width: 1.8;
}

/* ── Sections below the fold ─────────────────────────────────────────────── */

.today,
.nearby,
.passport,
.eat,
.news,
.site-footer {
  position: relative;
  background: var(--color-canvas);
}

.section-heading--row {
  display: flex;
  width: auto;
  max-width: none;
  margin-inline: var(--space-reference-heading) var(--space-md);
  gap: var(--space-sm);
  align-items: baseline;
  justify-content: space-between;
}

.section-heading--row h2 {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 4.2vw, 1.1875rem);
  font-weight: 700;
  line-height: var(--lh-title);
  letter-spacing: 0;
}

.link-more {
  flex: none;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
}

/* Today: weather and the emergency entry, side by side and always reachable. */
/* Stacked, not side by side. Two half-width cards left the weather line 136 px in a 136 px
 * box and the emergency label 151 px in a 151 px box — both fitting only at exactly 430 px
 * and wrapping on every narrower phone. The emergency entry is the one control here that
 * must never look cramped, so it gets its own full-width row. */
.today {
  display: grid;
  padding-block: var(--space-sm) var(--space-xs);
  padding-inline: var(--space-gutter);
  gap: var(--space-xs);
}

.today-card,
.sos-card {
  display: grid;
  min-height: var(--size-control);
  padding: var(--space-xs) var(--space-sm);
  align-content: center;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
}

.today-card {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
  justify-content: space-between;
}

.today-figure {
  font-size: var(--text-sm);
  font-weight: 600;
}

.today-temp {
  font-size: var(--text-md);
}

.today-sep {
  color: var(--color-ink-muted);
}

.aqi-tag {
  padding-inline: 0.3rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-tint-photo) 70%, var(--color-surface));
  font-size: var(--text-2xs);
}

.today-stamp {
  flex: none;
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
  white-space: nowrap;
}

.sos-card {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  border: var(--rule-hair) solid color-mix(in srgb, var(--color-danger) 25%, var(--color-surface));
  color: var(--color-danger);
  text-decoration: none;
}

.sos-mark .icon {
  width: 1.35rem;
  height: 1.35rem;
}

.sos-text {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.45;
}

.sos-chevron {
  width: 1rem;
  height: 1rem;
  flex: none;
}

/* Horizontal rails scroll natively; nothing here moves on its own.
 * Cards are sized so the third one always shows a 46 px sliver against the gutter. The old
 * 140 px card left 110 px of the next card visible, which reads as content falling off the
 * edge rather than as a rail you can push. scroll-padding keeps a snapped card off the
 * screen edge. */
.card-rail {
  display: flex;
  margin: 0;
  padding-inline: var(--space-gutter);
  padding-block: var(--space-2xs) var(--space-xs);
  gap: var(--space-xs);
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
  scroll-snap-type: inline mandatory;
  scroll-padding-inline: var(--space-gutter);
  overscroll-behavior-inline: contain;
  /* The peeking card is a vertical slice, so its name is always cut mid-word. Dissolving
   * the last 40 px turns that slice into an edge that reads as "there is more" instead of
   * a label that failed to fit. */
  mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
}

.card-rail::-webkit-scrollbar {
  display: none;
}

/* Fluid so the peek stays constant: two whole cards plus roughly 40 px of the third at any
 * phone width, rather than a fixed card that leaves 3 px of peek at 360 and 110 at 430. */
.place-card {
  min-width: clamp(8.75rem, 40vw, 10.75rem);
  width: clamp(8.75rem, 40vw, 10.75rem);
  scroll-snap-align: start;
}

.place-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
  color: inherit;
  text-decoration: none;
}

.place-photo {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.place-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-body {
  display: grid;
  padding: var(--space-2xs) var(--space-xs) var(--space-xs);
  gap: 0.15rem;
}

.place-name {
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-meta {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
}

.chip {
  padding-inline: 0.35rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-2xs);
  font-weight: 600;
}

.chip--open {
  background: color-mix(in srgb, var(--color-success) 18%, var(--color-surface));
  color: var(--color-success);
}

.chip--soon {
  background: var(--color-surface-sunken);
  color: var(--color-ink-muted);
}

.wide-cta {
  display: flex;
  min-height: var(--size-control);
  margin-inline: var(--space-md);
  padding-inline: var(--space-sm);
  gap: var(--space-xs);
  align-items: center;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.wide-cta__chevron {
  margin-inline-start: auto;
  width: 1.1rem;
  height: 1.1rem;
}

/* Passport: progress only, no numbers counting up. */
.passport {
  padding-block: var(--space-md) var(--space-xs);
  padding-inline: var(--space-md);
}

.passport-card {
  display: grid;
  padding: var(--space-sm);
  gap: var(--space-xs);
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
}

.passport-head {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
}

.passport-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: var(--lh-title);
}

.passport-count {
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
}

.passport-bar {
  height: 0.5rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
}

.passport-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary-bright);
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
}

.passport-cta {
  display: inline-flex;
  min-height: 2.25rem;
  padding-inline: var(--space-md) var(--space-sm);
  gap: var(--space-2xs);
  align-items: center;
  justify-self: start;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.passport-cta .icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* Vertical rhythm, set in one place. Every section opens with the same step and closes with
 * the same breathing room, so the gap between any two of them is identical no matter what
 * each one contains. Before this the gaps ran 14 / 19 / 24 / 16 / 24 / 16 / 24 px, because
 * three sections had no bottom padding at all and the spacing was whatever the next
 * section's top padding happened to be. */
.lanes,
.featured,
.today,
.nearby,
.passport,
.eat,
.news {
  padding-block: var(--space-section) var(--space-xs);
}

/* Opens tighter: it sits directly under the collage, which bleeds into it. */
.lanes {
  padding-block: var(--space-section-tight) var(--space-2xs);
}

/* Closes like every other section: the rail's own 8 px of shadow room sits inside it. */
.eat {
  padding-block-end: var(--space-xs);
}

/* News: civic information, plainly set. */
.news-lead {
  display: grid;
  margin-inline: var(--space-md);
  overflow: hidden;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
  color: inherit;
  text-decoration: none;
}

.news-photo {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.news-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-body,
.news-item {
  display: grid;
  padding: var(--space-xs) var(--space-sm) var(--space-sm);
  gap: 0.2rem;
}

.news-kicker {
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
  font-weight: 600;
}

.news-headline {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
}

.news-list {
  margin: var(--space-xs) var(--space-md) 0;
  padding: 0;
  list-style: none;
}

.news-item {
  border-block-start: var(--rule-hair) solid var(--color-border);
  color: inherit;
  text-decoration: none;
}

.news-list li:first-child .news-item {
  border-block-start: 0;
}

/* Footer: the issuing authority, stated plainly. */
.site-footer {
  display: grid;
  padding-block: var(--space-section) var(--space-md);
  padding-inline: var(--space-gutter);
  gap: 0.2rem;
  justify-items: center;
  border-block-start: var(--rule-hair) solid var(--color-border);
  text-align: center;
}

.footer-seal {
  width: 2.75rem;
  height: 2.75rem;
  margin-block-end: var(--space-2xs);
  object-fit: contain;
}

.footer-owner {
  font-size: var(--text-sm);
  font-weight: 600;
}

.footer-line {
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
}

.footer-line a {
  color: inherit;
}

.sr-only {
  position: absolute;
  inset-block-start: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover,
  .lane-button:hover,
  .nav-item:hover {
    transform: translateY(-1px);
  }

  .trip-cta:hover {
    background: var(--color-ink);
    transform: translateY(-1px);
  }

  .carousel-dot:hover {
    background: var(--color-primary);
  }
}

@media (max-width: 22rem) {
  .app-header {
    padding-inline: var(--space-sm);
    grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
  }

  .icon-button {
    width: 2.5rem;
    height: 2.5rem;
  }

  .wordmark {
    font-size: clamp(1.75rem, 9vw, 2rem);
  }

  .trip-copy {
    padding: var(--space-xs) var(--space-2xs) var(--space-xs) var(--space-sm);
  }

  .trip-badge {
    padding-inline: var(--space-xs);
    font-size: 0.6875rem;
  }

  .trip-copy h2 {
    white-space: normal;
    font-size: var(--text-base);
    line-height: 1.35;
  }

  .trip-description {
    font-size: 0.6875rem;
    line-height: 1.45;
  }

  .trip-cta {
    min-width: 5.75rem;
    min-height: 2.5rem;
    font-size: var(--text-sm);
  }
}

@media (min-width: 40rem) {
  body {
    padding-block: var(--space-lg);
  }

  .app-shell {
    min-height: calc(100svh - (2 * var(--space-lg)));
    border-radius: var(--radius-sheet);
    box-shadow: var(--shadow-float);
  }

  .bottom-nav {
    border-radius: var(--radius-card) var(--radius-card) var(--radius-sheet) var(--radius-sheet);
  }
}

/* Welcome entrance — plays once on load. transform/opacity only per the motion ceiling.
 * fill-mode backwards: hidden through its delay, then releases to natural styles so the
 * .pressable hover/active transforms keep working after the sequence ends.
 * Easy mode: <html data-entrance="off"> removes the whole sequence. */
@media (prefers-reduced-motion: no-preference) {
  /* Real spring settle where the browser supports linear(); the shorthand's ease-out
   * stays as the fallback because an unsupported override is dropped alone. */
  html:not([data-entrance="off"]) .app-shell {
    animation: enter-fade 180ms linear backwards;
  }

  html:not([data-entrance="off"]) .app-header {
    animation: enter-fade-down var(--dur-long) var(--ease-out) backwards;
  }

  html:not([data-entrance="off"]) .wordmark::after {
    transform-origin: left center;
    animation: enter-underline 400ms var(--ease-out) 480ms backwards;
  }

  html:not([data-entrance="off"]) .wordmark__sparkles {
    animation: enter-sparkle 420ms var(--ease-out) 700ms backwards;
    animation-timing-function: linear(0, 0.25, 0.6, 0.9, 1.06 55%, 1.02 72%, 0.99 86%, 1);
  }

  /* The layer carries the rise; the four photos only fade, staggered. Transforming them
   * individually would slide the traced seams apart for the length of the entrance. */
  html:not([data-entrance="off"]) .collage-layer {
    animation: enter-shot 520ms var(--ease-out) 120ms backwards;
  }

  html:not([data-entrance="off"]) .hero-shot {
    animation: enter-fade 420ms var(--ease-out) backwards;
  }

  html:not([data-entrance="off"]) .hero-shot--raft { animation-delay: 140ms; }
  html:not([data-entrance="off"]) .hero-shot--temple { animation-delay: 210ms; }
  html:not([data-entrance="off"]) .hero-shot--oldtown { animation-delay: 280ms; }
  html:not([data-entrance="off"]) .hero-shot--market { animation-delay: 350ms; }

  html:not([data-entrance="off"]) .speech-bubble {
    transform-origin: 62% 100%;
    animation: enter-pop 440ms var(--ease-out) 560ms backwards;
    animation-timing-function: linear(0, 0.06, 0.25, 0.55, 0.85, 1.05 60%, 1.02 75%, 0.995 88%, 1);
  }

  html:not([data-entrance="off"]) .doodle-heart {
    animation: enter-heart 380ms var(--ease-out) 880ms backwards;
    animation-timing-function: linear(0, 0.3, 0.7, 1.08 52%, 1.02 70%, 0.99 85%, 1);
  }

  html:not([data-entrance="off"]) .section-heading {
    animation: enter-fade-up var(--dur-long) var(--ease-out) 500ms backwards;
  }

  html:not([data-entrance="off"]) .lane-button {
    animation: enter-fade-up 420ms var(--ease-out) backwards;
    animation-timing-function: linear(0, 0.3, 0.65, 0.92, 1.03 68%, 1.005 84%, 1);
  }

  html:not([data-entrance="off"]) .lane-button:nth-child(1) { animation-delay: 560ms; }
  html:not([data-entrance="off"]) .lane-button:nth-child(2) { animation-delay: 600ms; }
  html:not([data-entrance="off"]) .lane-button:nth-child(3) { animation-delay: 640ms; }
  html:not([data-entrance="off"]) .lane-button:nth-child(4) { animation-delay: 680ms; }
  html:not([data-entrance="off"]) .lane-button:nth-child(5) { animation-delay: 720ms; }
  html:not([data-entrance="off"]) .lane-button:nth-child(6) { animation-delay: 760ms; }

  html:not([data-entrance="off"]) .trip-card {
    animation: enter-card 460ms var(--ease-out) 720ms backwards;
    animation-timing-function: linear(0, 0.3, 0.65, 0.92, 1.02 70%, 1.002 85%, 1);
  }

  html:not([data-entrance="off"]) .carousel-dots {
    animation: enter-fade 300ms var(--ease-out) 920ms backwards;
  }

  html:not([data-entrance="off"]) .bottom-nav {
    animation: enter-nav 460ms var(--ease-out) 120ms backwards;
    animation-timing-function: linear(0, 0.35, 0.72, 0.95, 1.02 72%, 1.002 86%, 1);
  }
}

/* Ambient life — runs forever once the entrance has landed, so the screen never sits
 * completely dead. transform/opacity only, every loop slow and low-amplitude, each with a
 * different period so the composition never pulses in unison. `data-ambient="off"` stops
 * it for easy mode; reduced motion stops it below. */
/* Ambient life, deliberately down to ONE loop.
 *
 * An earlier pass ran eleven infinite animations here. A consult read that as restless
 * rather than alive, and it broke the locked ceiling of two heavy animations per screen:
 * four separately drifting decoded JPEGs pin a lot of texture memory, doodles that never
 * stop reading as fidgety, and a notification dot that pings forever stops meaning
 * "something new". What survives is the photography itself breathing — the one loop that
 * actually makes the screen feel awake — plus a finite, event-driven notification pulse.
 *
 * The drift moves the shared collage layer, never the four photos individually, so the
 * traced seams stay locked together. */
@media (prefers-reduced-motion: no-preference) {
  /* The breath runs on its own box, never on .collage-layer: the observer pauses this loop
   * by setting animation-play-state, and that property is per element, so sharing an
   * element with the entrance would freeze the entrance too. */
  html:not([data-ambient="off"]):not([data-easy="on"]):not([data-season="royal"]):not([data-season="mourning"]) .collage-breath {
    animation: breathe 9s var(--ease-in-out) 1600ms infinite alternate;
  }

  /* Second loop, and the last one this screen gets. 40 s at 4.5% moved the collage by
   * 0.005 of scale every second and a half, which is below what an eye reads as motion —
   * the screen was technically animated and visibly dead. */
  html:not([data-ambient="off"]):not([data-easy="on"]):not([data-season="royal"]):not([data-season="mourning"]) .doodle-heart {
    animation:
      enter-heart 380ms var(--ease-out) 880ms backwards,
      drift-heart 3.2s var(--ease-in-out) 1400ms infinite alternate;
    animation-timing-function:
      linear(0, 0.3, 0.7, 1.08 52%, 1.02 70%, 0.99 85%, 1),
      var(--ease-in-out);
  }

  html:not([data-ambient="off"]):not([data-easy="on"]) .notification-dot[data-new] {
    animation: ping 1.2s var(--ease-out) 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* No sliding, no auto-advance: the dots still change the slide, instantly. */
  .trip-track {
    transition: none;
  }
}

/* Starts from the entrance's resting transform so there is no jump when it takes over.
 * 3% over 9 s is about 1.4 px a second on a 430 px screen — a slow inhale you can see,
 * still far under anything that would pull attention off the copy. */
@keyframes breathe {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-0.9%) scale(1.03); }
}

/* Base transform is rotate(12deg), which is where enter-heart lands, so the drift takes
 * over without a jump. */
@keyframes drift-heart {
  from { transform: rotate(12deg) translateY(0); }
  to { transform: rotate(4deg) translateY(-7px); }
}

@keyframes ping {
  0%, 70%, 100% { transform: scale(1); opacity: 1; }
  35% { transform: scale(1.5); opacity: 0.7; }
}

/* Below-fold sections settle once, when they first scroll into view. The class is only
 * added by script when motion is allowed, so a no-JS or reduced-motion visitor simply
 * sees the finished screen. */
.reveal[data-reveal="pending"] {
  opacity: 0;
  transform: translateY(8px);
}

.reveal[data-reveal="in"] {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 260ms var(--ease-out),
    transform 260ms var(--ease-out);
}

@keyframes enter-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes enter-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes enter-fade-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes enter-shot {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes enter-pop {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-3deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes enter-card {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes enter-underline {
  from { transform: rotate(-4deg) scaleX(0); }
  to { transform: rotate(-4deg) scaleX(1); }
}

@keyframes enter-sparkle {
  from {
    opacity: 0;
    transform: rotate(8deg) scale(0);
  }

  to {
    opacity: 1;
    transform: rotate(8deg) scale(1);
  }
}

@keyframes enter-heart {
  from {
    opacity: 0;
    transform: rotate(12deg) scale(0);
  }

  to {
    opacity: 1;
    transform: rotate(12deg) scale(1);
  }
}

@keyframes enter-nav {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  /* Cut movement outright rather than compressing it: a shortened drift still ends
   * somewhere other than where it started, and `transform: none` would flatten the
   * intentional static rotations on the doodles and the photo sticker. */
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── The 10/10 pass (2026-08-15) — patterns earned by the 102-app study ────
 * Every block cites its evidence. Nothing here adds a perpetual animation:
 * the two-loop budget was spent by the collage breath and the heart drift. */

/* 1 · Search-first (every one of the 102 apps opens with search or a grid). */
.search-zone {
  padding-inline: var(--space-gutter);
  padding-block-end: var(--space-sm);
}

.search-pill {
  display: flex;
  width: 100%;
  min-height: var(--size-control);
  padding-inline: var(--space-sm);
  gap: var(--space-xs);
  align-items: center;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.search-pill .icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
  color: var(--color-primary);
}

.search-pill span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 2 · Card meta: number + word beats bare stars (Booking "8.9 Fabulous"),
 * and the heart is the save affordance every travel app agrees on (Airbnb). */
.place-card {
  position: relative;
}

.place-rating {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  font-size: var(--text-2xs);
  font-weight: 600;
}

.place-rating .star {
  color: var(--color-primary-bright);
}

.save-heart {
  position: absolute;
  z-index: 2;
  inset-block-start: 0.4rem;
  inset-inline-end: 0.4rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  color: var(--color-primary);
  box-shadow: var(--shadow-control);
  cursor: pointer;
}

.save-heart .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.save-heart[aria-pressed="true"] .icon {
  fill: var(--color-primary-bright);
  stroke: var(--color-primary-bright);
}

/* 10 · Distance-ranked numerals (Fever's Top-10 outlined figures): the rail is
 * already sorted nearest-first, so the numbers state a true order. */
.place-photo {
  position: relative;
}

.rank-num {
  position: absolute;
  inset-block-end: 0.1rem;
  inset-inline-start: 0.35rem;
  color: transparent;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  paint-order: stroke fill;
  -webkit-text-stroke: 2.5px var(--color-surface);
}

/* 6 · Filter chips (Michelin's All/New/Distinctions row; Wongnai's category row).
 * Selected chip = filled ink pill, the quiet-authority treatment. */
.filter-row {
  display: flex;
  padding-inline: var(--space-gutter);
  padding-block-end: var(--space-xs);
  gap: var(--space-xs);
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: none;
  min-height: 2rem;
  padding-inline: var(--space-sm);
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

.filter-chip[aria-pressed="true"] {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-surface);
}

/* 5 · Trip meta trio + best-slide tag (Amazing Thailand's floating day chip,
 * Trip.com's "Cheapest" ribbon, Roadtrippers' duration/stops trio). */
.trip-meta-chip {
  position: absolute;
  inset-block-end: 0.5rem;
  inset-inline-start: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface) 86%, transparent);
  color: var(--color-ink);
  white-space: nowrap;
  font-size: var(--text-2xs);
  font-weight: 600;
}

.photo-tag {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary-bright);
  color: var(--color-on-primary);
  white-space: nowrap;
  font-size: var(--text-2xs);
  font-weight: 700;
}

/* 9 · The weather line says something (Discover HK's weather-driven pick;
 * NAVER's freshness stamp). Overrides the flex row above. */
.today-card {
  display: grid;
  gap: var(--space-2xs);
}

.today-row {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
  justify-content: space-between;
}

.today-hint {
  color: var(--color-ink);
  font-size: var(--text-xs);
  line-height: 1.45;
}

/* 7 · The old town as a hand-drawn object (Tokyo Disney's illustrated map,
 * Polarsteps' route line, IHG's category-coloured pins). */
.map-card {
  display: flex;
  margin-inline: var(--space-gutter);
  overflow: hidden;
  align-items: stretch;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
  color: inherit;
  text-decoration: none;
}

.map-doodle {
  display: block;
  flex: none;
  width: 8.25rem;
  background: color-mix(in srgb, var(--color-tint-chill) 42%, var(--color-surface));
}

.map-doodle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mm-river {
  stroke: var(--color-ink);
  stroke-width: 2.2;
  opacity: 0.45;
}

.mm-path {
  stroke: var(--color-primary-bright);
  stroke-width: 2;
  stroke-dasharray: 1 6;
}

.mm-ink {
  stroke: var(--color-ink);
  stroke-width: 1.8;
  opacity: 0.7;
}

.mm-pin {
  stroke: var(--color-ink);
  stroke-width: 1.8;
}

.mm-pin--food { fill: var(--color-tint-food); }
.mm-pin--oldtown { fill: var(--color-tint-oldtown); }
.mm-pin--merit { fill: var(--color-tint-merit); }
.mm-pin--photo { fill: var(--color-tint-photo); }

.map-copy {
  display: grid;
  min-width: 0;
  padding: var(--space-sm);
  gap: var(--space-3xs);
  align-content: center;
}

.map-copy strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0;
}

.map-copy > span:not(.map-go) {
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
  line-height: 1.4;
}

.map-go {
  display: inline-flex;
  margin-block-start: var(--space-3xs);
  gap: var(--space-2xs);
  align-items: center;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
}

.map-go .icon {
  width: 1rem;
  height: 1rem;
}

/* 3 · The passport as a ticket (The 1's perforated coupons, GetYourGuide's
 * ticket frame, Grab's always-visible count, Sweatcoin's ring, LEGOLAND's
 * mark-as-done trail, Swarm's stamps-are-memories voice). */
.passport-card {
  position: relative;
  overflow: hidden;
}

.passport-watermark {
  position: absolute;
  z-index: 0;
  inset-block-start: -0.5rem;
  inset-inline-end: -1rem;
  width: 7.5rem;
  fill: none;
  stroke: var(--color-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.07;
  pointer-events: none;
}

.passport-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.passport-ring {
  width: 3.9rem;
  height: 3.9rem;
  flex: none;
}

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 4;
}

.ring-track {
  stroke: var(--color-surface-sunken);
}

/* 7 of 24 → 33 of the r=18 circle's 113.1 circumference, opening at 12 o'clock. */
.ring-fill {
  stroke: var(--color-primary-bright);
  stroke-linecap: round;
  stroke-dasharray: 33 80.1;
  transform: rotate(-90deg);
  transform-origin: center;
}

.ring-num,
.ring-den {
  fill: var(--color-ink);
  stroke: none;
  font-family: var(--font-display);
  text-anchor: middle;
}

.ring-num {
  font-size: 13px;
  font-weight: 700;
}

.ring-den {
  fill: var(--color-ink-muted);
  font-size: 7px;
  font-weight: 600;
}

.passport-copy {
  display: grid;
  min-width: 0;
  gap: var(--space-3xs);
}

.passport-line {
  font-size: var(--text-xs);
  line-height: 1.45;
}

/* Thai phrases have no internal spaces, so the dictionary may split them mid-word;
 * same defence the trip titles use. */
.nowrap {
  white-space: nowrap;
}

.passport-hint {
  color: var(--color-success);
  font-size: var(--text-2xs);
  font-weight: 600;
}

.stamp-strip {
  position: relative;
  z-index: 1;
  display: flex;
  padding-block-start: var(--space-3xs);
  justify-content: space-between;
}

.st {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface-sunken);
}

.st.is-on {
  border-color: var(--color-primary-bright);
  background: var(--color-primary-bright);
}

/* The tear line: dashed rule plus two canvas notches that the card's own
 * overflow clips into half-moons, exactly like a coupon stub. */
.perf-line {
  position: relative;
  margin-block: var(--space-2xs) 0;
  margin-inline: calc(-1 * var(--space-sm));
  border-block-start: 2px dashed var(--color-border);
}

.perf-line::before,
.perf-line::after {
  position: absolute;
  inset-block-start: -0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--color-canvas);
  content: "";
}

.perf-line::before { inset-inline-start: -0.5rem; }
.perf-line::after { inset-inline-end: -0.5rem; }

.passport-cta {
  position: relative;
  z-index: 1;
}

/* 4 · Real dates make real urgency (Shopee's countdown, TripIt's "in N days",
 * DICE's time buckets) — the chip counts to an actual municipal event. */
.news-photo {
  position: relative;
}

.event-count {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary-bright);
  color: var(--color-on-primary);
  white-space: nowrap;
  font-size: var(--text-2xs);
  font-weight: 700;
}

/* 8 · The town on one line (Pizza Company's skyline divider; MK's line-art
 * watermark carries the same duty inside the passport card above). */
.skyline-divider {
  display: flex;
  padding-block: var(--space-section) 0;
  padding-inline: var(--space-gutter);
  justify-content: center;
  background: var(--color-canvas);
}

.skyline-divider svg {
  width: min(100%, 22.5rem);
  height: 2.75rem;
  fill: none;
  stroke: var(--color-ink-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

/* The search pill joins the entrance choreography between the heading and the
 * lane tiles — one-shot, so it spends nothing from the two-loop budget. */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-entrance="off"]) .search-pill {
    animation: enter-fade-up 420ms var(--ease-out) 520ms backwards;
  }
}
