/* 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)
 */
/* tokens.css is linked directly in every <head> so it does not wait for this file to
 * parse; the import stays as the fallback for anything loading styles.css alone. */
/* tokens.css is linked first in every page head — an @import here fetched it a second
   time under a stale version key that no build bump ever touched. */

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

/* Owner 2026-09-07: remove sample/demo presentation across the app. These are
 * annotation-only nodes; their surrounding content and runtime audience stay intact. */
[data-preview-banner],
[data-presentation-note],
.ux13-preview-note,
.ux13-sample-chip,
.ux13-inline-sample,
.checkin-v3-preview-label,
.checkin-v3-result-preview-label,
.news-demo,
.route-section-sample,
.route-action-sample,
.merchant-truth,
.merchant-adjacent-truth,
.merchant-hero__sample,
.stay-sample-badge,
.stay-preview-truth,
.ux14-truth-banner,
.ux14-sample-label,
.chip--sample,
.prototype-note,
.footer-line--proto,
.route-v3-truth,
.route-sample-label,
.stay-result__photo-label,
.ux14-news-preview,
.ux14-news-publisher,
.ux14-weather-future,
.search-preview-note {
  display: none !important;
}

html,
body {
  /* Tab must never park a control behind the fixed bottom bar: the browser scrolls a focused
   * element into view. app-core measures the active nav surface (including its safe-area
   * padding), adds a 17 px measured reserve (guaranteeing at least 16 px after rounding),
   * and writes this one shared reserve. */
  scroll-padding-block-end: var(--uthai-nav-reserve, 0px);
  min-height: 100%;
  overflow-x: clip;
}

/* No-nav pages start at zero. :has() gives nav pages a safe pre-JS estimate; ResizeObserver
 * replaces it with the real block size before any mode/zoom-dependent decision is made. */
:root {
  --uthai-nav-reserve: 0px;
}

html:has(.bottom-nav) {
  --uthai-nav-reserve: calc(var(--size-nav) + var(--space-md) + env(safe-area-inset-bottom, 0px));
}

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;
}

/* ROOT CAUSE of "a box flashes on every tap, mobile/device-mode only" (owner, 2026-08-16,
 * seen on this app, webuthai and the LIFF alike): Chrome on touch paints its own
 * -webkit-tap-highlight-color — default rgba(0,0,0,0.18), a grey slab over the tapped
 * element — and holds it until the next page paints. It never appears with a mouse, which
 * is why the desktop web looked fine. It was switched off on <button> only; every <a> —
 * the tiles, the cards, the bottom nav — still had it. Off everywhere something is tapped.
 * Global press scaling is deliberately absent: shrinking almost every control looked like
 * another flash even after the native highlight was removed. */
a,
button,
[role="button"],
[role="tab"],
[tabindex],
label,
input,
summary {
  -webkit-tap-highlight-color: transparent;
  /* Also removes the double-tap-to-zoom wait Chrome inserts before a touch tap fires,
     which is the other half of "every tap feels slow" on a phone. Pinch-zoom still works. */
  touch-action: manipulation;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

h1,
h2,
h3 {
  min-width: 0;
  /* break-word, not anywhere: Thai headings wrap at dictionary word boundaries first and only
   * split inside a word when that single word is wider than its box. `anywhere` also lowered
   * min-content to one letter, which let a squeezed grid column stack a heading one glyph per line. */
  overflow-wrap: break-word;
  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: var(--uthai-nav-reserve, 0px);
  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:
    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. */
/* Chrome draws its OWN ring whenever :focus-visible matches and no author rule paints one,
 * and in an installed PWA it matches on a plain tap — which is the box the owner saw appear
 * for a moment before each page loaded. Author rings are scoped to a keyboard session
 * (html[data-input="key"], set in app.js), so outside one the ring is switched off here,
 * engine default included. */
html:not([data-input="key"]) :focus,
html:not([data-input="key"]) :focus-visible {
  outline: none;
}

/* NO RING ON THE CONTAINERS THE APP FOCUSES ITSELF (owner, 2026-08-16: the boxes looked
   awful). These carry tabindex="-1": they are not tab stops, nobody arrives at them by
   pressing Tab, and a screen reader announces them on arrival regardless — so the rectangle
   was decoration on a moment that is already explained out loud. Real controls keep their
   :focus-visible ring below, which only ever appears for a keyboard. */
html[data-input="key"] .confirm-card:focus-visible,
html[data-input="key"] .ticket-sheet__card:focus-visible,
html[data-input="key"] .map-place-card:focus-visible,
html[data-input="key"] .redeem-result:focus-visible,
html[data-input="key"] .merchant-panel:focus-visible,
html[data-input="key"] .onboard-step:focus-visible,
html[data-input="key"] .stay-row:focus-visible,
html[data-input="key"] [data-notif="unread"]:focus-visible,
html[data-input="key"] [data-account="guest"]:focus-visible,
html[data-input="key"] .balance-value:focus-visible,
html[data-input="key"] .place-row:focus-visible,
html[data-input="key"] .map-shell:focus-visible,
html[data-input="key"] [data-map-shell]:focus-visible {
  outline: none;
}

html[data-input="key"] .pressable:focus-visible,
html[data-input="key"] .link-more:focus-visible,
html[data-input="key"] .policy-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

html[data-input="key"] .icon-button:focus-visible,
html[data-input="key"] .nav-item:focus-visible,
html[data-input="key"] .save-heart:focus-visible,
html[data-input="key"] .switch:focus-visible {
  outline-offset: -2px;
}

/* A round control reads better with the ring following its edge. */
html[data-input="key"] .icon-button:focus-visible,
html[data-input="key"] .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. */
/* The six intent tiles sit in a static grid (nothing clips them), so the ring follows the whole
 * tile — label included — like every other control, not just the icon disc. */
html[data-input="key"] .lane-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

html[data-input="key"] .filter-chip:focus-visible,
html[data-input="key"] .guide-card:focus-visible,
html[data-input="key"] .place-link:focus-visible,
html[data-input="key"] .place-row__link:focus-visible,
html[data-input="key"] .place-lead:focus-visible,
html[data-input="key"] .view-button:focus-visible {
  outline-offset: -2px;
}

/* Navigation deliberately has no cross-document fade. It used to fade the old root to zero,
 * start the new root at zero and also dim the tapped link; together those three layers looked
 * like a screen flash on every internal navigation. The former global :active scale also made
 * 68 of 71 controls visibly shrink on touch. Immediate, stable controls are calmer. */

/* A disabled control here still carries a sentence the reader needs — "อีก 40 แต้มจะแลกได้"
 * — so it steps back in colour rather than in opacity, which would drop that text under 3:1
 * on a phone held outdoors. */
.pressable:disabled,
.pressable[aria-disabled="true"] {
  cursor: not-allowed;
  border-color: var(--color-border);
  background: var(--color-surface-sunken);
  color: var(--color-ink-muted);
  box-shadow: none;
}

.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(1rem, env(safe-area-inset-top));
  padding-block-end: 0.65rem;
  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;
  max-inline-size: 100%;
  white-space: normal;
  text-align: center;
  overflow-wrap: normal;
  font-family: var(--font-display);
  /* The wordmark is a mark, not body text. At a large user text size the two header controls
   * grow with the reader, so the mark shrinks toward the room left between them instead of
   * wrapping into three lines; at the default size every term below resolves above the token
   * and nothing changes. A break, if one is ever forced, falls between the two words only. */
  /* 6.6 = the measured width of "เที่ยวเมืองอุทัย" in the display face, in em. */
  --wordmark-room: calc((100vw - 2 * var(--size-control) - 2 * var(--space-gutter) - 0.5rem) / 6.6);
  font-size: max(16px, min(var(--text-wordmark), 9.5vw, var(--wordmark-room)));
  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 {
  display: inline-block;
  max-inline-size: 100%;
  color: var(--color-ink);
}

/* ADR-023: Latin wordmarks need a word space the Thai one does not; both spans are inline-block. */
html:not([lang="th"]) .wordmark__uthai { margin-inline-start: 0.22em; }
.wordmark__uthai {
  display: inline-block;
  max-inline-size: 100%;
  color: var(--color-primary-bright-ink);
}

.wordmark__sparkles {
  position: absolute;
  inset-block-start: -0.7rem;
  inset-inline-end: -0.85rem;
  width: clamp(1.2rem, 5vw, 1.7rem);
  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);
}

/* UX-14: no public notification feed exists. Default-hidden also covers /home before its
 * deferred script can stamp the feature state; app-core removes each dormant dot from DOM. */
html:not([data-notifications="on"]) .notification-dot {
  display: none;
}

.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%;
  /* Reserve the selected frame even before the deferred video enhancement runs. */
  height: clamp(222px, 61vw, 258px);
  overflow: visible;
}

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

.hero-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Every figure spans the whole collage box and carries one of the four jigsaw clip
 * paths; its photograph is then placed inside its own quadrant with a bleed, so the
 * interlocking edge always cuts through picture, never through background. */
.hero-shot img {
  position: absolute;
  max-width: none;
  object-fit: cover;
}

.hero-shot--raft {
  clip-path: url("#jig-tl");
}

.hero-shot--raft img {
  inset-block-start: -2%;
  inset-inline-start: -2%;
  width: 60%;
  height: 56%;
  object-position: 50% 62%;
}

.hero-shot--temple {
  clip-path: url("#jig-tr");
}

.hero-shot--temple img {
  inset-block-start: -2%;
  inset-inline-start: 50%;
  width: 52%;
  height: 56%;
  object-position: 52% 46%;
}

.hero-shot--oldtown {
  clip-path: url("#jig-bl");
}

.hero-shot--oldtown img {
  inset-block-start: 44%;
  inset-inline-start: -2%;
  width: 52%;
  height: 60%;
  object-position: 38% 55%;
}

.hero-shot--market {
  clip-path: url("#jig-br");
}

.hero-shot--market img {
  inset-block-start: 44%;
  inset-inline-start: 38%;
  width: 64%;
  height: 60%;
  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: 7;
  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;
}

/* Home video enhancement: the original collage remains the no-script fallback.
 * Keep its labelled heading available without placing copy over the footage. */
.hero-collage--video {
  isolation: isolate;
}

.hero-collage--video > .collage-layer,
.hero-collage--video > .doodle-heart {
  display: none;
}

.hero-collage--video > .speech-bubble {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  background: transparent;
  box-shadow: none;
  animation: none !important;
}

.hero-collage--video > .speech-bubble::after {
  content: none;
}

.hero-collage--video .home-hero-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--color-surface-sunken);
}

.hero-collage--video .home-hero-video__poster,
.hero-collage--video .home-hero-video__media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-collage--video .home-hero-video__media {
  z-index: 1;
}

.hero-collage--video .home-hero-video__media[hidden],
.hero-collage--video .home-hero-video__toggle[hidden] {
  display: none;
}

/* Exact lower-edge curve from the original collage; the canvas token supplies its colour. */
.hero-collage--video::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset-inline: 0;
  inset-block-end: -1px;
  height: 27px;
  background: var(--color-canvas);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 440 552 48' preserveAspectRatio='none'%3E%3Cpath d='M-12 500V470C40 452 96 486 152 476C208 466 236 442 292 452C348 462 372 490 428 480C470 472 520 448 566 462V500Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.hero-collage--video .home-hero-video__toggle {
  position: absolute;
  z-index: 2;
  inset-inline-end: 12px;
  inset-block-end: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgb(255 251 245 / 65%);
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-surface);
  box-shadow: 0 2px 8px rgb(14 71 71 / 18%);
  font: 600 0.75rem / 1.4 var(--font-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-collage--video .home-hero-video__toggle svg {
  flex: none;
  width: 20px;
  height: 20px;
}

/* Owner 2026-09-14: the play/pause control is icon-only; the text stays for assistive tech
 * (the button also carries aria-label), so it is hidden visually, not removed. */
.hero-collage--video .home-hero-video__toggle > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html[data-input="key"] .hero-collage--video .home-hero-video__toggle:focus-visible {
  outline: 3px solid var(--color-surface);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--color-ink);
}

@media (max-height: 740px) and (max-width: 639px) {
  .hero-collage {
    height: 204px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-collage--video,
  .hero-collage--video .home-hero-video,
  .hero-collage--video .home-hero-video__media,
  .hero-collage--video .home-hero-video__toggle {
    animation: none !important;
    transition: none !important;
  }
}

.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,
.section-heading h3 {
  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: grid;
  gap: var(--space-xs);
  overflow: visible;
  padding-inline: var(--space-md);
  padding-block-end: var(--space-2xs);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.lane-button {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 4.65rem;
  padding: 0;
  gap: var(--space-2xs);
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  scroll-snap-align: start;
  /* The tile became a link when /home was wired; it keeps the tile's own look. */
  text-decoration: none;
}

.lane-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  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;
}

/* Six task labels now sit in a real 3 × 2 grid, so they can use the body floor without
 * colliding with a seventh off-screen tile. */
.lane-button > span:last-child {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

/* Easy mode keeps the six tasks in reach: two columns, icon + full label, three rows.
 * The icon itself clears the 56 px target floor at the 112.5% root step. */
html[data-easy="on"] .lane-scroller {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-easy="on"] .lane-button {
  min-height: 3.5rem;
  gap: var(--space-xs);
  grid-template-columns: 3.125rem minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  text-align: start;
}

html[data-easy="on"] .lane-icon {
  width: 3.125rem;
  height: 3.125rem;
}

html[data-easy="on"] .lane-button > span:last-child {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 1rem;
  text-align: start;
}

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

.lane-button--food { --lane-tint: var(--color-tint-food); }
.lane-button--coffee { --lane-tint: var(--color-tint-coffee); }
.lane-button--chill { --lane-tint: var(--color-tint-chill); }
.lane-button--merit { --lane-tint: var(--color-tint-merit); }
.lane-button--oldtown { --lane-tint: var(--color-tint-oldtown); }
.lane-button--photo { --lane-tint: 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);
}

/* Four-persona native rail. At every supported width, one 225 px card leads and exactly 15%
 * of the next card remains visible: (rail width - 8 px gap) / 1.15. */
.featured.home-lane-band {
  padding-inline: 0;
  padding-block: var(--space-reference-feature-top) var(--space-xs);
}

.home-lane-band .home-lane-heading {
  display: flex;
  width: auto;
  max-width: none;
  min-height: var(--size-control);
  margin-inline: var(--space-gutter);
  margin-block-end: var(--space-3xs);
  gap: var(--space-sm);
  align-items: flex-start;
  justify-content: space-between;
}

.home-lane-heading__copy {
  display: grid;
  min-width: 0;
  /* Room for the hand-drawn swash under the title, which sits 0.15 rem below the title box. */
  gap: 0.4rem;
}

.home-lane-heading__title {
  position: relative;
  min-width: 0;
}

.home-lane-heading__swash {
  position: absolute;
  inset-block-start: calc(100% - 0.15rem);
  inset-inline-start: 0;
  margin: 0;
  pointer-events: none;
  color: var(--home-daypart-accent, var(--color-primary-bright));
}

.home-lane-heading__daypart {
  display: block;
  max-width: 13.5rem;
  color: var(--color-ink-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.home-lane-heading__link {
  flex: none;
  padding-inline: 0;
  white-space: nowrap;
}

.home-lane-grid {
  display: flex;
  width: calc(100% - (2 * var(--space-gutter)));
  margin: 0 var(--space-gutter);
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 8px;
  list-style: none;
  overscroll-behavior-inline: contain;
  scroll-behavior: auto;
  scroll-padding-inline: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y pinch-zoom;
}

.home-lane-grid::-webkit-scrollbar {
  display: none;
}

.home-lane-grid > li {
  flex: 0 0 calc((100% - 8px) / 1.15);
  height: 225px;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-lane-card {
  display: grid;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  grid-template-rows: 149px 76px;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  color: var(--color-ink);
  text-decoration: none;
}

.home-lane-card__photo {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.home-lane-card__photo > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-home-lane="food"] .home-lane-card__photo > img:first-child { object-position: center 55%; }
[data-home-lane="temple"] .home-lane-card__photo > img:first-child { object-position: center 45%; }
[data-home-lane="nature"] .home-lane-card__photo > img:first-child { object-position: center 25%; }
[data-home-lane="chill"] .home-lane-card__photo > img:first-child { object-position: center 35%; }

.home-lane-card__photo strong {
  position: absolute;
  z-index: 1;
  inset-inline: 8px auto;
  inset-block-end: 8px;
  max-width: calc(100% - (2 * var(--space-2xs)));
  padding: 0 var(--space-2xs);
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-surface);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-size: 0.75rem;
  line-height: 1.55;
}

.home-lane-card__photo > .home-lane-card__ornament {
  position: absolute;
  z-index: 1;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  width: clamp(64px, 17.5vw, 72px);
  height: clamp(64px, 17.5vw, 72px);
  object-fit: contain;
  pointer-events: none;
}

.home-lane-card__body {
  display: grid;
  min-width: 0;
  padding: var(--space-3xs) var(--space-sm);
  gap: 1px;
  align-content: center;
}

.home-lane-card__tagline,
.home-lane-card__route > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-lane-card__tagline {
  color: var(--color-ink-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.home-lane-card__route {
  display: grid;
  min-width: 0;
}

[data-home-route-name] {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

[data-home-route-meta] {
  color: var(--color-ink-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

/* A card that opens a named trip: the lane becomes a small tinted tag on the photograph and
 * the trip name is the title. A lane-only card (no resolvable route) keeps the ink pill. */
.home-lane-card[data-home-trip="route"] .home-lane-card__photo strong {
  inset-block: 8px auto;
  padding-inline: var(--space-xs);
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.7;
}

[data-home-lane="food"][data-home-trip="route"] .home-lane-card__photo strong { background: color-mix(in srgb, var(--color-tint-food) 75%, var(--color-surface)); }
[data-home-lane="temple"][data-home-trip="route"] .home-lane-card__photo strong { background: color-mix(in srgb, var(--color-tint-merit) 75%, var(--color-surface)); }
[data-home-lane="nature"][data-home-trip="route"] .home-lane-card__photo strong { background: color-mix(in srgb, var(--color-tint-chill) 75%, var(--color-surface)); }
[data-home-lane="chill"][data-home-trip="route"] .home-lane-card__photo strong { background: color-mix(in srgb, var(--color-tint-oldtown) 75%, var(--color-surface)); }

.home-lane-card[data-home-trip="route"] .home-lane-card__tagline {
  display: none;
}

.home-lane-card[data-home-trip="route"] [data-home-route-name] {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[data-input="key"] .home-lane-card:focus-visible {
  outline-offset: -3px;
}

.nearby-heading-trailing {
  position: relative;
  display: inline-block;
}

.nearby-heading-ripple {
  position: absolute;
  inset-block-start: calc(100% - 2px);
  inset-inline-start: 50%;
  width: 44px;
  height: 10px;
  fill: none;
  stroke: var(--home-daypart-accent, var(--color-primary-bright));
  stroke-width: 1.5;
  stroke-linecap: round;
  translate: -50% 0;
  pointer-events: none;
}

html[data-daypart="morning"] { --home-daypart-accent: var(--color-sun-500); }
html[data-daypart="day"] { --home-daypart-accent: var(--color-tint-chill); }
html[data-daypart="evening"] { --home-daypart-accent: var(--color-primary); }
html[data-daypart="night"] { --home-daypart-accent: var(--color-ink); }

html[data-easy="on"] .home-lane-grid {
  display: grid;
  overflow: visible;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(124px, auto));
  scroll-snap-type: none;
  touch-action: auto;
}

html[data-easy="on"] .home-lane-grid > li {
  height: auto;
  min-height: 124px;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
}

html[data-easy="on"] .home-lane-card {
  min-height: 124px;
  /* Tracks total 122 px; the card's two 1 px borders complete the settled 124 px row. */
  grid-template-rows: 48px minmax(74px, auto);
}

html[data-easy="on"] .home-lane-card__tagline {
  display: none;
}

html[data-easy="on"] [data-home-route-name] {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[data-easy="on"] .home-lane-card__photo strong,
html[data-easy="on"] [data-home-route-name] {
  font-size: 0.8125rem;
}

html[data-easy="on"] .home-lane-card__tagline,
html[data-easy="on"] [data-home-route-meta] {
  font-size: 0.75rem;
}

.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);
}

/* 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: 2px;
  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) 0;
  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;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: clamp(var(--text-xs), 3.4vw, var(--text-sm));
  font-weight: 600;
  line-height: 1.35;
}

/* The current-state contract: a tab root whose href IS this document carries
 * aria-current="page"; a section screen (place, route, routes, lanes, stay-shop,
 * checkin-success) highlights the tab it belongs to and carries an sr-only "หมวดที่อยู่"
 * SETTLED RULING (round 29 — do not flip again): aria-current="true" on the section-parent
 * item. "true" is the ARIA value for "current item in a set" and keeps the accessible name
 * identical to the visible label, which voice control must be able to say. An sr-only name
 * suffix was tried and rejected: it made the name diverge from the label. */
.nav-item.is-active {
  color: var(--color-primary);
}

.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);
  /* Off-screen on every first paint: the browser skips its layout until it scrolls up. */
  content-visibility: auto;
  contain-intrinsic-block-size: auto 12rem;
}

.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,
.section-heading--row h3 {
  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-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 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 {
  /* The fact stays whole; the sample stamp beside it is the part that may wrap. */
  flex: none;
  white-space: nowrap;
  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: 0 1 auto;
  min-width: 0;
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
  text-align: end;
  white-space: normal;
}

.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;
}

/* Home's last saved-place control must clear the existing edge fade. */
main.app-shell > :is(.nearby, .eat) .card-rail {
  padding-inline-end: calc(var(--space-gutter) + 2.5rem);
}

/* 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;
  /* The implicit auto track sizes to its nowrap content and overflows the fixed-width card
     silently; a clamped track keeps every line inside the tile, easy mode included. */
  grid-template-columns: minmax(0, 1fr);
  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 {
  /* The card's identity has to outrank its own meta line: at --text-xs it was the same 12 px
     as the two lines under it, and clipped mid-name on top of that. */
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.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);
}

/* A category word, not a status: outlined so a reader scanning a list column can tell the
 * label pills from the sunken เปิด/ปิด ones. */
/* The bottom nav is fixed and visible the whole time, but it is the last block in the DOM,
 * so a keyboard reader had to pass every row on the page to reach the control already in
 * front of them. The link is invisible until focused, then it is a real pill at the top. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html[data-input="key"] .skip-link:focus-visible,
.skip-link:focus {
  position: fixed;
  z-index: var(--z-tooltip);
  inset-block-start: var(--space-xs);
  inset-inline-start: var(--space-xs);
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: var(--size-control);
  margin: 0;
  padding-inline: var(--space-md);
  overflow: visible;
  align-items: center;
  clip-path: none;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.chip--label {
  border: var(--rule-hair) solid var(--color-border);
  background: transparent;
  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 :is(h1, 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;
  /* A progress fill is meaningful, not decorative: --color-primary-bright measured 2.77:1
     on the sunken track, under the 3:1 floor for non-text contrast. */
  background: var(--color-primary);
  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);
}

/* One visible door to the separate accommodation list, after the merchant rail. */
.home-door {
  display: flex;
  min-height: var(--size-control);
  margin: var(--space-2xs) var(--space-gutter) 0;
  overflow: hidden;
  gap: var(--space-sm);
  align-items: center;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
  color: inherit;
  text-decoration: none;
}

.home-door > img {
  width: 4.75rem;
  height: 4rem;
  flex: none;
  object-fit: cover;
}

.home-door__copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  padding-block: var(--space-2xs);
  gap: 0.1rem;
}

.home-door__copy strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.3;
}

.home-door__copy span {
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.home-door > .icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  margin-inline-end: var(--space-sm);
  color: var(--color-primary);
}

/* 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;
}

/* /home's ช่วงเวลา filter sets hidden on the lead, and the display rule above
 * outranks the user-agent [hidden] rule. */
.news-lead[hidden] {
  display: 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;
}

/* ASSET GAP (do not "fix" by upscaling): municipality-seal-96.png is 96 px and renders at
 * 44–50 CSS px, so its rim text softens at DPR 3. An official crest must come from the
 * municipality at higher resolution — redrawing or regenerating one would be inventing an
 * emblem. Every photograph in this product ships 160/480/768/1200; this is the one asset
 * that cannot, until the municipality supplies the file. */
.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-sm);
}

/* The prototype disclosure app.js appends to every footer. */
.footer-line--proto {
  margin-block-start: var(--space-2xs);
  font-style: italic;
}

/* Easy keeps the five tabs visible at 320 px by allocating width from their real copy.
 * พาสปอร์ต needs more than an equal fifth; ฉัน needs only the 44 px target floor. */
html[data-easy="on"] .bottom-nav {
  grid-template-columns: 1.12fr 1fr 1fr 1.32fr minmax(44px, 0.72fr);
}

/* At true measured overflow (including 200% text), the full strip remains measurable but
 * leaves the accessibility tree. The generated launcher owns the same fixed-bottom slot. */
html[data-nav-overflow="on"] .bottom-nav,
html[data-nav-keyboard="on"] .bottom-nav,
html[data-nav-keyboard="on"] .nav-overflow-dock {
  visibility: hidden;
  pointer-events: none;
}

.nav-overflow-dock {
  position: fixed;
  z-index: var(--z-sticky);
  inset-block-end: 0;
  inset-inline: 0;
  display: flex;
  width: min(100%, 26.875rem);
  margin-inline: auto;
  padding-block: var(--space-xs) max(var(--space-xs), env(safe-area-inset-bottom, 0px));
  padding-inline: var(--space-md);
  justify-content: center;
  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-overflow-dock[hidden],
.nav-overflow-sheet[hidden] {
  display: none;
}

.nav-overflow-launcher {
  min-width: min(100%, 18rem);
  min-height: 3.5rem;
  padding: var(--space-xs) var(--space-md);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
}

.nav-overflow-sheet {
  position: fixed;
  z-index: calc(var(--z-tooltip) + 1);
  inset: 0;
  display: grid;
  padding-block-start: max(var(--space-md), env(safe-area-inset-top, 0px));
  padding-block-end: max(var(--space-md), env(safe-area-inset-bottom, 0px));
  padding-inline: max(var(--space-md), env(safe-area-inset-left, 0px)) max(var(--space-md), env(safe-area-inset-right, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  justify-items: center;
  align-content: safe end;
  background: rgb(14 71 71 / 42%);
}

.nav-overflow-card {
  display: grid;
  width: min(100%, 26.875rem);
  min-inline-size: 0;
  max-inline-size: 100%;
  max-block-size: calc(100svh - (2 * var(--space-md)));
  padding: var(--space-lg) var(--space-md) var(--space-md);
  gap: var(--space-sm);
  overflow-y: auto;
  border-radius: var(--radius-sheet);
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
}

.nav-overflow-card h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--lh-title);
}

.nav-overflow-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: var(--space-xs);
  list-style: none;
}

.nav-overflow-link {
  display: flex;
  min-width: 0;
  min-height: 3.5rem;
  padding: var(--space-xs) var(--space-sm);
  gap: var(--space-xs);
  align-items: center;
  justify-content: space-between;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-base);
  font-weight: 700;
  text-decoration: none;
}

.nav-overflow-link[aria-current] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.nav-overflow-current {
  flex: none;
  padding: 0.15em 0.55em;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
  font-size: var(--text-sm);
}

.nav-overflow-close {
  min-height: 3.5rem;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-primary);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
}

html[data-nav-sheet="open"],
html[data-nav-sheet="open"] body {
  overflow: hidden;
}

/* screens.css owns the toast's paint, while shell geometry owns its bottom edge. The same
 * measured reserve lifts it above either the five-tab bar or the overflow launcher; no-nav
 * screens retain a safe 16 px edge gap. */
html body .toast {
  inset-block-end: max(
    var(--uthai-nav-reserve, 0px),
    calc(var(--space-md) + env(safe-area-inset-bottom, 0px))
  );
}

.footer-line--version {
  font-size: var(--text-xs);
}

.footer-line a {
  color: inherit;
  font-size: var(--text-base);
}

.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);
  }

}

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

  /* The target floor holds at every width: the room comes from the wordmark's clamp, not
   * from the buttons an elderly reader has to hit. */

  .wordmark {
    font-size: max(16px, min(clamp(1.75rem, 9vw, 2rem), 9.5vw, var(--wordmark-room)));
  }

}

@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. The app shell
   * itself never fades: hiding the whole new screen duplicated the old navigation flash. */

  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; }

  /* The bottom nav slides in ONCE per session, on home's first welcome only (owner,
     2026-08-16). data-home-welcome is stamped by the head script on that load alone, so on
     every other screen — and on every return to home — the bar is simply there. */
  html[data-home-welcome="1"]: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);
  }

  /* The two ambient loops above exclude both seasons; this badge ping was the one animation
     that kept moving while every other motion in the app was stopped. */
  html:not([data-ambient="off"]):not([data-easy="on"]):not([data-season="royal"]):not([data-season="mourning"]) .notification-dot[data-new] {
    animation: ping 1.2s var(--ease-out) 2;
  }
}

/* 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);
  /* md, not sm: the heading below opens with stacked Thai marks whose ink rises well
   * above its box, and at sm they cleared the search field by a single pixel. */
  padding-block-end: var(--space-md);
}

.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;
}

/* A place the municipality has not rated says so, rather than leaving a shorter row. */
.place-rating--none {
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  font-style: italic;
}

.place-rating .star {
  /* Same 3:1 rule — the star is the rating, so it has to survive the sunken hero meta. */
  color: var(--color-primary);
}

.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);
  /* Trailing room plus an edge fade: a row that continues past the screen looks like it does. */
  padding-inline-end: calc(var(--space-gutter) + 2rem);
  padding-block-end: var(--space-xs);
  gap: var(--space-xs);
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
}

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

.filter-chip {
  flex: none;
  min-height: 2rem;
  padding-inline: var(--space-sm);
  /* Same reasoning as .ghost-button: the hairline in --color-border is 1.31:1 and reads as
     no boundary at all. The pressed state keeps its ink fill. */
  border: var(--rule-hair) solid var(--color-ink-muted);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink-muted);
  /* The chips narrow every list in the app; they sit on the small step, not the
   * smallest. */
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

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

/* 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;
  min-width: 0;
  gap: var(--space-sm);
  /* At a large text size the copy drops under the ring instead of running past the card. */
  flex-wrap: wrap;
  align-items: center;
}

.passport-main > .passport-copy {
  flex: 1 1 9rem;
}

.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);
  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: 9px;
  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);
  /* At 12 px / 700, the clay clears 4.5:1; the bright clay does not. */
  background: var(--color-primary);
  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;
  }
}

/* The compact wordmark rides every secondary header at 23 px, which WCAG counts as large
 * text and needs 3:1. --color-primary-bright measures 2.89:1 on the canvas; the clay
 * measures 5.5:1. /home keeps its approved rendering — this is scoped to the compact mark. */
.onboard-wordmark .wordmark__uthai,
.wordmark--compact .wordmark__uthai {
  color: var(--color-primary);
}

/* ---- Guide categories (owner PDF 2026-08-28; a still grid since 2026-09-07) --------------
 * Six category doors under the ready trips. The grid itself is styled further down. */
.guide-band {
  padding-block: var(--space-section) var(--space-xs);
}

/* Required OTA update. Opaque full-screen surface; no close path by design. The installed app
 * remains usable offline unless a successful server check proves this build is unsupported. */
html[data-update="required"],
html[data-update="required"] body {
  overflow: hidden;
}

.app-update-gate {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  min-height: 100svh;
  padding: max(var(--space-md), env(safe-area-inset-top)) var(--space-md) max(var(--space-md), env(safe-area-inset-bottom));
  place-items: center;
  overflow-y: auto;
  background: var(--color-canvas);
}

/* screens.css historically hard-coded a taller Easy reserve after this shared sheet loaded.
 * Extra element specificity keeps every shell on the measured token without editing that
 * legacy file; a no-nav Easy page therefore remains exactly zero. */
html[data-easy="on"] body .app-shell {
  padding-block-end: var(--uthai-nav-reserve, 0px);
}

html body .app-shell--login,
html body .app-shell--onboard,
html body .app-shell--sos {
  padding-block-end: var(--uthai-nav-reserve, 0px);
}

/* Me's name form used the input's min-content width to grow its grid card past 320 px.
 * Every box in that one dialog is allowed to shrink to the sheet's real inline size. */
html body [data-name-sheet] .confirm-card,
html body [data-name-sheet] [data-name-form],
html body [data-name-sheet] [data-name-input] {
  min-inline-size: 0;
  max-inline-size: 100%;
}

html body [data-name-sheet] [data-name-form],
html body [data-name-sheet] [data-name-input] {
  width: 100%;
}

.app-update-card {
  display: grid;
  width: min(100%, 24rem);
  padding: var(--space-xl) var(--space-lg);
  gap: var(--space-sm);
  justify-items: center;
  border: var(--rule-card) solid var(--color-border);
  border-radius: var(--radius-sheet);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.app-update-mark {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin-block-end: var(--space-xs);
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font: 700 2rem/1 var(--font-body);
}

.app-update-eyebrow,
.app-update-status {
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
}

.app-update-eyebrow {
  font-weight: 700;
}

.app-update-card h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.app-update-copy {
  max-width: 30ch;
}

.app-update-button {
  width: 100%;
  margin-block-start: var(--space-sm);
}

.app-update-status {
  min-height: calc(1em * var(--lh-body));
}

/* The dismissible half of the OTA policy (L3-F30), redesigned on the owner's pick of direction
 * v2, 2026-09-11 (work/update-toast-redesign-2026-09-11). A slim row in the flow, directly under
 * the page header: it takes the least space of any option shown and it covers nothing — the
 * previous version floated over a place card and its primary control rendered as the browser's
 * grey default. Message on the left, the two choices on the right; when the row cannot hold them
 * — a 320 px phone, a reader on very large text, or a longer translation — the message moves
 * above the actions instead of shrinking anything. */
.app-update-toast {
  display: flex;
  padding-block: var(--space-xs);
  padding-inline: var(--space-gutter);
  gap: var(--space-xs) var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-block-end: var(--rule-hair) solid var(--color-border);
  background: var(--color-surface-sunken);
}

.app-update-toast__copy {
  flex: 1 1 auto;
  margin: 0;
  min-width: 6rem;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: var(--lh-title);
}

.app-update-toast__actions {
  display: flex;
  flex: 0 1 auto;
  gap: var(--space-xs);
  align-items: center;
  flex-wrap: wrap;
}

/* The strip's primary control is a normal app pill, not a full-width block. It wears the ink
 * fill the owner approved in direction v2 rather than the brick of a page's main action: this
 * is a housekeeping offer, not the thing the reader came to the screen to do. The selector
 * is doubled on purpose: screens.css loads after this sheet, so .wide-button wins a tie. */
.app-update-toast .app-update-toast__install {
  flex: 0 1 auto;
  width: auto;
  min-height: var(--size-control);
  margin-block-start: 0;
  padding-inline: var(--space-md);
  background: var(--color-ink);
  color: var(--color-surface);
}

.app-update-toast__later {
  flex: 0 1 auto;
  min-height: var(--size-control);
  padding-inline: var(--space-md);
  border: var(--rule-card) solid var(--color-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.app-update-toast__status {
  flex: 1 0 100%;
  margin: 0;
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
}

.app-update-toast__status:empty {
  display: none;
}

/* Category grid (owner 2026-09-07): six still doors under the ready trips. The hero video is
 * Home's motion; nothing here moves on its own, so calm modes need no separate rail. */
.guide-band .section-heading {
  margin-block-end: var(--space-xs);
}

.guide-rail {
  padding-inline: var(--space-gutter);
}

.guide-track {
  display: grid;
  margin: 0;
  padding: 0;
  gap: var(--space-xs);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.guide-card {
  display: grid;
  min-width: 0;
  min-height: var(--size-control);
  overflow: hidden;
  gap: var(--space-2xs);
  align-content: start;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
}

.guide-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* The label sits under the photograph, so a long category wraps instead of clipping. */
.guide-card strong {
  display: block;
  padding: 0 var(--space-2xs) var(--space-xs);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

html[data-easy="on"] .guide-track {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-easy="on"] .guide-card strong {
  font-size: 1rem;
}

@media (min-width: 768px) {
  .guide-track { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---- Seasonal recommendations (owner PDF 2026-08-28) ---- */
.seasonal {
  display: grid;
  gap: var(--space-sm);
  padding-block: var(--space-section) var(--space-xs);
  padding-inline: var(--space-gutter);
}

.seasonal .section-heading {
  padding-inline: 0;
}

.seasonal-lead {
  display: block;
  overflow: hidden;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.seasonal-photo img {
  display: block;
  width: 100%;
  height: 11.5rem;
  object-fit: cover;
}

.seasonal-body {
  display: grid;
  gap: var(--space-3xs);
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.seasonal-body .news-headline {
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: var(--lh-display);
}

.seasonal-line {
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  line-height: var(--lh-body);
}

.seasonal-side {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs);
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
}

.seasonal-side__photo img {
  display: block;
  width: 7rem;
  height: 4.75rem;
  border-radius: calc(var(--radius-tile) - var(--space-xs));
  object-fit: cover;
}

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

/* ---- Sponsor coupon bar (owner PDF 2026-08-28, demo only in phase 1) ---- */
.sponsor {
  padding-block: 0 var(--space-xs);
  padding-inline: var(--space-gutter);
}

.sponsor-band {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-card) dashed var(--color-primary);
  border-radius: var(--radius-tile);
  background: color-mix(in srgb, var(--color-tint-merit) 45%, var(--color-surface));
}

.sponsor-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-primary);
}

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

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

.sponsor-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: var(--lh-display);
}

.sponsor-line {
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
  line-height: var(--lh-title);
}

.chip--sample {
  border: var(--rule-hair) solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.sponsor-chevron {
  flex: none;
  margin-inline-start: auto;
  color: var(--color-primary);
}

/* ---- Latest additions (owner PDF 2026-08-28) ---- */
.latest {
  padding-block: var(--space-xs) var(--space-section);
  padding-inline: var(--space-gutter);
}

.latest .section-heading {
  padding-inline: 0;
}

.latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.latest-card {
  display: block;
  overflow: hidden;
  border: var(--rule-hair) solid var(--color-border);
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-control);
}

.latest-card__photo {
  position: relative;
  display: block;
}

.latest-card__photo img {
  display: block;
  width: 100%;
  height: 6.25rem;
  object-fit: cover;
}

/* Not a `.chip`: the open-state sweep in app-core rewrites every .chip inside a place link,
 * and this badge answers "what is new", not "what is open". */
.latest-flag {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  padding-inline: 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: var(--text-2xs);
  font-weight: 600;
}

.latest-card__name {
  display: block;
  overflow: hidden;
  padding: var(--space-xs) var(--space-sm) 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

.latest-card__meta {
  display: block;
  padding: 0 var(--space-sm) var(--space-xs);
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
}

/* The four new Guide-PDF surfaces are cards, not prose links: inherit ink, no underline —
 * the same reset every other card link in this file carries. */
.guide-card,
.seasonal-lead,
.seasonal-side,
.sponsor-band,
.latest-card {
  color: inherit;
  text-decoration: none;
}

/* Owner-selected river studio welcome. Home markup and its session owner stay intact.
 * Only artwork moves; the seal, copy and controls remain immediately readable.
 * Counter-translated wrappers reveal the art using transform/opacity only. */
html[data-municipal-welcome] { overflow-y: hidden; }
html[data-municipal-welcome="holding"] .app-shell *,
html[data-municipal-welcome="holding"] .app-shell *::before,
html[data-municipal-welcome="holding"] .app-shell *::after,
html[data-municipal-welcome="holding"] .bottom-nav {
  animation: none !important;
}
.municipal-welcome {
  --welcome-line: #0e47472b;
  --welcome-muted: #59685f;
  color-scheme: only light;
  position: fixed;
  inset: 0;
  width: min(100%, 430px);
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  font: 400 1rem/1.6 var(--font-body);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
}
.municipal-welcome[open] { display: flex; flex-direction: column; }
.municipal-welcome::backdrop { background: transparent; }
.municipal-welcome__masthead {
  flex: none;
  margin: 0 26px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--welcome-line);
}
.municipal-welcome__owner { margin: 0; min-width: 0; font-size: .875rem; line-height: 1.65; letter-spacing: .015em; }
.municipal-welcome__owner strong { display: block; font-size: 1.3125rem; line-height: 1.55; font-weight: 600; }
.municipal-welcome__owner small { display: block; margin-top: 7px; font-size: .75rem; letter-spacing: .02em; color: var(--welcome-muted); }
.municipal-welcome__seal { display: block; width: 96px; height: 96px; flex: 0 0 96px; object-fit: contain; }
.municipal-welcome__identity { flex: none; padding: 10px 26px 0; position: relative; z-index: 2; }
.municipal-welcome__topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.municipal-welcome__eyebrow { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--welcome-muted); }
.municipal-welcome__eyebrow::before { content: ""; display: block; flex: none; width: 20px; height: 1px; background: var(--color-primary); }
.municipal-welcome__skip {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  padding: 0;
  font: inherit;
  font-size: .75rem;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
}
.municipal-welcome__skip-arrow { width: 13px; height: 13px; flex: none; }
.municipal-welcome__title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; }
.municipal-welcome__title { margin: 0; max-width: 100%; flex: none; font: 700 1rem/1.2 var(--font-display); overflow-wrap: anywhere; letter-spacing: normal; }
.municipal-welcome__title-small { display: block; font-size: 1.75rem; line-height: 1.5; }
.municipal-welcome__title-big { display: block; color: var(--color-primary); font-size: 4.75rem; line-height: 1.4; margin-top: -7px; margin-left: -3px; }
.municipal-welcome__invitation { margin: 0 0 23px; font-size: .8125rem; line-height: 1.9; text-align: right; color: var(--welcome-muted); }
.municipal-welcome__landscape {
  flex: 1 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 285px;
  width: 100%;
  margin: -10px 0 0;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
}
.municipal-welcome__landscape::before { content: ""; position: absolute; inset: 11% 9% 9%; background: radial-gradient(ellipse, #dce5d37a, transparent 69%); z-index: -1; }
.municipal-welcome__river-lines { position: absolute; width: 124%; height: 85%; max-width: none; left: -12%; top: 10%; color: #95a797; opacity: .46; z-index: -1; stroke-width: .7; }
.municipal-welcome__reveal { width: 100%; overflow: hidden; }
.municipal-welcome__plane { width: 100%; }
.municipal-welcome__artwork {
  display: block;
  width: 112%;
  max-width: none;
  height: auto;
  margin-left: -6%;
  transform-origin: 50% 70%;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 94%, transparent), linear-gradient(to right, transparent, #000 8%, #000 94%, transparent);
  mask-composite: intersect;
}
.municipal-welcome__footer { flex: none; padding: 5px 26px calc(12px + env(safe-area-inset-bottom, 0px)); }
.municipal-welcome__caption { margin: 0 0 14px; display: flex; align-items: center; gap: 12px; font-size: .75rem; letter-spacing: .015em; color: var(--welcome-muted); }
.municipal-welcome__caption::after { content: ""; height: 1px; flex: 1; background: var(--welcome-line); transform-origin: left; }
.municipal-welcome__value { margin: 0 0 18px; font-size: .9375rem; line-height: 1.75; }
.municipal-welcome__start {
  min-height: 58px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 13px 10px 20px;
  border: 0;
  border-radius: 5px;
  background: var(--color-ink);
  color: var(--color-surface);
  font: inherit;
  font-size: 1.0625rem;
  text-align: left;
  cursor: pointer;
}
.municipal-welcome__start-arrow { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #fffbf556; border-radius: 50%; flex: none; }
.municipal-welcome__arrow { width: 17px; height: 17px; }
.municipal-welcome__emergency { min-height: 44px; margin-top: 7px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: .75rem; color: var(--welcome-muted); text-decoration: none; }
.municipal-welcome__emergency-icon { width: 14px; height: 14px; flex: none; }
.municipal-welcome.is-still *, .municipal-welcome.is-still *::before, .municipal-welcome.is-still *::after { animation: none !important; transition: none !important; }
.municipal-welcome__skip:active, .municipal-welcome__start:active { opacity: .8; }
html[data-input="key"] .municipal-welcome :focus-visible { outline: 3px solid var(--color-primary); outline-offset: 4px; }
@keyframes municipal-river-open { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes municipal-river-counter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes municipal-river-settle { from { opacity: .35; transform: translate(10px, 18px) scale(1.065) rotate(-1.2deg); } to { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); } }
@keyframes municipal-river-lines { from { opacity: 0; transform: translateX(-8px); } to { opacity: .46; transform: translateX(0); } }
@keyframes municipal-caption-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .municipal-welcome__reveal { animation: municipal-river-open 1650ms cubic-bezier(.22, 1, .36, 1) both; }
  .municipal-welcome__plane { animation: municipal-river-counter 1650ms cubic-bezier(.22, 1, .36, 1) both; }
  .municipal-welcome__artwork { animation: municipal-river-settle 2100ms var(--ease-out) both; }
  .municipal-welcome__river-lines { animation: municipal-river-lines 1800ms ease-out both; }
  .municipal-welcome__caption::after { animation: municipal-caption-rule 1000ms 700ms cubic-bezier(.22, 1, .36, 1) both; }
  .municipal-welcome__start-arrow { transition: transform 180ms ease; }
  .municipal-welcome__start:hover .municipal-welcome__start-arrow { transform: translateX(3px); }
}
@media (max-width: 350px) {
  .municipal-welcome__masthead { margin-inline: 20px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
  .municipal-welcome__owner { font-size: .8125rem; }
  .municipal-welcome__owner strong { font-size: 1.125rem; }
  .municipal-welcome__owner small { letter-spacing: 0; }
  .municipal-welcome__identity { padding-inline: 20px; }
  .municipal-welcome__title-small { font-size: 1.5625rem; }
  .municipal-welcome__title-big { font-size: 4.125rem; }
  .municipal-welcome__invitation { font-size: .75rem; margin-bottom: 18px; }
  .municipal-welcome__landscape { min-height: 240px; }
  .municipal-welcome__footer { padding-inline: 20px; }
  .municipal-welcome__value { font-size: .875rem; }
}
@media (min-width: 40rem) {
  .municipal-welcome { top: var(--space-lg); bottom: auto; height: calc(100dvh - 2 * var(--space-lg)); border-radius: var(--radius-sheet); }
}
@media (max-height: 740px) and (max-width: 639px) {
  .municipal-welcome__masthead { padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: 12px; }
  .municipal-welcome__landscape { height: 170px; min-height: 170px; flex-basis: 170px; }
  .municipal-welcome__reveal, .municipal-welcome__plane { height: 100%; }
  .municipal-welcome__artwork { width: auto; height: 100%; margin-inline: auto; }
}
@media (max-height: 640px) and (max-width: 639px) {
  .municipal-welcome__masthead { padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: 8px; }
  .municipal-welcome__identity { padding-top: 4px; }
  .municipal-welcome__title-small { font-size: 1.375rem; }
  .municipal-welcome__title-big { font-size: 3.25rem; }
  .municipal-welcome__invitation { margin-bottom: 12px; }
  .municipal-welcome__landscape { height: 110px; min-height: 110px; flex-basis: 110px; }
  .municipal-welcome__caption { display: none; }
  .municipal-welcome__value { font-size: .8125rem; line-height: 1.55; margin-bottom: 10px; }
  .municipal-welcome__start { min-height: 52px; }
  .municipal-welcome__footer { padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .municipal-welcome *, .municipal-welcome *::before, .municipal-welcome *::after { animation: none !important; }
}

/* ── "แถวนี้มีอะไร" answer panel (owner scenario 2026-09-11) ─────────────────────
 * The first thing under the video answers the visitor's own question: highlights, nearest,
 * worth going now. Vertical rows, not a rail — every row shows all four facts without a
 * swipe, and the three mode chips re-order the same rows. */
.home-purpose {
  display: flex;
  margin: var(--space-xs) var(--space-gutter) 0;
  gap: var(--space-xs) var(--space-sm);
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.home-lang {
  flex: none;
  white-space: nowrap;
}

.home-lang a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.answer-modes {
  padding-block-end: var(--space-2xs);
}

.answer-now {
  margin: 0;
  padding-inline: var(--space-gutter);
  padding-block-end: var(--space-2xs);
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.answer-now strong {
  color: var(--color-ink);
  font-weight: 700;
}

.answer-list {
  display: grid;
  margin: 0;
  padding: var(--space-2xs) var(--space-gutter) var(--space-xs);
  gap: var(--space-xs);
  list-style: none;
}

.answer-row {
  min-width: 0;
  width: auto;
  scroll-snap-align: none;
}

.answer-row .place-link {
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: stretch;
  height: auto;
}

.answer-row .place-photo {
  aspect-ratio: auto;
  min-height: 5.5rem;
}

.answer-row .place-body {
  padding-block: var(--space-xs);
  padding-inline: 0 3rem;
  gap: 0.2rem;
  align-content: center;
}

.answer-row .place-name {
  font-size: var(--text-base);
  -webkit-line-clamp: 1;
  word-break: keep-all;
}

.answer-why {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.answer-row .place-meta {
  flex-wrap: wrap;
  row-gap: 0.15rem;
  font-size: var(--text-xs);
}

.answer-hours:empty {
  display: none;
}

.answer-parking {
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.answer-row .save-heart {
  inset-block-start: 50%;
  inset-inline-end: 0.5rem;
  transform: translateY(-50%);
}

/* Easy mode and large text: the thumbnail keeps its width in rem, the facts wrap freely. */
html[data-easy="on"] .answer-row .place-link {
  grid-template-columns: 6.5rem minmax(0, 1fr);
}

/* Easy mode widens the rail cards (screens.css); a row is never a rail card, so it keeps the
 * full width. Specificity beats the later sheet on purpose. */
html[data-easy="on"] .answer-list .answer-row {
  min-width: 0;
  width: auto;
}

html[data-easy="on"] .answer-list .answer-row .place-name {
  -webkit-line-clamp: 2;
}

/* Narrow phone in easy mode: the row restacks photo-over-facts instead of squeezing the facts
 * into a 120 px column. A container query in px, because a media query in rem does not react
 * to the root size easy mode sets. */
.answer-list {
  container-type: inline-size;
}

@container (max-width: 300px) {
  html[data-easy="on"] .answer-row .place-link {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-easy="on"] .answer-row .place-photo {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  html[data-easy="on"] .answer-row .place-body {
    padding-inline: var(--space-sm) 3rem;
  }
}

/* Where "ใกล้ฉัน" measures from. It only appears in that mode and it never claims the
 * reader's position until the device has actually given one. */
.answer-origin {
  margin: 0;
  padding-inline: var(--space-gutter);
  padding-block-end: var(--space-2xs);
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.answer-origin[data-origin-state="device"] {
  color: var(--color-ink);
  font-weight: 600;
}

.answer-origin__ask {
  min-height: 2rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* The mock-up notice at the door (owner ruling 2026-09-11). One dialog, once per session,
 * in the app's own voice — not a browser alert and not a banner that follows the reader. */
.mock-notice {
  max-width: min(22rem, calc(100vw - 2.5rem));
  margin: auto;
  padding: var(--space-md);
  border: 0;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 18px 48px rgb(14 71 71 / 22%);
}

.mock-notice::backdrop {
  background: rgb(14 71 71 / 42%);
}

.mock-notice__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 4.2vw, 1.1875rem);
  font-weight: 700;
  line-height: var(--lh-title);
}

.mock-notice__body {
  margin: 0 0 var(--space-xs);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.mock-notice__note {
  margin: 0 0 var(--space-md);
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.mock-notice__close {
  display: block;
  width: 100%;
  min-height: var(--size-control);
  padding-inline: var(--space-md);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-surface);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
}

/* ── Urgent notice band (Hub #55; the owner accepted the line lane's mockup 2026-09-11) ─────
 * A card under the logo bar and above the hero, in the level's own colour family. The level is
 * never colour alone: the word and the glyph ride together, so the message survives a reader
 * who cannot separate red from amber, a greyscale print, and a screen in the sun. */
.urgent-band {
  display: grid;
  padding-inline: var(--space-gutter);
  padding-block-start: var(--space-xs);
  gap: var(--space-xs);
}

.urgent-card {
  display: grid;
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-xs) var(--space-sm);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  border: var(--rule-hair) solid color-mix(in srgb, var(--urgent-ink) 28%, var(--color-surface));
  border-radius: var(--radius-tile);
  background: color-mix(in srgb, var(--urgent-ink) 8%, var(--color-surface));
  color: var(--color-ink);
  text-decoration: none;
}

.urgent-card[data-notice-level="emergency"] { --urgent-ink: var(--color-danger); }
.urgent-card[data-notice-level="watch"] { --urgent-ink: #b5720c; }
.urgent-card[data-notice-level="important"] { --urgent-ink: var(--color-sun-500); }

/* line's fit review of build 149: the icon must lead the eye, and a hairline glyph on a tinted
 * disc read lighter than the bold level word beside it. White disc, glyph in the level ink at
 * the word's weight — the same presence the LINE card and the website badge carry. */
.urgent-card__mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: var(--rule-hair) solid color-mix(in srgb, var(--urgent-ink) 30%, var(--color-surface));
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--urgent-ink);
}

.urgent-card__glyph {
  width: 1.3rem;
  height: 1.3rem;
  stroke-width: 2.25;
}

.urgent-card__body {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.urgent-card__head {
  display: flex;
  gap: var(--space-2xs) var(--space-xs);
  flex-wrap: wrap;
  align-items: baseline;
}

.urgent-card__level {
  color: var(--urgent-ink);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
}

.urgent-card__kicker {
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
}

.urgent-card__headline {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.urgent-card__meta {
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.urgent-card__read {
  color: var(--urgent-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  justify-self: start;
}

.urgent-card__chevron {
  width: 1.25rem;
  height: 1.25rem;
  align-self: center;
  color: var(--color-ink-muted);
}

/* Narrow phone or very large text: the chevron drops and the card becomes two rows. */
@media (max-width: 22.5rem) {
  .urgent-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .urgent-card__chevron {
    display: none;
  }
}

/* The picture variant of a notice (line's fit review of build 149). A municipal poster is
 * mostly text, so it is contained, never cropped, and capped so it cannot push the rest of the
 * card off the screen. A notice with no picture field draws no frame at all. */
.urgent-card[data-notice-picture] {
  grid-template-columns: auto minmax(0, 1fr);
  row-gap: var(--space-xs);
}

.urgent-card__picture {
  display: block;
  overflow: hidden;
  grid-column: 1 / -1;
  border-radius: var(--radius-tile);
  background: var(--color-surface);
}

.urgent-card__picture img {
  display: block;
  width: 100%;
  max-height: 11rem;
  object-fit: contain;
}

/* TOUR-HOME-TABLET: existing Warm Uthai tokens, task-first Home and fluid tablet shell. */
.hero-collage { height: clamp(12rem, 52vw, 14.5rem); }
.lanes .section-heading h2 { font-size: 1.35rem; }
.lane-scroller { gap: var(--space-xs); }
.lane-button {
  min-height: 6rem;
  padding: var(--space-sm) var(--space-2xs);
  border: var(--rule-hair) solid transparent;
  border-radius: var(--radius-card);
  background: var(--lane-tint, var(--color-surface));
  box-shadow: var(--shadow-control);
}
.lane-icon { border-radius: 0; background: transparent; box-shadow: none; }
.lane-button .icon { width: 2rem; height: 2rem; }
.answer-row .place-name {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  overflow-wrap: anywhere;
  word-break: normal;
}
.answer-why { -webkit-line-clamp: 2; }

@media (max-width: 699px) {
  html[data-easy="on"] .lane-button {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: center;
    min-height: 7.25rem;
  }
  html[data-easy="on"] .lane-button > span:last-child { text-align: center; }
}

@media (min-width: 700px) {
  html body { padding: 0; }
  html body .app-shell {
    width: 100%;
    max-width: none;
    min-height: 100svh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    --space-gutter: clamp(1.25rem, 3vw, 3rem);
  }
  html body .bottom-nav,
  html body .nav-overflow-dock { width: 100%; max-width: none; border-radius: 0; }
  .app-header { padding-inline: var(--space-gutter); }
  .hero-collage { height: clamp(14rem, 29vw, 21rem); }
  .lanes .section-heading h2 { font-size: 1.6rem; }
  .lane-scroller { padding-inline: var(--space-gutter); gap: var(--space-sm); }
  .lane-button { min-height: 6.5rem; }
  .lane-icon { width: 3.25rem; height: 3.25rem; }
  .answer-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
  html .answer-row .place-link { display: flex; flex-direction: column; gap: 0; height: 100%; }
  html .answer-row .place-photo { width: 100%; aspect-ratio: 16 / 10; min-height: 0; }
  html .answer-row .place-body { padding: var(--space-sm); align-content: start; flex: 1; }
  html .answer-row .save-heart { inset-block-start: var(--space-xs); transform: none; }
  .home-lane-grid > li { flex-basis: calc((100% - 16px) / 3); }
  .page-main { width: 100%; min-width: 0; }
}
@media (min-width: 700px) and (max-height: 850px) {
  .hero-collage { height: 14rem; }
}
