.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ho-indigo);
  color: var(--ho-paper-raised);
  font-family: var(--ho-font-ui);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

main {
  overflow: clip;
}

body,
.ho-top-bar,
.ho-top-brand,
.ho-primary-nav a,
.ho-menu-trigger,
.places-intro,
.places-intro h1,
.places-intro h1 + p,
.places-kicker,
.map-mode-switch,
.map-mode-button,
.map-era-control,
.map-era-control select,
.places-map-layout,
.map-frame,
.places-event-browser,
.event-browser-header,
.places-event-button,
.detail-dialog,
.detail-header,
.global-entry-links,
.global-entry-link,
.global-entry-link::after {
  transition:
    background-color 280ms ease,
    border-color 280ms ease,
    color 280ms ease,
    box-shadow 280ms ease;
}

.places-intro {
  --ho-section-banner-image: url("../assets/kinkakuji-visit-hero-v1.jpg");
  --ho-section-banner-position: center 44%;
}

.places-workspace {
  width: min(1500px, calc(100% - (var(--ho-gutter) * 2)));
  margin: 0 auto;
  padding: clamp(26px, 3vw, 38px) 0 clamp(58px, 7vw, 84px);
}

.map-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.map-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(138px, 1fr));
  border-bottom: 1px solid var(--ho-line-strong);
}

.map-mode-button {
  position: relative;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ho-ink-muted);
  cursor: pointer;
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-ui);
  font-weight: 660;
}

.map-mode-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
  content: "";
}

.map-mode-button:hover,
.map-mode-button:focus-visible,
.map-mode-button.is-active {
  color: var(--ho-indigo);
}

.map-mode-button.is-active::after {
  background: var(--ho-indigo);
}

.map-era-control {
  display: grid;
  grid-template-columns: auto minmax(210px, 300px);
  gap: 13px;
  align-items: center;
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-weight: 660;
}

.map-era-control[hidden] {
  /* Keep the map at the same vertical position when Period is unavailable. */
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}

.map-era-control select {
  min-height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--ho-line-strong);
  border-radius: var(--ho-radius-control);
  background: var(--ho-paper-raised);
  color: var(--ho-ink);
  cursor: pointer;
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-ui);
}

.places-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
  border-top: 3px solid var(--ho-indigo);
  border-bottom: 1px solid var(--ho-line-strong);
  background: var(--ho-paper-light);
}

.map-frame {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--ho-line-strong);
}

.history-map-canvas {
  min-height: clamp(660px, 72vh, 820px);
}

.map-error {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--ho-line-strong);
  background: var(--ho-paper-raised);
  color: var(--ho-ink);
  font-size: var(--ho-type-ui);
}

.map-selection-feedback {
  position: absolute;
  z-index: 500;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100% - 36px));
  padding: 13px 15px 14px;
  border: 1px solid var(--ho-line-strong);
  background: color-mix(in srgb, var(--ho-paper-raised) 96%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ho-ink) 12%, transparent);
  color: var(--ho-ink);
  pointer-events: none;
}

.map-selection-feedback.is-today-place {
  border-color: var(--today-line);
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--today-panel) 92%, var(--today-accent-soft)),
      color-mix(in srgb, var(--today-panel) 76%, var(--today-accent-soft))
    );
  box-shadow: 0 10px 28px color-mix(in srgb, var(--today-accent) 14%, transparent);
  color: var(--today-ink);
  pointer-events: auto;
}

.map-selection-feedback[hidden] {
  display: none;
}

.map-selection-feedback > p,
.map-selection-feedback-copy > strong,
.map-selection-feedback-copy > span {
  display: block;
  margin: 0;
}

.map-selection-feedback p {
  color: var(--ho-vermilion);
  font-family: var(--ho-font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.map-selection-feedback.is-today-place > p {
  color: var(--today-accent);
}

.map-selection-feedback-copy > strong {
  margin-top: 3px;
  font-family: var(--ho-font-reading);
  font-size: 0.98rem;
  font-weight: 620;
  line-height: 1.25;
}

.map-selection-feedback-copy > span {
  margin-top: 4px;
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-ui);
  font-size: 0.76rem;
  line-height: 1.4;
}

.map-selection-feedback-places {
  display: grid;
  margin-top: 6px;
}

.map-selection-feedback-places[hidden],
.map-selection-feedback-copy[hidden] {
  display: none;
}

.map-selection-place {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--today-line) 82%, transparent);
  color: var(--today-ink);
  text-decoration: none;
}

.map-selection-place:first-child {
  border-top: 0;
}

.map-selection-place:hover,
.map-selection-place:focus-visible {
  color: var(--today-accent);
}

.map-selection-place:focus-visible {
  outline: 2px solid var(--today-accent);
  outline-offset: 4px;
}

.map-selection-place__names,
.map-selection-place__context {
  display: grid;
  min-width: 0;
}

.map-selection-place__names strong {
  overflow-wrap: anywhere;
  font-family: var(--ho-font-reading);
  font-size: 0.98rem;
  font-weight: 620;
  line-height: 1.2;
}

.map-selection-place__japanese,
.map-selection-place__city,
.map-selection-place__context small {
  color: var(--today-muted);
  font-family: var(--ho-font-ui);
  line-height: 1.3;
}

.map-selection-place__japanese,
.map-selection-place__city {
  font-size: 0.73rem;
}

.map-selection-place__context {
  justify-items: end;
  text-align: right;
}

.map-selection-place__context small {
  font-size: 0.64rem;
  font-weight: 650;
}

.map-selection-place__arrow {
  color: var(--today-accent);
  font-family: var(--ho-font-ui);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.map-selection-place:hover .map-selection-place__arrow,
.map-selection-place:focus-visible .map-selection-place__arrow {
  transform: translateX(3px);
}

.places-event-browser {
  display: grid;
  min-width: 0;
  max-height: clamp(660px, 72vh, 820px);
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--ho-paper-raised);
}

.event-browser-header {
  padding: 23px 25px 20px;
  border-bottom: 1px solid var(--ho-line-strong);
}

.event-browser-header p,
.event-browser-header h2 {
  margin: 0;
}

.event-browser-header > p:first-child {
  color: var(--ho-vermilion);
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-weight: 690;
}

.event-browser-header h2 {
  margin-top: 5px;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  font-weight: 520;
  letter-spacing: -0.025em;
  line-height: var(--ho-leading-title);
}

#eventBrowserJapanese {
  margin-top: 4px;
  color: var(--ho-ink-muted);
  font-size: var(--ho-type-secondary-ja);
}


.places-event-list {
  margin: 0;
  padding: 0 22px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-color: var(--ho-line-strong) transparent;
  scrollbar-width: thin;
}

.places-event-list li {
  margin: 0;
}

.places-event-list[data-mode="today"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  align-items: start;
  overflow: visible;
  padding-bottom: 16px;
}

.places-browse-column {
  min-width: 0;
  list-style: none;
}

.places-region-column {
  padding-left: 18px;
  border-left: 1px solid var(--ho-line-strong);
}

.places-major-cities,
.places-regions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.places-list-heading {
  display: grid;
  gap: 3px;
  padding: 18px 4px 9px;
  border-bottom: 1px solid var(--ho-line-strong);
}

.places-list-heading strong {
  color: var(--ho-ink);
  font-family: var(--ho-font-ui);
  font-size: 0.82rem;
  font-weight: 720;
}

.places-list-heading span {
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-ui);
  font-size: 0.72rem;
  line-height: 1.35;
}

.places-region-group {
  border-bottom: 1px solid var(--ho-line);
}

.places-region-group details {
  width: 100%;
}

.places-region-group summary {
  display: grid;
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 3px;
  padding: 10px 5px;
  align-items: center;
  color: var(--ho-ink);
  cursor: pointer;
  list-style: none;
}

.places-region-group summary::-webkit-details-marker {
  display: none;
}

.places-region-group summary::after {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--ho-indigo);
  content: "+";
  font-family: var(--ho-font-ui);
  font-size: 1.1rem;
}

.places-region-group details[open] summary::after {
  content: "−";
}

.places-region-names {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.places-region-names strong {
  font-size: 0.96rem;
  font-weight: 610;
  white-space: nowrap;
}

.places-region-names span {
  color: var(--ho-ink-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.places-region-count {
  grid-column: 1;
  grid-row: 2;
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-ui);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.places-region-cities {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0 4px 10px 14px;
  border-left: 2px solid var(--ho-indigo);
  list-style: none;
}

.places-event-browser.is-today {
  max-height: none;
}

.places-event-button {
  display: grid;
  width: 100%;
  min-height: 92px;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 15px 4px;
  align-items: start;
  border: 0;
  border-bottom: 1px solid var(--ho-line);
  background: transparent;
  color: var(--ho-ink);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.places-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--ho-line);
}

.places-event-row .places-event-button {
  border-bottom: 0;
}

.places-event-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px 0 8px;
}

.event-expand-button,
.event-more-button {
  border: 0;
  background: transparent;
  color: var(--ho-indigo);
  cursor: pointer;
  font-family: var(--ho-font-ui);
  font-weight: 700;
  text-decoration: none;
}

.event-expand-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ho-line-strong);
  font-size: 1.1rem;
}

.event-expand-button:disabled,
.event-more-button:disabled {
  cursor: default;
  opacity: 0.34;
}

.event-quick-description {
  padding: 12px 14px 15px 80px;
  border-bottom: 1px solid var(--ho-line);
  background: color-mix(in srgb, var(--ho-paper-light) 72%, transparent);
}

.event-quick-description[hidden] {
  display: none;
}

.event-quick-description p {
  margin: 0;
  color: var(--ho-ink-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.event-quick-description p.is-missing {
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-style: italic;
}

.event-more-button {
  margin-top: 9px;
  padding: 5px 0;
  border-bottom: 1px solid currentColor;
  font-size: var(--ho-type-meta);
}

.places-event-button:hover,
.places-event-button:focus-visible,
.places-event-button.is-preview,
.places-event-button.is-selected {
  background: color-mix(in srgb, var(--ho-indigo) 6%, transparent);
}

.places-event-button.is-selected {
  box-shadow: inset 3px 0 0 var(--ho-indigo);
}

.places-event-date {
  color: var(--ho-vermilion);
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-variant-numeric: tabular-nums;
  font-weight: 710;
  line-height: 1.35;
}

.places-event-copy,
.places-event-copy strong,
.places-event-copy span,
.places-event-copy small {
  display: block;
}

.places-event-copy strong {
  font-size: 1rem;
  font-weight: 570;
  line-height: 1.33;
}

.places-event-japanese {
  margin-top: 3px;
  color: var(--ho-ink-muted);
  font-size: var(--ho-type-secondary-ja);
}

.places-event-summary {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-reading);
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-map-mark {
  align-self: center;
  padding: 4px 6px;
  border: 1px solid var(--ho-indigo);
  border-radius: var(--ho-radius-control);
  color: var(--ho-indigo);
  font-family: var(--ho-font-ui);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
}

.places-today-button {
  min-height: 68px;
  grid-template-columns: minmax(0, 1fr);
  padding: 9px 4px;
  align-items: center;
}

.places-today-button .places-event-japanese {
  display: inline;
  margin-top: 0;
  margin-left: 8px;
  vertical-align: baseline;
}

.places-today-button .places-event-copy strong {
  display: inline;
  font-size: 1rem;
  font-weight: 610;
}

.places-today-guide-count {
  margin-top: 4px;
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-ui);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.3;
}

body,
.places-intro,
.places-intro::before,
.places-map-layout,
.map-frame,
.places-event-browser,
.event-browser-header,
.map-mode-switch,
.map-mode-button,
.map-era-control select,
.places-event-button,
.global-entry-link,
dialog,
.detail-header {
  transition:
    background-color 280ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 280ms cubic-bezier(0.22, 1, 0.36, 1),
    color 280ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.error-state {
  padding: 24px 4px;
  color: var(--ho-ink-muted);
  font-size: var(--ho-type-body);
  line-height: var(--ho-leading-body);
}

dialog {
  width: min(760px, calc(100% - 36px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ho-line-strong);
  border-radius: 0;
  background: var(--ho-paper-raised);
  color: var(--ho-ink);
  box-shadow: 0 24px 78px color-mix(in srgb, var(--ho-ink) 24%, transparent);
}

dialog::backdrop {
  background: color-mix(in srgb, var(--ho-ink) 48%, transparent);
}

.detail-content {
  padding: 0 30px 34px;
}

.detail-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ho-line-strong);
  background: color-mix(in srgb, var(--ho-paper-raised) 96%, transparent);
  backdrop-filter: blur(10px);
}

.detail-kicker {
  margin: 0;
  color: var(--ho-vermilion);
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-weight: 700;
}

.text-close {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ho-indigo);
  cursor: pointer;
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-ui);
  font-weight: 680;
}

.detail-opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.42fr);
  gap: 28px;
  padding: 28px 0 25px;
  border-bottom: 1px solid var(--ho-line-strong);
}

.detail-opening:has(.detail-figure[hidden]) {
  grid-template-columns: 1fr;
}

.detail-title-block {
  grid-column: 1;
  grid-row: 1;
}

.detail-date {
  margin: 0;
  color: var(--ho-vermilion);
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-weight: 700;
}

.detail-date:empty {
  display: none;
}

.detail-title-block h2 {
  margin: 7px 0 0;
  font-size: var(--ho-type-section-title);
  font-weight: 520;
  letter-spacing: -0.03em;
  line-height: var(--ho-leading-title);
}

.detail-japanese {
  margin: 8px 0 0;
  color: var(--ho-ink-muted);
  font-size: var(--ho-type-secondary-ja);
}

.detail-figure {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.detail-image-frame {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-top: 1px solid var(--ho-line);
  border-bottom: 1px solid var(--ho-line);
}

.detail-image-frame::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--ho-paper-raised) 32%, transparent),
    transparent 35%,
    color-mix(in srgb, var(--ho-paper-raised) 26%, transparent)
  );
  content: "";
  pointer-events: none;
}

.detail-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.1) saturate(0.7) contrast(0.92);
}

.detail-figure figcaption {
  margin-top: 6px;
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-ui);
  font-size: 0.68rem;
  line-height: 1.35;
}

.detail-overview {
  padding: 6px 0 0;
}

.detail-overview section {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 25px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ho-line);
}

.detail-overview h3,
.detail-overview p {
  margin: 0;
}

.detail-overview h3,
.detail-connections h3,
.detail-connections h4 {
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-weight: 720;
}

.detail-overview p {
  color: var(--ho-ink-muted);
  font-size: var(--ho-type-body);
  line-height: var(--ho-leading-body);
}

.detail-place-facts {
  margin: 0;
  padding: 10px 0 0;
}

.detail-place-facts > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 25px;
  padding: 17px 0;
  border-bottom: 1px solid var(--ho-line);
}

.detail-place-facts dt {
  grid-row: 1 / span 2;
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
  font-weight: 720;
}

.detail-place-facts dd {
  margin: 0;
  color: var(--ho-ink-muted);
  line-height: 1.45;
}

.detail-modern-location {
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-meta);
}

.fact-japanese {
  font-size: var(--ho-type-secondary-ja);
}

.detail-connections {
  padding-top: 23px;
}

.detail-connections > h3 {
  margin: 0 0 15px;
}

.connection-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.connection-columns h4 {
  margin: 0 0 8px;
  color: var(--ho-vermilion);
}

.connection-list {
  border-top: 1px solid var(--ho-line-strong);
}

.connection-link {
  position: relative;
  display: block;
  width: 100%;
  padding: 11px 0;
  border-bottom: 1px solid var(--ho-line);
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  font-family: var(--ho-font-reading);
  text-align: left;
  text-decoration: none;
}

a.connection-link,
button.connection-link {
  padding-right: 24px;
  cursor: pointer;
}

a.connection-link:hover strong,
a.connection-link:focus-visible strong,
button.connection-link:hover strong,
button.connection-link:focus-visible strong {
  color: var(--ho-vermilion);
}

.connection-link i,
.guide-link i {
  position: absolute;
  right: 1px;
  top: 50%;
  color: var(--ho-indigo);
  font-style: normal;
  transform: translateY(-50%);
}

.connection-link strong,
.connection-link span {
  display: block;
}

.connection-link small {
  display: block;
  margin-top: 3px;
  color: var(--ho-ink-muted);
  font-family: var(--ho-font-ui);
  font-size: 0.72rem;
}

#detailPresentEn {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.guide-link {
  position: relative;
  display: block;
  min-width: 0;
  padding: 10px 24px 10px 0;
  border-bottom: 1px solid var(--ho-line);
  color: var(--ho-ink);
  text-decoration: none;
}

.guide-link strong,
.guide-link span {
  display: block;
}

.guide-link span {
  margin-top: 2px;
  color: var(--ho-ink-muted);
}

.guide-link:hover strong,
.guide-link:focus-visible strong {
  color: var(--ho-vermilion);
}

@media (max-width: 620px) {
  #detailPresentEn {
    grid-template-columns: 1fr;
  }
}

.connection-link strong {
  font-size: 0.98rem;
  font-weight: 560;
}

.connection-link span {
  margin-top: 3px;
  color: var(--ho-ink-muted);
  font-size: var(--ho-type-secondary-ja);
}

.detail-read-more {
  display: flex;
  min-height: 50px;
  margin-top: 28px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--ho-indigo);
  background: var(--ho-indigo);
  color: var(--ho-paper-raised);
  font-family: var(--ho-font-ui);
  font-size: var(--ho-type-ui);
  font-weight: 680;
  text-decoration: none;
}

.detail-read-more:hover,
.detail-read-more:focus-visible {
  background: var(--ho-paper-raised);
  color: var(--ho-indigo);
}

@media (max-width: 1080px) {
  .places-map-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  }
}

@media (max-width: 860px) {
  .places-map-layout {
    grid-template-columns: 1fr;
  }

  .map-frame {
    border-right: 0;
    border-bottom: 1px solid var(--ho-line-strong);
  }

  .history-map-canvas {
    min-height: min(64vh, 590px);
  }

  .places-event-browser {
    max-height: none;
  }

  .places-event-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 620px) {
  .places-workspace {
    width: calc(100% - (var(--ho-gutter) * 2));
    padding-top: 21px;
  }

  .map-toolbar {
    display: grid;
    gap: 14px;
  }

  .map-mode-switch {
    width: 100%;
  }

  .map-era-control {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .map-era-control select {
    width: 100%;
  }

  .history-map-canvas {
    min-height: 470px;
  }

  .map-selection-feedback {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
  }

  .map-selection-place {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .map-selection-place__context {
    display: none;
  }

  .event-browser-header {
    padding: 20px 17px 17px;
  }

  .places-event-list {
    padding: 0 14px 16px;
  }

  .places-event-list[data-mode="today"] {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .places-region-column {
    margin-top: 14px;
    padding-left: 0;
    border-left: 0;
  }

  .places-region-cities {
    grid-template-columns: minmax(0, 1fr);
  }

  .places-event-button {
    min-height: 88px;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .places-today-button {
    min-height: 66px;
    grid-template-columns: 1fr;
  }

  dialog {
    width: 100%;
    max-width: none;
    max-height: 90dvh;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .detail-content {
    padding: 0 20px 28px;
  }

  .detail-opening {
    grid-template-columns: 1fr;
  }

  .detail-title-block,
  .detail-figure {
    grid-column: 1;
  }

  .detail-figure {
    grid-row: 2;
  }

  .detail-overview section,
  .detail-place-facts > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .detail-place-facts dt {
    grid-row: auto;
  }

  .connection-columns {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-mode-button,
  .places-event-button,
  .detail-read-more {
    transition: none;
  }
}

/* Production Places landing: one map, a direct city index, then the full regional browse. */
.places-workspace .history-map-canvas[data-map-base="physical"] {
  --history-map-sea: var(--today-map-sea);
  --history-map-land: var(--today-map-land);
  --history-map-land-line: var(--today-line);
  background: var(--history-map-sea);
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
}
.places-workspace .history-map-canvas[data-map-base="physical"][data-map-theme="historical"] {
  --history-map-sea: #ead8bb;
  --history-map-land: #f4e3c8;
  --history-map-land-line: #a38c70;
}
.history-map-canvas[data-map-base="physical"] .history-map-land {
  fill: var(--history-map-land);
  fill-opacity: 1;
  stroke: var(--history-map-land-line);
  stroke-width: 0.75px;
}
.places-event-list[data-mode="historical"] { display: block; min-height: 0; }
.places-event-list[data-mode="historical"] li,
.places-event-list[data-mode="historical"] .places-event-row,
.places-event-list[data-mode="historical"] .places-event-button { height: auto; max-height: none; }
.places-event-list[data-mode="historical"] .places-event-button {
  grid-template-columns: 48px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 20px 0;
}
.places-event-list[data-mode="historical"] .places-event-copy { min-width: 0; }
.places-event-list[data-mode="historical"] .places-event-summary { display: block; overflow: visible; -webkit-line-clamp: unset; }
.places-event-list[data-mode="historical"] .places-event-controls { align-self: start; padding: 20px 0 20px 12px; flex-direction: column; }
.places-event-list[data-mode="historical"] .event-expand-button {
  display: grid; place-items: center; width: 38px; height: 38px; min-height: 38px; padding: 0; line-height: 1; box-sizing: border-box;
}
@media (min-width: 861px) {
  .places-map-layout > .places-event-browser:not(.is-today) { height: 0; min-height: 100%; max-height: none; overflow: hidden; }
}
.places-map-notes {
  padding: 14px 20px; border-bottom: 1px solid var(--ho-line-strong); color: var(--ho-ink-muted);
  font-size: 14px; line-height: 1.6; display: grid; grid-template-columns: 1fr auto; gap: 8px 24px;
}
.places-map-notes > p { margin: 0; }
.places-map-notes > [hidden] { display: none; }
.places-map-notes > #mapHistoricalReference { grid-column: 1 / -1; }
.places-map-notes details { grid-column: 1 / -1; }
.places-map-notes summary { cursor: pointer; width: fit-content; margin-left: auto; color: var(--ho-ink); }
.places-map-notes details:not([open]) { grid-column: 2; grid-row: 1; }
.places-map-notes details p { max-width: 90ch; margin: 12px 0 0; }
.places-map-notes summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.places-workspace {
  padding-top: clamp(18px, 2vw, 26px);
}

.history-map-canvas {
  min-height: clamp(430px, 52vh, 560px);
}

.places-event-browser {
  max-height: clamp(430px, 52vh, 560px);
}

.places-event-browser.is-today {
  max-height: clamp(430px, 52vh, 560px);
}

.places-event-list[data-mode="today"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  overflow-y: auto;
}

.places-event-list[data-mode="today"] > .places-list-heading {
  grid-column: 1 / -1;
}

.places-event-list[data-mode="today"] .places-today-button {
  min-height: 68px;
  border-bottom: 1px solid var(--ho-line);
  text-decoration: none;
}

.places-region-browser {
  margin-top: 18px;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--ho-line-strong);
  border-bottom: 1px solid var(--ho-line-strong);
  background: var(--ho-paper-raised);
}

.places-region-browser[hidden] {
  display: none;
}

.places-region-browser > h2 {
  margin: 0 0 14px;
  font-family: var(--ho-font-ui);
  font-size: 0.84rem;
  font-weight: 720;
}

.places-regions-horizontal {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 14px;
}

.places-regions-horizontal .places-region-group {
  min-width: 0;
  border-top: 1px solid var(--ho-line);
  border-bottom: 0;
}

.places-regions-horizontal .places-region-group summary {
  min-height: 64px;
  padding: 9px 2px;
}

.places-regions-horizontal .places-region-cities {
  max-height: 260px;
  overflow-y: auto;
  padding-left: 9px;
}

.places-regions-horizontal .places-today-button {
  min-height: 62px;
  padding-right: 3px;
  text-decoration: none;
}

.places-event-button,
.places-region-group summary,
.connection-link,
.guide-link,
.detail-read-more,
.event-map-mark,
.event-expand-button {
  cursor: pointer;
}

.detailPlacesSection.is-today-context,
#detailPlacesSection.is-today-context {
  padding: 12px 14px 14px;
  background: color-mix(in srgb, var(--ho-map-sea) 52%, var(--ho-paper-raised));
}

#detailPlacesSection.is-today-context h4 {
  color: var(--ho-map-land-deep, var(--ho-indigo));
}

.connection-place-action {
  margin-top: 5px;
  color: var(--ho-indigo);
  font-weight: 680;
}

@media (max-width: 1100px) {
  .places-regions-horizontal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .places-event-browser,
  .places-event-browser.is-today {
    max-height: none;
  }

  .places-event-list[data-mode="today"] {
    overflow: visible;
  }
}

@media (max-width: 620px) {
  .places-event-list[data-mode="today"] {
    grid-template-columns: 1fr;
  }

  .places-regions-horizontal {
    grid-template-columns: 1fr;
  }

  .places-region-browser {
    padding-right: 14px;
    padding-left: 14px;
  }

  .places-regions-horizontal .places-region-cities {
    max-height: none;
  }
}

/* Keep city and region navigation together beside the map. */
.event-browser-header[hidden] { display: none; }
.places-event-browser.is-today {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  align-content: start;
  max-height: none;
  padding: 0 20px;
  gap: 20px;
}
.places-event-list[data-mode="today"] {
  display: block;
  padding: 0;
  overflow: visible;
}
.is-today .places-region-browser {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.is-today .places-list-heading,
.is-today .places-region-browser > h2 {
  margin: 0;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--ho-line-strong);
  font-family: var(--ho-font-ui);
  font-size: .82rem;
  line-height: 1.3;
}
.is-today .places-region-group summary {
  min-height: 58px;
  padding: 7px 0;
  gap: 2px 8px;
}
.is-today .places-region-names { flex-wrap: wrap; gap: 0 6px; white-space: normal; color: var(--today-region); }
.is-today .places-region-names strong { font-size: 1rem; white-space: normal; overflow-wrap: anywhere; color: var(--today-region); }
.is-today .places-region-names span { font-size: .85rem; color: var(--today-region); }
.is-today .places-region-cities { max-height: 240px; overflow-y: auto; }
.places-event-list[data-mode="today"] .places-today-button {
  min-height: 70px;
  padding: 10px 0;
}
@media (min-width: 861px) {
  .places-workspace { padding-top: 4px; }
  .places-workspace .map-toolbar { margin-bottom: 10px; }
  .places-map-layout {
    grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
  }
  .places-workspace .places-map-layout .history-map-canvas[data-map-base="physical"] {
    height: clamp(440px, calc(100dvh - 320px), 650px);
    aspect-ratio: auto;
  }
  /* Mode changes must not change the map column or let a long list stretch it. */
  .places-workspace .places-map-layout > .places-event-browser {
    height: clamp(440px, calc(100dvh - 320px), 650px);
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }
  .is-today .places-region-group summary { min-height: 44px; padding-block: 4px; }
}
@media (max-width: 860px) {
  .places-event-browser.is-today { padding: 0 14px 16px; gap: 20px; }
}
