/* Mobile polish (November 2026). Loaded last on every main-site page by
   scripts/apply-mobile-polish.mjs. Phone-only rules live inside max-width media
   queries so the desktop layout is unchanged; the few rules marked "All widths"
   fix things that looked broken at every size. */

/* ---------- Phase 1: what looked broken ---------- */

/* All widths: an airline without a logo gets a lettered tile the same size as a
   logo, so every arrival row lines up. */
.flight-airline-tile{display:grid;place-items:center;flex:none;box-sizing:border-box;width:88px;height:36px;border:1px solid var(--line);border-radius:2px;background:var(--paper);color:#5d5a4f;font:600 13px/1 var(--body);letter-spacing:.08em}

/* All widths: a generic `td small{margin-left:8px}` rule in site.css was indenting the
   airline name and terminal under each flight number. Align them with it. */
.flight-airline-copy small{margin-left:0}

/* All widths: once a dated fare example passes its review cutoff, show only the
   "check the latest fare" message and the provider link, not out-of-date dates. */
.flight-fare[data-fare-expired] :is(.fare-example-label,.fare-basis,.fare-dates,.fare-disclaimer,.fare-source,.fare-route-note){display:none}
.flight-fare[data-fare-expired] .fare-expired{margin:16px 0 18px}

/* All widths: the "Step inside" film has letterbox bars baked into the footage.
   Frame it at the footage's true shape so the bars are cropped away. */
.motion-chapter .motion-media[data-motion-key="corridor"]{aspect-ratio:1280/548}

@media (max-width:650px){
  /* Arrival board heading: title and refresh button share one row. */
  .flight-board-heading{flex-wrap:nowrap;align-items:flex-start;gap:12px;margin-bottom:4px}
  .flight-board-heading>div{flex:1 1 auto;min-width:0}
  .flight-board-heading h3{font-size:23px}
  .flight-refresh{flex:none;min-height:40px;padding:8px 11px;gap:6px}
  .flight-route-meta{margin:8px 0 10px}
  .flight-schedule-note{font-size:12px;line-height:1.6;margin-bottom:6px}

  /* Arrival rows: one compact row per flight, logo | flight + airline | time + status. */
  .flight-table tbody tr{grid-template-columns:64px minmax(0,1fr) auto;gap:3px 12px;padding:14px 0;align-items:center}
  .flight-table td:first-child,.flight-table .flight-airline{display:contents}
  .flight-airline-logo,.flight-airline-tile{grid-column:1;grid-row:1/span 2;width:64px;height:32px;padding:3px;border:1px solid var(--line);box-sizing:border-box}
  .flight-airline-tile{padding:0;font-size:12px}
  .flight-airline-copy{grid-column:2;grid-row:1/span 2;align-self:center}
  .flight-airline-copy strong{font-size:16px;line-height:1.3}
  .flight-airline-copy small{margin:0;font-size:12px;line-height:1.45}
  .flight-airline-copy .flight-logistics{font-size:12px}
  .flight-table td.flight-time{grid-column:3;grid-row:1;text-align:right;font-size:20px;line-height:1.2}
  .flight-table td.flight-time:before{display:none}
  .flight-table td.flight-time+td.flight-time{grid-row:2;font-size:12px;font-weight:400;letter-spacing:0;color:var(--muted)}
  .flight-table td.flight-time+td.flight-time:before{display:inline;content:attr(data-label) " ";font-size:11px;margin:0}
  .flight-table td.flight-status{grid-column:3;grid-row:2;text-align:right}
  .flight-table tr:has(>td.flight-time+td.flight-time)>td.flight-status{grid-column:2/-1;grid-row:3;text-align:left}
  .flight-status-label{padding:2px 8px;font-size:11.5px;border-radius:999px}

  /* Date picker: the five quick dates become one swipeable row. */
  .flight-date-controls{gap:10px;margin-bottom:16px}
  .flight-quick-dates{display:flex;min-width:0;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:2px;scrollbar-width:none}
  .flight-quick-dates::-webkit-scrollbar{display:none}
  .flight-quick-dates button{flex:0 0 auto;min-width:78px;min-height:54px;padding:8px 12px;scroll-snap-align:start}
  .flight-quick-dates button strong{font-size:14px;line-height:1.4}
  .flight-date-picker{flex-direction:row;align-items:center;gap:10px;max-width:none;font-size:13px}
  .flight-date-picker input{flex:1;width:auto;min-width:0;min-height:44px;padding:8px 12px}

  /* Fare panel and search box: tighter on phones. */
  .flight-fare{padding:20px 18px}
  .flight-fare h3{font-size:24px;margin-bottom:16px}
  .fare-cabins{margin-bottom:18px}
  .flight-search{margin:8px 0 16px}

  /* Da Nang hero: keep the photo credit clear of the "Explore Da Nang" button. */
  .destination-hero .section{padding-bottom:104px}
  .destination-hero>small{left:16px;right:16px;bottom:14px;max-width:none;font-size:10.5px;line-height:1.45}
}

/* ---------- Phase 2: shorter pages on phones ---------- */

/* All widths: on the contact page the sticky "Inquire now" bar only links back to the
   same page. (The contact page is the only one whose inquiry section directly follows
   the page heading.) */
body:has(.page-intro + .inquiry) .mobile-inquiry{display:none}

@media (max-width:640px){
  /* Venue directories (Experiences, Dining, Spa, Golf, Stay, Comp venues): compact rows,
     a small square photo beside the text, instead of a full-width card per venue. */
  .resort-grid{gap:12px}
  .resort-card{display:grid;grid-template-columns:104px minmax(0,1fr);column-gap:14px;padding:12px;align-items:start}
  .resort-card figure{grid-column:1;grid-row:1}
  .resort-card figure img{width:104px;height:104px;aspect-ratio:1/1;border-radius:3px}
  .resort-card figcaption{padding:6px 0 0;font-size:10px;line-height:1.35}
  .resort-card-copy{grid-column:2;grid-row:1;padding:0}
  .resort-card .resort-category{font-size:11px;line-height:1.4;margin:0 0 3px}
  .resort-card h3{font-size:19px;line-height:1.25;margin:0 0 6px}
  .resort-card .resort-description{font-size:14px;line-height:1.55;margin:0 0 8px}
  .resort-card dl{gap:2px;margin:0 0 6px;font-size:12.5px;line-height:1.5}
  .resort-card dl>div{display:flex;flex-wrap:wrap;column-gap:6px}
  .resort-card dt:after{content:":"}
  .resort-card-links{margin-top:0;padding-top:0;border-top:0;gap:4px 16px;flex-wrap:wrap;justify-content:flex-start}
  .resort-card-links a{display:inline-flex;align-items:center;min-height:40px;font-size:14px}

  /* Directory filters: one swipeable row instead of four wrapped rows. */
  .resort-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
  .resort-filters::-webkit-scrollbar{display:none}
  .resort-filters button{flex:0 0 auto;white-space:nowrap}

  /* Home journal preview: three matching text cards, single dividers. */
  .journal-preview .journal-photo,.journal-preview .media-credit{display:none}
  .journal-preview .journal-grid{gap:0}
  .journal-preview .journal-card{border-bottom:0;padding-top:4px}
  .journal-preview .journal-card-copy{padding:16px 0 12px}
  .journal-preview .journal-card h2{font-size:22px;line-height:1.35}
}

@media (max-width:600px){
  /* Home hero: the four guest-privilege boxes sit 2 x 2 instead of one long stack. */
  .hero.hero-v6 .hero-privileges:has(.hero-benefit){grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero.hero-v6 .hero-privileges>a.hero-benefit{padding:12px 24px 14px 14px;gap:4px;border-bottom:0;border-right:1px solid var(--light-line)}
  .hero.hero-v6 .hero-privileges>a.hero-benefit:nth-child(2n){border-right:0}
  .hero.hero-v6 .hero-privileges>a.hero-benefit:nth-child(-n+2){border-bottom:1px solid var(--light-line)}
  .hero.hero-v6 .hero-privileges>a.hero-benefit>.hero-benefit-arrow{top:12px;right:9px;font-size:15px}
  .hero-benefit-label{font-size:11px;letter-spacing:.04em}
  .hero-benefit-value{font-size:20px}
  .hero-benefit-note{font-size:12px;line-height:1.45}

  /* Contact page: one heading instead of two stacked intros, so the first contact option
     is near the top. */
  .page-intro + .inquiry .inquiry-intro{display:none}
  .page-intro + .inquiry{padding-top:12px}

  /* WeChat / WhatsApp cards (contact page and every inquiry section): text and actions
     beside a smaller QR code. A QR is hard to use on the phone you're holding, so the
     tap actions come first. */
  .contact-linked .contact-qr-channel{grid-template-columns:minmax(0,1fr) 108px;gap:6px 14px;padding:18px;align-items:start}
  .contact-linked .contact-qr-channel h3{font-size:20px;line-height:1.3;margin:6px 0 8px}
  .contact-linked .contact-qr-channel p{font-size:13.5px;line-height:1.6}
  .contact-linked .contact-code-block{width:108px;justify-self:end}
  .contact-linked .contact-qr{padding:6px}
  .contact-linked .contact-enlarge-link{font-size:11.5px;line-height:1.3;min-height:40px;text-align:center}
  .contact-linked .contact-open-link{margin-top:14px;padding:8px 12px}
}

/* ---------- Phase 3: consistency ---------- */

/* All widths: Korean text wraps between words instead of splitting a word in half. */
html:lang(ko) body{word-break:keep-all;overflow-wrap:break-word}

@media (max-width:640px){
  /* One style for every section label (they ranged from 9px to 15px, some in capitals,
     some not). Card meta lines such as "Planning · 4 min read" keep their own style. */
  :is(.section-kicker,.eyebrow,.evisa-kicker,.evisa-document-label,.fare-kicker):not(.journal-card .section-kicker):not(.flight-search .section-kicker){font-size:11.5px;line-height:1.5;font-weight:600;letter-spacing:.14em;text-transform:uppercase}

  /* Readable minimum sizes for links, notes and disclosures (several were 7-11px). */
  .hero-foot a{font-size:12.5px}
  .site-header .brand-destination small{font-size:8.5px}
  .mobile-inquiry>span{font-size:11px}
  .fine.contact-service-note{font-size:12.5px;line-height:1.7}
  .ktv-terms p{font-size:13px;line-height:1.7}
  .ktv-privilege span{font-size:11px}
  .media-credit,.media-credit a{font-size:11px}
  figcaption:not(.resort-card figcaption){font-size:11px}
  .ktv-menu-currency,.ktv-menu-section small{font-size:12px}
  .flight-origins strong{font-size:12px}
  .footer-bottom span,.footer-bottom span a{font-size:11px;line-height:2}

  /* Side-by-side blocks that were cramped on a phone now stack. */
  .ktv-privilege{flex-direction:column;align-items:flex-start;gap:8px}
  .commission-components{grid-template-columns:1fr;gap:6px}
  .commission-components dl{flex-direction:row;align-items:baseline;gap:14px}
  .commission-components dd{margin:0}
  .commission-plus{justify-self:start;line-height:1;padding-left:4px}
  .ktv-menu-index .ktv-menu-nav{grid-template-columns:1fr}
  .ktv-menu-index .ktv-menu-nav a{min-height:48px;padding:12px 10px}

  /* "Arrive with ease" matches the other experience cards (it was a boxed variant). */
  .experience-transfers:last-child{background:none;margin-top:0}
  .experience-transfers:last-child .card-photo{min-height:0;aspect-ratio:16/9;display:block;overflow:hidden}
  .experience-transfers:last-child .card-content{padding:22px 0 0}

  /* Experiences count tiles: numbers in one column, labels lined up and capitalised. */
  .resort-overview a{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;column-gap:10px}
  .resort-overview a>span:first-of-type::first-letter{text-transform:uppercase}

  /* Da Nang in-page links: one swipeable row of chips instead of loose centred text. */
  .destination-nav{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;gap:8px;padding:12px 16px;scrollbar-width:none}
  .destination-nav::-webkit-scrollbar{display:none}
  .destination-nav a{flex:0 0 auto;white-space:nowrap;border:1px solid var(--line);border-radius:999px;padding:9px 14px;font-size:13px;background:var(--white)}

  /* Larger tap areas for small text links. */
  .breadcrumb{display:inline-block;padding:8px 0}
  .footer-bottom span a{display:inline-block;padding:4px 0}
}

/* ---------- Phase 4: Da Nang guide, journal lists, tap areas ---------- */
@media (max-width:640px){
  /* Journal lists (The travel journal, Da Nang "Practical guides", related stories): compact
     rows, a small square photo beside the text. A story without a photo gets a matching
     monogram tile so every row lines up. Summaries show 3 lines; the story has the rest. */
  :is(.journal-list,.destination-stories,.journal-related) .journal-grid{gap:0}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card{display:grid;grid-template-columns:96px minmax(0,1fr);column-gap:14px;align-items:start;padding:16px 0;border-top:0;border-bottom:1px solid var(--line)}
  :is(.journal-list,.destination-stories,.journal-related) .journal-photo{grid-column:1;grid-row:1;width:96px;aspect-ratio:1/1;border-radius:3px}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card:not(:has(.journal-photo))::before{content:"M&S";grid-column:1;grid-row:1;display:grid;place-items:center;width:96px;height:96px;border-radius:3px;background:var(--sand);color:#8a6d33;font:400 20px/1 var(--display);letter-spacing:.04em}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card-copy{grid-column:2;grid-row:1;padding:0}
  :is(.journal-list,.destination-stories,.journal-related) .media-credit{grid-column:1/-1;grid-row:2;padding-top:8px;font-size:10.5px;line-height:1.5}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card .section-kicker{margin:0 0 4px}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card h2{font-size:18px;line-height:1.3;margin:0 0 6px}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card-copy>p:not(.section-kicker){font-size:14px;line-height:1.55;margin:0 0 4px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card-footer{gap:8px}
  :is(.journal-list,.destination-stories,.journal-related) .journal-card-footer a{min-height:40px;padding:6px 0}

  /* Da Nang destination cards: the same compact row. Cards without a photo get a matching
     map-pin tile. The photo caption moves under the thumbnail instead of over the image. */
  .destination-grid{gap:12px}
  .destination-card{display:grid;grid-template-columns:104px minmax(0,1fr);column-gap:14px;padding:12px;align-items:start}
  .destination-card figure{grid-column:1;grid-row:1}
  .destination-card figure img{width:104px;height:104px;aspect-ratio:1/1;border-radius:3px}
  .destination-card figcaption{position:static;background:none;color:var(--muted);padding:6px 0 0;font-size:10px;line-height:1.35}
  .destination-card:not(:has(figure))::before{content:"";grid-column:1;grid-row:1;width:104px;height:104px;border-radius:3px;background:var(--sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6d33' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E") center/34px no-repeat}
  .destination-card-copy{grid-column:2;grid-row:1;padding:0}
  .destination-card h3{font-size:18px;line-height:1.3;margin:4px 0 6px}
  .destination-card p{font-size:14px;line-height:1.6;margin:0 0 8px}
  .destination-tip{padding-top:8px;margin:8px 0}
  .destination-tip strong{font-size:11.5px}
  .destination-card .underlink{display:inline-flex;align-items:center;min-height:40px;font-size:13px}

  /* Comfortable tap areas for the remaining small links. */
  .breadcrumb{display:inline-flex;align-items:center;min-height:40px;padding:0}
  .footer-bottom span a,.footer-resources a{display:inline-flex;align-items:center;min-height:40px;padding:0 2px}
  .resort-card h3 a,.experience-card .card-title h3 a{display:inline-block;padding:8px 0;margin:-8px 0}
  .journal-toc a{display:block;padding:9px 0}
  figcaption a{display:inline-block;padding:12px 0;margin:-12px 0}
}

/* ---------- Phase 5: header "Menu" button on phones/tablets ---------- */
@media (max-width:800px){
  /* Closed: a rounded button with a menu icon beside the (localised) label, instead of plain text. */
  .site-header .mobile-menu>summary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:40px;padding:0 13px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--ink);font-size:13px;font-weight:500;line-height:1;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .2s,color .2s,border-color .2s}
  .site-header .mobile-menu>summary::-webkit-details-marker{display:none}
  .site-header .mobile-menu>summary::before{content:"";flex:none;width:16px;height:12px;background:linear-gradient(currentColor 0 0) top/100% 1.6px no-repeat,linear-gradient(currentColor 0 0) center/100% 1.6px no-repeat,linear-gradient(currentColor 0 0) bottom/100% 1.6px no-repeat}
  /* Open: the button turns dark with a close icon. */
  .site-header .mobile-menu[open]>summary{background:var(--ink);border-color:var(--ink);color:#fffefa}
  .site-header .mobile-menu[open]>summary::before{content:"\2715";width:16px;height:auto;background:none;font-size:13px;line-height:1;text-align:center}
  /* The panel: a clean sheet with dividers, arrows and a shadow so it reads apart from the page. */
  .site-header .mobile-menu>nav{padding:6px 6% 14px;box-shadow:0 18px 30px rgba(20,22,18,.14)}
  .site-header .mobile-menu>nav a{min-height:52px;padding:0 4px;border-bottom:1px solid var(--line);font-size:17px;color:var(--ink);text-decoration:none}
  .site-header .mobile-menu>nav a:last-child{border-bottom:0}
  .site-header .mobile-menu>nav a::after{content:"\203A";margin-left:auto;padding-left:12px;font-size:22px;line-height:1;color:var(--muted)}
  .site-header .mobile-menu>nav a[aria-current]{background:var(--sand);padding:0 12px;margin:0 -8px;border-radius:4px;text-decoration:none;font-weight:500}
}

/* ---------- Team review (18 Nov 2026) ---------- */
/* All widths: home hero buttons in the order the team asked for - Explore Da Nang (outlined),
   Discover KTV (gold), Inquire now (text link; it is also in the header and the phone bar). */
.hero-actions .hero-explore{background:transparent;border:1px solid rgba(255,254,250,.72);color:var(--white)}
.hero-actions .hero-explore:hover{background:rgba(255,254,250,.12);border-color:var(--white)}
.hero-actions .hero-text-link.hero-inquire{background:transparent;border:0;border-bottom:1px solid #c8cfc9;border-radius:0;padding:8px 0;min-height:48px;color:#fff;font-size:14px;gap:8px}
.hero-actions .hero-text-link.hero-inquire:hover{background:transparent;color:var(--gold)}
/* All widths: a small line icon above each benefit card label. */
.hero-benefit-icon{display:block;width:22px;height:22px;margin-bottom:4px;color:#d9b77e}
.hero-benefit-icon svg{display:block;width:100%;height:100%}
@media (max-width:640px){
  .hero-benefit-icon{width:20px;height:20px;margin-bottom:2px}
  .hero-actions .hero-text-link.hero-inquire{font-size:13px}
}
/* Phones: the two hero buttons stack full width, Inquire now underneath as a link. */
@media (max-width:560px){
  .hero.hero-v6 .hero-actions{gap:12px}
  .hero.hero-v6 .hero-actions .button{flex:1 1 100%;justify-content:center;min-height:48px}
}
