:root {
  /* BẢN CHỐT FIGMA 27/09 (CONTRACT.md): thanh trên xanh rêu · dải "Sản phẩm khác" đen viền vàng · reel neo đáy · thanh dưới đen */
  --moss: #10241F;
  --moss-2: #172D28;
  --champ: #C9A96E;
  --champ-ink: #14100A;
  --cta: #C9A45D;
  /* vàng gold cho viền/nét (10:1 trên đen); chữ vàng tiêu đề/giá #D9B97A (10,6:1 trên #050505) */
  --gold: #D4AF37;
  --gold-hi: #F2D27A;
  --gold-text: #D9B97A;
  --white: #ffffff;
  --ink: #EDEDED;
  --bg: #000000;
  --red: #F12525;
  --shadow: 0 2px 8px rgba(0, 0, 0, .35);
  --sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  /* Trang tự tối sẵn; "light only" để Samsung Internet/Chrome không ép đảo màu */
  color-scheme: light only;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html {
  height: -webkit-fill-available;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}
body {
  background: var(--bg);
  color: var(--white);
  font: 14px/1.35 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
/* chữ chỉ cho trình đọc màn hình / máy tìm kiếm (tên món, giá — reel đã in sẵn trên hình) */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Khung điện thoại, xếp dọc: thanh trên 40 · dải Sản phẩm khác 74 · vùng video (phần còn lại) · thanh dưới 80 (+ safe-area).
   Thu gọn 28/09 (chủ): trên + dải = 114 ⇒ khung dọc từ 360×640, 390×664, 402×681 trở lên vùng video ≥ R×0,675 — đầu người dẫn live từ 20,5% reel thấy trọn.
   --app-h: 100dvh (máy cũ không có dvh: app.js đo innerHeight). Màn rộng hơn 480 (máy tính, màn ngang, máy gập): khung căn giữa,
   rộng 360…480 và hẹp lại theo chiều cao để reel phủ ngang chỉ mất khung sự kiện in sẵn phía trên (~20%; 0,7 ≈ 9/16 : 0,8). */
:root { --app-h: 100vh; }
@supports (height: 100dvh) { :root { --app-h: 100dvh; } }
.app {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --top-h: 40px;
  --strip-h: 74px;
  --dock-h: 80px;
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  /* một cột không nở theo chữ (chữ hệ thống phóng to không đẩy khung rộng hơn màn) */
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 480px, 100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  height: var(--app-h);
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 481px) {
  .app {
    width: min(480px, 100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px),
      max(360px, (var(--app-h) - var(--top-h) - var(--strip-h) - var(--dock-h) - var(--sat) - var(--sab)) * .7));
  }
}
.no-top .topbar { display: none; }
.no-top .app { --top-h: 0px; }
/* hàng cố định: thanh trên ẩn thì các hàng dưới giữ đúng chỗ; danh mục phủ đúng hai hàng dải + video */
.topbar, .cat-veil { grid-row: 1; grid-column: 1; }
.strip { grid-row: 2; grid-column: 1; }
.stage { grid-row: 3; grid-column: 1; }
.cat { grid-row: 2 / 4; grid-column: 1; }
.dock { grid-row: 4; grid-column: 1; }

/* ---------- Thanh trên: × · logo + dòng phụ · Tải app ---------- */
.topbar {
  display: flex; align-items: center;
  height: calc(var(--top-h) + var(--sat));
  padding: var(--sat) 12px 0 0;
  background: var(--moss) linear-gradient(180deg, var(--moss), var(--moss-2));
  touch-action: manipulation;
}
.top-x {
  flex: none;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0; border: 0; background: none;
  cursor: pointer;
}
.top-x svg { width: 16px; height: 16px; fill: #D9D9D9; }
.top-brand { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding-right: 8px; }
.top-brand img { display: block; width: 50px; height: 16px; }
.top-brand span { max-width: 100%; font-size: 11px; line-height: 13px; color: #D6D3C8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-app {
  position: relative;
  flex: none;
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 14px;
  border-radius: 14px;
  background: var(--champ) linear-gradient(180deg, #D5B77D, var(--champ) 55%, #BE9E62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 6px rgba(0, 0, 0, .35);
  color: var(--champ-ink);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
/* vùng chạm 0…36 của thanh 40 (viên 28 vẫn giữa thanh); 4px cuối thanh nhường "Xem tất cả" của dải */
.top-app::after { content: ""; position: absolute; inset: -6px -4px -2px; }

/* ---------- Dải "Sản phẩm khác" (thu gọn 28/09): nền #050505, viền vàng trên + dưới; hàng tiêu đề 19 · khe 3 · hàng thẻ ngang 48 · khe 3 ---------- */
.strip {
  position: relative;
  min-width: 0;
  height: var(--strip-h);
  background: #050505;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.no-top .strip { height: calc(var(--strip-h) + var(--sat)); padding-top: var(--sat); }
.strip-head { display: flex; align-items: center; justify-content: space-between; height: 19px; padding: 0 8px 0 12px; }
.strip-head h2 { margin: 0; font: 500 14px/1 var(--serif); color: var(--gold-text); white-space: nowrap; pointer-events: none; }
.strip-all {
  position: relative;
  z-index: 1;
  display: inline-flex; align-items: center; gap: 3px;
  height: 19px; padding: 0 6px;
  border: 0; background: none;
  color: var(--gold-text);
  font-size: 12px; font-weight: 500; white-space: nowrap;
  cursor: pointer;
}
/* vùng chạm cao 24 (WCAG 2.2 AA): từ 4px cuối thanh trên tới hết hàng tiêu đề — KHÔNG lấn xuống thẻ (Sol 93b0e797 F1).
   Khe 3px trên và dưới hàng thẻ: Chrome nắn điểm chạm (vùng ≥ 20dip) ⇒ khe 2px thì chạm sát mép trên thẻ bị kéo sang nút này,
   chạm sát mép dưới bị kéo sang video; 3 + 3 + thẻ 48 trong dải 74 ⇒ hàng tiêu đề 19, vùng chạm bắt đầu từ 36 */
.strip-all::after { content: ""; position: absolute; inset: -5px -4px 0; }
.strip-all svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.strip-list {
  /* mốc offsetLeft của thẻ (chu kỳ vòng tự trượt) */
  position: relative;
  display: flex; gap: 12px;
  padding: 3px 12px 2px;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* vuốt ngang cuộn dải; vuốt dọc do app.js chuyển thành đổi video (như vuốt trên video) */
  touch-action: pan-x;
}
.strip-list::-webkit-scrollbar { display: none; }
/* thẻ ngang trong suốt: ảnh vuông 48 bo 6 · gạch vàng dọc 1px · mã / giá vàng / giá gốc gạch ngang (hoặc "Đồng giá") */
.pc {
  flex: none;
  /* cột chữ ≥ 94 (vừa giá 12 ký tự "220.000.000đ" ⇒ thẻ 155) và nở theo chữ (cỡ chữ hệ thống 130% không cắt — Sol 93b0e797 F2);
     rộng có thể lẻ ⇒ app.js đo chu kỳ vòng tự trượt bằng getBoundingClientRect */
  display: grid; grid-template-columns: 48px 1px minmax(94px, max-content); grid-template-rows: 48px; align-items: center; column-gap: 6px;
  height: 48px;
  cursor: pointer;
  /* giữ lâu trên thẻ: không bật menu "lưu ảnh / mở liên kết" của iOS/Android */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.pc-img {
  position: relative;
  grid-column: 1; grid-row: 1;
  display: block;
  width: 48px; height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #000 url("/assets/logo-gold.svg") center / 80% auto no-repeat;
}
.pc-img img { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
/* chữ trắng trên ảnh SP: nền đen mờ gọn phía sau (ảnh studio nền đen ⇒ gần như không thấy; ảnh sáng/chưa tải vẫn ≥ 4,5:1) */
.pc-off {
  position: absolute; top: 2px; left: 2px;
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .62);
  color: var(--white);
  font-size: 9px; font-weight: 700; line-height: 12px;
}
.pc::after { content: ""; grid-column: 2; grid-row: 1; width: 1px; height: 34px; background: var(--gold); }
.pc-txt { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; min-width: 0; }
.pc-code, .pc-old, .pc-price { white-space: nowrap; overflow: hidden; }
.pc-code { font-size: 12px; font-weight: 600; line-height: 15px; color: var(--white); letter-spacing: .01em; }
.pc-price { order: 1; font-size: 12.5px; font-weight: 700; line-height: 16px; color: var(--gold-text); letter-spacing: -.01em; }
.pc-old { order: 2; height: 12px; font-size: 9.5px; line-height: 12px; color: #A8A8A8; }
.pc:active .pc-img { transform: scale(.96); }
/* dấu phát (thẻ + Danh mục): vòng viền vàng 1px, nền trong suốt, tam giác vàng sáng, bóng rất nhẹ */
.vid {
  position: absolute;
  display: grid; place-items: center;
  width: 16px; height: 16px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(0, 0, 0, .35);
}
.vid svg { width: 60%; height: 60%; margin-left: 1px; fill: var(--gold-hi); filter: drop-shadow(0 0 1px rgba(0, 0, 0, .5)); }
.pc-img .vid { top: 3px; right: 3px; width: 14px; height: 14px; }

/* ---------- Vùng video ---------- */
/* chạm video = dừng/phát: tắt phóng to khi chạm đúp (iOS Safari). */
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; touch-action: manipulation; background: var(--bg); }
/* ngữ cảnh xếp lớp riêng: lớp phủ trong từng slide nằm dưới loa / vòng tải / thanh tua */
.feed {
  position: relative; z-index: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  outline: none;
}
.feed::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  isolation: isolate;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  overflow: hidden;
}
/* Reel 9:16 phủ ngang, NEO ĐÁY: vùng thấp hơn reel ⇒ chỉ phần trên (khung sự kiện in sẵn) bị cắt, mã/tên/giá in sẵn ở đáy luôn đủ.
   Khung thấp hơn nữa: app.js (fitVideo) dời --oy để dải cốt lõi (vùng SP → hết dòng giá in sẵn) luôn thấy trọn, rồi vẫn phủ ngang,
   mép dưới dải cốt lõi neo đáy, cắt dần từ trên vùng SP (không đen hai bên). .is-fit (contain, vẫn neo đáy, nền đen) khi vùng cao hơn reel. */
.slide video {
  position: absolute; top: 0; bottom: 0; left: 0;
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% var(--oy, 100%);
  background: #000;
  cursor: pointer;
}
.slide.is-fit video { object-fit: contain; }

/* Lớp phủ đỉnh: viên sự kiện + "Video thật từng món" (thay khung sự kiện in sẵn đã bị cắt). Nền tối mờ phía sau để chữ trắng đủ
   4,5:1 cả khi video sáng; không nhận chạm (chạm rơi xuống video = dừng/phát). */
.ov {
  position: absolute; left: 0; right: 0; top: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  padding: 12px 64px 0 14px;
  pointer-events: none;
}
.ov::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; bottom: -22px; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .58) calc(100% - 22px), rgba(0, 0, 0, 0));
}
.pill {
  margin: 0;
  max-width: 100%;
  height: 27px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--champ);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  color: var(--champ-ink);
  font-size: 12px; font-weight: 600; line-height: 27px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live { margin: 0 0 0 2px; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; line-height: 14px; color: var(--white); }
.live::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #FF4D4D; box-shadow: 0 0 6px rgba(255, 77, 77, .8); }

/* Khách dừng (hoặc trình duyệt chặn tự phát): vòng phát 76 viền vàng ánh kim 2px, không nền, tam giác vàng giữa vùng video.
   Lớp phủ là chính nút play ⇒ chạm bất kỳ đâu trên video là phát tiếp. z 2: trên lớp phủ đỉnh (DOM trước). */
.play {
  position: absolute; inset: 0; z-index: 2;
  padding: 0; border: 0;
  background: rgba(0, 0, 0, .12);
  display: grid; place-items: center;
  color: var(--white);
  cursor: pointer;
}
.play-ring {
  position: relative;
  display: grid; place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45), 0 0 18px rgba(212, 175, 55, .35);
}
/* viền vàng ánh kim 2px: dải chuyển màu vàng, khoét lõi bằng mask ⇒ không nền */
.play-ring::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #FBEAB0, var(--gold) 35%, #8A6B1E 62%, var(--gold-hi));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.play-ring svg { width: 34px; height: 34px; margin-left: 5px; fill: var(--gold-hi); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }

.sold {
  position: absolute; inset: 0; z-index: 3;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, .45);
  pointer-events: none;
}
.sold span {
  padding: 10px 26px;
  border: 2px solid var(--red);
  border-radius: 5px;
  color: #D92F20;
  font: 700 22px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--white);
  transform: rotate(-8deg);
}
.slide.is-sold .sold { display: grid; }

.empty {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  padding: 0 16px;
  text-align: center;
  color: var(--gold-hi);
  background: var(--bg);
}
.empty img { width: 120px; height: auto; }
.empty p { margin: 0; }

/* Loa: tròn 40 góc trên-phải vùng video (cách phải 14, cách trên 8). Vùng chạm nới 4px. Nút ngoài #feed ⇒ bấm loa không dừng/phát. */
.sound {
  position: absolute; z-index: 3;
  top: 8px; right: 14px;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid rgba(212, 175, 55, .8);
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  cursor: pointer;
}
.sound::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.sound svg { width: 19px; height: 19px; fill: #F2F2F2; }
.sound .ico-on, .sound[aria-pressed="true"] .ico-off { display: none; }
.sound[aria-pressed="true"] .ico-on { display: block; }

/* Vòng tải vàng + "Đang mở video <MÃ>…": hiện sau 0,3 s chờ (tải nhanh thì không nháy); ẩn = display none (dừng hoạt ảnh) */
.loader {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  pointer-events: none;
  animation: fade-in .2s .3s both;
}
.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid rgba(212, 175, 55, .22);
  border-top-color: var(--gold);
  border-right-color: var(--gold);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.loader-text { font-size: 13px; font-weight: 500; text-shadow: 0 0 4px rgba(0, 0, 0, .95), 0 1px 3px rgba(0, 0, 0, .9); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }

/* "Đang xem <MÃ>": viên tối viền vàng giữa-trên vùng video, 2 giây (app.js ẩn) */
.toast {
  position: absolute; z-index: 4;
  left: 50%; top: 84px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 28px);
  height: 32px;
  padding: 0 16px;
  border: 1px solid rgba(212, 175, 55, .75);
  border-radius: 999px;
  background: rgba(10, 10, 10, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  color: var(--white);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  pointer-events: none;
  animation: fade-in .18s both;
}
.toast svg { flex: none; width: 10px; height: 10px; fill: var(--gold-hi); }

.swipe-hint {
  position: absolute; z-index: 4;
  left: 0; right: 0;
  top: 40%;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 500;
  pointer-events: none;
  animation: nudge 1.4s ease-in-out infinite;
  transition: opacity .4s;
}
.swipe-hint svg {
  width: 30px; height: 30px; padding: 3px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  fill: var(--gold-hi); background: rgba(0, 0, 0, .55);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.swipe-hint span {
  padding: 3px 10px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(0, 0, 0, .7); color: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.swipe-hint.is-off { opacity: 0; }
@keyframes nudge { 50% { transform: translateY(-8px); } }

.flash {
  position: absolute; z-index: 4;
  left: 50%; top: 50%;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  opacity: 0;
  pointer-events: none;
}
.flash svg { width: 30px; height: 30px; fill: var(--gold-hi); }
.flash.is-on { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 0; transform: scale(.8); } 20% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }

/* Thanh tua = nét vàng 3px ở đáy vùng video; vùng chạm vô hình 32px lấn lên video (kéo không cuộn feed).
   Kéo/phím ⇒ nét 6px + bong bóng giờ kính mờ bám theo nút tròn. app.js đặt --p = vị trí (0…1). */
.seek {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  height: 32px;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.seek[aria-disabled="true"] { cursor: default; }
.seek-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .2);
  transition: height .15s ease;
}
.seek-bar i { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.seek-knob {
  position: absolute; top: 50%; left: calc(var(--p, 0) * 100%);
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 0 2px #0C0C0C, var(--shadow);
  transform: scale(0);
  transition: transform .15s ease;
}
.is-drag .seek-bar, .is-key .seek-bar, .seek:focus-visible .seek-bar { height: 6px; }
.is-drag .seek-knob, .is-key .seek-knob, .seek:focus-visible .seek-knob { transform: scale(1); }
/* bong bóng kính mờ: chữ trắng / vàng sáng trên nền tối 88% */
.seek-time {
  position: absolute; bottom: 46px;
  left: clamp(66px, calc(var(--p, 0) * 100%), calc(100% - 66px));
  transform: translateX(-50%);
  padding: 5px 16px;
  border: 1px solid var(--champ);
  border-radius: 999px;
  background: rgba(12, 12, 12, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--white);
  font: 500 16px/1.2 var(--sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.seek-time b { font-size: 26px; font-weight: 700; }
.seek-time i { font-style: normal; color: var(--gold-hi); }
.seek-time span { color: var(--gold-hi); }
.is-drag .seek-time, .is-key .seek-time { opacity: 1; }

/* ---------- Thanh dưới: Nhắn tư vấn mẫu này (vàng, bo 12) · ô Chi tiết · ô Gọi (56×52 viền #2C2E2B) ---------- */
.dock {
  container-type: inline-size;
  display: flex; align-items: flex-start; gap: 8px;
  height: calc(var(--dock-h) + var(--sab));
  padding: 11px 12px calc(16px + var(--sab)) 16px;
  background: #0C0C0C;
  border-top: 1px solid #1A1A1A;
  touch-action: manipulation;
}
.cta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--cta);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 12px rgba(0, 0, 0, .35);
  color: var(--champ-ink);
  font-size: 16px; font-weight: 600;
}
.cta span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta svg { flex: none; width: 22px; height: 22px; }
.cta .msg-bubble { fill: var(--champ-ink); }
.cta .msg-bolt { fill: var(--cta); }
.dk {
  flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 56px; height: 52px;
  border: 1px solid #2C2E2B;
  border-radius: 12px;
  color: var(--ink);
  font-size: 11px; font-weight: 500; line-height: 1.2;
}
.dk svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dk span { max-width: 100%; white-space: nowrap; overflow: hidden; }
.cta:active, .dk:active { transform: scale(.97); }
/* khung hẹp hơn 390 (máy 360–389, khung máy tính/màn ngang 360): chữ nút Nhắn nhỏ lại để đọc trọn "Nhắn tư vấn mẫu này".
   Ngưỡng theo bề rộng NỘI DUNG thanh (khung − 28). */
@container (max-width: 361px) { .cta { gap: 8px; padding: 0 8px; font-size: 15px; } }
@container (max-width: 340px) { .cta { gap: 6px; padding: 0 6px; font-size: 14px; } .cta svg { width: 20px; height: 20px; } }
/* điện thoại (khung = màn) trên trình duyệt chưa có container query: cùng ngưỡng theo bề rộng màn */
@media (max-width: 389px) { .cta { gap: 8px; padding: 0 8px; font-size: 15px; } }
@media (max-width: 368px) { .cta { gap: 6px; padding: 0 6px; font-size: 14px; } .cta svg { width: 20px; height: 20px; } }

/* Màn ngang thấp (điện thoại xoay ngang): thanh gọn, dải chỉ còn hàng tiêu đề + "Xem tất cả" để vùng video còn chỗ */
@media (orientation: landscape) and (max-height: 540px) {
  .app { --top-h: 44px; --strip-h: 31px; --dock-h: 58px; }
  .no-top .app { --top-h: 0px; }
  .top-brand { gap: 1px; }
  .top-brand img { width: 60px; height: 19px; }
  .strip-list { display: none; }
  .strip-head, .strip-all { height: 29px; }
  /* không chồng, như màn dọc: Tải app 0…41 của thanh 44 · Xem tất cả từ 41 tới hết hàng tiêu đề (không lấn video) */
  .top-app::after { inset: -8px -4px -5px; }
  .strip-all::after { inset: -4px -4px 0; }
  .dock { padding-top: 6px; padding-bottom: calc(7px + var(--sab)); }
  .cta { height: 44px; }
  .dk { height: 44px; gap: 1px; }
  .dk svg { width: 17px; height: 17px; }
}

/* ---------- Danh mục thả xuống: tấm phủ từ dưới thanh trên tới trên thanh dưới, bo 2 góc dưới 18, nền tối phía sau ---------- */
.cat { position: relative; z-index: 10; min-height: 0; overflow: hidden; }
.cat-veil { position: relative; z-index: 10; }
.cat-scrim {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .25s ease;
}
.cat-sheet {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #0B0C0B;
  border: 1px solid rgba(212, 175, 55, .3);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .6);
  overflow: hidden;
  transform: translateY(-100%);
  transition: transform .25s ease;
}
.no-top .cat-sheet { padding-top: var(--sat); }
.cat.is-open .cat-scrim { opacity: 1; }
.cat.is-open .cat-sheet { transform: none; }
/* thu lên sau khi chạm thẻ: chờ 0,18 s để khách thấy thẻ vừa chạm sáng lên (video đích đã phát ngay trong cú chạm) */
.cat.is-pick .cat-sheet, .cat.is-pick .cat-scrim { transition-delay: .18s; }
.cat-head {
  flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px;
  padding: 14px 15px 0 16px;
}
.cat-head h2 { grid-column: 1; margin: 0; font: 600 22px/1.3 var(--serif); color: var(--gold-text); }
.cat-sub { grid-column: 1 / -1; margin: 2px 0 0; font-size: 11px; line-height: 1.35; color: #C8C1B3; }
.cat-x {
  position: relative;
  grid-column: 2; grid-row: 1; align-self: center;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
}
.cat-x::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.cat-x svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* chip loại: chip đang chọn nền vàng chữ tối; còn lại viền xám chữ sáng */
.cat-chips {
  flex: none;
  display: flex; gap: 9px;
  padding: 10px 16px 14px;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 29px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font-size: 13px; font-weight: 500; line-height: 27px;
  white-space: nowrap;
  cursor: pointer;
}
.chip[aria-selected="true"] { background: var(--champ); border-color: var(--champ); color: var(--champ-ink); font-weight: 600; }
/* lưới 2 cột; cuộn trong tấm không kéo feed phía sau */
.cat-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px 12px;
  padding: 2px 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.card {
  position: relative;
  min-width: 0;
  display: flex; flex-direction: column;
  border: 1px solid rgba(212, 175, 55, .28);
  border-radius: 12px;
  background: #131413;
  overflow: hidden;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  animation: rise .3s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card-img {
  position: relative;
  display: block;
  height: 150px;
  background: #000 url("/assets/logo-gold.svg") center / 50% auto no-repeat;
}
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.card-img .vid { right: 8px; bottom: 8px; width: 20px; height: 20px; }
.card-body { display: flex; flex-direction: column; padding: 8px 10px 10px; }
.card-code { font-size: 10px; font-weight: 600; line-height: 14px; letter-spacing: .08em; color: #C8C1B3; }
.card-name {
  margin-top: 3px;
  min-height: 35px;
  font-size: 13px; line-height: 17.5px; color: #D4D1C8;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden;
}
.card-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; margin-top: 6px; }
.card-price b { font: 700 14px/1.3 var(--serif); color: var(--gold-text); white-space: nowrap; }
.card-price s, .card-flat { font-size: 9.5px; color: #8E8A80; white-space: nowrap; }
/* mã đang phát: viền vàng + nhãn "ĐANG XEM" (chữ tối trên vàng champagne 8:1) */
.card.is-cur { border: 1.5px solid rgba(201, 169, 110, .9); }
.card.is-cur .card-img::after {
  content: "ĐANG XEM";
  position: absolute; left: 8px; top: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--champ);
  color: var(--champ-ink);
  font-size: 10px; font-weight: 700; line-height: 17px;
  letter-spacing: .08em;
  white-space: nowrap;
}
/* vừa chạm: sáng viền vàng + vòng phát giữa ảnh (phản hồi ngay khi chạm, trước khi danh mục thu lên) */
.card.is-picked { border: 1.5px solid var(--gold); box-shadow: 0 0 0 1px rgba(212, 175, 55, .35), 0 0 16px rgba(212, 175, 55, .3); }
.card.is-picked .card-img::before {
  content: "";
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: rgba(0, 0, 0, .25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23F2D27A' d='M9 6.5v11l8.5-5.5z'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 0 12px rgba(212, 175, 55, .45);
}

@media (prefers-reduced-motion: reduce) {
  .swipe-hint, .card, .toast, .loader { animation: none; }
  .loader-ring { animation-duration: 2.4s; }
  .seek-bar, .seek-knob, .seek-time, .cat-scrim, .cat-sheet { transition: none; }
}
