/* Shared by every online visitor document, after its template styles.
   Keep each edition's fonts and editorial emphasis; let the text reflow. */
:where(main, section, article, aside, nav, form, fieldset, figure) { min-inline-size: 0; }
:where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, figcaption, blockquote, label, legend, a) {
  overflow-wrap: anywhere;
}
:is(h1, h2, h3, h4, h5, h6, figcaption, legend) { text-wrap: balance; }
:is(p, li, dd, blockquote) { text-wrap: pretty; }
:lang(ko) { word-break: keep-all; }
[lang|="ja"] { word-break: normal; }
:lang(ja) { line-break: strict; }
#now-title:lang(ja) .now-promise { word-break: normal; line-break: strict; }
@supports (word-break: auto-phrase) {
  :lang(ja):is(h1, h2, h3, h4, h5, h6, figcaption, summary, a, button, strong),
  #now-title:lang(ja) .now-promise { word-break: auto-phrase; }
}

/* Retain the editorial phrase boundary on wide screens, with an actual space
   between the same words when a narrow screen needs to choose its own line. */
.heading-break { display: block; }

.button,
.edition-action,
.search-guide-action,
.place-visit-action,
.field-download {
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.button { column-gap: clamp(.5rem, 3vw, 1.875rem); }
:where(input, select, textarea) { min-inline-size: 0; max-inline-size: 100%; }
:where(.breadcrumbs, .place-detail-links, .place-hub-planning, .eoseung-actions, .stream-nav) > * { min-inline-size: 0; }

@media screen and (max-width: 560px) {
  .heading-break { display: inline; }

  /* The rem floor stays legible; the viewport term removes the desktop-sized
     minimum that used to split even ordinary place names on small phones. */
  .page-title,
  .place-detail h1,
  .place-detail-hero.has-photo h1,
  .place-hub-head h1,
  .place-mast h1,
  .transport-intro h1,
  .search-guide-hero h1,
  .stream-hero h1 {
    font-size: clamp(2.15rem, 9vw, 3rem);
    line-height: 1.12;
  }
  :is(.spring-hero, .summer-hero, .autumn-hero, .winter-hero) .page-title {
    font-size: clamp(2.6rem, 12vw, 4rem);
    line-height: 1.06;
  }
  .search-guide-hero h1 { max-inline-size: 100%; }
  .now h1 .term-name[data-long-name] { font-size: clamp(2.2rem, 10vw, 3.4rem); }

  .station-form { grid-template-columns: minmax(0, 1fr); }
  .station-form label:nth-child(2) { grid-column: auto; grid-row: auto; }
  .station-form :is(label, button, select) { min-inline-size: 0; }
}

@media screen and (max-width: 480px) {
  /* Two columns leave too little room for translated descriptions and values. */
  .place-detail-facts > div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .place-hub-entry { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  footer nav.fam-band ul.fam-grid { grid-template-columns: minmax(0, 1fr); }
}
