/* Trang chủ: thanh menu, sân khấu câu chuyện, phần cuộn dọc. Trắng là chính, hồng phấn phụ. Mọi màu là biến ở :root. */
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 500; font-display: swap; src: url(font/lora-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 500; font-display: swap; src: url(font/lora-vietnamese-500-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url(font/be-vietnam-pro-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url(font/be-vietnam-pro-vietnamese-400-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 600; font-display: swap; src: url(font/be-vietnam-pro-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 600; font-display: swap; src: url(font/be-vietnam-pro-vietnamese-600-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  color-scheme: light;
  --tim: #6C5CE7;
  --tim-dam: #5445C9;
  --hong-1: #FFF7F9;
  --hong-2: #FBE4EA;
  --hong-3: #F7D6DF;
  --hong-chu: #A83A5C;
  --muc: #2B2230;
  --muc-phu: #625868;
  --trang: #FFFFFF;
  --the: rgba(255, 255, 255, .94);
  --phong-ke: 'Lora', Georgia, 'Times New Roman', serif;
  --phong-than: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --an-duoi: env(safe-area-inset-bottom, 0px);
  --bien: 16px;
  --menu-cao: 64px;
  --co-tieu-de: clamp(1.625rem, 1.2rem + 1.5vw, 2.5rem);
  --co-than: clamp(1rem, .96rem + .2vw, 1.125rem);
  --dau-duoi: 56px;
  --dock-cao: 100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--phong-than); font-size: var(--co-than); line-height: 1.55; color: var(--muc); background: var(--trang); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--phong-ke); font-weight: 500; line-height: 1.24; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1, h2 { font-size: var(--co-tieu-de); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.an { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--tim); outline-offset: 2px; }
::selection { background: var(--tim); color: #fff; }

.bo-qua { position: absolute; left: 8px; top: -80px; z-index: 60; padding: 12px 16px; background: var(--trang); border-radius: 12px; }
.bo-qua:focus { top: 8px; }

/* Nút */
.nut { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; font: 600 1rem/1.2 var(--phong-than); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 140ms cubic-bezier(.22, 1, .36, 1), background-color 180ms ease; touch-action: manipulation; }
.nut:active { transform: scale(.97); }
.nut.chinh { background: var(--tim); color: #fff; }
.nut.phu { background: var(--hong-2); color: var(--muc); }
@media (hover: hover) { .nut.chinh:hover { background: var(--tim-dam); } .nut.phu:hover { background: var(--hong-3); } }
.nut:disabled { opacity: .5; cursor: default; }
.nut-cuoi { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Thanh menu */
.menu-tren { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--menu-cao); padding: 0 max(var(--bien), 3vw); background: var(--trang); border-bottom: 1px solid var(--hong-2); }
.hieu { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 600; flex: none; }
.hieu img { width: 36px; height: 36px; border-radius: 10px; }
.ten b, .ten-cuoi b { color: var(--hong-chu); font-weight: 600; }
.menu { display: flex; gap: 2px; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; text-decoration: none; font-size: .9375rem; color: var(--muc-phu); white-space: nowrap; transition: background-color 160ms ease; }
.menu a[aria-current] { color: var(--muc); font-weight: 600; background: var(--hong-1); }
@media (hover: hover) { .menu a:hover { background: var(--hong-1); } }

/* Không JS: xếp dọc */
.tren-san, .chon-chuyen, .chang { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tren-san { padding: 12px var(--bien); }
.chon-chuyen a, .chang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; }
.chang i { display: none; }
.buoc { padding: 20px var(--bien) 32px; max-width: 960px; margin: 0 auto; }
.buoc .chu p { margin-top: 8px; }
.buoc img { width: 100%; border-radius: 16px; margin-top: 10px; }
.buoc img.app { max-width: 320px; margin-inline: auto; }
.ten-cuoi img { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
.ten-cuoi { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.doi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tuoi { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--hong-2); color: var(--muc); font-weight: 600; font-size: .8125rem; }
.nhan-mo { font-size: .875rem; color: var(--muc-phu); }
.moi-vuot { font-size: .9375rem; font-weight: 600; color: var(--hong-chu); }
.ke, .nho { color: var(--muc-phu); font-size: .875rem; }
.nho { padding: 8px var(--bien); margin: 0; text-align: center; }
.ke-app { display: block; }
.lien { white-space: nowrap; }
.lien-chuyen { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 0; border: 0; background: none; font: 600 .9375rem var(--phong-than); color: var(--tim-dam); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.dieu-khien[hidden] { display: none; }
.rieng-tu { margin-top: 8px; }
.rieng-tu summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; color: var(--tim-dam); text-decoration: underline; text-underline-offset: .2em; list-style: none; }
.rieng-tu summary::-webkit-details-marker { display: none; }
.rieng-tu p { margin-top: 4px; font-size: .9375rem; line-height: 1.5; }

/* ========== Sân khấu ========== */
.co-js .san-khau { position: relative; height: calc(100vh - var(--menu-cao)); height: calc(100svh - var(--menu-cao)); min-height: 480px; overflow: hidden; background: var(--hong-1); touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none; cursor: grab; }
.co-js.dang-keo .san-khau { cursor: grabbing; }
#san { position: absolute; inset: 0; overflow: hidden; background: var(--hong-1); contain: strict; }
#san img { position: absolute; display: block; max-width: none; margin: 0; pointer-events: none; border-radius: 0; }
.canh, .nen-mo, .la, .cong, .may, .noi, .the-bay { position: absolute; }
.canh { inset: 0; overflow: hidden; }
.lop { position: absolute; will-change: transform; }
.lop img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chu-lon { position: absolute; left: 0; right: 0; top: 11%; text-align: center; font: 500 clamp(5rem, 13vw, 13rem)/1 var(--phong-ke); letter-spacing: -.02em; color: var(--trang); }
.lop-chu { display: none; }

.xa-la .nua { position: absolute; overflow: hidden; transform-origin: 0 0; will-change: transform, opacity; background: var(--hong-1); }
.xa-la .nua + .nua { box-shadow: 0 0 0 1.5px var(--trang); }
.xa-la img { will-change: transform; }
.nen-mo { will-change: transform; }
.nen-mo img { inset: 0; width: 100%; height: 100%; object-fit: cover; }

.cong { left: 0; top: 0; width: 400px; height: 400px; transform-origin: 0 0; will-change: transform, opacity; -webkit-mask-image: radial-gradient(closest-side, #000 62%, rgba(0, 0, 0, .55) 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, rgba(0, 0, 0, .55) 80%, transparent 100%); }
.cong.tang { -webkit-mask-image: radial-gradient(closest-side, #000 84%, transparent 100%); mask-image: radial-gradient(closest-side, #000 84%, transparent 100%); }
.cong.thang.mem-phai { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
.cong.thang:not(.mem-phai) { -webkit-mask-image: none; mask-image: none; }
.cong.thang { width: 100%; height: 100%; }
.cong .b { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.cong .b-mo { opacity: 0; will-change: opacity; object-fit: cover; }
.cong .b-net { object-fit: cover; }
.diem-chay { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #E896B0, 0 2px 8px rgba(43, 34, 48, .3); opacity: 0; will-change: transform, opacity; }

.the-bay { left: 0; top: 0; overflow: hidden; transform-origin: 0 0; will-change: transform; background: var(--trang); }
.the-trong { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.the-bd { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; will-change: opacity, transform; }

.noi { pointer-events: none; will-change: transform, opacity; }
.noi img { position: static !important; width: 100%; height: 100%; object-fit: contain; }
.noi-cay { left: 0; right: 0; bottom: 0; height: 100%; }
.noi-cay img { object-fit: cover; object-position: bottom; }
.noi-den { inset: 0; mix-blend-mode: screen; }
.noi-den img { object-fit: cover; object-position: top; }
.noi-tim { right: 12%; bottom: 16%; width: clamp(90px, 11vw, 200px); height: auto; }
.noi-bongT { left: 34%; top: 20%; width: clamp(120px, 13vw, 220px); height: auto; }
.doc .noi-bongT, .doc .noi-ghimT, .doc .noi-ghimH { display: none; }
.doc .noi-cay { left: -45%; right: auto; width: 190%; height: auto; }
.doc .noi-cay img, .doc .noi-den img { height: auto; }
.doc .noi-den { bottom: auto; height: auto; }
.doc .noi-tim { display: none; }

.la { pointer-events: none; will-change: transform, opacity; }
.la img { inset: 0; width: 100%; height: 100%; object-fit: cover; }

.troi .khung { position: absolute; transform-origin: 50% 66%; will-change: transform; }
.troi img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.troi .troi-day { opacity: 0; will-change: opacity; }
.troi .sang { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tho { position: absolute; width: 11%; background: radial-gradient(closest-side, rgba(255, 255, 255, .5), transparent); will-change: transform, opacity; pointer-events: none; opacity: 0; }
.chan-sang { position: absolute; width: 12%; aspect-ratio: 2.4; border-radius: 50%; background: radial-gradient(closest-side, #fff, rgba(251, 228, 234, 0)); opacity: 0; will-change: transform, opacity; pointer-events: none; }
.song { position: absolute; width: 22%; aspect-ratio: 2.8; border-radius: 50%; border: 2px solid var(--trang); opacity: 0; will-change: transform, opacity; pointer-events: none; }
.tia { position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, #fff 30%, rgba(251, 228, 234, .7) 55%, transparent); opacity: 0; will-change: transform, opacity; pointer-events: none; }
.gap { position: absolute; width: 16%; aspect-ratio: 1.8; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .85), transparent); opacity: 0; will-change: transform, opacity; pointer-events: none; }
.nhan-cot { position: absolute; padding: 8px 12px; border-radius: 999px; background: var(--the); color: var(--muc); font: 600 .8125rem/1.3 var(--phong-than); white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.hao { position: absolute; background: radial-gradient(closest-side, rgba(255, 255, 255, .34), transparent); opacity: .6; will-change: opacity; pointer-events: none; }

.may { left: 0; top: 0; transform-origin: 0 0; }
.may.bay { will-change: transform, opacity; }
.vien { position: absolute; inset: -6px; border-radius: calc(var(--may-rong) * .155); background: #15131A; opacity: 0; }
.bong { position: absolute; inset: 1% 0 0; border-radius: calc(var(--may-rong) * .155); box-shadow: 0 24px 60px rgba(43, 34, 48, .24); opacity: 0; }
.man { position: absolute; inset: 0; overflow: hidden; border-radius: calc(var(--may-rong) * .135); background: var(--trang); isolation: isolate; transform: translateZ(0); }
.cuon { position: absolute; inset: 0; }
.cuon .s { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.toi { position: absolute; inset: 0; background: rgba(43, 34, 48, .5); }
.manh { position: absolute; overflow: hidden; }
.manh img { position: absolute; max-width: none; }
.manh.tam { border-radius: 7% 7% 0 0 / 7.6% 7.6% 0 0; will-change: transform; }
.than { position: absolute; inset: 0; background: var(--trang); clip-path: inset(7.6% 0 10% 0); }
.than .s { will-change: transform; clip-path: inset(0 0 12% 0); }
.manh.tin { will-change: transform, opacity; }
.manh.nhan { transform-origin: 0 100%; }
.manh.gui { transform-origin: 100% 100%; }
.manh.the { border-radius: 16px; transform-origin: 30% 0; }
.manh.avatar { border-radius: 50%; }
.vong { position: absolute; left: 42.82%; top: 53.89%; width: 16.4%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 3px var(--trang), 0 0 0 5px var(--hong-3); }
.vong-ban { position: absolute; left: 49.74%; top: 47.27%; width: 12%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(64, 132, 246, .9); }
.cham { position: absolute; width: 13.5%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .62); box-shadow: 0 0 0 1.5px rgba(43, 34, 48, .22), 0 3px 10px rgba(43, 34, 48, .28); }
.vong-duong { position: absolute; left: 4.6%; top: 81.5%; width: 63.6%; height: 5.6%; border-radius: 999px; box-shadow: 0 0 0 3px var(--hong-3); }
.gon { position: absolute; width: 13.5%; aspect-ratio: 1; border-radius: 50%; border: 2.5px solid rgba(108, 92, 231, .85); }
.man-che { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(255, 255, 255, .9), rgba(255, 247, 249, .82) 50%, rgba(255, 247, 249, .62)); }
.man-mo { position: absolute; inset: 0; background: var(--hong-1); opacity: 0; pointer-events: none; transition: opacity 260ms ease; z-index: 5; }
.man-mo.hien { opacity: 1; }
.dom-sang { display: none; }

/* Trên sân khấu: chọn chuyện và chặng */
.co-js .tren-san { position: absolute; z-index: 30; left: 12px; top: 10px; padding: 0; gap: 8px; flex-wrap: nowrap; align-items: center; max-width: calc(100% - 24px); }
.co-js .chon-chuyen, .co-js .chang { flex-wrap: nowrap; gap: 0; padding: 2px; border-radius: 999px; background: var(--the); }
.co-js .chon-chuyen a, .co-js .chang a { position: relative; }
.co-js .chon-chuyen a::after, .co-js .chang a::after { content: ''; position: absolute; inset: -6px 0; }
.co-js .chon-chuyen a { min-height: 32px; padding: 0 12px; border-radius: 999px; font-size: .8125rem; text-decoration: none; color: var(--muc-phu); white-space: nowrap; }
.co-js .chon-chuyen a[aria-current] { background: var(--hong-2); color: var(--muc); }
.co-js .chang a { min-height: 32px; padding: 0 10px; font-size: .8125rem; text-decoration: none; color: var(--muc-phu); white-space: nowrap; }
.co-js .chang a[aria-current] { color: var(--muc); }
.co-js .chang i { display: block; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--hong-chu); transform: scaleX(0); transform-origin: 0 50%; transition: transform 420ms cubic-bezier(.22, 1, .36, 1); }

/* Hai mũi tên tròn. Hình 38 px, vùng chạm 44 px nhờ ::after.
   Màn ngang: dải rộng và cao bằng 0 để doMay không chừa chỗ, hai nút neo vào sân khấu. */
.dieu-khien { display: flex; gap: 8px; }
.co-js .dieu-khien { position: static; display: block; width: 0; height: 0; }
.co-js .dieu-khien[hidden] { display: none; }
.co-js .dieu-khien .nut { position: absolute; z-index: 30; top: 50%; width: 38px; min-height: 38px; height: 38px; margin-top: -19px; padding: 0; box-shadow: 0 0 0 1px rgba(43, 34, 48, .12), 0 2px 8px rgba(43, 34, 48, .2); }
.co-js .dieu-khien .nut::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; }
.co-js #nut-lui { left: 12px; background: var(--the); }
.co-js #nut-toi { right: 12px; }
.co-js #nut-lui:disabled { display: none; }
#nut-toi .xem-lai { display: none; }
.cuoi #nut-toi .mui { display: none; }
.cuoi #nut-toi .xem-lai { display: block; }

/* Dòng nhỏ */
.co-js .nho { position: absolute; z-index: 20; left: 12px; bottom: calc(12px + var(--an-duoi)); max-width: 40%; padding: 8px; border-radius: 10px; background: var(--the); text-align: left; font-size: .6875rem; line-height: 1.3; color: var(--muc-phu); }
.co-js .ke-app { display: none; }
.co-js.dang-app .ke-app { display: block; }

/* Chữ từng bước: tấm trắng, chữ mực */
.co-js #truyen { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.co-js .buoc { scroll-margin-top: calc(var(--menu-cao) + 100vh); position: absolute; inset: 0; padding: 0; max-width: none; margin: 0; visibility: hidden; }
.co-js .chu { position: absolute; left: clamp(60px, 5vw, 72px); bottom: 64px; width: min(21rem, 30vw); padding: 12px 16px; border-radius: 16px; background: var(--the); color: var(--muc); pointer-events: auto; opacity: 0; will-change: transform, opacity; }
.co-js .chu p { margin-top: 4px; font-size: .875rem; line-height: 1.45; }
.co-js .chu .ke { font-size: .8125rem; }
.co-js .buoc h2 { font-size: clamp(1.125rem, .95rem + .6vw, 1.5rem); }

.co-js .vt-mo .chu { left: 50%; width: min(25rem, 34vw); top: 50%; bottom: auto; translate: -50% -50%; padding: 16px 18px; }
.co-js .vt-mo h1 { font-size: clamp(1.625rem, 1.1rem + 1.2vw, 2.25rem); margin-top: 6px; }
.co-js .vt-mo .nut, .co-js .vt-cuoi .nut { min-height: 44px; padding: 0 16px; font-size: .875rem; }
.co-js .vt-cuoi .nut-cuoi { flex-wrap: nowrap; gap: 6px; }
.co-js .vt-cuoi .nut { flex: 1 1 0; padding: 0 6px; font-size: .75rem; white-space: nowrap; }
.co-js .vt-mo .nut-cuoi { flex-wrap: wrap; }
.co-js .moi-vuot { margin-top: 8px !important; font-size: .8125rem !important; }
.co-js .vt-giua .chu { left: 50%; translate: -50% 0; text-align: center; }
.co-js .vt-tren .chu { left: 50%; top: 60px; bottom: auto; translate: -50% 0; width: max-content; max-width: min(28rem, 80%); text-align: center; }
.co-js .vt-phai .chu { left: auto; right: clamp(60px, 5vw, 72px); top: 60px; bottom: auto; }
.co-js .vt-di .chu { left: auto; right: clamp(60px, 5vw, 72px); top: 60px; bottom: auto; }
.co-js .vt-di b, .dem-m { display: block; font-family: var(--phong-ke); font-weight: 500; font-size: clamp(1.25rem, 1rem + .9vw, 1.75rem); line-height: 1.25; }
.co-js .dong-di { position: relative; }
.co-js .dong-2 { opacity: 0; position: absolute; left: 16px; right: 16px; top: 12px; margin: 0 !important; }
.co-js .dong-1 { margin: 0 !important; }
.co-js .vt-cuoi .chu { left: auto; right: clamp(60px, 5vw, 72px); bottom: 64px; width: min(21rem, 30vw); }
.co-js .vt-cuoi h2 { margin-top: 10px; }
.co-js .vt-so .chu { left: 50%; top: 56px; bottom: auto; translate: -50% 0; width: min(30rem, 76%); text-align: center; }
.co-js .vt-so h2 span { display: block; font-size: clamp(1rem, .85rem + .6vw, 1.375rem); }
.co-js .vt-so h2 b { display: block; font-weight: 500; font-size: clamp(2.5rem, 1.75rem + 3.4vw, 4.75rem); line-height: 1.05; letter-spacing: -.02em; }
.co-js .vt-so.toi .chu { background: none; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.co-js .trong-app .chu { left: max(60px, calc(var(--may-trai) - 21rem - 56px)); top: 50%; bottom: auto; translate: 0 -50%; width: min(21rem, calc(var(--may-trai) - 60px - 24px)); background: none; }

/* Màn dọc */
.doc .tho { width: 20%; }
.doc .chan-sang { width: 26%; }
.doc .song { width: 46%; }
.doc .man-che { background: rgba(255, 255, 255, .5); }
.doc .chu, .doc .vt-tren .chu, .doc .vt-phai .chu, .doc .vt-di .chu, .doc .vt-giua .chu, .doc .vt-duoi .chu { left: 12px; right: 12px; top: calc(var(--dau-duoi) + 6px); bottom: auto; width: auto; max-width: none; translate: none; text-align: left; padding: 8px 12px; border-radius: 14px; }
.doc .chu p { font-size: .8125rem; line-height: 1.4; margin-top: 2px; }
.doc .chu .ke { font-size: .75rem; }
.doc .buoc h2 { font-size: 1.0625rem; }
.doc .dong-2 { left: 12px; right: 12px; top: 8px; }
.doc .vt-mo .chu { left: 12px; right: 12px; top: calc(var(--dau-duoi) + 6px); bottom: auto; width: auto; translate: none; padding: 10px 12px; }
.doc .vt-mo .nut-cuoi { flex-wrap: nowrap; gap: 6px; }
.doc .vt-mo h1 { font-size: 1.375rem; margin-top: 2px; }
.doc .vt-mo .nut { flex: 1 1 0; min-height: 44px; padding: 0 6px; font-size: clamp(.75rem, 3.5vw, .875rem); white-space: nowrap; }
.doc .vt-mo .chu p { font-size: .8125rem; line-height: 1.4; }
.doc .vt-mo .nut-cuoi { margin-top: 8px; }
.doc .vt-so .chu { left: 12px; right: 12px; top: calc(var(--dau-duoi) + 4px); translate: none; width: auto; }
.doc .vt-so.toi .chu { top: auto; bottom: calc(var(--dock-cao) + 6px); }
.doc .vt-cuoi .chu { left: 12px; right: 12px; top: calc(var(--dau-duoi) + 6px); bottom: auto; width: auto; padding: 8px 12px; }
.doc .vt-cuoi .nut-cuoi { flex-wrap: nowrap; gap: 6px; margin-top: 8px; }
.doc .vt-cuoi .ke { display: none; }
.doc .vt-cuoi .lien-chuyen { min-height: 36px; margin-top: 2px; }
.doc .vt-cuoi .ten-cuoi { display: none; }
.doc .vt-cuoi h2 { margin-top: 0; font-size: 1.0625rem; }
.doc .vt-cuoi .nut { flex: 1 1 0; min-height: 44px; padding: 0 6px; font-size: clamp(.75rem, 3.5vw, .875rem); white-space: nowrap; }
.doc .trong-app .chu { left: 12px; right: 12px; top: auto; bottom: calc(var(--dock-cao) + 6px); translate: none; width: auto; background: var(--the); padding: 8px 12px; }
.doc .trong-app h2 { font-size: 1.0625rem; }
.doc .app-tren .chu { top: calc(var(--dau-duoi) + 6px); bottom: auto; }
.doc .rieng-tu { margin-top: 2px; }
.doc .rieng-tu summary { position: relative; min-height: 32px; font-size: .8125rem; }
.doc .rieng-tu summary::after { content: ''; position: absolute; inset: -6px 0; }
.doc .chang { display: none; }
.doc .tren-san { left: 12px; top: 8px; }
/* Màn dọc: dải dưới thật (doMay cần đo đỉnh dải), hai mũi tên ở hai đầu, dòng nhỏ nằm giữa. */
.doc .dieu-khien { position: absolute; z-index: 30; display: flex; justify-content: space-between; left: 12px; right: 12px; bottom: calc(8px + var(--an-duoi)); width: auto; height: 38px; pointer-events: none; }
.doc .dieu-khien .nut { position: relative; top: auto; margin: 0; pointer-events: auto; }
.doc #nut-lui, .doc #nut-toi { left: auto; right: auto; }
.doc #nut-toi { margin-left: auto; }
.doc .nho, .doc.dang-app .nho { left: 58px; right: 58px; bottom: calc(8px + var(--an-duoi)); width: fit-content; max-width: none; margin-inline: auto; padding: 4px 8px; text-align: center; font-size: .6875rem; line-height: 1.25; }
.doc.dang-app .ke-app { display: inline; }

/* Thấp */
.thap .chu { bottom: 56px; padding: 8px 12px; }
.thap .chu p { font-size: .8125rem; line-height: 1.35; }
.thap .moi-vuot, .thap .nhan-mo { display: none; }

/* Hẹp */
@media (max-width: 760px) {
  :root { --menu-cao: 56px; }
  .menu-tren { padding: 0 8px; gap: 2px; }
  .ten { display: none; }
  .chi-rong { display: none; }
  .menu { flex: 1; justify-content: space-between; }
  .menu a { padding: 0 6px; font-size: clamp(.75rem, 3.4vw, .875rem); }
}
@media (max-width: 1100px) { .chi-rong { display: none; } }
@media (max-width: 1180px) and (min-aspect-ratio: 1/1) { .co-js .chang { display: none; } }

/* Phần cuộn dọc */
.doc-phan { padding: clamp(40px, 7vw, 88px) max(var(--bien), calc((100% - 72rem) / 2)); }
.doc-phan.hong { background: var(--hong-1); }
.doc-phan > p { margin-top: 10px; }
.ba-cot { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 24px; margin: 24px 0 0; padding: 0; list-style: none; }
.ba-cot h3 { font-size: 1.375rem; }
.ba-cot p { margin-top: 6px; color: var(--muc-phu); }
blockquote { margin: 16px 0 0; max-width: 46rem; font: 500 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.45 var(--phong-ke); }
.phu-chu { color: var(--muc-phu); max-width: 46rem; }
.chan { padding: 32px max(var(--bien), calc((100% - 72rem) / 2)) 40px; background: var(--hong-2); font-size: .875rem; color: var(--muc); }
.chan p + p { margin-top: 6px; }


@media (prefers-reduced-motion: reduce) {
  .nut, .chang i, .man-mo { transition-duration: 1ms; }
}

/* Mũi tên: không nền, không chữ, chớp nhẹ để gọi vuốt tiếp */
.len-tai { display: none; }
.co-js .len-tai { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--tim); color: #fff; font-size: .8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.co-js .dieu-khien .nut, .co-js #nut-lui { width: 32px; min-height: 44px; height: 44px; margin-top: -22px; background: none; color: #fff; box-shadow: none; }
.co-js .dieu-khien .nut::after { inset: 0 -6px; border-radius: 0; }
.co-js .dieu-khien svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(43, 34, 48, .75)); }
.co-js #nut-toi .mui { animation: chop-mui 1.3s ease-in-out infinite; }
@keyframes chop-mui { 0%, 100% { opacity: 1; transform: translateX(2px); } 50% { opacity: .22; transform: translateX(-1px); } }

/* Điện thoại: ảnh là chính, chữ chỉ còn một nhãn nhỏ ở đáy */
@media (max-width: 760px) {
  .co-js.doc .chon-chuyen a { min-height: 30px; padding: 0 10px; }
  .co-js.doc .len-tai { min-height: 30px; }
  .co-js.doc .nho { display: none; }
  .co-js.doc .dieu-khien { left: 0; right: 0; bottom: var(--an-duoi); height: 46px; }
  .co-js.doc .dieu-khien .nut { position: absolute; top: auto; bottom: calc((100svh - var(--menu-cao)) / 2 - 22px); margin: 0; }
  .co-js.doc #nut-lui { left: 2px; }
  .co-js.doc #nut-toi { right: 2px; margin: 0; }
  .co-js.doc .buoc .chu { left: 50%; right: auto; top: auto; bottom: calc(6px + var(--an-duoi)); translate: -50% 0; width: max-content; max-width: calc(100% - 16px); padding: 6px 12px; border-radius: 12px; background: var(--the); color: var(--muc); text-shadow: none; text-align: center; }
  .co-js.doc .buoc .chu h2 { font-size: .9375rem; }
  .co-js.doc .buoc .chu > p:not(.giu) { display: none; }
  .co-js.doc .buoc .chu p.giu { font-size: .75rem; line-height: 1.3; }
  .co-js.doc .rieng-tu { display: none; }
  .co-js.doc .vt-so h2 span { display: inline; font-size: .9375rem; }
  .co-js.doc .vt-so h2 b { display: inline; font-size: .9375rem; font-family: inherit; letter-spacing: 0; }
  .co-js.doc .vt-mo .chu, .co-js.doc .vt-cuoi .chu { width: calc(100% - 16px); padding: 8px 10px; }
  .co-js.doc .vt-mo h1 { font-size: 1.0625rem; margin: 0; }
  .co-js.doc .vt-mo .chu .nhan-mo.giu { display: block; font-size: .6875rem; }
  .co-js.doc .vt-mo .chu .nut-cuoi, .co-js.doc .vt-cuoi .chu .nut-cuoi { margin-top: 6px; }
  .co-js.doc .vt-mo .nut, .co-js.doc .vt-cuoi .nut { min-height: 40px; }
  .co-js.doc .vt-cuoi .lien-chuyen { display: none; }
}
@media (prefers-reduced-motion: reduce) { .co-js #nut-toi .mui { animation: none; } }

/* Nút vào app luôn hiện trên sân khấu; Tải app là nút phụ */
.co-js .len-tai.tai-phu { background: var(--the); color: var(--muc); }
.co-js .len-tai + .len-tai { margin-left: 6px; }
@media (max-width: 400px) { .co-js.doc .len-tai { padding: 0 9px; } .co-js.doc .chon-chuyen a { padding: 0 8px; } }
@media (max-width: 374px) { .co-js.doc .len-tai.tai-phu { display: none; } }
