/* Phone art direction. Loaded after page styles; desktop remains unchanged. */
@media (max-width: 700px) {
  :root { --mobile-gutter: 24px; --mobile-title: clamp(32px, 8.4vw, 44px); --mobile-heading: clamp(29px, 7.5vw, 38px); }
  .header-inner { padding-inline: var(--mobile-gutter); }
  main h1, main h2, main h3 { overflow-wrap: break-word; text-wrap: balance; }
  main p { text-wrap: pretty; }
  /* One phone screen: photograph, masthead, copy and controls share a canvas. */
  :root { --header: 88px; }
  html { scrollbar-gutter: auto; scroll-padding-top: 24px; }
  body[data-page] { --home-ribbon-height: 0px; --site-ribbon-height: 0px; }
  body[data-page] > .ribbon { display: none; }
  body[data-page] .site-header {
    position: absolute; top: 0; inset-inline: 0; border: 0;
    background: transparent !important; box-shadow: none; backdrop-filter: none;
  }
  body[data-page] .site-header .header-inner { height: var(--header); gap: 20px; }
  body[data-page] .site-header .brand { width: 112px; height: 76px; }
  body[data-page] .site-header .menu-toggle { width: 44px; height: 44px; padding: 11px; }
  body[data-page] .site-header .mobile-nav {
    min-height: 0; max-height: calc(100svh - var(--header));
    padding: 18px var(--mobile-gutter) 32px; background: #172c21;
    color: #f8f7f1; border-color: #f8f7f129;
  }
  body[data-page] .mobile-nav a { color: #f8f7f1; border-color: #f8f7f129; }
  body[data-page="/"] .hero-carousel {
    display: block; height: 100svh; height: 100dvh; min-height: 0; aspect-ratio: auto;
    width: 100%; padding: 0; background: #14291f;
  }
  body[data-page="/"] .hero-carousel .hero-slides {
    position: absolute; inset: 0; width: 100%; height: 100%;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide],
  body[data-page="/"] .hero-carousel .hero-slide[data-slide].is-active {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    justify-content: flex-end; align-items: stretch; width: 100%; height: 100%;
    padding: calc(var(--header) + 28px) var(--mobile-gutter) calc(108px + env(safe-area-inset-bottom));
    text-align: left;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-image {
    position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
    max-height: none; object-fit: cover !important;
    object-position: var(--cms-image-position-mobile, 50% 38%);
    transform: none !important; animation: none !important;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-shade {
    display: block; position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
    background: linear-gradient(180deg, #06180f85 0%, #06180f0a 24%, #06180f08 37%, #06180f94 58%, #06180fe8 78%, #06180ff5 100%);
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-content {
    position: relative; inset: auto; min-height: 0; width: 100%; max-width: 520px;
    margin: 0; padding: 0; background: transparent; transform: none; text-align: left;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-content .eyebrow {
    display: block; width: fit-content; margin: 0 0 14px; padding: 10px 0 0;
    border-top: 1px solid #d8e2b885; color: #e4e8cb;
    font-size: 9px; line-height: 1.5; letter-spacing: .16em;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-content h1 {
    width: 100%; margin: 0 0 16px; color: #fff8eb;
    font-size: var(--cms-heading-size-mobile, clamp(36px, 9.5vw, 48px)) !important;
    line-height: 1.08; letter-spacing: -.025em; text-align: left; text-wrap: balance;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-content .lead {
    max-width: 38em; margin: 0; color: #f2f1e5;
    font-size: var(--cms-body-size-mobile, 13px); line-height: 1.65; text-align: left;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-actions {
    flex-direction: row; justify-content: flex-start; align-items: center; margin-top: 20px;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .button-outline {
    min-height: 44px; max-width: 100%; padding: 11px 16px;
    font-size: 10px; letter-spacing: .09em; border-color: #e7e8cf99;
    background: #14291f33; backdrop-filter: blur(5px);
  }
  body[data-page="/"] .hero-carousel .hero-controls {
    position: absolute; inset: auto 0 0; background: transparent;
  }
  body[data-page="/"] .hero-carousel .hero-controls-inner {
    position: relative; padding: 0 var(--mobile-gutter) calc(18px + env(safe-area-inset-bottom));
  }
  body[data-page="/"] .hero-carousel .hero-controls-top { padding-right: 116px; }
  body[data-page="/"] .hero-carousel .hero-arrows { gap: 10px; }
  body[data-page="/"] .hero-carousel .hero-arrows button { width: 44px; height: 44px; }
  body[data-page="/"] .hero-carousel .hero-markers { margin-top: 14px; padding-right: 116px; gap: 8px; }
  body[data-page="/"] .hero-carousel .hero-marker {
    min-height: 24px; padding: 0; font-size: 0;
  }
  body[data-page="/"] .hero-carousel .hero-marker span {
    position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden;
  }
  body[data-page="/"] .hero-carousel .hero-slide .hero-credit {
    position: absolute; inset: auto var(--mobile-gutter) 105px auto;
    max-width: 65%; padding: 0; font-size: 8px;
  }
  .interest-box { width: 104px; height: 46px; right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  body.interest-calm .interest-box,
  body:has(.menu-toggle[aria-expanded="true"]) .interest-box,
  body:has(.tea-registration:focus-within) .interest-box { visibility: hidden; pointer-events: none; }

  /* Use the same optical edge as the logo, without nested side padding. */
  .tea-index-inner, .fermented-wrap, .founder-wrap, .gift-journey-wrap,
  .ct-destinations-inner, .ct-correspondence-inner, .tea-registration-inner {
    width: calc(100% - 2 * var(--mobile-gutter));
  }
  body[data-page] .full-frame-hero {
    display: flex; flex-direction: column; justify-content: flex-end;
    width: 100%; height: 100svh; height: 100dvh; min-height: 0; aspect-ratio: auto;
  }
  body[data-page] .full-frame-hero > .full-frame-hero-image {
    position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; aspect-ratio: auto;
  }
  body[data-page] .full-frame-hero .full-frame-hero-image img {
    object-fit: cover !important; object-position: var(--cms-image-position-mobile, 50% 40%);
  }
  body[data-page] .full-frame-hero > .tea-hero-inner,
  body[data-page] .full-frame-hero > .ct-hero-inner {
    width: 100%; margin: 0; padding: calc(var(--header) + 28px) var(--mobile-gutter) 64px;
  }
  body[data-page] .full-frame-hero .full-frame-hero-copy {
    position: relative; inset: auto; width: 100%; max-width: none; padding: 0;
  }
  body[data-page] .full-frame-hero h1 { font-size: var(--mobile-title); line-height: 1.12; margin: 18px 0 20px; }
  .full-frame-hero .tea-hero-copy > p:not(.tea-kicker), .full-frame-hero .ct-hero-note {
    font-size: 14px; line-height: 1.8; max-width: 36em;
  }
  .full-frame-hero .tea-hero-discover, .full-frame-hero .ct-hero-link { margin-top: 20px; }
  .full-frame-hero-border { border: 0; }
  .full-frame-hero > .full-frame-hero-shade {
    inset: 0; height: 100%; z-index: -2;
    background: linear-gradient(180deg, #07191080, transparent 28%, #07191038 46%, #071910dc 74%, #071910f5);
  }
  body[data-page] .full-frame-hero > .tea-hero-bottom { display: none; }

  /* Photo-led covers use the same portrait treatment on the phone. */
  body[data-page="/thu-vien"].gallery-museum .museum-hero {
    height: 100svh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end;
  }
  .gallery-museum .museum-hero-image { position: absolute; inset: 0; z-index: 0; }
  .gallery-museum .museum-hero-image img {
    display: block; width: 100%; height: 100%; transform: none;
    object-fit: cover !important; object-position: var(--cms-image-position-mobile, 50% 40%);
  }
  .gallery-museum .museum-hero .museum-hero-shade {
    z-index: 1; inset: 0; height: 100%;
    background: linear-gradient(180deg, #07191080, transparent 28%, #07191038 46%, #071910dc 74%, #071910f5);
    mask-image: none; -webkit-mask-image: none; pointer-events: none;
  }
  body[data-page="/thu-vien"].gallery-museum .museum-hero-inner {
    position: relative; z-index: 2; display: block; min-height: 0; width: 100%; max-width: none;
    margin: 0; padding: calc(var(--header) + 28px) var(--mobile-gutter) 64px;
    background: transparent;
  }
  .gallery-museum .museum-hero h1 { font-size: var(--mobile-title); line-height: 1.12; margin: 18px 0 20px; text-shadow: none; }
  .gallery-museum .museum-hero-copy > p:not(.eyebrow) { font-size: 14px; line-height: 1.8; text-shadow: none; padding: 0; border: 0; }
  .gallery-museum .museum-hero .museum-scroll { margin-top: 24px; }
  .museum-hero-frame { display: none; }
  /* Smaller stories are square; the long photographic chapters are 9:16. */
  body[data-page="/"] .editorial-visual .media-frame,
  body[data-page="/"] .book-frame,
  body[data-page="/"] .book-frame .media-frame,
  body[data-page="/"] .home-gallery-photo > .media-frame,
  body[data-page="/"] .home-connect-figure {
    width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: 1;
  }
  body[data-page="/"] .editorial-visual .media-frame img,
  body[data-page="/"] .book-frame img,
  body[data-page="/"] .home-gallery-photo > .media-frame img,
  body[data-page="/"] .home-connect-figure img {
    width: 100%; height: 100%; object-fit: cover !important;
    object-position: var(--cms-image-position-mobile, 50% 50%);
  }
  body[data-page="/"] .home-connect-figure img { height: auto; aspect-ratio: 1; }
  /* Introduce this chapter before its photograph, with a quieter reading rhythm. */
  body[data-page="/"] #hanh-trinh { padding: 48px var(--mobile-gutter) 56px; }
  body[data-page="/"] #hanh-trinh .editorial-grid {
    grid-template-columns: minmax(0, 1fr); gap: 28px;
  }
  body[data-page="/"] #hanh-trinh .editorial-copy {
    order: 1; width: 100%; max-width: 520px; margin: 0; text-align: left;
  }
  body[data-page="/"] #hanh-trinh .editorial-copy .eyebrow {
    font-size: 9px; line-height: 1.5; letter-spacing: .16em;
  }
  body[data-page="/"] #hanh-trinh .editorial-copy .eyebrow::before {
    width: 18px; margin-right: 9px;
  }
  body[data-page="/"] #hanh-trinh .editorial-copy h2 {
    margin: 14px 0 18px; font-size: var(--cms-heading-size-mobile, clamp(28px, 8vw, 38px));
    line-height: 1.16; letter-spacing: -.018em;
  }
  body[data-page="/"] #hanh-trinh .editorial-copy > p:not(.eyebrow) {
    margin: 0; max-width: 100%; font-size: var(--cms-body-size-mobile, 14px); line-height: 1.75;
  }
  body[data-page="/"] #hanh-trinh .text-link {
    min-height: 44px; margin-top: 18px; padding: 6px 0; gap: 13px;
    border-bottom: 1px solid #8b9c715c; color: var(--forest);
    font-size: 12px; font-weight: 400; letter-spacing: .025em; text-transform: none;
  }
  body[data-page="/"] :is(#hanh-trinh, #tan-cuong) .text-link span {
    position: relative; width: 12px; height: 12px; flex: 0 0 12px;
    font-size: 0; line-height: 0; color: currentColor;
  }
  body[data-page="/"] :is(#hanh-trinh, #tan-cuong) .text-link span::before {
    content: ""; position: absolute; top: 0; right: 0; width: 9px; height: 9px;
    border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  }
  body[data-page="/"] :is(#hanh-trinh, #tan-cuong) .text-link span::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 15px; height: 1px;
    background: currentColor; transform: rotate(-45deg); transform-origin: left center;
  }
  body[data-page="/"] #hanh-trinh .editorial-visual { order: 2; min-width: 0; }
  body[data-page="/"] #hanh-trinh .editorial-visual::after { display: none; }
  body[data-page="/"] #hanh-trinh .editorial-visual .media-frame {
    border-radius: 3px; box-shadow: none;
  }
  body[data-page="/"] #hanh-trinh .media-frame img { transform: none !important; }
  body[data-page="/"] #hanh-trinh .art-botanical { display: none; }
  body[data-page="/"] .home-harvest { padding-block: 32px; }
  /* This composed artwork must keep its entire landscape frame on phones. */
  body[data-page="/"] .home-harvest .home-harvest-art {
    aspect-ratio: auto; padding-bottom: 0; overflow: visible;
  }
  body[data-page="/"] .home-harvest .home-harvest-image {
    width: 100%; height: auto; object-fit: contain !important; transform: none;
  }
  body[data-page="/"] .home-harvest.caption-overlay figcaption {
    position: relative; inset: auto; max-width: 100%; margin: 14px auto 0;
    padding: 0 var(--mobile-gutter); font-size: clamp(17px, 4.7vw, 22px);
  }
  body[data-page="/"] .wide-story {
    display: flex; align-items: flex-end; width: 100%; min-height: calc(100vw * 16 / 9);
    aspect-ratio: 9 / 16; padding: 48px var(--mobile-gutter); text-align: left;
  }
  body[data-page="/"] .wide-story > img,
  body[data-page="/"] .wide-story > .cms-picture > img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover !important;
  }
  body[data-page="/"] .wide-story .wide-shade {
    background: linear-gradient(180deg, #07191015 20%, #0719105c 45%, #071910e0 78%, #071910f2);
  }
  body[data-page="/"] .wide-story .wide-copy { width: 100%; max-width: 100%; }
  body[data-page="/"] .wide-story h2 { font-size: var(--mobile-heading); line-height: 1.14; }
  body[data-page="/"] .wide-story .wide-copy > p:not(.eyebrow) { font-size: 14px; line-height: 1.75; }
  /* Clean-tea chapter: moss shade and copy open at the top of the photograph. */
  body[data-page="/"] #tan-cuong.wide-story {
    align-items: flex-start; padding: 24px var(--mobile-gutter);
  }
  body[data-page="/"] #tan-cuong.wide-story .wide-shade {
    background: linear-gradient(180deg, #1b3020f5 0%, #1b3020e8 14%, #1b3020c7 24%, #1b30208a 34%, #1b302047 42%, #1b302012 49%, transparent 54%);
  }
  body[data-page="/"] #tan-cuong .wide-copy .eyebrow {
    font-size: 8px; line-height: 1.5; letter-spacing: .15em;
  }
  body[data-page="/"] #tan-cuong .wide-copy h2 {
    margin: 10px 0 12px; font-size: clamp(22px, 6.4vw, 27px); line-height: 1.12;
  }
  body[data-page="/"] #tan-cuong .wide-copy > p:not(.eyebrow) {
    font-size: clamp(11.5px, 3.2vw, 12.5px); line-height: 1.6;
  }
  body[data-page="/"] #tan-cuong .wide-copy .text-link {
    min-height: 44px; margin-top: 10px; padding: 6px 0; gap: 12px;
    font-size: 10px; letter-spacing: .08em;
  }
  body[data-page="/thu-vien"] .museum-index h2,
  body[data-page="/thu-vien"] .archive-heading h2,
  body[data-page="/thu-vien"] .museum-ending h2 { font-size: var(--cms-heading-size-mobile, var(--mobile-heading)); line-height: 1.18; }

  .tea-index-inner { padding-block: 52px; }
  .tea-index h2, .tea-chapter h2 { font-size: var(--mobile-heading); line-height: 1.15; }
  .tea-index-list { margin-top: 28px; }
  .tea-index-list a { min-height: 64px; }
  .tea-chapter-link { min-height: 540px; }
  .tea-chapter-copy { padding: 0 var(--mobile-gutter) 36px; }
  .tea-chapter-copy > p { font-size: 14px; line-height: 1.8; }
  .tea-chapter--flower .tea-chapter-link, :is(.tea-chapter--fermented,.tea-chapter--shan_tuyet) .tea-chapter-link { padding: 32px var(--mobile-gutter) 44px; }
  .tea-chapter--flower .tea-chapter-photo, :is(.tea-chapter--fermented,.tea-chapter--shan_tuyet) .tea-chapter-photo { width: 100%; height: auto; aspect-ratio: 1; }
  .tea-chapter--flower .tea-chapter-copy, :is(.tea-chapter--fermented,.tea-chapter--shan_tuyet) .tea-chapter-copy { padding: 36px 0 0; }
  .tea-chapter-number { font-size: 72px; opacity: .5; }

  .about-opening-quote h2, .about-journey-copy h2, .about-vision-copy h2,
  .about-renewal-top h2, .about-philosophy h2 { font-size: var(--mobile-heading); line-height: 1.18; }
  .about-prologue-deck p { font-size: 14px; line-height: 1.8; }
  .fermented-page .fermented-hero-copy h1, .ngoc-variety-copy h1,
  .founder-cover h1, .gift-detail-copy h1 { font-size: var(--mobile-title); line-height: 1.14; }
  body[data-page] .gift-detail-copy h1 { font-size: var(--mobile-title); line-height: 1.14; }
  body[data-page] .gift-detail-motto { font-size: clamp(25px, 7vw, 30px); line-height: 1.3; }
  .fermented-page h2, .ngoc-variety-content h2, .founder-section-heading h2,
  .gift-ambassadors-head h2, .gift-language-copy h2, .gift-manifesto-copy h2 { font-size: var(--mobile-heading); line-height: 1.18; }
  .fermented-page .fermented-hero-art, .ngoc-variety-art { width: 100%; }
  .fermented-page .fermented-hero-art .media-frame, .ngoc-variety-art .media-frame { aspect-ratio: 1; }
  .fermented-variety-copy > p:not(.fermented-small-label), .fermented-uses p { font-size: 14px; line-height: 1.8; }
  .fermented-story, .fermented-collection, .fermented-benefits, .founder-section { padding-block: 48px; }
  .founder-press-meta { flex-wrap: wrap; gap: 8px; }

  .ct-destinations h2, .ct-letter h2, .ct-location h3 { font-size: var(--mobile-heading); line-height: 1.18; }
  .ct-location .ct-location-photo { width: 100%; height: auto; aspect-ratio: 1; }
  .ct-location .ct-location-copy, .ct-location:nth-child(even) .ct-location-copy,
  .ct-location.image-left .ct-location-copy, .ct-location.image-right .ct-location-copy,
  .ct-location.image-left:nth-child(even) .ct-location-copy,
  .ct-location.image-right:nth-child(odd) .ct-location-copy { padding: 28px 0 0; }
  .ct-location address, .ct-letter > p:last-child { font-size: 14px; line-height: 1.8; }
  .ct-contact-detail > a, .ct-hotline > a { overflow-wrap: anywhere; }
  .ct-social { flex-wrap: wrap; gap: 12px 18px; }
  .ct-social a { min-height: 44px; }

  .meet-benefits-head h2, .meet-invitation-copy h2, .tea-registration h2 { font-size: var(--mobile-heading); line-height: 1.18; }
  body[data-page="/gap-go-ket-noi"] .meet-hero h1 { font-size: var(--mobile-title); line-height: 1.14; }
  .meet-host h2, .meet-section-head h2, .meet-tasting-head h2,
  .gift-collections-head h2, .gift-detail-story h2, .gift-related h2 { font-size: var(--mobile-heading); line-height: 1.18; }
  .gift-card-title h3 { font-size: 30px; }
  .about-project-copy h2 { font-size: var(--mobile-heading); line-height: 1.18; }
  .meet-invitation-copy h2 em { white-space: normal; }
  .meet-benefit-card h3 { font-size: 27px; line-height: 1.2; }
  .tea-registration-inner { padding-block: 48px 56px; gap: 28px; }
  .tea-registration-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tea-registration-field-wide { grid-column: auto; }
  .tea-registration-paper { padding: 24px 20px; box-shadow: 4px 6px 0 #dfe3d4; }
  .tea-registration-field input, .tea-registration-field textarea { font-size: 16px; }
  .tea-registration-submit-row { flex-wrap: wrap; gap: 16px; }
  .tea-registration-submit { width: 100%; }
  .site-footer { padding-inline: var(--mobile-gutter); }
  .footer-grid { gap: 30px; }
  .footer-explore nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .footer-explore nav a, .footer-social a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-location-list address, .footer-info-list a, .footer-info-list p { font-size: 13px; line-height: 1.7; }
}
@media (max-width: 380px) {
  :root { --mobile-gutter: 18px; }
  .tea-chapter-link { min-height: 500px; }
}
/* Keep all copy and the CTA inside the viewport when Safari's bars are open. */
@media (max-width: 700px) and (max-height: 680px) {
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-content .eyebrow { margin-bottom: 10px; }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-content h1 {
    font-size: var(--cms-heading-size-mobile, clamp(31px, 8.5vw, 38px)) !important;
    margin-bottom: 12px;
  }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-content .lead { font-size: 12px; line-height: 1.55; }
  body[data-page="/"] .hero-carousel .hero-slide[data-slide] .hero-actions { margin-top: 14px; }
  body[data-page="/"] .hero-carousel .hero-controls-inner { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  body[data-page="/"] .hero-carousel .hero-markers { margin-top: 8px; }
}
@media (max-width: 700px) and (orientation: landscape) and (max-height: 500px) {
  body[data-page="/"] .hero-carousel,
  body[data-page] .full-frame-hero,
  body[data-page="/thu-vien"].gallery-museum .museum-hero { height: auto; min-height: 640px; }
}
