/* ============================================================
   AI Web Kit — phong cách "AI Studio" (GetLayers, style ai-studio-style)
   Nền đen tuyền, chữ trắng ngà, một quầng tím duy nhất. Chữ Be Vietnam Pro
   (font gốc Zen Kaku Gothic New của mẫu không có bộ dấu tiếng Việt).
   Hai lớp bố cục:
     • html.reel  — sân khấu ghim theo cuộn (bố cục của mẫu)
     • mặc định   — bản đọc tĩnh, xếp dọc: dùng khi tắt JS, khi "giảm chuyển động", hoặc khi mã chính lỗi
   ============================================================ */
:root {
  --background: #000000;
  --foreground: #f5f1ec;
  --ink: #07031a;
  --pf-card: #14110e;
  --cc-search: #161310;
  --paper: #f5f1ec;
  --paper-alt: #f3f1ec;
  --muted: #9a948d;
  --accent: #9a73f0;
  --nav-surface: #e3e3e3;
  --nav-item: #ffffff;
  --nav-logo: #dadada;
  --nav-cta: #0d0d0d;
  --nav-cta-ink: #f4f4f4;
  --nav-ink: #1a1a1a;
  --glass-dark: rgba(40, 36, 33, .55);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-border-soft: rgba(255, 255, 255, .14);
  --card-violet: radial-gradient(95% 80% at 50% 28%, #ddd6fe 0%, #9a73f0 38%, #6d28d9 68%, #34146e 100%);
  --loader-glow: rgba(154, 115, 240, .55);

  --sr-card-w: 42vmin;
  --sr-card-h: 62vmin;
  --sr-carousel-r: 27vmin;
  --sr-flyback: 40vmin;
  --sr-hero-pad: 8vmin;
  --sr-heading-1: 12vmin;
  --sr-heading-2: 15vmin;
  --sr-sphere-body-w: 52vmin;
  --sr-sphere-body-text: 2.4vmin;
  --hero-img-w: min(90vw, 46vh);
  --hero-img-h: 62vh;
  --hero-img-x: 73%;   /* máy tính: ảnh nổi lệch phải để không che tiêu đề; về giữa khi thẻ thu lại */

  --radius-btn: 8px;
  --radius-card: 3vmin;
  --radius-pf: 2.5vmin;
  --radius-slider: 1.6vmin;

  --font: "Be Vietnam Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* biến dùng chung với hộp xem mẫu + bảng 11 mẫu (phim/hop.css) */
  --nen-2: #0c0a12;
  --chu: #f5f1ec;
  --chu-mo: #a7a09a;
  --vien: rgba(255, 255, 255, .13);
  --nhan: #9a73f0;
  --nhan-2: #c9b6ff;
  --tho: cubic-bezier(.2, .7, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: clip; -webkit-tap-highlight-color: transparent; background: var(--background); }
body {
  background: var(--background); color: var(--foreground);
  font-family: var(--font); font-weight: 400; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
.word { display: inline-block; white-space: nowrap; }
.ltr { display: inline-block; will-change: transform, opacity; }

/* nút dùng chung (chữ giữ nguyên từ trang cũ: .nut, .nut--chinh) */
.nut {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .8em 1.5em;
  border-radius: var(--radius-btn); border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08);
  color: var(--paper); font: 500 1rem/1.15 var(--font); cursor: pointer; text-align: center;
}
.nut--chinh { background: var(--paper); border-color: var(--paper); color: #0b0910; }
.nut:hover { opacity: .88; }
.nhan-that {
  position: absolute; top: 12px; left: 12px; z-index: 3; padding: .25rem .65rem; border-radius: 999px;
  background: #16361f; color: #fff; font-style: normal; font-weight: 700; font-size: .74rem; letter-spacing: .02em;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .45);
}

/* ============================================================ thanh điều hướng nổi */
.site-header { position: fixed; left: 0; top: 2vmin; z-index: 100; display: flex; width: 100%; justify-content: center; pointer-events: none; padding: 0 12px; }
.nav-bar {
  pointer-events: auto; display: flex; align-items: stretch; gap: 1px; border-radius: var(--radius-btn);
  background: var(--nav-surface); padding: 1px; max-width: 100%;
  transition: opacity .7s cubic-bezier(.65, 0, .35, 1), transform .7s cubic-bezier(.65, 0, .35, 1);
}
.nav-logo {
  display: flex; height: 40px; align-items: center; gap: 9px; padding: 0 14px 0 12px; border-radius: var(--radius-btn);
  background: var(--nav-logo); color: var(--nav-ink); font-size: 13px; font-weight: 700; letter-spacing: .14em;
}
.nav-logo img { width: 16px; height: 16px; transition: transform .3s cubic-bezier(.34, 1.2, .64, 1); }
.nav-logo:hover img { transform: rotate(90deg); }
.nav-item { display: flex; height: 40px; align-items: center; justify-content: center; padding: 0 18px; border-radius: var(--radius-btn); background: var(--nav-item); font-size: 15px; color: var(--nav-ink); }
.nav-item:hover { opacity: .6; }
.nav-cta { display: flex; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-btn); background: var(--nav-cta); padding: 0 20px; font-size: 15px; font-weight: 500; color: var(--nav-cta-ink); white-space: nowrap; }
@media (max-width: 420px) {
  .nav-logo span { display: none; }
  .nav-logo { padding: 0 12px; }
  .nav-item { padding: 0 13px; font-size: 14px; }
  .nav-cta { padding: 0 14px; font-size: 14px; }
}

/* ============================================================ màn chờ (chỉ máy tính) */
#loader { display: none; }
html.reel.day #loader {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--background); transition: opacity .65s cubic-bezier(.65, 0, .35, 1), transform .65s cubic-bezier(.65, 0, .35, 1);
}
.loader-bloom { position: absolute; width: 78vmin; height: 78vmin; border-radius: 9999px; filter: blur(80px); background-image: var(--card-violet); opacity: .85; transition: opacity 1s ease; pointer-events: none; }
.loader-star { position: relative; width: 132px; height: 132px; filter: drop-shadow(0 0 28px var(--loader-glow)); animation: sao-quay 6s linear infinite; }
@keyframes sao-quay { to { transform: rotate(360deg); } }
html.reel.day:not(.dang-cho) #loader { opacity: 0; transform: translateY(-3vh); pointer-events: none; }
html.reel.day:not(.dang-cho) #loader .loader-bloom { opacity: 0; }
html.reel.day.dang-cho { overflow: hidden; }
html.reel.day.dang-cho .nav-bar { opacity: 0; transform: translateY(-10px); }

/* ============================================================ quầng sáng góc */
#aurora { display: none; }
html.reel #aurora { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; display: block; }
#glAurora { display: block; width: 100%; height: 100%; }
html.nhe #glAurora { display: none; }
html.nhe #aurora {
  background:
    radial-gradient(60% 45% at 100% 100%, rgba(140, 70, 255, .55), transparent 70%),
    radial-gradient(55% 40% at 0% 0%, rgba(110, 50, 230, .45), transparent 70%);
}

/* ============================================================ BẢN ĐỌC TĨNH (mặc định) */
html:not(.reel) .track { padding: 76px 16px 24px; display: grid; gap: 16px; max-width: 1100px; margin: 0 auto; }
html:not(.reel) .backdrop, html:not(.reel) .marquee-wrap, html:not(.reel) .carousel-cta,
html:not(.reel) .hero-templates, html:not(.reel) .sphere-gl, html:not(.reel) .sphere-logo,
html:not(.reel) .sphere-htop, html:not(.reel) .sphere-hbot, html:not(.reel) #glTarget,
html:not(.reel) .final-frame, html:not(.reel) .hero-img-wrap { display: none; }
html:not(.reel) .scene3d, html:not(.reel) .camera-rig, html:not(.reel) .carousel, html:not(.reel) .bay-chu { display: grid; gap: 16px; }
html:not(.reel) .card { position: relative; }
html:not(.reel) .hero-card { min-height: 82svh; }
html:not(.reel) .cc { min-height: 70svh; }
html:not(.reel) .sphere-card { position: relative; min-height: 56svh; }
html:not(.reel) .sphere-mask, html:not(.reel) .sphere-inner { position: relative; inset: auto; left: auto; top: auto; width: auto; height: auto; transform: none; background: transparent; -webkit-mask: none; mask: none; }
html:not(.reel) .sphere-body { position: static; padding: 1.4rem 1rem 0; max-width: 40rem; font-size: 1.05rem; }
html:not(.reel) .target-block { position: relative; inset: auto; left: auto; top: auto; width: auto; height: auto; min-height: 80svh; opacity: 1; transform: none; border-radius: var(--radius-card); background: radial-gradient(90% 70% at 50% 100%, #6d28d9 0%, #34146e 45%, #07031a 100%); }
html:not(.reel) .cta-block { position: relative; inset: auto; opacity: 1; padding: 2rem 1.25rem; }
html:not(.reel) .sao-poster { display: block; }
html:not(.reel) .portfolio { position: relative; inset: auto; transform: none; padding: 0 16px; max-width: 1100px; margin: 0 auto; }
html:not(.reel) .pf-viewport { overflow-x: auto; }
html:not(.reel) .pf-track { height: 70svh; padding: 0 0 12px; }
html:not(.reel) .bay-tam { position: relative; opacity: 1; visibility: visible; transform: none; }

/* ============================================================ SÂN KHẤU GHIM (html.reel) */
main { position: relative; z-index: 2; }
.track { position: relative; width: 100%; }
html.reel .sticky-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; padding: 4vmin; }
.backdrop { position: absolute; inset: 0; z-index: 0; background: #fff; }
.marquee-wrap { position: absolute; left: 0; top: 50%; z-index: 1; width: 100vw; transform: translateY(-50%); pointer-events: none; }
.marquee-row { display: flex; width: 100vw; overflow: hidden; white-space: nowrap; }
.marquee-strip { display: flex; align-items: center; will-change: transform; }
.marquee-item { padding: 0 3vw; font-size: 7vw; font-weight: 400; letter-spacing: -0.03em; color: #000; line-height: 1.2; }
.marquee-dot { width: 1.5vw; height: 1.5vw; flex-shrink: 0; transform: translateY(0.4vw); border-radius: 9999px; border: 2px solid #000; }

html.reel .scene3d { position: relative; z-index: 2; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; perspective: 1500px; }
html.reel .camera-rig { position: absolute; inset: 0; transform-style: preserve-3d; }
html.reel .carousel { position: relative; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; transform-style: preserve-3d; }
html.reel .card { position: absolute; overflow: hidden; }
html.reel .side { height: var(--sr-card-h); width: var(--sr-card-w); }
html.reel .card1 { width: calc(100vw - var(--sr-hero-pad)); height: calc(100svh - var(--sr-hero-pad)); }
.sphere-slot { display: flex; align-items: center; justify-content: center; overflow: visible !important; }

/* ---- thẻ đầu trang (#mo) ---- */
.hero-card { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius-card); background: #05030c; }
html.khong-gl .hero-card, html:not(.reel) .hero-card {
  background: radial-gradient(70% 55% at 45% 100%, #8b5cf6 0%, #5b21b6 35%, #1e1050 65%, #05030c 100%);
}
#glHero { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; }
.hero-head { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 1.2vmin; padding: 40px; pointer-events: none; }
html:not(.reel) .hero-head { position: relative; padding: 28px 22px 0; }
.hero-nhan { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.hero-h1 { display: flex; flex-direction: column; align-items: flex-start; text-align: left; font-size: 5.4vw; font-weight: 400; line-height: 1.04; letter-spacing: -0.03em; color: #fff; }
.hero-h1 > span { display: block; padding-bottom: .06em; }
.hero-h1 .line2 { opacity: .42; }
.hero-templates { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.hero-templates p { text-align: center; font-size: 3.6vmin; font-weight: 400; line-height: 1.15; color: #fff; filter: drop-shadow(0 10px 15px rgba(0, 0, 0, .4)); transform: rotate(-90deg); white-space: nowrap; }
.hero-img-wrap { position: absolute; inset: 0; z-index: 6; perspective: 1400px; pointer-events: none; }
.hero-img { position: absolute; left: var(--hero-img-x); top: 50%; width: var(--hero-img-w); height: var(--hero-img-h); overflow: hidden; border-radius: var(--radius-slider); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6); will-change: transform; transform: translate(-50%, -50%); }
.hero-img .slide { position: absolute; inset: 0; }
.hero-img .slide img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-img .slide-2 { position: absolute; left: 100%; top: 0; width: 100%; height: 100%; overflow: hidden; }
.hero-img .slide-2 img { width: 100%; height: 100%; object-fit: cover; transform: rotate(-90deg) scale(1.65); }
.hero-bottom { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; z-index: 6; display: flex; flex-direction: column; gap: 22px; color: #fff; font-weight: 300; pointer-events: none; }
html:not(.reel) .hero-bottom { position: relative; padding: 22px; }
.hero-bottom .col { display: flex; flex-direction: column; gap: 22px; max-width: 30rem; pointer-events: auto; }
.hero-bottom p.lead { opacity: .92; line-height: 1.6; font-size: 16px; font-weight: 300; }
.hero-bottom .btns { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-bottom .btns > * { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 28px; border-radius: var(--radius-btn); font-size: 17px; line-height: 1; }
.hero-bottom .btns .ghost { background: rgba(255, 255, 255, .1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .2); color: #fff; }
.hero-bottom .btns .solid { background: #fff; color: #000; font-weight: 500; }
.hero-divider { width: 100%; height: 1px; background: rgba(255, 255, 255, .3); margin: 6px 0; }
.hero-proof { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; }
.hero-pill { display: inline-flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .2); border-radius: 9999px; padding: 8px 18px; font-size: 14px; font-weight: 500; }

/* ---- hai thẻ ảnh (#van-de, #laptop) ---- */
.cc { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius-card); }
.cc > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cc::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .25) 52%, rgba(0, 0, 0, .86) 100%); pointer-events: none; }
.cc .inner { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; padding: 3.2vmin; color: var(--paper); }
html:not(.reel) .cc .inner { padding: 22px; }
.cc .top { display: flex; align-items: center; gap: 1.4vmin; }
.cc .logo { display: flex; width: 3.4vmin; height: 3.4vmin; min-width: 22px; min-height: 22px; flex-shrink: 0; border-radius: .9vmin; background: #fff; position: relative; }
.cc .logo::after { content: ''; position: absolute; inset: 22%; background: var(--ink); -webkit-mask: url(/ai-web-kit/ban-moi/anh/sao.svg) center / contain no-repeat; mask: url(/ai-web-kit/ban-moi/anh/sao.svg) center / contain no-repeat; }
.cc .url { font-size: max(1.5vmin, 12px); letter-spacing: .04em; opacity: .9; font-weight: 500; }
.cc-search { margin: auto 0; display: flex; align-items: center; gap: 1.4vmin; border-radius: 5vmin; background: rgba(22, 19, 16, .86); padding: 1.8vmin 2.2vmin; color: var(--paper); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
.cc-search .ic { display: flex; width: 3vmin; height: 3vmin; min-width: 20px; min-height: 20px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 9999px; background: var(--glass-border-soft); }
.cc-search .q { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: max(1.7vmin, 13px); opacity: .85; }
.cc .foot { margin-top: auto; display: grid; gap: 1.4vmin; }
.cc .foot h2 { font-size: 4.2vmin; font-weight: 400; line-height: 1.12; letter-spacing: -0.015em; }
.cc .foot p { font-size: max(2vmin, 14px); font-weight: 300; line-height: 1.45; color: rgba(245, 241, 236, .86); }
html:not(.reel) .cc .foot h2 { font-size: 1.7rem; }

/* ---- thẻ tím + quả cầu hạt (#mau) ---- */
.sphere-card { width: 100%; height: 100%; }
.sphere-face { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-card); background: var(--card-violet); }
html:not(.reel) .sphere-face { position: relative; min-height: 46svh; }
.sphere-face .inner { display: flex; width: 100%; height: 100%; flex-direction: column; padding: 3.2vmin; color: var(--paper); }
html:not(.reel) .sphere-face .inner { padding: 22px; min-height: 46svh; }
.sphere-face .top { display: flex; align-items: center; justify-content: space-between; }
.sphere-face .lbl { border-radius: 9999px; border: 1px solid var(--glass-border); background: var(--glass-dark); padding: .8vmin 1.8vmin; font-size: max(1.4vmin, 12px); letter-spacing: .04em; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sphere-face h2 { margin-top: auto; max-width: 92%; font-size: 4.6vmin; font-weight: 400; line-height: 1.08; letter-spacing: -0.015em; }
html:not(.reel) .sphere-face h2 { font-size: 2rem; }
html.reel .sphere-mask { position: absolute; left: 50%; top: 50%; height: 300vh; width: 300vw; background: #000; -webkit-mask-image: url(/ai-web-kit/ban-moi/anh/sao.svg); mask-image: url(/ai-web-kit/ban-moi/anh/sao.svg); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: 8vmin; mask-size: 8vmin; }
html.reel .sphere-inner { position: absolute; left: 50%; top: 50%; height: 100vh; width: 100vw; }
.sphere-gl { position: absolute; left: 50%; top: 50%; z-index: 2; width: 100%; height: 100%; }
#glSphere { width: 100%; height: 100%; display: block; pointer-events: none; }
.sphere-poster { display: none; position: absolute; left: 50%; top: 50%; width: min(78vh, 96vw); height: auto; aspect-ratio: 1; margin: calc(min(78vh, 96vw) / -2) 0 0 calc(min(78vh, 96vw) / -2); animation: cau-quay 90s linear infinite; pointer-events: none; }
@keyframes cau-quay { to { transform: rotate(360deg); } }
html.nhe #glSphere, html.khong-cau #glSphere { display: none; }
html.nhe .sphere-poster, html.khong-cau .sphere-poster { display: block; }
.sphere-logo { position: absolute; left: 50%; top: 50%; z-index: 3; height: 12vh; width: 12vh; background: #fff; -webkit-mask: url(/ai-web-kit/ban-moi/anh/sao.svg) center / contain no-repeat; mask: url(/ai-web-kit/ban-moi/anh/sao.svg) center / contain no-repeat; }
.sphere-htop { position: absolute; left: 4vmin; top: 4vmin; z-index: 4; margin: 0; white-space: nowrap; text-align: left; font-size: var(--sr-heading-1); font-weight: 400; line-height: 1; letter-spacing: -0.03em; color: #fff; pointer-events: none; }
.sphere-hbot { position: absolute; bottom: 4vmin; right: 4vmin; z-index: 4; margin: 0; display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; text-align: right; font-size: var(--sr-heading-2); font-weight: 400; line-height: 1; letter-spacing: -0.03em; color: #fff; pointer-events: none; }
html.reel .sphere-body { position: absolute; bottom: 5vmin; left: 4vmin; z-index: 4; display: flex; max-width: var(--sr-sphere-body-w); flex-direction: column; gap: 1.8vmin; text-align: left; font-size: var(--sr-sphere-body-text); font-weight: 300; line-height: 1.5; color: #fff; pointer-events: none; }

/* ---- nút "Xem 11 mẫu" hiện trong lúc băng chuyền xoay ---- */
html.reel .carousel-cta { position: absolute; left: 0; right: 0; bottom: 3vmin; z-index: 3; display: flex; justify-content: center; padding: 0 4vmin; pointer-events: none; }
.carousel-cta button { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-btn); background: var(--ink); padding: 1.8vmin 4vmin; min-height: 46px; font-size: max(2vmin, 15px); line-height: 1; color: var(--paper); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }

/* ---- lưới ảnh bay qua ---- */
.grid-tile { position: absolute; left: 50%; top: 50%; z-index: -1; overflow: hidden; background-color: #0d0b12; background-size: cover; background-position: top center; opacity: 0; }

/* ---- ba mục chữ trong chặng bay (#cms, #khach, #ten-mien) ---- */
html.reel .bay-chu { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.bay-tam {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.6vmin; padding: 3.6vmin 4vmin; border-radius: var(--radius-card);
  background: rgba(8, 6, 14, .74); border: 1px solid var(--glass-border); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); color: var(--paper);
}
html.reel .bay-tam { position: absolute; left: 6vw; bottom: 9vh; max-width: min(46rem, 52vw); opacity: 0; visibility: hidden; pointer-events: auto; }
html.nhe .bay-tam { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 6, 14, .96); }
.bay-nhan { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--nhan-2); }
.bay-tam h2 { font-size: clamp(30px, 5.4vmin, 64px); font-weight: 400; line-height: 1.08; letter-spacing: -0.025em; }
.bay-dat { font-size: clamp(15px, 2.1vmin, 19px); font-weight: 300; line-height: 1.55; color: rgba(245, 241, 236, .86); max-width: 34rem; }
.bay-nut { display: flex; flex-wrap: wrap; gap: 12px; margin-top: .6vmin; }

/* ---- cảnh giá (#gia): nền mesh-gradient + sao chrome ---- */
html.reel .target-block { position: absolute; left: 50%; top: 50%; z-index: -1; height: 100vh; height: 100svh; width: 100vw; overflow: hidden; background: var(--ink); opacity: 0; }
#glTarget { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.sao-poster { display: none; position: absolute; right: -6vw; top: 8%; width: min(62vw, 62vh); height: auto; aspect-ratio: 1; pointer-events: none; animation: sao-troi 14s ease-in-out infinite alternate; }
@keyframes sao-troi { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(8deg) translateY(2vh); } }
html.nhe .target-block, html.khong-sao .target-block { background: radial-gradient(85% 65% at 55% 100%, #7c3aed 0%, #4c1d95 38%, #160a3a 70%, #07031a 100%); }
html.nhe #glTarget, html.khong-sao #glTarget { display: none; }
html.nhe .sao-poster, html.khong-sao .sao-poster { display: block; }
.final-frame { position: absolute; inset: -4vmin; z-index: 3; border-radius: 11vmin; border: 8vmin solid #fff; opacity: 0; pointer-events: none; }
html.reel .cta-block { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2vmin; padding: 9vmin; opacity: 0; visibility: hidden; }
.cta-nhan { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(245, 241, 236, .72); }
.cta-block h2 { margin: 0; display: flex; max-width: 60vw; flex-direction: column; align-items: flex-start; font-size: 6.4vw; font-weight: 400; line-height: 1.02; letter-spacing: -0.03em; color: var(--paper); }
.cta-block h2 .faded { opacity: .42; }
.cta-gia { font-size: clamp(34px, 6vmin, 72px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; color: #fff; text-shadow: 0 0 40px rgba(154, 115, 240, .55); }
.cta-dat { max-width: min(36rem, 44vw); font-size: clamp(15px, 2.1vmin, 19px); line-height: 1.5; color: rgba(245, 241, 236, .78); font-weight: 300; }
.cta-nut { display: flex; flex-wrap: wrap; gap: 12px; margin-top: .6vmin; }

/* ---- dải 12 thẻ mẫu (#ray) ---- */
.pf-nhan { position: absolute; left: 3vmin; top: 6vmin; z-index: 2; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(245, 241, 236, .78); }
html:not(.reel) .pf-nhan { position: static; padding: 0 0 10px; }
html.reel .portfolio { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; overflow: hidden; padding-top: 11vmin; padding-bottom: 8vmin; color: var(--paper-alt); transform: translateY(100%); visibility: hidden; will-change: transform; background: transparent; }
.pf-viewport { position: relative; z-index: 1; min-height: 0; flex: 1; overflow: hidden; display: flex; align-items: center; }
.pf-track { display: flex; height: 100%; gap: 3vmin; padding-left: 3vmin; will-change: transform; }
.pf-card {
  position: relative; display: flex; height: 100%; width: 62vw; flex-shrink: 0; flex-direction: column; justify-content: flex-end; gap: 1vmin;
  overflow: hidden; border-radius: var(--radius-pf); background: var(--pf-card); padding: 3.2vmin; color: #fff; text-align: left;
  border: 1px solid var(--glass-border); transition: border-color .3s;
}
.pf-card:hover, .pf-card:focus-visible { border-color: var(--accent); }
.pf-card img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pf-card::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .82) 100%); }
.pf-meta { position: relative; z-index: 2; font-size: max(1.6vmin, 13px); opacity: .9; }
.pf-card h3 { position: relative; z-index: 2; margin: 0; max-width: 90%; font-size: 4.6vw; font-weight: 400; line-height: 1; letter-spacing: -0.03em; }
@media (orientation: landscape) {
  html.reel .pf-track { height: min(100%, 36vw); }
  html.reel .pf-card { width: 64vw; }
}

/* ---- phần giá đọc tiếp sau sân khấu (#gia-them) ---- */
.gia-them { position: relative; z-index: 3; background: var(--background); padding: 12vmin 16px 10vmin; }
.gia-them__khung { max-width: 46rem; margin: 0 auto; display: grid; gap: 1.1rem; }
.gia-cam { font-size: 1.05rem; line-height: 1.65; color: rgba(245, 241, 236, .9); padding-left: 1rem; border-left: 2px solid var(--accent); }
.gia-cam b { color: #fff; font-weight: 600; }
.gia-nho { font-size: .94rem; line-height: 1.6; color: var(--chu-mo); }
.gia-nho .giu, .giu { white-space: nowrap; }
.tam__mo { border: 1px solid var(--vien); border-radius: 14px; background: #0c0a12; overflow: hidden; }
.tam__mo summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 500; list-style: none; color: var(--paper); }
.tam__mo summary::-webkit-details-marker { display: none; }
.tam__mo summary::before { content: '+'; display: inline-block; width: 1.2em; color: var(--accent); font-weight: 600; }
.tam__mo[open] summary::before { content: '–'; }
.tam__mo-than { padding: 0 1.2rem 1.1rem; display: grid; gap: .9rem; }
.tam__mo-than p { font-size: .96rem; line-height: 1.65; color: rgba(245, 241, 236, .84); }
.tam__mo-than b { color: #fff; font-weight: 600; }
.tam__mo-tiep { display: block; margin-top: .5rem; }
.gia-chan { display: flex; gap: 1.4rem; font-size: .9rem; color: var(--chu-mo); padding-top: .6rem; }
.gia-chan a { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ ĐIỆN THOẠI (khổ dọc) */
/* Đức xem trên iPhone 3/10 chê "lỏ": viền trắng của sân khấu lộ ra quanh thẻ, ảnh mẫu bị cắt hai mép, sao đè chữ,
   nút mua nằm dưới thanh cookie. Bản điện thoại vì thế: nền đen tràn viền, không khung trắng cuối, thẻ mẫu là
   khung điện thoại hiện trọn bề ngang ảnh, nút đầu trang đặt ngay dưới ảnh, chừa chỗ cho thanh cookie (--cookie-h). */
@media (orientation: portrait), (max-width: 760px) {
  :root { --hero-img-w: calc(30svh * .696); --hero-img-h: 30svh; --hero-img-x: 50%; --sr-hero-pad: 0px; --radius-card: 0px; }
  html.reel .sticky-stage { padding: 0; }
  .backdrop { background: #000; }
  .marquee-item { font-size: 13vw; color: rgba(245, 241, 236, .9); }
  .marquee-dot { width: 3vw; height: 3vw; border-color: rgba(245, 241, 236, .6); }
  .hero-head { padding: 20px; padding-top: 74px; gap: 10px; }
  .hero-h1 { font-size: 8.3vw; }
  .hero-h1 > span { text-wrap: balance; }
  .hero-nhan { font-size: 12px; }
  /* ảnh nổi luôn nằm dưới tiêu đề (mép trên ≥ 182px), khối chữ + nút nằm ngay dưới ảnh */
  .hero-img { top: max(42%, calc(182px + var(--hero-img-h) / 2)); border-radius: 14px; }
  .hero-bottom { top: calc(max(42%, calc(182px + var(--hero-img-h) / 2)) + var(--hero-img-h) / 2 + 16px); bottom: auto; padding: 0 18px; gap: 12px; }
  .hero-bottom .col { gap: 14px; max-width: none; }
  .hero-bottom p.lead { font-size: 15px; line-height: 1.55; }
  .hero-bottom .btns { gap: 10px; flex-wrap: nowrap; }
  .hero-bottom .btns > * { flex: 1 1 0; padding: 14px 10px; font-size: 16px; white-space: nowrap; }
  .hero-divider { display: none; }
  .hero-pill { font-size: 13px; padding: 6px 14px; }
  .hero-templates p { font-size: 5.6vmin; }
  .cc .inner { padding: 4.4vmin; }
  .cc .foot h2 { font-size: 6vmin; }
  .cc .foot p { font-size: max(3.4vmin, 13px); }
  .side .cc, .side .sphere-face { border-radius: 18px; }
  .sphere-face h2 { font-size: 7vmin; }
  .sphere-htop { top: 74px; left: 18px; }
  .sphere-hbot { right: 18px; bottom: calc(7svh + var(--cookie-h, 0px)); }
  html.reel .sphere-body { top: calc(92px + var(--sr-heading-1) * 1.1); bottom: auto; left: 18px; max-width: calc(100vw - 36px); font-size: 4.1vw; }
  /* dải mẫu: mỗi thẻ là một chiếc điện thoại, ảnh hiện trọn bề ngang (cùng tỉ lệ 390:760 với ảnh) — không cắt chữ ở mép */
  html.reel .portfolio { padding-top: 104px; padding-bottom: calc(5svh + var(--cookie-h, 0px)); }
  .pf-nhan { left: 16px; right: 16px; top: 68px; font-size: 11px; letter-spacing: .08em; }
  html.reel .pf-track { height: auto; align-items: flex-start; gap: 16px; padding-left: 16px; }
  .pf-card {
    width: min(62vw, calc((100svh - 200px - var(--cookie-h, 0px)) * .513)); height: auto; padding: 0; gap: 4px;
    justify-content: flex-start; background: transparent; border: 0; overflow: visible; border-radius: 0;
  }
  .pf-card img {
    position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 390 / 760; object-fit: cover; object-position: top center;
    border-radius: 24px; border: 5px solid #17141d; background: #111; margin-bottom: 8px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 26px 50px -20px rgba(0, 0, 0, .85);
  }
  .pf-card::after { display: none; }
  .pf-card h3 { order: 2; font-size: 6vw; max-width: none; }
  .pf-meta { order: 3; font-size: 13px; color: var(--chu-mo); opacity: 1; }
  .pf-card .nhan-that { top: 14px; left: 14px; }
  .pf-card:hover img, .pf-card:focus-visible img { box-shadow: 0 0 0 2px var(--accent), 0 26px 50px -20px rgba(0, 0, 0, .85); }
  html.reel .bay-tam { left: 16px; right: 16px; bottom: calc(6svh + var(--cookie-h, 0px)); max-width: none; padding: 22px 20px; gap: 12px; border-radius: 18px; }
  .bay-tam h2 { font-size: 9.4vw; }
  .bay-nut .nut { flex: 1 1 auto; }
  /* cảnh giá: không khung trắng; sao nhỏ ở góc trên phải; khối mua dồn xuống đáy, chừa chỗ thanh cookie */
  .final-frame { display: none; }
  html.reel .cta-block { padding: 84px 20px calc(24px + var(--cookie-h, 0px)); justify-content: flex-end; gap: 12px; }
  .cta-block h2 { max-width: none; font-size: 10vw; }
  .cta-gia { font-size: 9vw; }
  .cta-dat { max-width: none; font-size: 15px; }
  .cta-nut { width: 100%; }
  .cta-nut .nut { flex: 1 1 100%; }
  .sao-poster { right: 3vw; top: 72px; width: min(40vw, 28svh); animation-duration: 18s; }
}
/* màn thấp (iPhone SE, hoặc khi thanh cookie còn hiện): ảnh nhỏ lại, sao lùi ra sau chữ */
@media (orientation: portrait) and (max-height: 620px) {
  :root { --hero-img-h: 22svh; --hero-img-w: calc(22svh * .696); }
  .hero-h1 { font-size: 7.6vw; }
  .hero-bottom, .hero-bottom .col { gap: 10px; }
  .hero-bottom p.lead { font-size: 14px; line-height: 1.5; }
  .sao-poster { width: min(30vw, 22svh); top: 66px; opacity: .55; }
  .cta-block h2 { font-size: 9vw; }
}
@media (max-width: 380px) {
  .hero-h1 { font-size: 8vw; }
  .hero-bottom p.lead { font-size: 14px; }
}

/* máy nhẹ: không kính mờ (làm mờ lại liên tục trên nền động làm cuộn nghẽn) */
html.nhe .hero-bottom .btns .ghost, html.nhe .hero-pill, html.nhe .sphere-face .lbl { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(18, 14, 26, .62); }

/* giảm chuyển động: trang đã ở bản đọc tĩnh (không có .reel); tắt thêm các vòng xoay trang trí */
@media (prefers-reduced-motion: reduce) {
  .loader-star, .sphere-poster, .sao-poster { animation: none; }
}

/* ============================================================ hộp xem web thật + bảng 11 mẫu (bổ sung cho phim/hop.css) */
.bang__the { position: relative; }
.hop__sua { color: var(--nhan-2) !important; font-weight: 600; }
@media (max-width: 860px) {
  /* hop.css bản trang phim thiếu khối này (có trong thu/chung.css): điện thoại xem toàn màn, cột mô tả xuống dưới */
  .hop { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .hop__than { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .hop__ben { border-left: 0; border-top: 1px solid var(--vien); max-height: 40svh; }
  .hop__khung[data-kho="dt"] iframe { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
  .hop__kho { display: none; }
}

/* Audit 4/10: bỏ khung trắng cuối sân khấu ở máy tính — khung trắng nối với phần giá nền đen bên dưới thành một dải trắng thừa */
.final-frame { display: none !important; }
/* Audit 4/10: chữ thân nét 300 trên nền tím loang khó đọc → nét 400; tránh chữ cuối rớt một mình xuống dòng */
.hero-bottom p.lead, .bay-dat, .cta-dat { font-weight: 400; text-wrap: pretty; }
.sphere-body p, .gia-cam, .gia-nho, .tam__mo-than p { text-wrap: pretty; }
