/* Onsen Hopper v3.4. One family, big type, photos doing the work.
   :root is the token source of truth. Mobile first (375). */

:root {
  --paper: #FAF8F2;
  --ink: #121212;
  --muted: #6B6B66;
  --line: #E3DFD4;
  --yuzu: #FFE00D;
  --on-yuzu: #121212;
  --water: #0047FF;
  --scrim: rgba(18, 18, 18, .4);
  --lift: 0 1px 2px rgba(18, 18, 18, .06), 0 16px 40px -12px rgba(18, 18, 18, .28);

  /* Region colour blocks (photo fallback) */
  --r-hokkaido: #C9D6DF;
  --r-tohoku: #D5DCC4;
  --r-kanto: #E8D3C0;
  --r-chubu: #CFE0D8;
  --r-kansai: #E6C9C4;
  --r-chugoku: #DCD0E4;
  --r-shikoku: #D3E0EC;
  --r-kyushu-okinawa: #EBD9B4;
  --r-none: #E3DFD4;
  /* Dark mode keeps the hue at about L 30% and adds a 2px stripe in these */
  --stripe: none;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --fs-label: 13px;
  --fs-body: 15px;
  --fs-card: 17px;
  --fs-sec: 22px;
  --fs-h1: 28px;
  --fs-hero: 40px;

  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --gutter: 16px;
  --max: 1200px;
  --r: 12px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121212; --ink: #F5F2EA; --muted: #9A9890; --line: #2A2A28; --water: #7A96FF;
    --scrim: rgba(0, 0, 0, .6);
    --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -12px rgba(0, 0, 0, .7);
    --r-hokkaido: #3D4F5C; --r-tohoku: #535C3D; --r-kanto: #674B32; --r-chubu: #3F5A4D;
    --r-kansai: #653B34; --r-chugoku: #503C5D; --r-shikoku: #344D65; --r-kyushu-okinawa: #675632; --r-none: #595340;
    --stripe: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121212; --ink: #F5F2EA; --muted: #9A9890; --line: #2A2A28; --water: #7A96FF;
  --scrim: rgba(0, 0, 0, .6);
  --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -12px rgba(0, 0, 0, .7);
  --r-hokkaido: #3D4F5C; --r-tohoku: #535C3D; --r-kanto: #674B32; --r-chubu: #3F5A4D;
  --r-kansai: #653B34; --r-chugoku: #503C5D; --r-shikoku: #344D65; --r-kyushu-okinawa: #675632; --r-none: #595340;
  --stripe: block;
  color-scheme: dark;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --fs-h1: 40px; --fs-hero: 56px; }
}

/* ---- Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 999px; }
.skip:focus { top: 8px; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
[hidden] { display: none !important; }

/* ---- Header / footer ---------------------------------------------------- */
.head__in { display: flex; align-items: center; gap: var(--s2); height: 56px; }
.wordmark { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.head__link { font-weight: 600; text-decoration: none; padding: 8px 2px; white-space: nowrap; }
.head__n { font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .head__in { gap: var(--s4); } .head__link { padding: 8px 4px; } }
.head__link[aria-current] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.theme-toggle {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px;
  border: 0; background: transparent; cursor: pointer;
}
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.foot { border-top: 1px solid var(--line); padding: var(--s7) 0 var(--s7); margin-top: var(--s8); }
.foot__in { display: grid; gap: var(--s6); }
.foot__brand { display: grid; gap: var(--s3); justify-items: start; align-content: start; }
.foot__mark { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.foot__line { font-weight: 600; font-size: var(--fs-card); line-height: 1.35; max-width: 26em; text-wrap: balance; }
.maker { display: inline-flex; align-items: center; gap: var(--s3); font-weight: 600; text-decoration: none; margin-top: var(--s2); }
.maker img { width: 40px; height: 40px; border-radius: 999px; }
.maker:hover span { text-decoration: underline; }
.foot__col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; align-content: start; }
.foot__h { grid-column: 1 / -1; font-size: var(--fs-label); color: var(--muted); font-weight: 600; }
.foot__col a { font-size: 15px; font-weight: 600; text-decoration: none; }
.foot__col a:hover { text-decoration: underline; }
.foot__small { font-size: var(--fs-label); color: var(--muted); line-height: 1.5; max-width: 52em; }
.foot__small a { text-decoration: underline; }
@media (min-width: 768px) {
  .foot__in { grid-template-columns: 1.6fr 1fr 1fr; gap: var(--s6) var(--s6); }
  .foot__col { grid-template-columns: 1fr; }
  .foot__small { grid-column: 1 / -1; }
}

/* ---- Buttons, pills, chips --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
}
.btn--big { height: 56px; font-size: var(--fs-card); width: 100%; gap: .3em; }
.btn--big b { font-weight: 800; font-variant-numeric: tabular-nums; }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (min-width: 600px) { .btn--big { width: auto; padding: 0 32px; } }

.chip {
  flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink); background: transparent;
  font-weight: 600; font-size: var(--fs-body); text-decoration: none; white-space: nowrap; cursor: pointer; border: 0;
  transition: background-color .15s var(--ease), color .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.chip[data-on], .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip--x { width: 40px; padding: 0; justify-content: center; font-size: 22px; line-height: 1; }

.chipbar { position: sticky; top: 0; z-index: 10; background: var(--paper); }
.chipbar__sentinel { height: 1px; margin-bottom: -1px; }
/* The map's own bar keeps using .chipbar__in as the scrolling row */
.chipbar__in {
  display: flex; align-items: center; gap: var(--s2); overflow-x: auto; scrollbar-width: none;
  padding: var(--s3) max(var(--gutter), (100% - var(--max)) / 2); scroll-padding-inline: var(--gutter);
}
.chipbar__in::-webkit-scrollbar { display: none; }
.chipbar > .chipbar__in { display: block; overflow: visible; padding: 0; }
.chipbar__row {
  position: relative; display: flex; align-items: center; gap: var(--s2); overflow-x: auto; scrollbar-width: none;
  padding: var(--s3) max(var(--gutter), (100% - var(--max)) / 2); scroll-padding-inline: var(--gutter);
  background: var(--paper); transition: box-shadow .2s ease-out;
}
.chipbar__row::-webkit-scrollbar { display: none; }
.chipbar__row.is-pinned { box-shadow: 0 1px 0 var(--line), 0 8px 14px -8px rgb(0 0 0 / .22); }
.chipbar__lead { padding: 0 max(var(--gutter), (100% - var(--max)) / 2) var(--s3); }
.chipbar__n { flex: none; font-weight: 600; padding-right: var(--s2); white-space: nowrap; }
.chipbar__n b { font-weight: 800; font-variant-numeric: tabular-nums; }
.chipbar__n--hidden { display: none; }
.chipbar__note { padding: 0 max(var(--gutter), (100% - var(--max)) / 2) var(--s3); font-size: var(--fs-body); color: var(--muted); }
.chipbar__note a { color: var(--water); }
/* Landing, phones: the Go button scrolls away, only the chip row pins */
@media (max-width: 899px) {
  .page-home .chipbar, .page-home .chipbar > .chipbar__in { display: contents; }
  .page-home .chipbar__row { position: sticky; top: 0; z-index: 10; }
}
/* Desktop: one row, the button first, the chips after it */
@media (min-width: 900px) {
  .chipbar > .chipbar__in { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) max(var(--gutter), (100% - var(--max)) / 2); }
  .chipbar__lead { flex: none; padding: 0; }
  .chipbar__lead .go { min-height: 0; }
  .chipbar__lead .btn--big { height: 48px; padding: 0 24px; font-size: var(--fs-body); width: auto; }
  .chipbar__row { flex: 1; min-width: 0; padding: 0; background: none; }
  .chipbar__row.is-pinned { box-shadow: none; }
  .chipbar:has(.chipbar__row.is-pinned) { box-shadow: 0 1px 0 var(--line), 0 8px 14px -8px rgb(0 0 0 / .22); }
}

/* ---- Landing: the Soak Sentence ------------------------------------------------ */
.hero { padding: var(--s6) 0 var(--s4); }
.sentence {
  font-size: var(--fs-hero); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
  max-width: 13em; text-wrap: pretty;
  /* A fixed box (4 lines on phones, 2 on desktop, in px of the base size) so
     the button under it never moves when a blank changes. landing.js steps
     the font down for the rare combo that would not fit. */
  min-height: calc(4 * 1.22 * var(--fs-hero));
}
/* The price pill and its full stop never part */
.sentence__p { display: inline-block; white-space: nowrap; }
@media (min-width: 900px) {
  /* "outdoor bath", "near anywhere" and "for any price." each stay whole, so
     "anywhere" never drops under "I want" */
  .sentence { max-width: 21em; min-height: calc(2 * 1.22 * var(--fs-hero)); }
  .sentence__u, .sentence__end { display: inline-block; white-space: nowrap; }
}
.blank {
  display: inline-block; border: 0; cursor: pointer; padding: 0 .28em .04em; margin: .04em 0;
  border-radius: 999px; color: var(--on-yuzu); background: linear-gradient(var(--yuzu), var(--yuzu)) no-repeat 0 0 / 100% 100%;
  font: inherit; letter-spacing: inherit; line-height: 1.1;
  -webkit-tap-highlight-color: transparent;
}
.blank__t { display: inline-block; }
/* A caret while its sheet is open */
.blank[aria-expanded="true"]::after {
  content: ""; display: inline-block; width: .07em; height: .82em; margin-left: .06em; vertical-align: -.06em;
  background: currentColor; border-radius: 2px;
}
.sentence .w { display: inline-block; }
@media (min-width: 900px) { .hero { padding: var(--s8) 0 var(--s5); } }

/* "Show n onsen": pins to the bottom on phones once the sentence is gone */
.go { min-height: 56px; }
.go.is-stuck .go__btn {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  width: auto; box-shadow: 0 12px 28px -10px rgb(0 0 0 / .45); padding: 0 20px;
}
.go__edit { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go.is-stuck .go__edit { display: block; }
.go.is-stuck .go__show { display: none; }
.go__btn.is-off { opacity: .4; cursor: not-allowed; }
.go.is-stuck .go__btn.is-off { opacity: 1; cursor: pointer; }
/* Pinned: room under the list so it never covers "Show more" */
.go-stuck .page-home .list { padding-bottom: calc(var(--s7) + 88px); }

/* ---- Grid and cards ------------------------------------------------------------- */
/* 2 / 3 / 4 columns at 375 / 768 / 1200. Phones get a compact card. */
.list { padding-bottom: var(--s7); }
.results { padding-top: var(--s3); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s3); align-items: start; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s4); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; min-width: 0; }
.card__a { display: grid; gap: 4px; text-decoration: none; }
.card__name {
  font-size: var(--fs-body); font-weight: 600; line-height: 1.25; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta, .card__place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.card__meta { font-size: var(--fs-label); }
.card__place { font-size: var(--fs-label); color: var(--muted); }
/* Phones: one line under the name. Facts when known, else the place. */
.card__meta + .card__place { display: none; }
@media (min-width: 768px) {
  .card__a { gap: 6px; }
  .card__name { font-size: var(--fs-card); }
  .card__meta { font-size: var(--fs-body); }
  .card__meta + .card__place { display: block; }
}
.card__a:hover .card__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

.ph { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--r-none); }
.ph--card { aspect-ratio: 4 / 5; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph__mark { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); }
.spring { width: 72px; height: 72px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.r-hokkaido { background: var(--r-hokkaido); } .r-tohoku { background: var(--r-tohoku); }
.r-kanto { background: var(--r-kanto); } .r-chubu { background: var(--r-chubu); }
.r-kansai { background: var(--r-kansai); } .r-chugoku { background: var(--r-chugoku); }
.r-shikoku { background: var(--r-shikoku); } .r-kyushu-okinawa { background: var(--r-kyushu-okinawa); }

/* Placeholder tile: a quiet seal. The onsen mark in the middle, the kanji name
   as one vertical column at the edge (decorative). System Japanese fonts on purpose. */
.ph__ja {
  position: absolute; right: 12px; top: 56px; bottom: 52px; writing-mode: vertical-rl;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  font-size: 15px; font-weight: 600; letter-spacing: .08em; line-height: 1; color: var(--ink); opacity: .85;
  white-space: nowrap; overflow: hidden;
}
.ph--card .ph__mark { display: grid; place-items: center; }
.ph--card .spring { width: 56px; height: 56px; stroke-width: 3; }
.ph--card .ph__mark { opacity: .7; }
@media (min-width: 768px) { .ph--card .spring { width: 64px; height: 64px; } }
.ph img { position: relative; z-index: 1; }
.ph img.is-broken { display: none; }
/* Dark mode: a 2px region stripe on top so the darker blocks keep their edge */
.ph--none::before {
  content: ""; display: var(--stripe); position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 1;
  background: var(--stripe-c, #E3DFD4);
}
.r-hokkaido { --stripe-c: #C9D6DF; } .r-tohoku { --stripe-c: #D5DCC4; } .r-kanto { --stripe-c: #E8D3C0; }
.r-chubu { --stripe-c: #CFE0D8; } .r-kansai { --stripe-c: #E6C9C4; } .r-chugoku { --stripe-c: #DCD0E4; }
.r-shikoku { --stripe-c: #D3E0EC; } .r-kyushu-okinawa { --stripe-c: #EBD9B4; }

.tag {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px;
  background: var(--yuzu); color: var(--on-yuzu); font-weight: 800; font-size: var(--fs-label); line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.tag--inline { position: static; justify-self: start; }
/* One stamp at most: the best recognition, two words, top left */
.stamp {
  position: absolute; left: 8px; top: 10px; z-index: 2; width: max-content; max-width: calc(100% - 58px);
  padding: 3px 6px; border-radius: 6px; background: var(--yuzu); color: var(--on-yuzu);
  font-weight: 800; font-size: 12px; line-height: 1.15; letter-spacing: 0;
  transform: rotate(-2deg); box-shadow: 0 1px 0 rgb(0 0 0 / .18);
}
@media (min-width: 768px) {
  .tag { left: 12px; bottom: 12px; padding: 4px 10px; font-size: var(--fs-body); }
  .stamp { left: 12px; top: 12px; font-size: var(--fs-label); }
}

.stamp--static { position: static; transform: rotate(-2deg); justify-self: start; max-width: 100%; left: auto; top: auto; }
.heart {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 999px; border: 0;
  display: grid; place-items: center; cursor: pointer; background: rgba(250, 248, 242, .92); color: #121212;
  -webkit-tap-highlight-color: transparent; z-index: 3;
}
.heart__svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.heart[aria-pressed="true"] .heart__svg { fill: #121212; }
.saved-pill {
  position: absolute; z-index: 4; height: 28px; padding: 0 12px; display: inline-flex; align-items: center;
  border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: var(--fs-label);
  white-space: nowrap; pointer-events: none;
}

/* Card hover, pointers only: the photo tilts and lifts, the price tag pops */
@media (hover: hover) and (pointer: fine) {
  .card .ph { transition: transform .2s ease-out, box-shadow .2s ease-out; }
  .card:hover .ph { transform: rotate(1.5deg); box-shadow: 0 14px 24px -10px rgb(0 0 0 / .28); }
  .card .heart { transition: transform .2s ease-out; }
  .card:hover > .heart { transform: translate(-2px, 3px) rotate(1.5deg); }
}

.more { display: flex; margin: var(--s6) auto 0; width: max-content; }
.empty { padding: var(--s7) 0; font-size: var(--fs-sec); font-weight: 600; }
.empty a { color: var(--water); }
/* Zero results: one-tap ways out */
.relax { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: calc(-1 * var(--s5)); padding-bottom: var(--s6); }
.relax__b { height: auto; min-height: 48px; padding: 10px 20px; text-align: left; }

/* Nearby: a swipe row on phones */
.grid--row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.grid--row::-webkit-scrollbar { display: none; }
.grid--row > .card { scroll-snap-align: start; }
@media (min-width: 768px) { .grid--row { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } }
@media (min-width: 1200px) { .grid--row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) and (max-width: 1199px) { .nearby .grid--row > .card:nth-child(4) { display: none; } }

/* ---- Five rules --------------------------------------------------------------- */
.rules { padding: var(--s7) 0; }
.rules h2 { font-size: var(--fs-sec); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--s5); }
.rules__list { display: grid; gap: var(--s4); }
.rules__list li { display: grid; grid-template-columns: 44px 1fr; align-items: start; align-content: start; gap: var(--s3); }
.rules__n { display: block; overflow: hidden; font-weight: 800; font-size: 44px; line-height: .95; letter-spacing: -0.04em; padding-bottom: .02em; }
.rules__n > span { display: inline-block; }
.rules__list.is-waiting .rules__n > span { transform: translateY(105%); }
.rules__list p { font-size: var(--fs-card); line-height: 1.35; padding-top: 4px; }
.rules__list b { font-weight: 600; }
@media (min-width: 900px) {
  .rules__list { grid-template-columns: repeat(5, 1fr); gap: var(--s5); }
  .rules__list li { grid-template-columns: 1fr; }
  .rules__n { font-size: 72px; }
}

/* ---- Picker: bottom sheet (phone) / popover (desktop) ------------------------- */
/* Enter 400ms, rows 30ms apart; exit 150ms. */
.picker { position: fixed; inset: 0; z-index: 40; }
.picker__scrim { position: absolute; inset: 0; background: transparent; }
.picker.is-sheet .picker__scrim { background: var(--scrim); opacity: 0; transition: opacity .15s ease-in; }
.picker.is-sheet.is-open .picker__scrim { opacity: 1; transition: opacity .4s cubic-bezier(.2, 0, 0, 1); }
.picker__panel {
  position: absolute; background: var(--paper); color: var(--ink); border-radius: 16px; box-shadow: var(--lift);
  padding: var(--s2); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(-6px); transition: opacity .15s ease-in, transform .15s ease-in;
}
.picker.is-open .picker__panel { opacity: 1; transform: none; transition: opacity .4s cubic-bezier(.2, 0, 0, 1), transform .4s cubic-bezier(.2, 0, 0, 1); }
.picker.is-sheet .picker__panel {
  left: 0; right: 0; bottom: 0; max-height: 82dvh; border-radius: 20px 20px 0 0; border: 0; border-top: 1px solid var(--line);
  padding: var(--s3) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom));
  transform: translateY(10%);
}
.picker.is-sheet.is-open .picker__panel { transform: none; }
.picker.is-sheet .picker__panel::before { content: ""; flex: none; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto var(--s3); }
.picker__list { margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.picker__h { flex: none; font-size: var(--fs-label); color: var(--muted); font-weight: 600; padding: 4px 12px 8px; }
.picker__search { flex: none; padding: 0 4px 8px; }
.picker__search input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1.5px var(--ink);
  background: transparent; color: var(--ink); font: 600 16px/1 var(--font); -webkit-appearance: none; appearance: none;
}
.picker__search input::placeholder { color: var(--muted); font-weight: 400; }
.picker__search input:focus { outline: none; box-shadow: inset 0 0 0 2.5px var(--ink); }
.picker__g { font-size: var(--fs-label); color: var(--muted); font-weight: 600; padding: 14px 12px 4px; }
.picker__none { padding: 16px 12px; color: var(--muted); }
.picker__opt {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px;
  border-radius: 10px; font-size: var(--fs-card); font-weight: 600; cursor: pointer;
}
.picker__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__n { color: var(--muted); font-weight: 400; font-size: var(--fs-body); font-variant-numeric: tabular-nums; }
.picker__opt:hover, .picker__opt:focus { background: color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
.picker__opt[aria-disabled="true"] { color: var(--muted); font-weight: 400; cursor: default; }
.picker__opt[aria-disabled="true"] .picker__n { opacity: .7; }
.picker__opt[aria-selected="true"]::after { content: ""; flex: none; width: 12px; height: 12px; border-radius: 999px; background: var(--yuzu); box-shadow: 0 0 0 1.5px var(--ink); }

/* ---- Sub pages ------------------------------------------------------------------ */
.sub { padding: var(--s6) 0 var(--s3); }
.sub h1 { font-size: var(--fs-hero); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.sub__lede { font-size: var(--fs-card); line-height: 1.45; max-width: 32em; margin-top: var(--s3); }
.prose { max-width: 36rem; }
.prose h1 { margin-bottom: var(--s4); }
.prose h2 { font-size: var(--fs-sec); font-weight: 800; letter-spacing: -0.02em; margin: var(--s6) 0 var(--s2); }
.prose p { font-size: 17px; }
.prose a:not(.btn) { color: var(--water); }
.lede { font-size: var(--fs-sec); font-weight: 600; line-height: 1.3; margin-bottom: var(--s5); }

/* ---- Onsen page ----------------------------------------------------------------- */
.detail__ph { position: relative; }
.detail__top { display: grid; grid-template-columns: minmax(0, 1fr); }
.detail__top > * { min-width: 0; }
.detail__top > .mini { margin: var(--s5) var(--gutter) 0; }
.ph--hero { aspect-ratio: 4 / 3; border-radius: 0; max-height: 48vh; width: 100%; }
.ph--hero .spring { width: 120px; height: 120px; }
.round {
  position: absolute; top: 12px; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; z-index: 4;
  background: rgba(250, 248, 242, .92); color: #121212;
}
.round--back { left: 12px; }
.round--back svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.heart--round { top: 12px; right: 12px; width: 44px; height: 44px; }
.credit {
  position: absolute; right: 8px; bottom: 8px; z-index: 2; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; line-height: 1.4; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 85%, transparent); color: var(--muted);
}
.credit a { text-decoration: none; }
.credit a:hover { text-decoration: underline; }

/* No photo: the map is the hero, the region colour a band under it with the kanji name */
.detail__ph--map .mini--hero { height: 220px; border-radius: 0; }
.band { position: relative; min-height: 56px; display: flex; align-items: center; padding: 10px var(--gutter); }
.band:empty { min-height: 12px; padding: 0; }
.band::before { content: ""; display: var(--stripe); position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--stripe-c, #E3DFD4); }
.band__ja {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--ink);
}
.detail__ph--bare .band { min-height: 68px; padding-inline: 68px; }
.detail__ph--bare .band:empty { min-height: 68px; }

@media (min-width: 900px) {
  .detail__top {
    width: min(var(--max), 100% - 2 * var(--gutter)); margin: var(--s2) auto 0;
    grid-template-columns: 7fr 5fr; grid-template-rows: auto 1fr; grid-template-areas: "ph body" "mini body"; gap: var(--s5) var(--s6); align-items: start;
  }
  .detail--nophoto .detail__top { grid-template-areas: "ph body"; grid-template-rows: auto; }
  .detail__ph { grid-area: ph; width: auto; margin: 0; }
  .detail__body { grid-area: body; width: auto; margin: 0; padding: 0; max-width: none; }
  .detail__top > .mini { grid-area: mini; height: 240px; margin: 0; }
  .ph--hero { aspect-ratio: 3 / 2; border-radius: var(--r); max-height: none; }
  .detail__ph--map .mini--hero { height: auto; aspect-ratio: 3 / 2; border-radius: var(--r) var(--r) 0 0; }
  .band { padding: 14px var(--s5); border-radius: 0 0 var(--r) var(--r); }
  .detail__ph--bare .band { border-radius: var(--r); padding-inline: 68px; }
}

.detail__body > *, .detail__foot > * { max-width: 760px; }
.detail__body { padding-top: var(--s5); display: grid; gap: var(--s5); }
.detail__h { font-size: var(--fs-h1); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.detail__where { color: var(--muted); margin-top: calc(-1 * var(--s4)); }
.detail__ja {
  margin-top: calc(-1 * var(--s4)); color: var(--muted); font-size: 15px; line-height: 1.3;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
}
.detail__ja + .detail__where { margin-top: calc(-1 * var(--s3)); }
.detail__where a { color: var(--ink); text-underline-offset: 3px; }
.more-in { padding-top: var(--s6); }
.more-in__a { font-weight: 700; font-size: var(--fs-card); text-decoration: underline; text-decoration-color: var(--yuzu); text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.more-in__a span { color: var(--muted); font-weight: 600; }
.more-in + .nearby { padding-top: var(--s5); }
.nearby__h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s4); }
.nearby .nearby__h h2 { margin: 0; }
.pills { display: flex; gap: var(--s2); flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.pill--ink { background: var(--ink); color: var(--paper); }
.pill--line { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pill svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tiles { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tile { flex: 1 1 calc(50% - var(--s2)); border: 1.5px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4) var(--s4); min-width: 0; }
.tile--wide { flex-basis: 100%; }
.tile dt { font-size: var(--fs-label); color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.tile dd { display: grid; gap: 4px; }
.tile__big { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile__big--s { font-size: var(--fs-sec); }
.tile__txt { font-size: var(--fs-card); font-weight: 600; line-height: 1.3; }
.tile__note { font-size: var(--fs-label); color: var(--muted); line-height: 1.4; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); font-weight: 600; line-height: 1.4; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--muted); flex: none; }
.status.is-open::before { background: #1F9D55; box-shadow: 0 0 0 2px color-mix(in srgb, #1F9D55 25%, transparent); }
.ticks { display: grid; gap: 2px; font-weight: 600; font-size: var(--fs-card); }
.ticks li { display: flex; gap: 8px; }
.ticks .is-no { color: var(--muted); }
.ticks span[aria-hidden] { width: 1em; }
@media (min-width: 600px) { .tile { flex: 1 1 0; min-width: 120px; } .tile--wide { flex: 2 1 0; min-width: 240px; } }

.why { font-size: 18px; line-height: 1.4; font-weight: 500; max-width: 34em; }
@media (min-width: 900px) { .why { font-size: 20px; } }

.recog { display: grid; gap: 6px; }
.recog__h { font-size: var(--fs-label); color: var(--muted); font-weight: 600; }
.recog__list { display: grid; gap: 4px; }
.recog__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.recog__label { font-weight: 800; font-size: var(--fs-card); text-decoration: underline; text-decoration-color: var(--yuzu); text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.recog__label:hover { text-decoration-color: currentColor; }
.recog__ja { color: var(--muted); }
.recog__src { font-size: var(--fs-label); color: var(--water); }
.recog__blurb { flex-basis: 100%; color: var(--muted); font-size: var(--fs-body); line-height: 1.4; }

/* ---- /famous ------------------------------------------------------------------- */
.famous__nav { padding: var(--s3) 0 0; }
.famous__jump { display: flex; flex-wrap: wrap; gap: var(--s2); }
.famous { padding-top: var(--s7); scroll-margin-top: 8px; }
.famous__head { display: grid; gap: 6px; margin-bottom: var(--s5); max-width: 40rem; }
.famous__head h2 { font-size: var(--fs-sec); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.famous__ja { font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: .2em; }
.famous__story { font-size: var(--fs-card); line-height: 1.5; max-width: 40rem; }
.famous__town { font-size: var(--fs-sec); font-weight: 800; margin-top: var(--s5); letter-spacing: -0.02em; }
.famous__tg:first-child .famous__town { margin-top: 0; }
.famous__tja { font-weight: 600; color: var(--muted); letter-spacing: 0; }
.famous__n { font-size: var(--fs-body); font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: .3em; }
.famous__note { color: var(--muted); margin: 2px 0 var(--s3); }
.famous__tg .more-in__a { display: inline-block; margin-top: var(--s3); }
@media (min-width: 768px) { .famous__tg .grid--row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ladder { list-style: none; padding: 0; margin: 0; max-width: 40rem; }
.ladder li { display: grid; grid-template-columns: 48px 1fr; align-items: baseline; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.ladder__n { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ladder__t { font-size: var(--fs-card); font-weight: 700; }
.ladder__t a { text-underline-offset: 3px; }
.ladder__ja, .ladder__pref, .ladder__c { font-size: var(--fs-body); font-weight: 400; color: var(--muted); margin-left: .4em; }

/* Landing: the lists strip */
.lists { padding: var(--s7) 0 0; }
.lists h2 { font-size: var(--fs-sec); font-weight: 800; letter-spacing: -0.02em; }
.lists__p { color: var(--muted); margin: var(--s2) 0 var(--s4); max-width: 36em; }
.lists__row {
  list-style: none; margin: 0; padding: 0 var(--gutter) 4px; margin-inline: calc(-1 * var(--gutter));
  display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.lists__row::-webkit-scrollbar { display: none; }
.lists__row > li { flex: 0 0 150px; scroll-snap-align: start; display: flex; }
.lists__tile {
  flex: 1; border: 1.5px solid var(--line); border-radius: var(--r); padding: var(--s4); display: grid; gap: 6px;
  align-content: start; text-decoration: none; min-width: 0;
}
.lists__tile:hover { border-color: var(--ink); }
.lists__ja {
  color: var(--muted); font-size: var(--fs-label); line-height: 1.35;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.lists__n { font-weight: 600; }
@media (min-width: 900px) {
  .lists__row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .lists__row > li { flex: none; }
}
.famous__src { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-label); color: var(--water); justify-self: start; }
.famous__src svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Long lists: 8, then "Show all (n)". Without JS every card shows. */
.famous__all { display: none; margin: var(--s5) 0 0; }
.js .famous__list.is-capped .grid > .card:nth-child(n+9) { display: none; }
.js .famous__list.is-capped .famous__all { display: inline-flex; }

/* ---- /onsen: region -> prefecture index ---------------------------------------- */
.pindex { padding-top: var(--s6); }
.pindex h2 { font-size: var(--fs-sec); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--s4); }
.pindex__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s4); }
@media (min-width: 768px) { .pindex__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pindex__g h3 { font-size: var(--fs-label); color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.pindex__g li { line-height: 1.9; }
.pindex__g a { font-weight: 600; text-decoration: none; }
.pindex__g a:hover { text-decoration: underline; }
.pindex__n { color: var(--muted); font-size: var(--fs-label); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .famous__head h2 { font-size: 28px; } }

/* ---- /saved -------------------------------------------------------------------- */
.saved__empty { display: grid; justify-items: start; gap: var(--s2); }
.saved__empty .empty { padding-bottom: var(--s3); }

.mini { position: relative; display: block; height: 180px; border-radius: var(--r); overflow: hidden; background: var(--line); }
.mini__map { position: absolute; inset: 0; }
.mini__map.maplibregl-map { position: absolute; }
.mini__dot {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 999px;
  background: var(--ink); box-shadow: 0 0 0 3px var(--yuzu); z-index: 2; pointer-events: none;
}
.mini__link { position: absolute; inset: 0; z-index: 3; }
.mini__dot--approx { background: transparent; box-shadow: none; border: 3px solid var(--ink); }
.mini__note { position: absolute; left: 6px; bottom: 6px; z-index: 2; font-size: 11px; line-height: 1.4; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 85%, transparent); color: var(--ink); pointer-events: none; }
.mini__attr { position: absolute; right: 6px; bottom: 6px; z-index: 2; font-size: 10px; line-height: 1.4; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 85%, transparent); color: var(--muted); pointer-events: none; }

.nearby { padding-top: var(--s7); }
.nearby h2 { font-size: var(--fs-sec); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--s4); }
.detail__foot { padding-top: var(--s7); display: grid; gap: var(--s4); justify-items: start; }
.checked { font-size: var(--fs-label); color: var(--muted); }
.checked a { color: var(--water); white-space: nowrap; }
.ja summary { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
.ja summary::-webkit-details-marker { display: none; }
.ja[open] summary { background: var(--ink); color: var(--paper); }
.ja { width: 100%; max-width: 560px; }
/* The taxi card: show it to the driver, or copy it into a map app */
.ja__card {
  margin-top: var(--s3); padding: var(--s5); border-radius: var(--r); border: 1.5px solid var(--line);
  background: color-mix(in srgb, var(--ink) 3%, var(--paper)); display: grid; gap: var(--s4); justify-items: start;
}
.ja__card [lang="ja"] { display: grid; gap: var(--s2); }
.ja__name { font-size: 28px; font-weight: 700; line-height: 1.25; }
.ja__addr { font-size: var(--fs-card); line-height: 1.5; }
.ja__copy { height: 40px; padding: 0 18px; }

/* ---- Toast --------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; max-width: calc(100% - 32px);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: var(--fs-body);
  box-shadow: var(--lift); transition: opacity .2s ease-out, transform .2s ease-out;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Map page ------------------------------------------------------------------- */
.page-map { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.page-map main { flex: 1; position: relative; min-height: 0; }
.map-shell, .map, .map.maplibregl-map { position: absolute; inset: 0; }
.map-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; pointer-events: none; }
.map-bar .chipbar__in { pointer-events: auto; width: max-content; max-width: 100%; }
.map-bar .chip, .map-bar .chipbar__n { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink), 0 2px 8px rgba(0,0,0,.12); }
.map-bar .chipbar__n { height: 40px; display: inline-block; line-height: 40px; padding: 0 14px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.map-bar .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.map-noscript { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s5); text-align: center; }
/* Doubled class: maplibre-gl.css loads after this file */
.maplibregl-popup .maplibregl-popup-content { background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--lift); font-family: var(--font); }
.maplibregl-popup .maplibregl-popup-tip { border-top-color: var(--paper) !important; border-bottom-color: var(--paper) !important; }
.pop { display: grid; gap: 4px; text-decoration: none; }
.pop__name { font-weight: 600; font-size: var(--fs-card); line-height: 1.25; }
.pop:hover .pop__name { text-decoration: underline; }
.pop__meta { color: var(--muted); font-size: var(--fs-label); }
.pop .tag { margin-top: 4px; font-size: var(--fs-label); }

/* ---- Motion ----------------------------------------------------------------------- */
/* Everything that moves on its own lives here. The JS checks the same query. */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: hidden until landing.js splits the words; shown anyway after 1.2s */
  .js .page-home .sentence:not(.is-in) { opacity: 0; animation: jog-show 0s linear 1.2s forwards; }
  @keyframes jog-show { to { opacity: 1; } }

  /* Caret blinks while a blank's sheet is open */
  .blank[aria-expanded="true"]::after { animation: jog-caret 1s steps(1) infinite; }
  @keyframes jog-caret { 50% { opacity: 0; } }

  /* Sheet rows arrive 30ms apart */
  .picker.is-open .picker__opt, .picker.is-open .picker__g { animation: jog-row .4s cubic-bezier(.2, 0, 0, 1) both; animation-delay: calc(var(--i, 0) * 30ms); }
  @keyframes jog-row { from { opacity: 0; transform: translateY(6px); } }

  @media (hover: hover) and (pointer: fine) {
    /* Price tag pops after the tilt */
    .card:hover .tag { animation: jog-pop .3s cubic-bezier(.23, 1, .32, 1) 80ms both; }
    @keyframes jog-pop { from { transform: scale(.9); } }
    /* Steam rises off the onsen mark */
    .card:hover .ph--none .steam { animation: jog-steam 1.2s ease-in-out infinite; }
    .card:hover .ph--none .steam:nth-of-type(3) { animation-delay: .15s; }
    .card:hover .ph--none .steam:nth-of-type(4) { animation-delay: .3s; }
    @keyframes jog-steam { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-5px); opacity: .35; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
