/* Plan your trip: every block shares one frame, with the title and intro in
   a left rail and the content on the right, but each block's content has its
   own form: a map, a rail line, cards, a flashcard deck, a wall menu and a
   receipt. */
.screen-navigation .screen > .trip {
  display: block;
  max-width: 1120px;
  margin-inline: auto;
  width: calc(100% - 2 * var(--gutter));
}
.trip .section-heading {
  max-width: 680px;
}
.trip .section-heading > .intro {
  margin-top: 1.5rem;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}
.trip h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}
.trip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--red);
  font-size: 0.85rem;
  text-decoration: none;
}
.trip-link:hover span:first-child {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Jump bar: section links centered in plain text, sticky under the screen
   header. The current block's link turns red over a thin red line, like the
   main nav. Prices switch currency from the header's menu. */
.trip-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
  margin-top: 2.5rem;
  padding: 0.4rem 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.trip-jump {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 2.25rem;
  min-width: 0;
}
.trip-jump a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s;
}
.trip-jump a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.trip-jump a:hover,
.trip-jump a[aria-current] {
  color: var(--red);
}
.trip-jump a[aria-current]::after {
  transform: none;
}
.trip-jump a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Block: rail (title, intro, side note) and content */
.trip-block {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(2rem, 6vw, 5rem);
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(3.3rem + 1px);
}
.trip-block:focus {
  outline: none;
}
.trip-block > * {
  grid-column: 2;
  grid-row: 1/-1;
  min-width: 0;
}
.trip-block > .trip-block-title {
  grid-column: 1;
  grid-row: 1;
}
.trip-block > .trip-block-intro,
.trip-block > .trip-help {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}
.trip-block-title {
  margin: 0;
  font: 400 clamp(1.6rem, 2.3vw, 2rem) / 1.15 var(--serif);
  letter-spacing: -0.02em;
}
.trip-block-intro {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
}
:lang(ja) .trip-block-title {
  font-family: "Noto Serif JP", serif;
  letter-spacing: 0;
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.5;
}

/* Getting around: a rail line. Each station is a button; the line runs red
   up to the chosen one and its notes open in a panel whose notch points back
   at it. Without scripts the notes are a plain numbered list. */
.transport-line {
  --dot: 56px;
  --progress: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.transport-station {
  display: none;
}
.transport-stop + .transport-stop {
  margin-top: 1.5rem;
}
.transport-detail {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: baseline;
}
.transport-detail[hidden] {
  display: none;
}
.transport-detail > * {
  grid-column: 2;
}
.transport-number {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--red);
  font: 400 2.2rem/1 var(--serif);
  font-variant-numeric: tabular-nums;
}
.transport-number span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.transport-detail h4 {
  font: 400 1.4rem/1.25 var(--serif);
}
.transport-detail p:not(.transport-number) {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--muted);
}
.transport-detail p + p:not(.transport-links-label, .transport-note) {
  margin-top: 0.75rem;
}
/* Booking links: a small label over a row of links that wraps */
.transport-detail p.transport-links-label {
  margin-top: 1.4rem;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--red);
}
.transport-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.transport-links .trip-link {
  gap: 0.35rem;
  font-size: 0.8rem;
}
.transport-detail p.transport-note {
  margin-top: 0.1rem;
  font-size: 0.72rem;
  line-height: 1.6;
}
.transport-line.is-enhanced {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.transport-line.is-enhanced .transport-stop {
  display: contents;
}
.transport-line.is-enhanced::before,
.transport-line.is-enhanced::after {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2 - 1.5px);
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}
.transport-line.is-enhanced::after {
  background: var(--red);
  transform: scaleX(var(--progress));
  transform-origin: left;
  transition: transform 0.5s ease;
}
.is-enhanced .transport-station {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.2rem 1.6rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: 400 0.78rem/1.35 var(--sans);
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s;
}
.transport-dot {
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}
.transport-icon,
.tip-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.transport-icon {
  width: 46%;
  height: 46%;
}
.transport-station:hover {
  color: var(--ink);
}
.transport-station:hover .transport-dot {
  border-color: var(--ink);
}
.transport-station.is-passed .transport-dot {
  border-color: var(--red);
  color: var(--red);
}
.transport-station[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 500;
}
.transport-station[aria-pressed="true"] .transport-dot {
  border-color: var(--red);
  background: var(--red);
  color: var(--paper);
  box-shadow:
    0 0 0 5px var(--paper),
    0 0 0 6px rgba(180, 50, 37, 0.35);
  transform: scale(1.06);
}
.transport-station:focus-visible {
  outline: none;
}
.transport-station:focus-visible .transport-dot {
  outline: 2px solid var(--red);
  outline-offset: 7px;
}
.transport-line.is-enhanced .transport-detail {
  position: relative;
  grid-row: 2;
  grid-column: 1 / -1;
  padding: 1.75rem 2rem 1.9rem;
  border: 1px solid var(--line);
  background: var(--paper-card);
  animation: city-in 0.45s ease both;
}
.transport-line.is-enhanced .transport-detail::before {
  content: "";
  position: absolute;
  top: -8px;
  left: calc(10% + var(--progress) * 80% - 7px);
  width: 14px;
  height: 14px;
  border: solid var(--line);
  border-width: 1px 0 0 1px;
  background: var(--paper-card);
  transform: rotate(45deg);
  transition: left 0.5s ease;
}
.transport-body > .trip-link {
  margin-top: 1rem;
}

/* Good to know: a grid of small cards, each with a line icon */
.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tip-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.35rem 1.45rem;
  border: 1px solid var(--line);
  background: var(--paper-card);
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}
.tip-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin-bottom: 1rem;
  color: var(--ink);
  transition: color 0.25s;
}
.tip-card h4 {
  margin-bottom: 0.45rem;
  font: 400 1.25rem/1.25 var(--serif);
}
.tip-card p {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
}
/* A card's link sits at its foot, level with the links on its neighbors */
.tip-card .trip-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.6rem;
  min-height: 36px;
}
@media (hover: hover) {
  .tip-card:hover {
    border-color: var(--ink);
    box-shadow: 0 14px 28px -22px rgba(37, 37, 36, 0.55);
    transform: translateY(-3px);
  }
  .tip-card:hover .tip-icon {
    color: var(--red);
  }
}
:lang(ja) .tip-card h4,
:lang(ja) .transport-detail h4 {
  font-family: "Noto Serif JP", serif;
  font-size: 1.05rem;
  line-height: 1.5;
}
.trip-help {
  margin-top: 1.75rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--red);
  background: rgba(180, 50, 37, 0.04);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink);
}
.trip-help strong {
  display: block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 400;
  color: var(--red);
}

/* Guides: two cards about the person: face, name and flag, then languages
   and areas under small red labels, and a WhatsApp button pinned to the
   bottom so both line up. The services they share sit once in the rail.
   The guide who speaks the page's language comes first. */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.guide-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  background: var(--paper-card);
}
:lang(pt) .guide-card[data-guide="paulo"] {
  order: -1;
}
.guide-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.guide-head > div {
  min-width: 0;
}
.guide-avatar {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
  box-shadow:
    0 0 0 3px var(--paper-card),
    0 0 0 4px var(--line);
}
.guide-card h4 {
  font: 400 1.4rem/1.15 var(--serif);
  text-wrap: balance;
}
.guide-from {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.guide-flag {
  width: 20px;
  height: 14px;
  outline: 1px solid rgba(37, 37, 36, 0.12);
}
.guide-facts {
  display: grid;
  gap: 1rem;
  margin: 1.35rem 0 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.guide-facts dt,
.guides-offer-label {
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--red);
}
.guide-facts dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
}
.guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.guide-tags li {
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.76rem;
  line-height: 1.5;
  white-space: nowrap;
}
.guide-contact {
  margin-top: auto;
  width: 100%;
  font-size: 0.86rem;
}
.guide-whatsapp {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: #25d366;
}
.guide-contact:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Shared services: under the intro in the rail, after the cards when the
   rail stacks. */
.trip-block > .guides-offer {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  margin-top: 1.75rem;
}
.guide-services {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
}
.guide-services li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.guide-services .stay-icon {
  width: 15px;
  height: 15px;
  stroke: var(--muted);
}

/* Phrases: flashcards in a grid, all in view. The whole card plays its
   recording, and a red rule runs across the top while it plays. */
.phrase-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.phrase-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto;
  column-gap: 0.5rem;
  padding: 0.75rem 0.85rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper-card);
  transition: border-color 0.25s;
}
.phrase-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.phrase-card:has(.is-playing)::before {
  transform: none;
}
.phrase-card:hover,
.phrase-card:has(.is-playing) {
  border-color: var(--ink);
}
.phrase-card:has(.phrase-play:focus-visible) {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.phrase-jp {
  grid-column: 1 / -1;
  grid-row: 1;
  font:
    400 1.15rem/1.45 "Noto Serif JP",
    serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.phrase-romaji {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0.45rem;
  font: italic 400 0.98rem/1.3 var(--serif);
  color: var(--red);
}
.phrase-meaning {
  grid-column: 1;
  grid-row: 3;
  margin-top: 0.1rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}
.phrase-play {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.phrase-play::after {
  content: "";
  position: absolute;
  inset: 0;
}
.phrase-play svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.phrase-play svg path:first-child {
  fill: currentColor;
  stroke: none;
}
.phrase-card:hover .phrase-play {
  border-color: var(--red);
}
.phrase-play.is-playing {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
}
.phrase-play:focus-visible {
  outline: none;
}
:lang(ja) .phrase-meaning {
  font-size: 0.8rem;
}

/* Food: a wall menu (o-shinagaki) hanging from a rail, every dish on show at
   once so guests can read and compare them. Each dish has its Japanese name
   above, then its name, a dotted leader and its price, then a short note. */
.food-menu {
  position: relative;
  margin-top: 1.4rem;
  padding: 1.6rem clamp(1.1rem, 3vw, 2.25rem) 1.75rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-card);
  box-shadow: 0 18px 30px -26px rgba(37, 37, 36, 0.55);
}
/* The rail, and the two cords the board hangs from */
.food-menu::before {
  content: "";
  position: absolute;
  top: -1.4rem;
  left: -0.4rem;
  right: -0.4rem;
  height: 4px;
  border-radius: 2px;
  background: var(--ink);
}
.food-menu::after {
  content: "";
  position: absolute;
  top: -1.4rem;
  left: 14%;
  right: 14%;
  height: 1.4rem;
  border-inline: 1px solid var(--ink);
}
.food-menu-title {
  margin: 0 0 1.1rem;
  color: var(--red);
  text-align: center;
  font:
    400 1.25rem/1 "Noto Serif JP",
    serif;
  letter-spacing: 0.3em;
}
.food-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 19rem 2;
  column-gap: clamp(1.5rem, 4vw, 3rem);
  column-rule: 1px solid var(--line);
}
.food-item {
  display: grid;
  grid-template-columns: minmax(min-content, max-content) minmax(1rem, 1fr) auto;
  column-gap: 0.5rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px dashed var(--line);
  break-inside: avoid;
}
.food-item:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}
.food-glyph {
  grid-column: 1 / -1;
  color: var(--red);
  font:
    400 0.95rem/1.4 "Noto Serif JP",
    serif;
  letter-spacing: 0.08em;
}
.food-item h4 {
  grid-column: 1;
  grid-row: 2;
  font: 400 1.2rem/1.25 var(--serif);
}
/* The dotted leader between name and price */
.food-item::after {
  content: "";
  grid-column: 2;
  grid-row: 2;
  border-bottom: 1px dotted var(--muted);
  translate: 0 -0.3em;
}
.food-price {
  grid-column: 3;
  grid-row: 2;
  font: 400 1.05rem/1.25 var(--serif);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.price-range {
  white-space: nowrap;
}
.food-text {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 0.3rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}
/* In Japanese the red name is the dish's name, so it sits on the price line */
:lang(ja) .food-item h4 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
:lang(ja) .food-glyph {
  grid-column: 1;
  grid-row: 2;
  color: var(--ink);
  font-size: 1.15rem;
}

/* Cities: title, intro and the city card read down the left column, with a
   large map on the right whose pins are the buttons that pick a city. The
   map stays in view beside the card. */
#trip-cities {
  grid-template-columns: minmax(340px, 1fr) minmax(0, 1.15fr);
  grid-template-rows: auto auto 1fr;
}
.city-explorer {
  display: contents;
}
.city-attraction:focus-visible,
.city-chip:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
/* City names under the map, for narrow screens where the pins are too small
   to tap; the chosen city turns red over a line, like the main nav. */
.city-chips {
  display: none;
}
.city-chip {
  position: relative;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
}
.city-chip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.city-chip[aria-pressed="true"] {
  color: var(--red);
}
.city-chip[aria-pressed="true"]::after {
  transform: none;
}
.city-map {
  position: sticky;
  top: 4.5rem;
  grid-column: 2;
  grid-row: 1/-1;
  justify-self: center;
  width: 100%;
  max-width: 540px;
  align-self: start;
}
.city-art-map {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.land {
  opacity: 0.1;
}
.land path {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.okinawa-frame {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}
.city-pin {
  cursor: pointer;
}
.city-pin:focus {
  outline: none;
}
.city-pin:focus-visible .city-hit {
  stroke: var(--red);
  stroke-width: 1.5;
}
.city-pin:focus-visible .city-kanji {
  fill: var(--red);
}
.city-hit {
  fill: transparent;
}
.city-dot {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.5;
  transition:
    fill 0.25s ease,
    stroke 0.25s ease,
    r 0.25s ease;
}
.city-kanji {
  font:
    400 19px "Noto Serif JP",
    serif;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
  stroke-linejoin: round;
  transition: fill 0.25s ease;
}
.city-romaji {
  font: 500 9.5px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--muted);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.city-pin.is-hover .city-dot {
  stroke: var(--red);
}
.city-pin.is-hover .city-kanji {
  fill: var(--red);
}
.city-pin.is-active .city-dot {
  fill: var(--red);
  stroke: var(--paper);
  r: 6px;
}
.city-pin.is-active .city-kanji {
  fill: var(--red);
}
.city-pin.is-active .city-romaji {
  fill: var(--ink);
}
.city-cards {
  grid-column: 1;
  grid-row: 3;
  margin-top: 1.5rem;
  align-self: start;
  container: city-card/inline-size;
}
.city-card + .city-card {
  margin-top: 2.5rem;
}
.is-enhanced .city-card {
  animation: city-in 0.45s ease both;
}
.is-enhanced .city-card + .city-card {
  margin-top: 0;
}

@keyframes city-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.city-glyph {
  display: block;
  color: var(--red);
  font:
    400 clamp(2.4rem, 4vw, 3.2rem) / 1.15 "Noto Serif JP",
    serif;
}
.city-card h4 {
  margin-top: 0.2rem;
  font: 400 clamp(1.5rem, 2vw, 1.8rem) / 1.15 var(--serif);
}
.city-temp {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: 0.7rem 0;
  border-block: 1px solid var(--line);
  font-size: 0.86rem;
}
.city-temp > span,
.city-label {
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--red);
}
.city-temp strong {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* From Tokyo: one line like the weather, with an icon for the train or
   plane, the time and a single fare */
.city-route {
  flex-wrap: wrap;
  column-gap: 0.75rem;
  margin-top: 0;
  border-top: 0;
}
.city-route strong {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  white-space: nowrap;
}
.route-icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--red);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.city-route strong > [aria-hidden],
.city-route .route-price {
  color: var(--muted);
}
.city-route.is-home strong {
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}
:lang(ja) .city-route.is-home strong {
  font-family: "Noto Serif JP", serif;
  font-style: normal;
}
.city-art {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 0.6rem;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: rgba(202, 197, 187, 0.16);
}
.city-art.is-changing > * {
  animation: art-in 0.35s ease both;
}

@keyframes art-in {
  from {
    opacity: 0;
  }
}
.city-art.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      transparent 30%,
      rgba(255, 255, 255, 0.35) 50%,
      transparent 70%
    )
    0 0 / 250% 100%;
  animation: art-skeleton 1.4s ease-in-out infinite;
}

@keyframes art-skeleton {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -50% 0;
  }
}
.city-art-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.city-art-image[hidden] {
  display: none;
}
.city-art-label {
  position: relative;
  padding: 1rem;
  text-align: center;
  font: italic 400 clamp(1.05rem, 1.5vw, 1.25rem) / 1.35 var(--serif);
  color: var(--muted);
}
.city-art-image:not([hidden]) + .city-art-label {
  display: none;
}
/* Where to stay, then main attractions, each under a small red label like
   the weather's */
.city-label {
  margin: 1.1rem 0 0;
  font-weight: 400;
  line-height: 1.4;
}
.city-sights {
  margin-top: 1.4rem;
  padding-bottom: 1.25rem;
  border-block: 1px solid var(--line);
}
/* Klook: two small red links under the attractions, the welcome offer above
   the booking link */
.city-klook,
.city-klook-signup {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}
.city-klook-signup {
  display: flex;
  width: fit-content;
  min-height: 32px;
}
.city-klook-signup + .city-klook {
  margin-top: 0;
}

/* Affiliate links end in a heart; the note at the end of the section says
   what it means */
.affiliate-mark {
  display: inline-flex;
}
.affiliate-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  fill: var(--red);
  stroke: var(--red);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.trip-affiliate-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

/* Where to stay: the districts as small pills; picking one shows its notes
   in a pale panel underneath. Every note shares one grid cell, so the height
   never jumps. */
.trip-icons {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.stay-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.35rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}
.stay-options li {
  display: flex;
}
.stay-option {
  min-height: 32px;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: 400 0.92rem/1.2 var(--serif);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background-color 0.2s;
}
.stay-option:hover {
  border-color: var(--red);
  color: var(--red);
}
.stay-option[aria-pressed="true"] {
  border-color: var(--red);
  background: var(--red);
  color: var(--paper);
}
.stay-option:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
:lang(ja) .stay-option {
  font-family: "Noto Serif JP", serif;
  font-size: 0.85rem;
}
.stay-details {
  display: grid;
  margin-top: 0.7rem;
  padding: 0.85rem 1rem 0.95rem;
  background: rgba(202, 197, 187, 0.16);
}
.stay-detail {
  grid-area: 1 / 1;
}
.stay-detail:not([hidden]) {
  animation: art-in 0.3s ease both;
}
.stay-detail[hidden] {
  display: block;
  visibility: hidden;
}
.stay-text {
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}
.stay-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}
.stay-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.76rem;
  line-height: 1.45;
}
.stay-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--red);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Main attractions: hovering or focusing a name previews its art above, a
   click keeps it */
.city-attractions {
  display: grid;
  column-gap: 1.25rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}
.city-attractions li {
  display: flex;
  align-items: center;
}
.city-attractions li + li {
  border-top: 1px solid var(--line);
}
.city-attraction {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 400 1.05rem/1.3 var(--serif);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}
.city-attraction:hover,
.city-attraction[aria-pressed="true"] {
  color: var(--red);
}
:lang(ja) .city-attraction,
:lang(ja) .city-art-label {
  font-family: "Noto Serif JP", serif;
  font-style: normal;
  font-size: 0.95rem;
}

/* Two attractions per row once the card has room for them */

@container city-card (min-width:300px) {
  .city-attractions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .city-attractions li:nth-child(2) {
    border-top: 0;
  }
  .city-attraction:not(:lang(ja)) {
    font-size: 0.96rem;
  }
}

/* Ready: packing list beside a paper receipt for a day in Tokyo */
.ready-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.packing h4 {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  font: 400 0.68rem/1.6 var(--sans);
  letter-spacing: 0.14em;
  color: var(--red);
}
.packing-list {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}
.packing-list li + li {
  border-top: 1px solid var(--line);
}
.packing-list label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  font-size: 0.86rem;
  cursor: pointer;
}
.packing-list input {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 0.25rem 0 0;
  accent-color: var(--red);
}
.packing-list input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--red);
}
.receipt {
  position: relative;
  margin: 0.5rem 0 0;
  padding: 2rem 1.6rem 2.3rem;
  background: var(--paper-card);
  transform: rotate(1.2deg);
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/14px 51%
      repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top/14px 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/14px 51%
      repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top/14px 51% repeat-x;
}
.trip {
  --paper-card: #fffdf8;
}

.receipt-store {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.receipt h4 {
  margin: 0.4rem 0 0.2rem;
  text-align: center;
  font: 400 1.5rem/1.2 var(--serif);
}
.receipt-date {
  margin-bottom: 1.1rem;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.receipt-rows {
  margin: 0;
  border-top: 1px dashed var(--line);
}
.receipt-rows div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.82rem;
}
.receipt-rows dd {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  font-weight: 500;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.receipt-note {
  margin-top: 0.8rem;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 72%;
}
.receipt-stamp {
  position: absolute;
  right: 1.3rem;
  bottom: 1.7rem;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font:
    500 1.5rem/1 "Noto Serif JP",
    serif;
  transform: rotate(-14deg);
  opacity: 0.8;
}
:lang(ja) .packing h4 {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
:lang(ja) .receipt h4 {
  font-family: "Noto Serif JP", serif;
  font-size: 1.25rem;
}

/* Below the widest layout the links center in the space left of the switch,
   and once they no longer fit on one line they scroll sideways */

@media (max-width: 1100px) {
  .trip-bar {
    grid-template-columns: minmax(0, 1fr);
  }
  .trip-jump {
    grid-column: 1;
  }
}

@media (max-width: 900px) {
  .trip-jump {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 1.4rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  /* The links fade out at whichever edge has more to scroll to */
  .trip-jump {
    --fade-before: 0px;
    --fade-after: 0px;
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent,
      #000 var(--fade-before),
      #000 calc(100% - var(--fade-after)),
      transparent
    );
    mask-image: linear-gradient(
      90deg,
      transparent,
      #000 var(--fade-before),
      #000 calc(100% - var(--fade-after)),
      transparent
    );
  }
  .trip-jump.has-before {
    --fade-before: 1.75rem;
  }
  .trip-jump.has-after {
    --fade-after: 2.5rem;
  }
  .trip-jump::-webkit-scrollbar {
    display: none;
  }
  .trip-jump a {
    flex-shrink: 0;
  }
  .trip-jump a:first-child {
    margin-left: auto;
  }
  .trip-jump a:last-child {
    margin-right: auto;
  }
  .trip-block,
  #trip-cities {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    padding-top: 1.75rem;
  }
  .trip-block > *,
  .trip-block > .trip-block-title,
  .trip-block > .trip-block-intro,
  .trip-block > .trip-help,
  .trip-block > .guides-offer,
  .city-map,
  .city-cards {
    grid-column: 1;
    grid-row: auto;
  }
  .trip-block-intro {
    margin-bottom: 1.75rem;
  }
  .trip-block > .trip-help {
    margin: 2rem 0 0;
  }
  .trip-block-title + .tip-grid {
    margin-top: 1.75rem;
  }
  .city-cards {
    margin-top: 0;
  }
  .city-map {
    position: static;
    margin: 0 auto 1.5rem;
    max-width: 460px;
  }
  .city-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.25rem;
    margin-top: 0.5rem;
  }
  .ready-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .receipt {
    width: 100%;
    max-width: 340px;
    justify-self: center;
  }
}

@media (max-width: 600px) {
  .guide-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .guide-head {
    gap: 1.25rem;
  }
  .guide-avatar {
    width: 96px;
    height: 96px;
  }
  .guide-card h4 {
    font-size: 1.5rem;
  }
  .guide-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .transport-line {
    --dot: 44px;
  }
  .is-enhanced .transport-station {
    gap: 0.5rem;
    padding-bottom: 1.25rem;
    font-size: 0.7rem;
  }
  .transport-line.is-enhanced .transport-detail {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.35rem 1.25rem 1.5rem;
  }
  .transport-detail > *,
  .transport-number {
    grid-column: 1;
    grid-row: auto;
  }
  .transport-number {
    margin-bottom: 0.6rem;
    font-size: 1.6rem;
  }
  .transport-number span {
    display: inline;
  }
  .phrase-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .phrase-card {
    padding: 0.7rem 0.75rem 0.65rem;
  }
  .phrase-jp {
    font-size: 1.05rem;
  }
  .phrase-romaji {
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-enhanced .city-card,
  .city-art.is-changing > *,
  .city-art.is-loading::before,
  .stay-detail:not([hidden]),
  .transport-detail {
    animation: none;
  }
}
