/* =====================================================================
   Landing đứng riêng "Miến gà sấy thăng hoa" – 2026-12-02
   Khung nâu đậm bao quanh tấm nền xanh pastel, chữ to, phiếu thành phần
   kiểu hoá đơn. Hero là video nguyên liệu rơi vào hộp vẽ theo tiến độ cuộn
   (js/landing.js). Điện thoại: hero tràn màn hình, video phủ kín, chữ và
   nút đè lên. Cuối hero: zoom vào tô miến nhìn từ trên.
   ===================================================================== */
:root {
  --mg-frame: #4A1C1E; --mg-frame-chu: #F3E6C8; --mg-ink: #3A1416; --mg-ink-2: #5B2A2C;
  --mg-panel-c: #D2E6AE; --mg-panel-e: #9FBE7F; --mg-paper: #F5F7DE; --mg-cream: #FFF8E6;
  --mg-cta: #CA4666; --mg-zalo: #0068FF;
  --mg-display: "Baloo 2", "Quicksand", system-ui, sans-serif;
  --mg-body: "Be Vietnam Pro", system-ui, sans-serif;
  --mg-mono: "Roboto Mono", ui-monospace, Menlo, monospace;
  --mg-px: 8px;        /* số px cuộn cho mỗi frame video 20 fps (điện thoại 10px: cảnh rơi chậm hơn) */
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mg-frame); color: var(--mg-ink); font-family: var(--mg-body); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Nút, chip ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; font: 700 15px/1 var(--mg-body); color: inherit; cursor: pointer; text-decoration: none; transition: background-color .15s, transform .12s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .chip:focus-visible, .mg-tag:focus-visible { outline: 3px solid var(--mg-ink); outline-offset: 2px; }
.btn--primary { background: var(--mg-cta); color: #fff; box-shadow: 0 10px 22px -8px rgba(202, 70, 102, .6); }
.btn--primary:hover { background: #B63F5D; }
.btn--zalo { background: var(--mg-zalo); color: #fff; }
.btn--zalo:hover { background: #0052cc; }
.btn--outline { border: 2px solid var(--mg-ink); color: var(--mg-ink); background: transparent; }
.btn--outline:hover { background: rgba(255, 248, 230, .55); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--mg-ink); background: transparent; color: var(--mg-ink); font: 600 15px/1.2 var(--mg-body); cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.chip.is-active { background: var(--mg-ink); color: var(--mg-cream); }

.mg { overflow-x: clip; }

/* ---------- Hero: màn cuộn dính ---------- */
.mg-scene { height: calc(100svh + var(--mg-n, 400) * var(--mg-px)); }
.mg-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.mg-frame { max-width: 1440px; height: 100%; margin: 0 auto; padding: 12px 24px 16px; display: flex; flex-direction: column; }
.mg-panel {
  position: relative; flex: 1; min-height: 0; border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 50%, var(--mg-panel-c), var(--mg-panel-e));
  display: grid; grid-template-columns: minmax(0, .66fr) minmax(0, 2.3fr) minmax(0, .62fr);
  grid-template-areas: "intro stage rec" "buy stage rec"; grid-template-rows: auto 1fr; column-gap: 12px;
  padding: clamp(12px, 2svh, 24px) 28px clamp(12px, 2svh, 22px);
}
.mg-intro { grid-area: intro; align-self: end; }
.mg-eyebrow { margin: 0 0 12px; font: 700 13px/1.4 var(--mg-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mg-ink-2); }
.mg-title { margin: 0; font: 800 clamp(30px, 2.7vw, 44px)/1 var(--mg-display); text-transform: uppercase; color: var(--mg-ink); }
.mg-line { display: block; padding: .14em 0 0; margin-top: -.06em; }
.mg-lead { margin: 16px 0 0; max-width: 30ch; font-size: 17px; line-height: 1.5; color: var(--mg-ink-2); }

.mg-buy { grid-area: buy; align-self: start; margin-top: 24px; }
.mg-price { display: flex; align-items: baseline; gap: 12px; }
.mg-price strong { font: 800 44px/1 var(--mg-display); color: var(--mg-ink); }
.mg-unit { margin: 8px 0 0; font: 500 13px/1.4 var(--mg-mono); color: var(--mg-ink-2); }
.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.mg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mg-note { margin: 14px 0 0; max-width: 36ch; font: 500 12px/1.5 var(--mg-mono); color: var(--mg-ink-2); }
.mg-hero-cta { display: none; }
.mg-game { display: none; }

/* ---------- Sân khấu: thẻ video 3D ---------- */
.mg-stage-wrap { grid-area: stage; position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 0; }
.mg-stage { position: relative; height: 124%; margin-block: -12%; aspect-ratio: 4 / 5; max-width: 100%; perspective: 1400px; }
.mg-depth { position: absolute; inset: -8%; z-index: 0; width: 116%; height: 116%; filter: blur(26px) saturate(1.25); opacity: .55; border-radius: 30%; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 40%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 50%, #000 40%, transparent 72%); }
.mg-card { position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d; transform-origin: 50% 62%; will-change: transform, opacity; }
.mg-sharp { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; pointer-events: none; transform: translateZ(2px); }
/* translateZ: .mg-card là preserve-3d, Safari xếp lớp theo chiều sâu 3D chứ không theo z-index, nên ảnh nét phải nằm trước canvas trong không gian 3D */
.mg-sharp.on { opacity: 1; }
.mg-cv { display: block; width: 100%; height: 100%; transform: translateZ(0); }
.mg-cv, .mg-sharp {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
/* Chú thích nguyên liệu: thẻ nhỏ góc dưới trái + 6 chấm tiến độ, không che video */
.mg-fcaps { position: absolute; left: 7%; bottom: 13%; z-index: 7; display: grid; grid-template-rows: auto auto; gap: 8px; justify-items: start; max-width: min(300px, 60%); pointer-events: none; transform: translateZ(60px); }
.mg-fdots { grid-row: 1; display: flex; gap: 6px; padding-left: 2px; }
.mg-fdots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(58, 20, 22, .25); transition: background-color .2s, transform .2s; }
.mg-fdots i.done { background: var(--mg-ink); }
.mg-fdots i.on { background: var(--mg-cta); transform: scale(1.35); }
.mg-fcap { grid-row: 2; grid-column: 1; text-align: left; padding: 8px 12px 9px; border-radius: 12px; background: rgba(255, 248, 230, .92); color: var(--mg-ink); box-shadow: 0 10px 24px -12px rgba(58, 20, 22, .55); opacity: 0; translate: -8px 0; transition: opacity .22s ease-out, translate .22s ease-out; }
.mg-fcap.on { opacity: 1; translate: 0 0; }
.mg-fcap b { display: block; font: 800 15px/1.2 var(--mg-display); }
.mg-fcap small { display: block; margin-top: 2px; font: 500 11px/1.35 var(--mg-mono); color: var(--mg-ink-2); }
.mg-stage-wrap::after { content: none; }
.mg-load { position: absolute; left: 50%; bottom: 5%; translate: -50% 0; z-index: 7; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(255, 248, 230, .9); font: 700 12px/1.2 var(--mg-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mg-ink); transition: opacity .3s; }
.mg-load.off { opacity: 0; }

/* Cuối hero: quầng sáng + tô miến phóng to vào giữa */
.mg-glow { position: absolute; z-index: 4; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 248, 230, .85), rgba(255, 248, 230, 0) 60%); opacity: 0; pointer-events: none; will-change: opacity, transform; }
.mg-topview {
  position: absolute; z-index: 5; left: 50%; top: 50%; margin: 0;
  width: min(700px, 112%, 82svh); padding: 12px 12px 0; background: var(--mg-cream); border-radius: 22px;
  box-shadow: 0 40px 70px -30px rgba(58, 20, 22, .7); opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(.55); will-change: transform, opacity;
}
.mg-topview.live { pointer-events: auto; }
.mg-pic { position: relative; overflow: hidden; border-radius: 12px; }
.mg-topview img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; will-change: transform; }
.mg-topview figcaption { padding: 10px 4px 12px; display: flex; justify-content: space-between; gap: 12px; font: 700 13px/1.3 var(--mg-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--mg-ink); opacity: 0; transition: opacity .3s; }
.mg-tag-pos { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; }
.mg-tag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; padding: 6px 12px 6px 8px; border: 0; border-radius: 999px; background: var(--mg-cream); color: var(--mg-ink); font: 700 13px/1.2 var(--mg-body); box-shadow: 0 6px 14px -6px rgba(58, 20, 22, .55); opacity: 0; cursor: pointer; transition: background-color .15s, color .15s; }
.mg-tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--mg-cta); box-shadow: 0 0 0 3px rgba(202, 70, 102, .25); }
.mg-tag.hl, .mg-tag:hover { background: var(--mg-ink); color: var(--mg-cream); }
.mg-tag:active { transform: scale(.95); }

.mg-cue { position: absolute; right: 0; bottom: 6px; z-index: 6; margin: 0; width: 150px; text-align: center; font: 700 13px/1.3 var(--mg-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mg-ink); transition: opacity .25s ease-out; }
.mg-cue.off { opacity: 0; }
.mg-cue svg { display: block; margin: 4px auto 0; width: 18px; height: 18px; animation: mg-cue 1.4s ease-in-out infinite; }
@keyframes mg-cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Phiếu thành phần ---------- */
.mg-rec { grid-area: rec; align-self: center; position: relative; padding: 36px 8px 8px; }
.mg-rec-wrap { filter: drop-shadow(0 18px 22px rgba(58, 20, 22, .28)); transform: rotate(-2.5deg); }
.mg-receipt {
  background: var(--mg-paper); color: var(--mg-ink); padding: 30px 24px;
  -webkit-mask: radial-gradient(circle at 50% 0, transparent 6px, #000 6.5px) top / 16px 51% repeat-x, radial-gradient(circle at 50% 100%, transparent 6px, #000 6.5px) bottom / 16px 51% repeat-x;
          mask: radial-gradient(circle at 50% 0, transparent 6px, #000 6.5px) top / 16px 51% repeat-x, radial-gradient(circle at 50% 100%, transparent 6px, #000 6.5px) bottom / 16px 51% repeat-x;
}
.mg-receipt h2 { margin: 0 0 12px; font: 800 clamp(20px, 2.8svh, 26px)/1.15 var(--mg-display); text-transform: uppercase; color: var(--mg-ink); }
.mg-meta { margin: 0; display: grid; gap: 4px; font: 500 13px/1.45 var(--mg-mono); }
.mg-meta div { display: flex; gap: 6px; align-items: baseline; }
.mg-dots { flex: 1; border-bottom: 2px dotted rgba(58, 20, 22, .45); transform: translateY(-4px); min-width: 12px; }
.mg-meta dd { margin: 0; text-align: right; font-weight: 700; }
.mg-rule { border: 0; border-top: 2px dashed rgba(58, 20, 22, .5); margin: 14px 0; }
.mg-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font: 500 14px/1.4 var(--mg-mono); }
.mg-items li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; opacity: .45; transition: opacity .25s; }
.mg-items li.on { opacity: 1; }
.mg-items li.hl { background: rgba(58, 20, 22, .08); }
.mg-tick { position: relative; width: 18px; height: 18px; margin-top: 1px; border: 2px solid var(--mg-ink); border-radius: 4px; }
.mg-tick i { position: absolute; inset: 0; background: var(--mg-ink); color: var(--mg-paper); font: 700 12px/14px var(--mg-mono); text-align: center; font-style: normal; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.mg-items li.on .mg-tick i { opacity: 1; transform: none; }
.mg-fine { margin: 12px 0 0; font: 500 12px/1.5 var(--mg-mono); color: var(--mg-ink-2); }
.mg-fine a { color: inherit; text-decoration: underline; }
.mg-fine--light { color: var(--mg-frame-chu); opacity: .8; }
.mg-stamp { position: absolute; z-index: 2; top: -18px; right: -14px; width: 118px; height: 118px; opacity: 0; transform: rotate(-120deg) scale(.4); transition: opacity .3s, transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.mg-stamp.on { opacity: 1; transform: rotate(-8deg) scale(1); }

/* ---------- Bản sao cho màn hẹp ---------- */
.mg-after { display: none; }
.mg-rec-m .mg-rec { padding-top: 28px; }

/* ---------- Các khối dưới hero ---------- */
.mg-sec { padding: clamp(40px, 7vw, 88px) 0; }
.mg-sec--paper .container { background: var(--mg-paper); border-radius: 28px; padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(28px, 4vw, 48px); }
.mg-sec:not(.mg-sec--paper) { color: var(--mg-frame-chu); }
.mg-sec:not(.mg-sec--paper) .mg-h2 { color: var(--mg-frame-chu); }
.mg-kicker { margin: 0 0 8px; font: 700 13px/1.4 var(--mg-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.mg-h2 { margin: 0 0 clamp(20px, 3vw, 36px); font: 800 clamp(28px, 3.4vw, 44px)/1.08 var(--mg-display); text-transform: uppercase; color: var(--mg-ink); }
.mg-num { display: inline-block; font: 700 13px/1 var(--mg-mono); letter-spacing: .08em; color: var(--mg-cta); margin-right: 10px; }
.mg-center { text-align: center; margin-top: 28px; }

.mg-ngon { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mg-ngon__item { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 18px; align-items: center; background: var(--mg-cream); color: var(--mg-ink); border-radius: 22px; padding: 14px; }
.mg-ngon__item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.mg-ngon__item h3 { margin: 6px 0 6px; font: 800 clamp(18px, 1.6vw, 22px)/1.2 var(--mg-display); }
.mg-ngon__item p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--mg-ink-2); }
.mg-ngon__item:nth-child(2n) { grid-template-columns: minmax(0, 1fr) minmax(120px, 38%); }
.mg-ngon__item:nth-child(2n) img { order: 2; }

.mg-pha { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mg-pha li { background: #fff; border-radius: 20px; padding: 12px 12px 18px; }
.mg-pha img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.mg-pha h3 { margin: 14px 0 6px; font: 800 20px/1.2 var(--mg-display); color: var(--mg-ink); display: flex; align-items: center; }
.mg-pha h3 .mg-num { font-size: 15px; }
.mg-pha p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--mg-ink-2); }

.mg-that { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mg-that img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; background: var(--mg-ink-2); }

.mg-camket { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mg-camket li { display: grid; gap: 6px; padding: 18px; border-radius: 18px; background: #fff; color: var(--mg-ink); font-size: 14px; line-height: 1.5; }
.mg-camket b { font: 800 18px/1.2 var(--mg-display); }
.mg-camket span { color: var(--mg-ink-2); }

.mg-mua .container { background: radial-gradient(120% 90% at 50% 50%, var(--mg-panel-c), var(--mg-panel-e)); border-radius: 28px; padding-top: clamp(24px, 4vw, 44px); padding-bottom: clamp(24px, 4vw, 44px); color: var(--mg-ink); }
.mg-mua__box { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.mg-mua__box img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 22px; }
.mg-mua .mg-h2 { margin-bottom: 8px; }
.mg-mua .mg-price { margin-top: 16px; }
.mg-foot { padding: 24px 16px 40px; color: var(--mg-frame-chu); opacity: .75; font: 500 12px/1.6 var(--mg-mono); text-align: center; }

/* Hiện dần khi cuộn tới (chỉ khi JS chạy: .mg.js) */
.mg.js .mg-ngon__item, .mg.js .mg-pha li, .mg.js .mg-that li, .mg.js .mg-camket li, .mg.js .mg-mua__box { opacity: 0; translate: 0 18px; transition: opacity .45s ease-out, translate .45s ease-out; }
.mg.js .in, .mg.js .mg-pha li.in, .mg.js .mg-that li.in, .mg.js .mg-camket li.in { opacity: 1; translate: 0 0; }

/* ---------- Thanh mua dính (điện thoại) ---------- */
.mg-sticky { display: none; }
.mg-toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 40; translate: -50% 8px; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: var(--mg-ink); color: var(--mg-cream); font: 600 14px/1.4 var(--mg-body); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; }
.mg-toast.on { opacity: 1; translate: -50% 0; }

/* ---------- Hộp đặt hàng ---------- */
.mg-dialog { width: min(440px, calc(100vw - 24px)); margin: auto; padding: 0; border: 0; border-radius: 24px; background: var(--mg-cream); color: var(--mg-ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.mg-dialog::backdrop { background: rgba(58, 20, 22, .55); }
.mg-dialog form { position: relative; margin: 0; padding: 24px 22px 20px; }
.mg-dialog h2 { margin: 0 0 6px; font: 800 26px/1.1 var(--mg-display); text-transform: uppercase; }
.mg-dialog__sum { margin: 0; font: 500 14px/1.4 var(--mg-mono); color: var(--mg-ink-2); }
.mg-dialog__sum strong { color: var(--mg-ink); }
.mg-dialog__x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--mg-ink); font: 400 28px/1 var(--mg-body); cursor: pointer; }
.mg-dialog__x:hover { background: rgba(58, 20, 22, .08); }
.mg-dialog__acts { display: grid; gap: 10px; margin-top: 8px; }
.mg-dialog .mg-fine { margin-top: 14px; }
@media (max-width: 760px) {
  .mg-dialog { width: 100vw; max-width: none; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .mg-dialog form { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ---------- Responsive ---------- */
@media (max-height: 820px) and (min-width: 1181px) {
  .mg-rec { padding: 28px 4px 4px; }
  .mg-receipt { padding: 20px 16px; }
  .mg-receipt h2 { margin-bottom: 8px; font-size: 19px; }
  .mg-meta { font-size: 12px; gap: 2px; }
  .mg-items { gap: 4px; font-size: 12.5px; }
  .mg-rule { margin: 9px 0; }
  .mg-fine { margin-top: 8px; font-size: 11px; }
  .mg-stamp { width: 92px; height: 92px; top: -10px; right: -8px; }
  .mg-eyebrow { margin-bottom: 8px; font-size: 12px; }
  .mg-lead { margin-top: 10px; font-size: 15px; }
  .mg-buy { margin-top: 14px; }
  .mg-price strong { font-size: 38px; }
  .mg-chips { margin: 10px 0; }
  .mg-note { margin-top: 10px; }
}
@media (max-width: 1180px) {
  .mg-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-areas: "intro stage" "buy stage"; }
  .mg-pin .mg-rec { display: none; }
  .mg-after { display: block; padding-top: 24px; }
  .mg-rec-m { max-width: 440px; margin: 0 auto; }
  .mg-that { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mg-camket { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Điện thoại: hero tràn màn hình, video phủ kín, chữ và nút đè lên video */
@media (max-width: 760px) {
  :root { --mg-px: 10px; }
  .mg-frame { padding: 0; }
  .mg-panel { display: block; border-radius: 0; padding: 0; }
  .mg-stage-wrap { position: absolute; inset: 0; display: block; }
  .mg-stage { position: absolute; inset: 0; height: auto; width: auto; aspect-ratio: auto; margin: 0; max-width: none; perspective: 1100px; }
  .mg-depth { display: none; }
  .mg-card { transform-origin: 50% 58%; transform-style: flat; will-change: auto; }   /* điện thoại: không cần không gian 3D (Safari xếp lớp theo chiều sâu, đè ảnh nét) */
  .mg-fcaps { transform: none; }
  .mg-cv, .mg-sharp { -webkit-mask-image: none; mask-image: none; }
  .mg-intro { position: absolute; left: 0; right: 0; top: 0; z-index: 8; padding: calc(18px + env(safe-area-inset-top)) 18px 44px; pointer-events: none;
    background: linear-gradient(to bottom, rgba(210, 230, 174, .96) 0%, rgba(210, 230, 174, .82) 55%, rgba(210, 230, 174, 0) 100%); }
  .mg-eyebrow { margin-bottom: 8px; font-size: 11.5px; }
  .mg-title { font-size: clamp(34px, 10vw, 44px); }
  .mg-lead { margin-top: 8px; font-size: 15px; max-width: 28ch; }
  .mg-pin .mg-buy { display: none; }
  .mg-fcaps { left: 16px; bottom: calc(112px + env(safe-area-inset-bottom)); max-width: 64%; }
  /* lớp mờ xanh dưới đáy để nút và chú thích đọc rõ trên video */
  .mg-stage-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 200px; z-index: 3; pointer-events: none; background: linear-gradient(to top, rgba(210, 230, 174, .92), rgba(210, 230, 174, 0)); }
  .mg-hero-cta { display: grid; justify-items: center; gap: 6px; position: absolute; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 9; }
  .mg-hero-cta .btn { width: auto; min-width: 72%; }
  .mg-hero-cta small { font: 600 12px/1.3 var(--mg-mono); color: var(--mg-ink); background: rgba(210, 230, 174, .85); padding: 3px 10px; border-radius: 999px; }
  .mg-cue { left: 50%; right: auto; translate: -50% 0; bottom: calc(96px + env(safe-area-inset-bottom)); font-size: 12px; }
  .mg-load { bottom: calc(130px + env(safe-area-inset-bottom)); }
  .mg-glow { width: 150%; }
  .mg-topview { width: min(90vw, 54svh); top: 40%; border-radius: 18px; padding: 10px 10px 0; }
  .mg-tag { font-size: 12px; padding: 5px 10px 5px 7px; min-height: 30px; }
  .mg-buy-m .mg-buy { display: block; margin: 0 0 16px; padding: 20px 16px; border-radius: 18px; background: var(--mg-panel-c); }
  .mg-buy-m .mg-note { display: none; }
  .mg-sec { padding: 36px 0; }
  .mg-ngon { grid-template-columns: 1fr; }
  .mg-ngon__item, .mg-ngon__item:nth-child(2n) { grid-template-columns: 112px minmax(0, 1fr); }
  .mg-ngon__item:nth-child(2n) img { order: 0; }
  .mg-pha { grid-template-columns: 1fr; }
  .mg-that { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mg-camket { grid-template-columns: 1fr; }
  .mg-mua__box { grid-template-columns: 1fr; }
  .mg-mua__box img { max-width: 320px; margin: 0 auto; }
  .mg-actions .btn { flex: 1 1 auto; }
  .mg-sticky { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 16px; border-radius: 22px; background: rgba(255, 248, 230, .97); color: var(--mg-ink); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); transform: translateY(140%); opacity: 0; transition: transform .3s ease, opacity .2s ease; }
  .mg-sticky.on { transform: none; opacity: 1; }
  .mg-sticky strong { display: block; font: 800 20px/1 var(--mg-display); }
  .mg-sticky small { display: block; margin-top: 2px; font: 500 11px/1.3 var(--mg-mono); color: var(--mg-ink-2); }
  .mg-sticky .btn { min-height: 46px; padding: 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .mg-scene { height: auto; }
  .mg-pin { position: static; height: auto; overflow: visible; }
  .mg-frame { height: auto; }
  .mg-stage { height: 70svh; margin-block: 0; }
  .mg-cue { display: none; }
  .mg-fcap, .mg-items li, .mg-tick i, .mg-stamp, .mg-topview figcaption, .mg-sticky { transition: none; }
  @media (max-width: 760px) { .mg-panel { min-height: 100svh; } .mg-stage { position: absolute; height: auto; } }
}

/* ===== Khay "thả nguyên liệu vào tô" trên điện thoại (gọn: một hàng ô nhỏ + nhãn tên, che ít video nhất) ===== */
@media (max-width: 760px) {
  .mg-fcaps { display: none; }   /* tên nguyên liệu nằm trong nhãn của khay */
  .mg-cue { display: none; }
  /* đang chơi: chỉ giữ tên sản phẩm ở trên, dòng nhỏ và lớp mờ lớn biến đi để lộ video */
  .mg-intro { background: none; }
  .mg-intro::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(210, 230, 174, .96) 0%, rgba(210, 230, 174, .82) 55%, rgba(210, 230, 174, 0) 100%); transition: opacity .3s; }
  .mg-intro::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(150px + env(safe-area-inset-top)); z-index: -1; background: linear-gradient(to bottom, rgba(210, 230, 174, .85), rgba(210, 230, 174, 0)); }
  .mg-eyebrow, .mg-lead { transition: opacity .3s, transform .3s; }
  .mg.playing .mg-intro::before { opacity: 0; }
  .mg.playing .mg-eyebrow, .mg.playing .mg-lead { opacity: 0; transform: translateY(-6px); }
  .mg-game { display: grid; justify-items: center; gap: 6px; position: absolute; z-index: 9; left: 8px; right: 8px; bottom: calc(98px + env(safe-area-inset-bottom)); pointer-events: none; color: var(--mg-ink); }
  .mg-game-label { margin: 0; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255, 248, 230, .94); box-shadow: 0 8px 18px -10px rgba(58, 20, 22, .6); }
  .mg-game-name { font: 800 14px/1.2 var(--mg-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mg-game-swipe { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--mg-cta); color: #fff; transition: width .25s, opacity .25s; }
  .mg-game-swipe svg { width: 14px; height: 14px; animation: mg-up 1.3s ease-in-out infinite; }
  .mg-game.started .mg-game-swipe { width: 0; opacity: 0; }
  .mg-game.started .mg-game-label { padding-left: 12px; }
  .mg-game-row { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; background: rgba(255, 248, 230, .9); box-shadow: 0 10px 24px -14px rgba(58, 20, 22, .6); }
  .mg-game-lane { position: relative; }
  .mg-game-track { position: absolute; left: 16px; right: 16px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; background: rgba(58, 20, 22, .14); overflow: hidden; }
  .mg-game-fill { position: absolute; inset: 0; background: linear-gradient(90deg, #E7A23A, var(--mg-cta)); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
  .mg-game-slots { position: relative; display: flex; gap: 7px; }
  .mg-slot { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--mg-cream); box-shadow: 0 0 0 1.5px rgba(58, 20, 22, .18); }
  .mg-slot img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; filter: grayscale(1); opacity: .35; transition: opacity .2s, filter .2s; }
  .mg-slot::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--mg-cta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat; box-shadow: 0 0 0 1.5px var(--mg-cream); transform: scale(0); transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
  .mg-slot.on { box-shadow: 0 0 0 2px var(--mg-cta); }
  .mg-slot.on img { filter: none; opacity: .9; }
  .mg-slot.on::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--mg-cta); opacity: 0; animation: mg-ring 1.2s ease-out infinite; }
  .mg-slot.got { box-shadow: 0 0 0 2px var(--mg-ink); }
  .mg-slot.got img { filter: none; opacity: 1; }
  .mg-slot.got::after { transform: scale(1); }
  .mg-slot.pop { animation: mg-pop .36s cubic-bezier(.3, 1.5, .5, 1); }
  .mg-game-count { margin: 0; display: flex; align-items: baseline; font-family: var(--mg-display); }
  .mg-game-count b { font-weight: 800; font-size: 20px; line-height: 1; display: inline-block; }
  .mg-game-count span { font-weight: 700; font-size: 12px; color: var(--mg-ink-2); }
  .mg-game-count.bump b { animation: mg-bump .32s ease-out; }
  /* xong cả 6: khay đổi màu, nút Đặt mua nháy sáng một lần */
  .mg-game.done .mg-game-label, .mg-game.done .mg-game-row { background: var(--mg-ink); color: var(--mg-cream); }
  .mg-game.done .mg-game-count span { color: rgba(255, 248, 230, .75); }
  .mg-game.done .mg-game-track { background: rgba(255, 248, 230, .2); }
  .mg-game.done .mg-slot { box-shadow: 0 0 0 2px #E7A23A; }
  .mg-hero-cta.go .btn { animation: mg-go .9s ease-out 1; }
  @keyframes mg-pop { 0% { transform: scale(1); } 45% { transform: scale(1.25); } 100% { transform: scale(1); } }
  @keyframes mg-bump { 0% { transform: translateY(0); } 40% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
  @keyframes mg-ring { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
  @keyframes mg-up { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
  @keyframes mg-go { 0% { transform: scale(1); } 35% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(202, 70, 102, .25), 0 10px 22px -8px rgba(202, 70, 102, .6); } 100% { transform: scale(1); } }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .mg-slot.on::before, .mg-game-swipe svg { animation: none; }
  .mg-slot.pop, .mg-game-count.bump b, .mg-hero-cta.go .btn { animation: none; }
}
