.acd-guide, .acd-how, .guide-chapter { scroll-margin-top: 1.25rem; }
.acd-guide, .guide-chapter, .guide-page-hero {
  padding-block: clamp(2.75rem, 5.5vw, 5.5rem);
  border-top: 1px solid var(--line);
}
.guide-index, .guide-chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 7rem);
}
.guide-index h2, .quote-explainer h2, .guide-page-hero h1, .guide-chapter h2,
.guide-details h3, .guide-ship-link h3, .map-head h2, .map-story h3 {
  font: 400 var(--guide-heading-size, 2rem)/1.04 var(--serif);
  letter-spacing: -.025em;
  margin: 0;
}
.guide-index h2, .guide-chapter h2, .quote-explainer h2 {
  --guide-heading-size: clamp(2.65rem, 4vw, 4.15rem);
}
.guide-index-intro p, .guide-page-hero p, .guide-details p, .quote-explainer p, .map-story p {
  margin: .75rem 0;
  max-width: 58ch;
  line-height: 1.6;
  color: var(--muted);
}
.guide-text-link, .map-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pine);
  font: 600 .95rem/1.45 var(--sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}
.guide-text-link:hover, .map-actions a:hover, .guide-ship-link:hover span {
  text-decoration-thickness: 2px;
}
.guide-ship-link {
  display: grid;
  grid-template-columns: minmax(5rem, 30%) 1fr;
  align-items: center;
  gap: clamp(.9rem, 2vw, 1.8rem);
  padding: 1.15rem 0;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.guide-ship-link:last-child { border-bottom: 1px solid var(--line); }
.guide-ship-link img {
  display: block;
  width: 100%;
  height: auto;
  background: #e9eee5;
}
.guide-ship-link h3 { --guide-heading-size: clamp(1.65rem, 2.45vw, 2.25rem); }
.guide-ship-link p { color: var(--muted); margin: .28rem 0 .45rem; font-size: .96rem; line-height: 1.45; }
.guide-ship-link span { color: var(--pine); font-size: .9rem; font-weight: 650; text-decoration: underline; text-underline-offset: .24em; }
.acd-how {
  background: #eaf0e9;
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}
.quote-explainer { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.quote-explainer p { margin-bottom: 0; max-width: 66ch; }
.quote-explainer .button { flex: none; }

.guide-page-hero { border-top: none; }
.guide-page-hero h1 { --guide-heading-size: clamp(3.25rem, 6.4vw, 6.25rem); }
.guide-page-hero p { max-width: 55ch; font-size: clamp(1.05rem, 1.45vw, 1.2rem); }
.guide-jump { display: flex; flex-wrap: wrap; gap: .35rem 1.75rem; }
.guide-chapter figure { margin: 1.25rem 0 0; }
.chapter-photo { display: block; width: 100%; height: auto; }
.guide-chapter figcaption, .map-pair figcaption { margin: .5rem 0 0; font-size: .875rem; color: var(--muted); line-height: 1.45; }
.guide-details { display: grid; gap: 1.45rem; }
.guide-details section + section { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.guide-details h3, .map-story h3 { --guide-heading-size: clamp(1.85rem, 2.7vw, 2.65rem); }
.guide-details p { margin: .5rem 0 .15rem; }

.cabin-map-dialog {
  width: min(64rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: #faf8f1;
  border: 1px solid var(--line);
  border-radius: .5rem;
  color-scheme: light;
}
.cabin-map-dialog[open] { display: flex; flex-direction: column; }
.cabin-map-dialog::backdrop { background: rgb(16 29 25 / 66%); }
.cabin-map-dialog :is(button, select, h2):focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
.map-head, .map-content, .map-actions { padding-inline: clamp(1rem, 3vw, 2rem); }
.map-head {
  flex: none;
  padding-block: 1.25rem .9rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.map-head h2 { --guide-heading-size: clamp(2rem, 3.4vw, 2.85rem); text-wrap: balance; }
.map-head p { margin: .3rem 0 0; color: var(--muted); font-size: .94rem; }
.map-close {
  height: 44px;
  width: 44px;
  padding: 0;
  flex: none;
  border: 0;
  border-radius: .25rem;
  color: var(--pine);
  background: transparent;
  font: 400 1.65rem/1 var(--sans);
  cursor: pointer;
}
.map-close:hover { background: #eaf0e9; }
.map-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-block: 1.15rem; }
.map-picker { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .85rem; font-size: .9375rem; font-weight: 600; }
.map-picker select {
  width: min(100%, 21rem);
  min-height: 44px;
  padding: .55rem .65rem;
  border: 1px solid #7e8981;
  border-radius: .25rem;
  background-color: #fffef9;
  color: var(--text);
  font: 450 1rem var(--sans);
  cursor: pointer;
}
.map-story p { margin: 0 0 .55rem; text-wrap: pretty; font-size: .95rem; line-height: 1.45; }
.map-story .deck-line { margin-bottom: .4rem; color: var(--pine); }
.map-pair { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); align-items: start; gap: clamp(1rem, 2vw, 1.65rem); margin-top: 1.1rem; }
.map-pair figure { margin: 0; }
.map-pair [data-map-location] { margin-top: 1rem; }
.map-pair [data-map-location][hidden] { display: none; }
.map-pair figcaption { font-size: .82rem; }
.map-photo { position: relative; }
.map-photo img, .map-plan { display: block; width: 100%; height: auto; }
.map-plan { aspect-ratio: 768/420; object-fit: contain; background: #f9f3e9; }
.map-pin { position: absolute; left: var(--pin-x); top: var(--pin-y); display: flex; align-items: center; pointer-events: none; }
.map-pin b { margin: -5px; width: 11px; height: 11px; border-radius: 50%; background: white; border: 2px solid var(--pine); box-shadow: 0 0 0 2px #fff; }
.map-pin span { margin-left: 8px; padding: .1rem .35rem; background: var(--pine); color: white; font-size: .75rem; line-height: 1.3; }
.map-actions {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1.25rem;
  border-top: 1px solid var(--line);
  padding-block: .85rem;
}
.map-actions p { flex: 1 1 17rem; margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.45; text-wrap: pretty; }
@media (max-width: 43.75em) {
  .guide-index, .guide-chapter-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .guide-ship-link { grid-template-columns: minmax(4.75rem, 25%) 1fr; }
  .quote-explainer { display: grid; gap: 1.25rem; }
  .quote-explainer .button { justify-self: start; }
  .guide-page-hero, .guide-chapter { padding-block: 2.5rem; }
}
@media (max-width: 36.25em) {
  .cabin-map-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .map-pair { grid-template-columns: 1fr; gap: 1rem; }
  .map-picker { display: grid; }
  .map-picker select { width: 100%; }
  .map-pair figure[data-map-location]:not([hidden]) { display: grid; grid-template-columns: minmax(0, 53%) 1fr; gap: .65rem; align-items: center; }
  .map-pin span { font-size: .65rem; }
  .map-actions { display: grid; }
  .map-actions .button { justify-content: center; min-height: 2.875rem; }
}
@media (max-height: 30rem) {
  .cabin-map-dialog[open] { display: block; overflow-y: auto; }
  .map-content { overflow: visible; }
}
@media (max-width: 24.375em) {
  .guide-ship-link { grid-template-columns: minmax(4.5rem, 25%) 1fr; }
}
@media (max-width: 21em) {
  .guide-ship-link { grid-template-columns: minmax(0, 1fr); }
  .guide-ship-link img { max-width: 7rem; }
  .map-content, .map-head, .map-actions { padding-inline: .75rem; }
  .guide-details, .guide-chapter-grid > *, .map-story { min-width: 0; overflow-wrap: anywhere; }
}
