/* INSIDE BÁNH v14 · Pocket edition
   Mobile-only visual refinements; desktop Classic remains intact.
*/
@media (max-width: 760px) {
  :root { --mobile-gutter: clamp(18px, 5vw, 26px); }
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 78px; }
  body { font-size: 15px; line-height: 1.6; overflow-x: clip; }
  main { overflow: clip; }
  img { max-width: 100%; }
  a,button,summary,input { -webkit-tap-highlight-color: transparent; }
  a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #cf747d; outline-offset: 3px; }
  .section-pad { padding: 68px var(--mobile-gutter) !important; }
  .section-pad-top { padding: 28px var(--mobile-gutter) 72px !important; }
  .eyebrow { font-size: .61rem; line-height: 1.5; letter-spacing: .125em; }

  /* compact identity and navigation */
  .topbar {
    height: 66px !important;
    grid-template-columns: minmax(0,1fr) auto;
    padding-inline: var(--mobile-gutter) !important;
    background: rgba(255,249,242,.97);
    border-bottom: 1px solid rgba(37,34,31,.07);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    isolation: isolate;
  }
  .topbar.scrolled { background: rgba(255,249,242,.96); border-bottom-color: rgba(37,34,31,.11); backdrop-filter:none; }
  .topbar .brand { display: inline-flex; align-items:baseline; gap:8px; line-height:1; font-size: 1.25rem; }
  .topbar .brand::after { content: 'by Dũng'; font: 500 10px/1 var(--sans); letter-spacing: .01em; color: #897e73; text-transform:none; }
  .topbar .brand span { margin-left:-8px; }
  .nav-actions { gap:0; }
  .menu-button { display:grid !important; align-content:center; justify-items:center; width:45px; height:45px; padding:12px; border:1px solid rgba(37,34,31,.13); border-radius:50%; background: rgba(255,255,255,.52); position:relative; z-index:3; }
  .menu-button span { width:18px; height:1.5px; background:currentColor; margin:3px 0; transition:transform .22s ease,background .22s ease; }
  .mobile-menu { padding: max(102px,calc(env(safe-area-inset-top) + 90px)) var(--mobile-gutter) calc(44px + env(safe-area-inset-bottom)); gap: 4px; justify-content:center; overflow-y:auto; -webkit-overflow-scrolling:touch; transition:transform .3s cubic-bezier(.23,.8,.2,1); }
  .mobile-menu a { font-size: clamp(2.75rem, 12vw,4.5rem); padding:18px 2px; line-height:1.04; }
  body.menu-is-open { overflow:hidden; touch-action:none; }
  body.menu-is-open .topbar { background:var(--ink); border-color:rgba(255,255,255,.16); color:var(--milk); }
  body.menu-is-open .topbar .brand::after { color:#b8aca0; }
  body.menu-is-open .menu-button { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.28); }
  body.menu-is-open .menu-button span:first-child { transform:translateY(3.75px) rotate(45deg); }
  body.menu-is-open .menu-button span:last-child { transform:translateY(-3.75px) rotate(-45deg); }

  /* opening spread: short and readable without endless scrolling */
  .hero-section { padding: 104px var(--mobile-gutter) 55px !important; display:flex !important; flex-direction:column; gap: 27px !important; min-height:0 !important; }
  .hero-section::before { width:72vw; height:72vw; top:52%; right:-26vw; opacity:.65; }
  .hero-copy { width:100%; }
  .hero-kicker { font-size: .56rem; gap:8px; letter-spacing:.12em; margin-bottom:18px; }
  .hero-kicker span { width:22px; }
  .hero-copy h1 { font-size: clamp(3.35rem, 14.8vw, 5.2rem) !important; line-height:.94; letter-spacing:-.058em; max-width: 520px; text-wrap:balance; }
  .hero-lead { margin:21px 0 21px !important; font-size:.93rem !important; line-height:1.72; color:#655e56; max-width:45ch; }
  .hero-actions { gap:15px 18px; }
  .hero-actions .button { min-height:49px; padding-inline:20px; justify-content:space-between; gap:16px; }
  .hero-actions .text-link { font-size:.72rem; }
  .button { min-height:49px; }
  .hero-micro { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 !important; margin-top:29px !important; padding-top:17px; border-top:1px solid var(--line); }
  .hero-micro div { min-width:0; padding:0 8px !important; border-right:1px solid var(--line); }
  .hero-micro div:first-child { padding-left:0 !important; }
  .hero-micro div:last-child { border-right:0; padding-right:0 !important; }
  .hero-micro strong { font-size:1.5rem; }
  .hero-micro span { font-size:.54rem; letter-spacing:.025em; line-height:1.45; }
  .hero-stage { width:100%; min-height:0 !important; padding:0 !important; }
  .hero-stage .cake-photo.hero-art { width:100% !important; height:auto !important; aspect-ratio: 1.15 / 1 !important; max-height:none !important; border-radius:21px !important; box-shadow:0 15px 30px rgba(77,50,38,.11) !important; }
  .hero-stage .cake-photo.hero-art .photo-frame { border-radius:21px !important; }
  .hero-stage .cake-photo.hero-art img { object-position:center 50%; }

  /* editorial headings: intentionally smaller, better line wrapping */
  .section-heading { margin-bottom:28px !important; }
  .split-heading,.row-heading { display:block !important; }
  .split-heading h2,.row-heading h2,.center-heading h2 { font-size:clamp(3rem, 12vw, 4.4rem) !important; line-height:.97; margin-top:12px; text-wrap:balance; }
  .split-heading>p { font-size:.9rem; line-height:1.75; margin-top:21px; }
  .center-heading { margin-bottom:28px !important; }
  .row-heading .circle-link { width:auto; aspect-ratio:auto; min-height:40px; max-width:160px; border-radius:999px; padding:10px 16px; margin-top:22px; font-size:.59rem; }

  /* anatomy remains in original flow without oversized spacer blocks */
  .anatomy-showcase { display:block !important; min-height:0 !important; }
  .anatomy-sticky { height:auto !important; }
  .anatomy-sticky .anatomy-illustration { position:relative !important; top:auto !important; margin:0 !important; border-radius:18px !important; padding:7px !important; }
  .anatomy-notes { padding-top:16px !important; }
  .anatomy-notes article { min-height:0 !important; padding:24px 0 !important; }
  .anatomy-notes h3 { font-size:2.1rem; line-height:1.05; }
  .anatomy-notes p { font-size:.87rem; line-height:1.73; }
  .anatomy-legend { gap:8px; letter-spacing:.08em; }

  /* 2x2 collection: no giant slabs on a phone */
  .world-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
  .world-card { min-height:188px !important; border-radius:17px !important; padding:17px !important; }
  .world-card h3 { font-size:clamp(2.05rem, 8vw, 2.8rem) !important; margin-top:8px; line-height:.88; }
  .world-card small { font-size:.44rem; letter-spacing:.075em; }
  .world-card .world-number { left:17px; top:13px; font-size:1rem; }
  .world-card > b { width:32px; height:32px; min-width:32px; font-size:.9rem; }
  .world-card::before,.world-card::after { opacity:.78; }

  /* swipeable only on the featured showcase; explore remains a useful list */
  .featured-grid { display:grid !important; grid-auto-flow:column; grid-auto-columns:minmax(240px,82vw); grid-template-columns:none !important; gap:14px !important; margin-inline:calc(-1 * var(--mobile-gutter)); padding:0 var(--mobile-gutter) 12px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scroll-padding-inline:var(--mobile-gutter); scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .featured-grid::-webkit-scrollbar,.filter-group::-webkit-scrollbar { display:none; }
  .featured-grid .cake-card { scroll-snap-align:start; }
  .featured-grid .cake-card-visual { aspect-ratio:1.2 !important; border-radius:17px !important; }
  .featured-grid .cake-card-copy h3 { font-size:2rem !important; }
  .cake-card-index { top:10px !important; left:10px !important; }
  .cake-card-action { top:10px !important; right:10px !important; }
  .cake-card-copy { padding:13px 2px 0 !important; }
  .cake-card-copy p { font-size:.79rem; line-height:1.5; }

  /* Browse: compact image-left stories, more content above the fold */
  .explore-grid,.related-grid { display:grid !important; grid-template-columns:1fr !important; gap:0 !important; }
  .explore-grid .cake-card,.related-grid .cake-card { display:grid; grid-template-columns:38% minmax(0,1fr); align-items:center; column-gap:15px; padding:13px 0; border-bottom:1px solid var(--line); }
  .explore-grid .cake-card-visual,.related-grid .cake-card-visual { width:100%; height:auto !important; aspect-ratio:1.14 !important; border-radius:14px !important; }
  .explore-grid .cake-card-index,.related-grid .cake-card-index { font-size:.47rem !important; padding:6px 7px !important; }
  .explore-grid .cake-card-action,.related-grid .cake-card-action { display:none !important; }
  .explore-grid .cake-card-copy,.related-grid .cake-card-copy { padding:0 !important; }
  .explore-grid .cake-card-copy h3,.related-grid .cake-card-copy h3 { font-size:clamp(1.55rem, 6.6vw, 2rem) !important; line-height:1.02; }
  .explore-grid .cake-card-copy p,.related-grid .cake-card-copy p { font-size:.76rem; line-height:1.4; -webkit-line-clamp:2; }
  .explore-grid .tag-row,.related-grid .tag-row { gap:4px; margin-top:8px; }
  .explore-grid .tag-row span,.related-grid .tag-row span { font-size:.48rem; padding:3px 6px; }

  /* Home final chapters: more balanced heights */
  .baking-teaser { display:block !important; min-height:0 !important; }
  .baking-teaser h2 { font-size:clamp(3rem, 12vw, 4.6rem) !important; line-height:.97; margin:15px 0 20px; }
  .baking-teaser p { font-size:.88rem; line-height:1.76; }
  .ingredient-orbit { min-height:265px !important; margin-top:12px; }
  .formula-card { width:190px !important; border-radius:18px; padding:22px; box-shadow:0 15px 40px rgba(27,48,19,.13); }
  .formula-card strong { font-size:1.9rem; }
  .formula-card em { font-size:1.5rem; }
  .ingredient-pill { font-size:.45rem; padding:7px 9px; }
  .search-cta { padding:66px var(--mobile-gutter) !important; }
  .search-cta p { font-size:.82rem; }
  .giant-search-link { min-width:0; align-items:center; }
  .giant-search-link span { font-size:clamp(2.4rem,11vw,4.4rem) !important; line-height:.9; }
  .giant-search-link b { width:45px; height:45px; flex:0 0 45px; }

  /* Detail/recipe: reduce shouty type and retain legible reading rhythm */
  .page-hero { min-height:0 !important; padding:112px var(--mobile-gutter) 58px !important; }
  .page-hero h1 { font-size:clamp(3.6rem,14vw,5.8rem) !important; line-height:.93; text-wrap:balance; }
  .page-hero p { font-size:.9rem; line-height:1.73; }
  .explore-toolbar { margin-bottom:20px; }
  .mega-search { min-width:0; }
  .mega-search input { font-size:16px !important; width:100%; }
  .filter-group { gap:7px; scrollbar-width:none; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity; }
  .filter-chip { min-height:42px; padding:10px 15px; scroll-snap-align:start; }
  .explore-meta { margin-bottom:8px; }
  .explore-meta>span:last-child { max-width:40ch; font-size:.7rem; line-height:1.6; }
  .cake-detail-hero { padding:100px var(--mobile-gutter) 50px !important; gap:26px !important; }
  .detail-copy h1 { font-size:clamp(3.8rem,15vw,5.7rem) !important; line-height:.92; }
  .detail-copy>p { font-size:.88rem; line-height:1.72; }
  .detail-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .detail-facts div { min-width:0; }
  .detail-facts strong { font-size:.81rem !important; line-height:1.3; overflow-wrap:anywhere; }
  .detail-art-wrap { aspect-ratio:1.2 / 1 !important; border-radius:18px !important; padding:7px !important; }
  .story-band { padding:65px var(--mobile-gutter) !important; }
  .story-band blockquote { font-size:clamp(2.25rem,9vw,3.6rem); line-height:1.09; }
  .illustrated-layer-visual { min-height:0 !important; }
  .layer-visual { min-height:0 !important; }
  .cake-layer-inspector { display:block !important; }
  .layer-notes article { padding:19px 0 !important; }
  .texture-section,.recipe-preview { display:block !important; }
  .recipe-preview-art { min-height:0 !important; padding:0 !important; }
  .recipe-preview-art .cake-photo { width:100%; aspect-ratio:1.3; }
  .recipe-preview-copy { padding-top:25px; }
  .recipe-preview-copy h2 { font-size:clamp(3.4rem,13vw,5rem) !important; }
  .recipe-hero { padding:106px var(--mobile-gutter) 48px !important; gap:25px !important; }
  .recipe-hero h1 { font-size:clamp(3.4rem,13.2vw,5.5rem) !important; }
  .recipe-hero .cake-photo { width:100%; aspect-ratio:1.18; max-width:none; }
  .recipe-workspace { display:block !important; }
  .ingredient-checklist { position:static !important; padding-bottom:35px; }
  .ingredient-item { min-height:48px; }
  .ingredient-item input { display:block; position:absolute; opacity:0; width:24px; height:24px; }
  .recipe-step { padding:29px 0 48px; gap:14px; }
  .step-body h2 { font-size:clamp(2.6rem,10vw,3.8rem); line-height:1; }
  .step-body>p { font-size:.88rem; line-height:1.7; }
  .mini-timer button { min-height:44px; }
  .recipe-finish { padding:45px 22px !important; }
  .recipe-finish h2 { font-size:3.1rem; }

  /* Content pages: magazine index instead of stacked oversized blocks */
  .vietnam-map-section { display:block !important; }
  .vietnam-map-wrap { position:relative !important; width:100%; height:430px !important; }
  .vietnam-quote blockquote { font-size:clamp(2rem,8vw,3.2rem); line-height:1.12; }
  .region-head h2,.continent-title h2 { font-size:3rem !important; }
  .continent-cakes { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px; }
  .continent-cakes>a { border-radius:13px; }
  .continent-cakes .cake-photo { aspect-ratio:1.25; }
  .continent-cakes strong { font-size:1.17rem; line-height:1.2; }
  .article-card { min-height:0 !important; padding:22px !important; border-radius:17px; }
  .article-card h3 { font-size:2rem !important; }
  .science-section { gap:10px; }
  .science-card { min-height:270px !important; border-radius:17px; padding:24px; }
  .science-card h2 { font-size:3.3rem; margin-top:30px; }
  .formula-strip { font-size:clamp(1.2rem,5vw,2.4rem) !important; min-height:100px !important; gap:8px; }
  .faq-list summary { font-size:1.8rem; min-height:68px; align-items:center; }
  .photo-credit-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:22px 10px; }
  .photo-credit-thumb { border-radius:15px; }

  .site-footer { padding:52px var(--mobile-gutter) calc(24px + env(safe-area-inset-bottom)) !important; gap:28px; }
  .site-footer p { font-size:.81rem; line-height:1.7; }
  .footer-links { gap:5px 20px; }
  .footer-links a { padding:9px 0; font-size:1.2rem; }
  .footer-note { line-height:1.7; letter-spacing:.1em; }
}
@media (max-width: 360px) {
 .hero-copy h1 { font-size:3.18rem !important; }
 .world-card { min-height:169px !important; padding:13px !important; }
 .world-card h3 { font-size:1.9rem !important; }
 .hero-actions .button { min-width:0; }
 .explore-grid .cake-card,.related-grid .cake-card { grid-template-columns:36% minmax(0,1fr); gap:10px; }
}
@media (hover: none) and (pointer: coarse) {
 .cake-card:hover .cake-card-visual img { transform:none !important; }
 .hero-stage .cake-photo.hero-art { animation:none !important; transform:none !important; }
 .ingredient-pill,.hero-orbit { animation:none !important; }
 .world-card:hover,.circle-link:hover,.button-dark:hover { transform:none !important; }
}
@media (prefers-reduced-motion: reduce) {
 .featured-grid,.filter-group { scroll-behavior:auto !important; }
 .mobile-menu,.menu-button span { transition:none !important; }
}
