/* =====================================================================================================
 * ari-chung.css — THÀNH PHẦN dùng chung (cần ari-tokens.css nạp trước): nền, chữ, nút (viên thuốc + tròn), thanh điều hướng
 * viên kính, tấm danh mục điện thoại, khung video, dải chữ chạy, chân trang kính đen, thanh đáy điện thoại, nút dừng mọi
 * chuyển động, luật giảm chuyển động / trong suốt / tương phản. HTML của các khối này: khuon_chung.py (Python + PHP).
 * ===================================================================================================== */
/* ---------- 2. Nền ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
html::before {                                           /* quầng hồng cố định: kính có cái để nhìn xuyên */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 8% 6%, rgb(247 166 204 / .52), transparent 70%),
    radial-gradient(ellipse 50% 45% at 96% 42%, rgb(221 203 250 / .52), transparent 70%),
    radial-gradient(ellipse 55% 40% at 50% 52%, rgb(250 196 222 / .30), transparent 70%),
    radial-gradient(ellipse 50% 45% at 4% 90%, rgb(255 214 196 / .38), transparent 70%),
    radial-gradient(ellipse 55% 45% at 96% 100%, rgb(250 188 214 / .46), transparent 70%),
    linear-gradient(#FFF8FB, #FFF1F6);
}
body {
  margin: 0; background: var(--c-bg); color: var(--c-text);
  font: 400 var(--fs-body)/1.65 var(--f-doc); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body { background: transparent; }                        /* cho quầng html::before hiện ra */
::selection { background: var(--c-selection); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; }
.an { position: absolute; width: 0; height: 0; overflow: hidden; }
.an-chu { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; }
.bo-qua { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: var(--r-pill); background: var(--p-ink-900); color: var(--c-text-invert); font-weight: 600; text-decoration: none; }
.bo-qua:focus { top: 12px; outline-color: var(--p-pink-400); }

.khung { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
main > section { position: relative; }
.lop, .so, .cong-cu, .fv, .bt, .vs, .ket { padding-block: var(--sp-section); }

/* ---------- 3. Chữ ---------- */
.td-lon {
  font-family: var(--f-hien); font-weight: 700; font-stretch: 96%; font-optical-sizing: auto;
  font-size: var(--fs-display); line-height: 1.04; letter-spacing: -.022em; text-wrap: balance; max-width: 15ch;
}
.td-vua { font-family: var(--f-hien); font-weight: 650; font-stretch: 98%; font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.dan { margin-top: 20px; font-size: var(--fs-lead); line-height: 1.55; color: var(--c-text-2); max-width: 56ch; text-wrap: pretty; }
.chu-thich { margin-top: 12px; font-size: var(--fs-sm); line-height: 1.5; color: var(--c-text-3); max-width: 60ch; }
.tu { display: inline-block; overflow: hidden; padding-block: .12em; margin-block: -.12em; vertical-align: top; }
.tu > span { display: inline-block; }

/* "số trang" của tạp chí — là thứ tự thật của các trang, nên được đánh số */
.folio { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(24px, 3vw, 40px); font-size: .875rem; font-weight: 500; color: var(--c-text-accent-sm); }
.folio-so { font-family: var(--f-hien); font-weight: 650; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 14px; }
.folio-so::after { content: ""; width: 56px; height: 1px; background: currentColor; opacity: .6; }
.folio-dao { color: var(--c-text-accent-on-dark); }

/* ---------- 4. Nút ---------- */
.hang-nut { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: var(--r-pill); font: 600 .97rem/1.2 var(--f-doc); text-decoration: none; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-fast);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.nut:active { transform: scale(.97); }
.nut:has(.nut-vong) { padding-right: 8px; }
.nut-vong { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(42 15 26 / .1); transition: transform var(--dur-base) var(--ease-spring); }
.nut-vong .ic { width: 16px; height: 16px; }
.nut:hover .nut-vong { transform: translate(3px, -1px) scale(1.05); }
.nut-hong { background: var(--c-brand); color: var(--c-text-on-brand); }
.nut-hong:hover { background: var(--c-brand-hover); box-shadow: var(--sh-glow); }
.nut-den { background: var(--p-ink-900); color: var(--c-text-invert); }
.nut-den .nut-vong { background: var(--c-brand); color: var(--c-text-on-brand); }
.nut-den:hover { background: var(--p-ink-700); }
.nut-kinh { background: var(--glass-thin-bg); border-color: var(--c-line-strong); color: var(--c-text); box-shadow: var(--sh-1); }
.nut-kinh:hover { background: rgb(255 255 255 / .9); border-color: rgb(242 132 181 / .7); }
.nut-kinh-dao { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .3); color: var(--c-text-invert); }
.nut-kinh-dao:hover { background: rgb(255 255 255 / .14); }
.nut-nho { min-height: 44px; padding: 8px 16px; font-size: .9rem; }
.nut-nho:has(.nut-vong) { padding-right: 6px; }
.nut-nho .nut-vong { width: 30px; height: 30px; }
.nut-to { min-height: 56px; padding-inline: 26px; font-size: 1.05rem; }
.nut-tron {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: rgb(255 255 255 / .85); border: 1px solid var(--c-line-strong); color: var(--c-text);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast);
}
.nut-tron:active { transform: scale(.94); }

/* ---------- 5. Thanh điều hướng (kính dày, nổi) ---------- */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; padding-inline: 12px; pointer-events: none; }
.nav-vo {
  pointer-events: auto; display: flex; align-items: center; gap: 6px; max-width: var(--container); height: 58px; margin-inline: auto;
  padding: 0 7px 0 12px; border-radius: var(--r-pill); border: 1px solid var(--glass-edge);
  background: var(--glass-thick-bg); -webkit-backdrop-filter: var(--glass-thick-blur); backdrop-filter: var(--glass-thick-blur);
  box-shadow: var(--sh-glass);
  transition: max-width var(--dur-slow) var(--ease-flow), height var(--dur-base) var(--ease-out);
}
.nav-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-right: 10px; text-decoration: none; font: 700 1.06rem/1 var(--f-hien); letter-spacing: -.01em; }
.nav-logo img { width: 34px; height: 36px; filter: drop-shadow(0 0 .6px rgb(168 48 94 / .75)); }
.nav-lien { display: flex; align-items: center; gap: 0; margin-left: 8px; }
.nav-lien a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); font-size: .9rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color var(--dur-fast); }
.nav-lien a:hover { background: rgb(255 255 255 / .8); }
.nav-lien a.dang-o { background: rgb(242 132 181 / .2); color: var(--c-text-accent-sm); }
.nav-trang { margin-left: auto; padding: 0 12px; font: 600 .9rem/1 var(--f-hien); font-variant-numeric: tabular-nums; color: var(--c-text-accent-sm); white-space: nowrap; }
.nav-trang b { font-weight: 700; color: var(--c-text); }
.nav-trang::before { content: "tr. "; }
.nav-mo, .nav-dong { display: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--p-ink-900); color: var(--c-text-invert); cursor: pointer; }
.nav-dong { display: inline-grid; }
@media (max-width: 1139px) {
  .nav-lien { display: none; }
  .nav-mo { display: inline-grid; }
}
@media (max-width: 767px) {
  .nav { top: 8px; padding-inline: 8px; }
  .nav-vo { height: 54px; padding-left: 8px; }
  .nav-zalo { display: none; }
}
.tam-menu {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 24px; padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  background: rgb(255 248 251 / .9); -webkit-backdrop-filter: var(--glass-thick-blur); backdrop-filter: var(--glass-thick-blur); overflow-y: auto; overscroll-behavior: contain;
}
.tam-menu-dau { display: flex; align-items: center; justify-content: space-between; min-height: 54px; }
.tam-menu-ten { font: 600 .95rem var(--f-doc); color: var(--c-text-accent-sm); }
.tam-menu-ds { list-style: none; }
.tam-menu-ds a { display: flex; align-items: baseline; gap: 16px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--c-line); text-decoration: none; font: 650 clamp(1.6rem, 6vw, 2.4rem)/1.15 var(--f-hien); letter-spacing: -.02em; }
.tam-menu-ds span { font: 600 .9rem var(--f-hien); color: var(--c-text-accent-sm); font-variant-numeric: tabular-nums; min-width: 2ch; }

/* ---------- 6. Khung video (chỗ để video Higgsfield) + nhãn ---------- */
.khung-video { position: relative; overflow: hidden; background: var(--c-bg-sunk); }
.nhan-slot {
  position: absolute; right: 12px; bottom: 12px; z-index: 5; max-width: min(320px, calc(100% - 24px)); padding: 7px 11px; border-radius: 12px;
  background: rgb(29 21 25 / .84); color: var(--c-text-invert); font: 500 .8125rem/1.4 var(--f-doc); pointer-events: none; display: none;
}
.hien-khung .nhan-slot { display: block; }
.hien-khung [data-video-slot] { outline: 2px dashed rgb(168 48 94 / .7); outline-offset: -2px; }
.nhan-slot b { display: block; font-weight: 600; color: var(--p-pink-400); }
.phim-hong img, .phim-hong video { filter: brightness(1.9) contrast(1.15) saturate(.5); }
.phim-hong::after { content: ""; position: absolute; inset: 0; background: #D983AB; mix-blend-mode: screen; opacity: .85; pointer-events: none; }


/* ---------- 9. Dải chữ chạy chậm ---------- */
.dai-chay { position: relative; z-index: 3; display: flex; align-items: center; overflow: hidden; background: var(--p-ink-900); color: var(--p-pink-400); padding-block: 16px; }
.dai-chay-ray { display: flex; width: max-content; animation: chay 70s linear infinite; }
.dai-chay-ray span { display: inline-flex; align-items: center; gap: .5em; padding-right: .5em; white-space: nowrap; font: 750 clamp(1.9rem, 4.6vw, 4.2rem)/1.12 var(--f-hien); font-stretch: 90%; letter-spacing: -.02em; }
.dai-chay-ray span::after { content: ""; width: .28em; height: .28em; border-radius: 50%; background: currentColor; }
.dai-chay-ray span:nth-child(even) { color: var(--c-text-invert); font-weight: 500; }
.dai-chay.dung .dai-chay-ray { animation-play-state: paused; }
.nut-dung-chay { position: absolute; right: 14px; top: 50%; translate: 0 -50%; background: rgb(29 21 25 / .88); border-color: rgb(255 255 255 / .28); color: var(--c-text-invert); }
@keyframes chay { to { transform: translateX(-50%); } }


/* ---------- 21. Chân trang kính đen ---------- */
.chan { position: relative; z-index: 3; background: var(--p-ink-950); color: var(--c-text-invert-2); border-radius: var(--r-xl) var(--r-xl) 0 0; overflow: hidden; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.chan :focus-visible { outline-color: var(--p-pink-400); }
.dai-chay-chan { background: transparent; border-bottom: 1px solid rgb(255 255 255 / .1); }
.dai-chay-chan .dai-chay-ray span, .dai-chay-chan .dai-chay-ray span:nth-child(even) { color: var(--p-pink-400); font-weight: 750; }
.chan-luoi { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 3fr)); gap: 32px; padding-block: clamp(48px, 6vw, 80px); }
.chan-logo img { width: min(240px, 100%); height: auto; filter: drop-shadow(0 0 .6px rgb(242 132 181 / .9)); }
.chan-td { margin-bottom: 12px; font: 650 1.02rem var(--f-hien); color: var(--p-pink-400); }
.chan-cot p + p { margin-top: 10px; }
.chan-cot ul { list-style: none; }
.chan a { color: var(--c-text-invert); text-underline-offset: 4px; display: inline-block; padding-block: 10px; }
.chan-cot p a { padding-block: 10px; }
.chan-ghi { padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .1); font-size: .875rem; }

/* ---------- 21b. Khối "Tới studio" ở ĐÁY chân trang (QĐ-65, 27/09/2026) ----------
 * Cô Ari: người ta kéo xuống cuối trang để tìm chỉ đường -> khối này là màn cuối của mọi trang. HTML: khuon_chung.py KHUON_CHAN.
 * Máy tính: bản đồ trái 7 phần, chữ + nút phải 5 phần. Dưới 900px: một cột, nút "Chỉ đường" lên ngay dưới địa chỉ (bấm nhanh nhất),
 * rồi bản đồ, câu đường đi, Gọi + Zalo. Bản đồ Google do ari-chung.js gắn khi khối còn cách màn ~600 px (không tải gì lúc mở trang).
 * .toi-studio-day: trang chủ (đầy đủ) | .toi-studio-gon: trang phụ (gọn). Một màu nhấn hồng; nút viên thuốc như .nut. */
.toi-studio { border-top: 1px solid rgb(255 255 255 / .1); padding-block: clamp(40px, 6vw, 80px) clamp(32px, 4vw, 56px); }
.ts-luoi { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.ts-ban-do {
  grid-column: 1; grid-row: 1; position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-xl); overflow: hidden;
  background: var(--p-ink-900); border: 1px solid rgb(255 255 255 / .12);
}
.ts-ban-do iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chan .ts-ban-do-cho {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 0;
  color: var(--c-text-invert-2); text-decoration: none; font: 600 .95rem var(--f-doc);
}
.ts-ban-do-cho .ic { width: 40px; height: 40px; color: var(--p-pink-400); }
.ts-chu { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.ts-td { display: inline-flex; align-items: center; gap: 10px; font: 650 1.05rem var(--f-hien); color: var(--p-pink-400); }
.ts-td .ic { width: 22px; height: 22px; }
.ts-dc { font: 750 clamp(1.7rem, 2.6vw, 2.5rem)/1.08 var(--f-hien); letter-spacing: -.02em; color: var(--c-text-invert); text-wrap: balance; }
.ts-dc-phu { margin-top: -8px; color: var(--c-text-invert-2); }
.ts-dc-phu:empty { display: none; }
.ts-ghi { display: grid; gap: 8px; max-width: 54ch; }
.ts-ghi p { white-space: pre-line; }
.ts-phu { display: flex; flex-wrap: wrap; gap: 10px; }
/* .chan a (inline-block, chữ sáng) thắng .nut: trả nút về đúng kiểu viên thuốc, chữ nút hồng giữ màu tối (tương phản) */
.toi-studio .nut { display: inline-flex; padding-block: 12px; }
.toi-studio .nut-hong { color: var(--c-text-on-brand); }
.ts-chinh .nut { min-width: 220px; }
.ts-lien a { padding-block: 10px; }
/* bản gọn (trang phụ): hai nửa bằng nhau, bản đồ thấp hơn, địa chỉ nhỏ hơn */
.toi-studio-gon .ts-luoi { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.toi-studio-gon .ts-ban-do { aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
.toi-studio-gon .ts-dc { font-size: clamp(1.4rem, 2vw, 1.85rem); }
.toi-studio-gon .ts-chu { gap: 14px; }
/* Dưới 900px một cột. Thứ tự nhìn: tên, địa chỉ, bản đồ, đường đi, rồi CỤM NÚT sát đáy -> màn cuối trang (chỗ người ta kéo tới) luôn
   thấy nút "Chỉ đường" to, Gọi + Zalo cạnh nhau. Thứ tự đọc (DOM, trình đọc màn hình) giữ: tên, địa chỉ, Chỉ đường, đường đi, Gọi, Zalo. */
@media (max-width: 899px) {
  .ts-luoi { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .ts-chu { display: contents; }
  .ts-td { order: 1; } .ts-dc, .ts-dc-phu { order: 2; } .ts-ban-do { order: 3; aspect-ratio: 4 / 3; } .ts-ghi { order: 4; }
  .ts-dc-phu { margin-top: -10px; }
  .ts-chinh { order: 5; } .ts-phu { order: 6; } .ts-lien { order: 7; }
  .toi-studio-gon .ts-ban-do { aspect-ratio: 16 / 10; }
  .ts-ban-do { max-height: 360px; }                 /* máy tính bảng dọc / điện thoại xoay ngang: bản đồ không cao quá nửa màn */
  .ts-chinh .nut { width: 100%; min-width: 0; }
  .ts-phu .nut { flex: 1 1 auto; padding-inline: 14px; gap: 8px; }
  .toi-studio { padding-block: 40px 28px; }
}


/* ---------- 21e. Dừng mọi chuyển động (nút trên nav + thanh đáy) ---------- */
.nav-lang { margin-right: 6px; }
.nut-lang[aria-pressed="true"] { background: var(--p-ink-900); color: var(--p-pink-400); border-color: var(--p-ink-900); }
.dung-het .dai-chay-ray, .dung-het .dock-vong, .dung-het .dock-vong::after, .dung-het .dock-chu span, .dung-het .go i { animation-play-state: paused !important; }
/* Hoạt ảnh LẶP VÔ HẠN trong trang công cụ (CSS do JS công cụ / am-thanh.js chèn vào). Chỉ liệt kê từng cái, KHÔNG dùng `.dung-het *`:
   nhiều hoạt ảnh "hiện ra" (ccHien, kqvao, ttVao, bgt-vao…) bắt đầu từ opacity 0, dừng chung sẽ kẹt nội dung ở trạng thái vô hình. */
.dung-het .sndfab::after, .dung-het .gn-sao, .dung-het .tt-tho, .dung-het .tt-dau-g, .dung-het .tt-hao, .dung-het .tt-lac,
.dung-het .tt-anh-tho, .dung-het .un-troi, .dung-het .bgt-cho, .dung-het .kfxem-khung::after { animation-play-state: paused !important; }

/* ---------- 21f. Thanh đáy điện thoại: vòng thở + dừng + Zalo ---------- */
.dock { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .dock {
    position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 6px;
    height: 60px; padding: 0 6px 0 8px; border-radius: var(--r-pill); border: 1px solid var(--glass-edge);
    background: var(--glass-thick-bg); -webkit-backdrop-filter: var(--glass-thick-blur); backdrop-filter: var(--glass-thick-blur); box-shadow: var(--sh-glass);
    transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
  }
  .dock.an-dock { transform: translateY(120%); opacity: 0; pointer-events: none; }
  .dock-tho { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-right: 6px; text-decoration: none; }
  .dock-vong { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--p-pink-600); }
  .dock-vong::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--p-pink-300), var(--c-brand)); animation: tho-vong 10s var(--ease-breath) infinite; }
  .dock-chu { position: relative; display: grid; font: 650 .9375rem var(--f-hien); color: var(--c-text-accent-sm); }
  .dock-chu span { grid-area: 1 / 1; animation: tho-chu 10s steps(1) infinite; }
  .dock-chu span + span { animation-name: tho-chu-2; }
  .dock-lang { margin-left: auto; }
  .dock-zalo { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px 0 6px; border-radius: var(--r-pill); background: var(--c-brand); color: var(--c-text-on-brand); font: 650 .9375rem var(--f-doc); text-decoration: none; }
  .dock-zalo img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--p-white); }
}
@keyframes tho-vong { 0% { transform: scale(.55); } 40% { transform: scale(1.45); } 100% { transform: scale(.55); } }
@keyframes tho-chu { 0% { opacity: 1; } 40% { opacity: 0; } }
@keyframes tho-chu-2 { 0% { opacity: 0; } 40% { opacity: 1; } }


/* ---------- 24. Giảm chuyển động / trong suốt / tương phản ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .dai-chay-ray { animation: none !important; }
  .tho-vong span { transition: none !important; }
  .dock-chu span { animation: none !important; opacity: 0; }
  .dock-chu::after { content: "Hít 4, thở 6"; grid-area: 1 / 1; }
  .dock-vong::after { animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  html::before { background: var(--c-bg); }
  .nav-vo, .tam-menu, .dock { background: rgb(255 255 255 / .98); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bia-dong-bia, .the-kinh, .nut-kinh { background: #fff; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-vo, .tam-menu { background: rgb(255 255 255 / .96); }
}
@media (prefers-contrast: more) {
  :root { --c-text-2: #3F3137; --c-text-3: #4E3E46; --c-line: rgb(168 48 94 / .32); --c-text-accent: #8E2456; }
}


/* ---------- 25. Phần dùng chung khi màn nhỏ (tách từ mục 22/23 cũ) ---------- */
.nav-dem { flex: 1 1 auto; }
.nav-trang { margin-left: 0; }
.chan-luoi { grid-template-columns: minmax(0, 3fr) repeat(4, minmax(0, 2.4fr)); }
/* QĐ-65: cột chữ "Tới studio" rời lưới thành khối riêng ở đáy -> lưới còn logo + 3 cột (trang dựng lại lấy lớp chan-luoi-3;
   trang chưa dựng lại vẫn 4 cột theo luật cũ ngay trên) */
@media (min-width: 1140px) { .chan-luoi.chan-luoi-3 { grid-template-columns: minmax(0, 3fr) repeat(3, minmax(0, 2.4fr)); } }
@media (max-width: 1139px) { .chan-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .nav-lang { display: none; }
  .dai-chay-ray span { font-size: 1.9rem; }
  .dai-chay { padding-right: 60px; }
  .chan-luoi { grid-template-columns: 1fr; }
  .chan-logo img { width: 170px; }
  .nhan-slot { font-size: .8125rem; }
}

/* nút Đăng nhập do tai-khoan.js gắn (chỉ hiện khi phần tài khoản đã lên web): đổi màu cho hợp nền kính sáng */
.nav-vo .ari-tk { color: var(--c-text); border-color: var(--c-line-strong); background: rgb(255 255 255 / .7); }
.nav-vo .ari-tk:hover { background: #fff; border-color: var(--c-text-accent); }

/* neo tên cũ (#khonggian, #tailieu, #studio, #beat...) để liên kết cũ vẫn tới đúng chỗ */
.neo { display: block; position: relative; top: -96px; height: 0; overflow: hidden; }

/* ---------- 26. Nút TRÒ CHƠI trong danh mục điện thoại + thanh đáy (cô Ari 26/09, CH-145 A: "vào nhanh và tiện") ----------
 * Đích lấy từ khuon_chung.DUONG_TRO_CHOI. Thanh đáy chật: ở đây vòng thở chỉ còn cái vòng (chữ "Hít vào / Thở ra" ẩn),
 * để đủ chỗ cho [vòng thở] [dừng] [Trò chơi] [Nhắn Zalo] ở màn 375px. */
.tam-menu-choi {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-radius: var(--r-md);
  background: var(--p-ink-900); color: var(--p-pink-50); text-decoration: none; font: 500 .9375rem/1.3 var(--f-doc);
}
.tam-menu-choi .ic { width: 24px; height: 24px; color: var(--p-pink-400); }
.tam-menu-choi b { display: block; font: 700 1.15rem/1.2 var(--f-hien); color: var(--p-pink-400); }
.dock-choi { display: none; }
@media (max-width: 767px) {
  .dock { gap: 5px; padding: 0 5px 0 6px; }
  .dock-tho { gap: 0; padding-right: 0; justify-content: center; min-width: 44px; }
  .dock-chu { display: none; }
  .dock-choi {
    display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 13px 0 11px; border-radius: var(--r-pill);
    background: var(--p-ink-900); color: var(--p-pink-400); font: 650 .875rem var(--f-doc); text-decoration: none; white-space: nowrap;
  }
  .dock-choi .ic { width: 20px; height: 20px; }
  .dock-lang, .dock-tho, .dock-choi { flex: none; }
  .dock-zalo { padding: 0 14px 0 6px; font-size: .875rem; white-space: nowrap; }
}
@media (max-width: 359px) { .dock-zalo span { font-size: 0; } .dock-zalo span::after { content: "Zalo"; font-size: .875rem; } }

/* ---------- 27. Nút nổi "Về đầu trang" + "Liên hệ Ari" (QĐ-67, 27/09/2026) ----------
 * HTML: khuon_chung.KHUON_NOI (nut_noi() / ari_nut_noi()), JS: ari-chung.js mục 5. Gộp thanh "Kênh & liên hệ" (#rail) + nút lên đầu (#upTop)
 * của web cũ thành MỘT cụm ở góc phải dưới: nút "Về đầu trang" đứng trên nút "Liên hệ Ari". Bấm "Liên hệ Ari" bung danh sách kênh lên
 * phía trên (khi mở, nút "Về đầu trang" tạm ẩn để không bị đè). Điện thoại: cụm đứng TRÊN thanh đáy (.dock), bên phải; nút loa
 * (am-thanh.js) + nút "Trang chủ" (.homefab) giữ bên trái. Trang chủ: cả cụm chỉ hiện sau bìa (data-hien="sau-dau", lớp .qua-dau).
 * z-index 46: trên thanh đáy (45), dưới thanh điều hướng (50) và tấm danh mục (60). Nút ≥ 48 px. */
.nut-noi {
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 46;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none;
}
.nut-noi > * { pointer-events: auto; }
.nut-noi.an-noi { visibility: hidden; opacity: 0; }
.uptop {
  position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--c-line-strong); background: rgb(255 250 252 / .96); color: var(--c-text-accent-sm); box-shadow: var(--sh-2);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base), background-color var(--dur-fast);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.uptop .ic { width: 22px; height: 22px; stroke-width: 1.8; }
.nut-noi.qua-dau .uptop { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nut-noi.dang-mo .uptop { opacity: 0; visibility: hidden; }
.uptop:hover { background: #fff; border-color: var(--c-brand); }
.uptop-chu {
  position: absolute; right: calc(100% + 10px); top: 50%; translate: 0 -50%; padding: 7px 12px; border-radius: var(--r-pill); white-space: nowrap;
  background: var(--p-ink-900); color: var(--p-pink-50); font: 600 .875rem/1.2 var(--f-doc); opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.uptop:hover .uptop-chu, .uptop:focus-visible .uptop-chu { opacity: 1; }
.rail { position: relative; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s; }
.nut-noi[data-hien="sau-dau"]:not(.qua-dau) .rail { opacity: 0; visibility: hidden; transform: translateY(10px); transition-delay: 0s, 0s, var(--dur-base); }
.rail-mo {
  display: inline-flex; align-items: center; gap: 9px; min-height: 52px; padding: 0 20px 0 16px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid rgb(255 255 255 / .7); background: var(--c-brand); color: var(--c-text-on-brand); font: 650 .95rem/1.1 var(--f-doc);
  box-shadow: 0 0 0 .5px rgb(168 48 94 / .2), 0 14px 32px -14px rgb(150 52 100 / .55);
  transition: background-color var(--dur-fast), transform var(--dur-press) var(--ease-out); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.rail-mo:hover { background: var(--c-brand-hover); }
.rail-mo:active { transform: scale(.97); }
.rail-mo .ic { width: 22px; height: 22px; }
.rail-mo .ic-dong { display: none; }
.rail-mo[aria-expanded="true"] { background: var(--p-ink-900); color: var(--p-pink-400); border-color: var(--p-ink-900); }
.rail-mo[aria-expanded="true"] .ic-mo { display: none; }
.rail-mo[aria-expanded="true"] .ic-dong { display: block; }
.rail-ds {
  position: absolute; right: 0; bottom: calc(100% + 10px); display: grid; gap: 8px; width: max-content; min-width: 100%; margin: 0; padding: 0; list-style: none;
  max-height: calc(100svh - 190px); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translateY(10px); transform-origin: 100% 100%;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-flow), visibility 0s linear var(--dur-base);
}
.rail.mo .rail-ds { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.rail-muc {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 5px 18px 5px 6px; border-radius: var(--r-pill); text-decoration: none;
  border: 1px solid var(--c-line); background: rgb(255 250 252 / .98); color: var(--c-text); box-shadow: var(--sh-2);
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}
.rail-muc:hover { background: #fff; border-color: var(--c-line-strong); }
.rail-ic { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--p-ink-900); color: var(--p-pink-400); transition: background-color var(--dur-fast), color var(--dur-fast); }
.rail-muc:hover .rail-ic, .rail-muc:focus-visible .rail-ic { background: var(--c-brand); color: var(--c-text-on-brand); }
.rail-chu { display: grid; gap: 1px; }
.rail-chu b { font: 650 .95rem/1.2 var(--f-doc); }
.rail-chu small { font: 500 .8125rem/1.3 var(--f-doc); color: var(--c-text-2); }
.rail-chu small:empty { display: none; }
/* nút loa (am-thanh.js) trên trang có cụm này: cụm chiếm góc PHẢI, nên trang có nút "Trang chủ" (am-thanh.js gắn .phai) thì nút loa
   đứng bên trái, TRÊN nút "Trang chủ" (máy tính: nút Trang chủ cao 52 px ở đáy 16 px). Chú thích nút loa quay sang phải cho khỏi tràn mép. */
.nut-noi ~ .sndfab.phai { left: 16px; right: auto; bottom: calc(80px + env(safe-area-inset-bottom)); }
.nut-noi ~ .sndfab.phai .tip { left: 56px; right: auto; transform: translateX(-8px); }
.nut-noi ~ .sndfab.phai:hover .tip { transform: none; }
@media (max-width: 767px) {
  /* đứng trên thanh đáy (đáy 8 px, cao 60 px) như nút loa / nút Trang chủ ở trang phụ */
  .nut-noi { right: max(12px, env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); gap: 8px; }
  .rail-mo { min-height: 48px; padding: 0 16px 0 13px; font-size: .9rem; }
  .uptop-chu { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rail-ds { max-height: calc(100svh - 80px - 48px - 90px - env(safe-area-inset-bottom)); }
  .rail-muc { min-height: 48px; padding-block: 4px; }
  .nut-noi ~ .sndfab { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .nut-noi ~ .sndfab.phai { bottom: calc(142px + env(safe-area-inset-bottom)); }
}
@media (max-width: 359px) { .rail-mo span { font-size: 0; } .rail-mo span::after { content: "Liên hệ"; font-size: .9rem; } }
@media (prefers-reduced-motion: reduce) { .uptop, .rail, .rail-ds { transform: none !important; } }
@media print { .nut-noi { display: none; } }
/* QĐ-78 (27/09): cuộn hết trang thì dòng cuối chân trang ("Một số hình minh họa…") nằm ngay dưới cụm nút nổi + nút loa góc trái → chừa
   đáy chân trang cho các nút đó (máy tính: nút loa / "Liên hệ Ari" cao tới ~70 px; điện thoại: trên thanh đáy, "Về đầu trang" cao tới ~184 px). */
body:has(> .nut-noi) > .chan { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (max-width: 767px) { body:has(> .nut-noi) > .chan { padding-bottom: calc(120px + env(safe-area-inset-bottom)); } }
@media print { body:has(> .nut-noi) > .chan { padding-bottom: 28px; } }

/* ---------- 28. Nút "Nghe Ari" (giọng Ari) trên trang khuôn hồng (QĐ-78, 27/09/2026) ----------
 * HTML: khuon_chung.giong_trang() (hộp .giong.giong-hong có sẵn nút, lời trong #giong-trang), JS: ari-yoga/giong-ari.js (dùng chung với
 * khu Công cụ, mở trang không tải tệp giọng nào). Trang chủ, Hồ sơ, Ứng dụng, Flow Video KHÔNG nạp giong-ari.css (màu nền tối khu Công cụ,
 * thêm một tệp CSS chặn vẽ): các luật cần của tệp đó chép vào đây theo màu hồng sáng; chân trang kính đen có bản tối riêng.
 * Nút cao ≥ 44 px, chữ ≥ 13 px. Khung "Lời Ari" (giong-ari.js dựng lúc bấm) nằm ngay dưới nút. Giảm chuyển động: không hiệu ứng. */
.giong-hong { margin: 14px 0 0; }
.giong-hong[hidden], .giong-hong[data-lech-loi] { display: none !important; }   /* data-lech-loi: lời không còn khớp chữ trên trang (ari-chung.js mục 6) */
.giong-hong .giong-nut {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin: 0; padding: 6px 15px 6px 11px; border-radius: var(--r-pill);
  border: 1px solid var(--c-line-strong); background: rgb(255 255 255 / .72); color: var(--c-text); box-shadow: var(--sh-1);
  font: 600 .875rem/1.25 var(--f-doc); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.giong-hong .giong-nut:hover { background: #fff; border-color: var(--c-brand); }
.giong-hong .giong-nut:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; }
.giong-hong .giong-nut.dang-bat { background: var(--p-pink-100); border-color: var(--c-text-accent); color: var(--c-text-accent-sm); }
.giong-hong .giong-ic { flex: none; width: 18px; height: 18px; fill: var(--c-text-accent); }
.giong-hong .giong-gio { font-variant-numeric: tabular-nums; font-size: .8125rem; font-weight: 500; color: var(--c-text-2); }
/* nhãn "Nghe Ari" ↔ "Dừng nghe": giữ sẵn bề ngang nhãn dài hơn, bấm không làm nút phình ra (như giong-ari.css) */
.giong-hong .giong-chu { display: inline-grid; }
.giong-hong .giong-chu::after { content: attr(data-dung); grid-area: 1 / 1; visibility: hidden; height: 0; overflow: hidden; }
.giong-hong .giong-sr { position: absolute !important; 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; }
.giong-hong .giong-khung {
  margin-top: 10px; padding: 14px 16px 6px; max-width: 62ch; border-radius: var(--r-sm); text-align: left;
  background: #fff; border: 1px solid var(--c-line); box-shadow: var(--sh-2); color: var(--c-text-2); font: 400 .9375rem/1.6 var(--f-doc);
}
.giong-hong .giong-khung[hidden] { display: none; }
.giong-hong .giong-dong { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.giong-hong .giong-thanh { flex: 1; height: 3px; border-radius: 3px; background: var(--p-pink-100); overflow: hidden; }
.giong-hong .giong-thanh i { display: block; height: 100%; width: 0; background: var(--c-text-accent); transition: width .25s linear; }
.giong-hong .giong-khung-gio { font-variant-numeric: tabular-nums; font-size: .8125rem; white-space: nowrap; }
.giong-hong .giong-doan { margin: 0 0 4px; font-size: .8125rem; color: var(--c-text-accent); }
.giong-hong .giong-loi, .giong-hong .giong-bao { margin: 0; color: var(--c-text); }
.giong-hong .giong-bao { margin-top: 8px; }
.giong-hong .giong-chan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; margin-top: 4px; }
.giong-hong .giong-ghi { font-size: .8125rem; }
.giong-hong .giong-an, .giong-hong .giong-batloa {
  min-height: 44px; margin: 0; padding: 0 4px; background: none; border: 0; cursor: pointer; font: 600 .875rem var(--f-doc);
  color: var(--c-text-accent); text-decoration: underline; text-underline-offset: 3px;
}
.giong-hong .giong-batloa { display: inline-flex; align-items: center; margin-top: 6px; padding: 0 16px; border: 1px solid var(--c-text-accent); border-radius: var(--r-pill); text-decoration: none; }
.giong-hong .giong-an:focus-visible, .giong-hong .giong-batloa:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
/* chân trang kính đen (khối "Tới studio", giọng 005): nút tối viền sáng; khung lời vẫn nền trắng cho dễ đọc */
.chan .giong-hong .giong-nut { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .24); color: var(--c-text-invert); box-shadow: none; }
.chan .giong-hong .giong-nut:hover { background: rgb(255 255 255 / .12); border-color: var(--p-pink-400); }
.chan .giong-hong .giong-nut.dang-bat { background: rgb(242 132 181 / .18); border-color: var(--p-pink-400); color: var(--c-text-invert); }
.chan .giong-hong .giong-ic { fill: var(--p-pink-400); }
.chan .giong-hong .giong-gio { color: var(--c-text-invert-2); }
.chan .giong-hong .giong-nut:focus-visible { outline-color: var(--p-pink-400); }
.toi-studio .giong-hong { margin: 0; }
@media (max-width: 899px) { .toi-studio .giong-cd { order: 4; } }   /* .ts-chu thành display: contents: đứng ngay sau câu đường đi */
@media (max-width: 399.98px) { .giong-hong .giong-gio { display: none; } }
@media (prefers-reduced-motion: reduce) { .giong-hong .giong-nut, .giong-hong .giong-thanh i { transition: none; } }
