/* Keep phone overrides after the unlayered reference/commerce styles. */
@media (max-width: 700px) {
  html { scroll-padding-top: calc(180px + env(safe-area-inset-top)); }
  body { font-size: 15px; }

  /* The same navigation links stay visible in document flow, below the brand. */
  .site-header { height: auto; }
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'brand actions' 'navigation navigation';
    gap: 0 8px;
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }
  .header-inner > .brand { grid-area: brand; min-width: 0; min-height: 64px; gap: 8px; }
  .header-inner .brand b { font-size: 24px; letter-spacing: .04em; }
  .header-inner .brand small { font-size: 11px; letter-spacing: .04em; margin-top: 3px; }
  .header-inner .brand svg, .header-inner .brand img { width: 36px; height: 36px; flex-shrink: 0; }
  .header-actions { grid-area: actions; }
  .header-actions .icon-btn, .header-actions .my-link { width: 44px; height: 44px; }
  .header-actions .menu-button { display: none; }
  .main-navigation, .main-navigation.open {
    grid-area: navigation;
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px 4px;
    height: auto;
    padding: 5px 0 7px;
    border-top: 1px solid #f9dfbb40;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
  }
  .main-navigation a {
    min-width: 0;
    min-height: 44px;
    padding: 7px 2px;
    font-size: 14px;
    line-height: 1.4;
    justify-content: center;
    border-radius: 4px;
  }
  .main-navigation a[aria-current] { color: #ffe6ab; background: #f5d79d18; }
  .main-navigation a::after { bottom: 2px; }
  .main-navigation a[aria-current]::after, .main-navigation a:hover::after {
    left: 24%; right: 24%; bottom: 2px; height: 2px; box-shadow: none;
  }

  /* A narrower type scale: display, page, section, card, body, annotation. */
  .hero-copy { padding-top: 28px; }
  .hero-copy h1 { font-size: clamp(34px, 9.7vw, 40px); line-height: 1.3; margin-block: 15px 18px; }
  .home-hero { height: auto; }
  .hero-inner { height: auto; min-height: 580px; padding-bottom: 120px; }
  .hero-description { font-size: 15px; line-height: 1.85; }
  .hero-buttons { flex-wrap: wrap; gap: 14px 18px; }
  .hero-play { font-size: 14px; }
  .hero-search input { font-size: 16px; }
  .hot-search { flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
  .hot-search a { min-height: 36px; }
  .hero-caption { font-size: 12px; }

  .page-banner h1, .page-banner.compact h1,
  .archive-stage-head h1, .guide-title h1, .detail-summary h1 { font-size: 28px; line-height: 1.4; }
  .section-heading h2, .gallery-heading h2, .topic-heading h2,
  .craft-video h2, .creative-feature-copy h2, .about-content > h2,
  .booking-services h1, .booking-form > h2, .guide-object h2,
  .final-invitation h2, .route-detail-layout h2 { font-size: 24px; line-height: 1.5; }
  .section-heading h2 { letter-spacing: .01em; text-wrap: balance; }
  .gallery-heading { gap: 10px; margin-top: 28px; }
  .gallery-heading > div { min-width: 0; }
  .gallery-heading > span { font-size: 14px; }
  .card-body h3, .reference-archive-grid .card-body h3, .home-heritage .card-body h3,
  .route-card h3, .creative-card h3, .topic-strip h3,
  .service-title h2, .booking-service-note h3 { font-size: 20px; line-height: 1.5; }
  .craft-strip span { font-size: 17px; }
  .craft-strip small { font-size: 12px; }
  .footer-brand b { font-size: 26px; }
  .detail-tagline { font-size: 17px; line-height: 1.65; }
  .story-text, .detail-description, .section-description,
  .page-banner p:last-child, .archive-stage-head > div > p,
  .guide-title > p:last-child, .guide-story { font-size: 15px; line-height: 1.85; }

  .eyebrow, .hero-copy .eyebrow, .section-heading .eyebrow, .detail-summary .eyebrow,
  .small-text, .source-note, .theme-source, .detail-metadata span,
  .card-location, .home-heritage .card-location, .reference-archive-grid .card-location,
  .card-tags span, .home-heritage .card-tags span, .reference-archive-grid .card-tags span,
  .card-category, .video-indicator, .topic-heading p, .topic-strip p,
  .archive-pages, .contact-details, .footer-project, .footer-bottom,
  .scene-controls a, .scene-controls button, .speech-status, .speak-main small,
  .guide-picks span, .guide-facts span, .viewfinder > small { font-size: 13px; }
  .card-location svg, .detail-metadata svg { flex-shrink: 0; }
  .card-location { flex-wrap: wrap; }
  .card-tags { flex-wrap: wrap; }
  .card-description, .home-heritage .card-description, .reference-archive-grid .card-description {
    font-size: 14px; line-height: 1.8; min-height: 0;
  }
  .topic-strip a { min-height: 190px; }
  .craft-highlights { gap: 12px; padding-block: 20px; }
  .craft-highlights span { font-size: 21px; }
  .craft-highlights h3 { font-size: 14px; line-height: 1.6; }
  .craft-highlights p { font-size: 13px; line-height: 1.75; color: #6b5744; }

  .button { font-size: 14px; }
  .text-link, .section-heading > .text-link, .detail-landscape .back-link,
  .archive-rail button, .booking-services header a, .save-plan-only,
  .booking-service-note a, .speech-track p { font-size: 14px; }
  .booking-service p, .booking-service-note p, .booking-form label { font-size: 14px; }
  .service-category, .booking-service footer span, .booking-service footer small,
  .booking-form .booking-consent, .booking-form .other-date, .form-footnote,
  .contact-fields label, .date-week-heading, .time-options button { font-size: 13px; }
  .date-week button small { font-size: 12px; }
  .date-week button span { font-size: 11px; height: auto; }
  .booking-service > img { width: 86px; }
  .booking-shell { grid-template-columns: minmax(0, 1fr); }
  .booking-form { min-width: 0; }
  .service-title { flex-wrap: wrap; }
  .booking-service footer { flex-wrap: wrap; }
  .cooperate-form { scroll-margin-top: 180px; }

  .profile-heading p, .profile-stats span, .tabs button,
  .assistant-sidebar .service-status, .assistant-sidebar > .small-text:not(.sidebar-note),
  .chat-header span, .chat-welcome > p:not(.eyebrow), .composer-note,
  .followups button, .game-page-note, .game-page-toolbar .back-link,
  .game-page-toolbar .text-link, .empty-state p { font-size: 13px; }
  .chat-header strong, .question-grid button, .message-text { font-size: 14px; }
  .chat-welcome h2 { font-size: 22px; }
  .chat-panel { height: max(525px, calc(100dvh - 390px)); }
  .portal input, .portal textarea, .portal select { font-size: 16px; }
}

@media (max-width: 380px) {
  .time-people { grid-template-columns: minmax(0, 1fr); }
  .craft-highlights { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .craft-highlights > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; }
  .craft-highlights span { grid-row: 1 / 3; padding-top: 3px; }
  .craft-highlights h3 { margin-top: 0; }
  .craft-highlights p { margin-top: 3px; }
}
