/* =========================================================================
   S-RIDE THEME "Hành trình Cao nguyên" – Immersive 3D Gamified Learning
   Lớp nhận diện thương hiệu nạp SAU pages.css: đổi giao diện toàn web mà không
   đụng tới chức năng. Xem docs/DESIGN_SYSTEM.md.
   Mục lục: 1 Nền · 2 Khối cơ bản · 3 Thanh trên · 4 Dock đáy · 5 Biểu ngữ phân hệ
            6 Phân hệ · 7 Trang chủ · 8 Chuyển động · 9 Tiết kiệm/giảm chuyển động
   ========================================================================= */

/* ---------- 1. NỀN: kem nắng + cảnh cao nguyên mờ ---------- */
body { background-color: var(--nen); color: var(--ink); }
.nen-hoa-tiet { background: linear-gradient(180deg, #DDF0FC 0%, var(--nen) 38%, var(--nen) 100%); }
.nen-hoa-tiet svg { opacity: .5; height: 46vh; }
::selection { background: var(--helmet); color: var(--ink); }
h1, h2, h3, h4 { color: var(--sky-800); letter-spacing: -.01em; }
a { color: var(--sky-700); }
a:hover { color: var(--bazan-dark); }
:focus-visible { outline-color: var(--bazan); box-shadow: 0 0 0 6px rgba(27, 30, 63, .5); }

/* Dải thổ cẩm Ê Đê – đường phân cách thương hiệu */
.dai-tho-cam, .chan-trang::before {
  display: block; height: 12px; border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, var(--sky-700) 0 18px, var(--ink) 18px 22px, var(--sky-300) 22px 30px, var(--tho-cam) 30px 32px, var(--sky-700) 32px 50px, #fff 50px 56px);
}
.chan-trang { border-top: 0; position: relative; padding-top: 0; background: linear-gradient(180deg, transparent, rgba(255, 239, 217, .7)); }
.chan-trang::before { content: ''; margin: 0 0 22px; border-radius: 0; height: 10px; opacity: .9; }
.chan-trang a { font-weight: 600; }

/* ---------- 2. KHỐI CƠ BẢN (đồ chơi khối 3D, viền mực, bóng đặc) ---------- */
.the {
  border: var(--bd) solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: var(--r-card);
}
a.the:hover, .the.bam-duoc:hover { transform: translateY(-4px) rotate(-.3deg); }
.the-phu { background: var(--sky-50); border: 2px solid var(--sky-200); box-shadow: none; }
.the-phu a.the, .the .the { box-shadow: 0 4px 0 var(--line); }

.nut {
  --vien: var(--line); --day: var(--line);
  border-color: var(--vien);
  box-shadow: 0 6px 0 var(--day), 0 12px 20px rgba(27, 30, 63, .18);
  letter-spacing: .005em;
}
.nut:active, .nut.dang-nhan { box-shadow: 0 2px 0 var(--day), 0 4px 8px rgba(27, 30, 63, .18); }
.nut-xanh-la { --nen: var(--bazan); --chu: #fff; }               /* hành động chính = xanh trời đậm */
.nut-vang    { --nen: var(--helmet); --chu: var(--ink); }
.nut-cam     { --nen: #FFD9A8; --chu: var(--ink); }
.nut-do      { --nen: var(--bad-btn); --chu: #fff; }
.nut-trang   { --nen: #fff; --chu: var(--ink); }
.nut-trang:hover { --nen: var(--nen-2); }

.nut-loc { border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); color: var(--ink); }
.nut-loc:hover { background: var(--nen-2); }
.nut-loc[aria-pressed="true"] { background: var(--mau-ph); border-color: var(--line); box-shadow: 0 4px 0 var(--line); color: #fff; }

.nhan { border-width: 2px; border-color: var(--line); background: #fff; color: var(--ink); }
.nhan-vang { background: var(--helmet); border-color: var(--line); color: var(--ink); }
.nhan-cam { background: #FFEBD2; border-color: var(--line); color: var(--ink); }
.nhan-xanh-la { background: var(--ok-50); border-color: var(--ok-dark); color: #14532D; }
.nhan-do { background: var(--bad-50); border-color: var(--bad-dark); color: #7F1D1D; }
.nhan-xanh { background: var(--sky-100); border-color: var(--sky-800); color: var(--sky-800); }

.vien-tron { border-color: var(--line); box-shadow: 0 5px 0 var(--line); }
.vien-tron.xanh { border-color: var(--line); box-shadow: 0 5px 0 var(--line); color: var(--sky-800); }

.o-nhap { border: 2px solid var(--line); box-shadow: inset 0 3px 0 rgba(27, 30, 63, .08); }
.o-nhap:focus-visible { border-color: var(--sky-700); }

/* Thanh tiến độ kiểu game: sọc chạy, viền mực */
.thanh-tien-do { border: 2px solid var(--line); background: #fff; }
.thanh-tien-do > span {
  background: repeating-linear-gradient(-45deg, var(--sky-500) 0 12px, var(--sky-300) 12px 24px);
  background-size: 34px 34px;
}
@media (prefers-reduced-motion: no-preference) { html:not(.tiet-kiem) .thanh-tien-do > span { animation: soc-chay 1.2s linear infinite; } }
@keyframes soc-chay { to { background-position: 34px 0; } }

.canh-bao { border: var(--bd) solid var(--line); box-shadow: 0 5px 0 var(--line); background: var(--helmet-50); color: var(--ink); }
.ghi-chu { background: #fff; border: 2px dashed var(--sky-300); }
.bang-cuon { border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); }
.bang th { background: var(--sky-800); }
dialog.hop-thoai { border: var(--bd) solid var(--line); box-shadow: 0 10px 0 var(--line), 0 30px 60px rgba(27, 30, 63, .35); }
dialog.hop-thoai::backdrop { background: rgba(11, 34, 57, .72); }
.anh-giu-cho { background-color: var(--sky-50); border-color: var(--sky-300); color: var(--sky-800); }

/* HUD – ô chỉ số kiểu trò chơi */
.hud { display: flex; flex-wrap: wrap; gap: 8px; }
.hud-o {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border: 2px solid var(--line); border-radius: var(--r-pill); background: #fff; box-shadow: 0 3px 0 var(--line);
  font-weight: 800; color: var(--ink); text-decoration: none; line-height: 1.2;
}
.hud-o .hud-bt { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--helmet); border: 2px solid var(--line); font-size: 1rem; }
.hud-o small { display: block; font-size: .68rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- 3. THANH TRÊN: đảo nổi viên thuốc ---------- */
.thanh-tren { background: transparent; border-bottom: 0; box-shadow: none; backdrop-filter: none; padding-top: 10px; pointer-events: none; }
.thanh-tren .khung {
  pointer-events: auto;
  min-height: 64px; max-width: calc(var(--container) + 40px);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border: var(--bd) solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line), 0 14px 30px rgba(27, 30, 63, .12);
  padding: 0 10px 0 12px;
}
@media (min-width: 768px) { .thanh-tren .khung { width: calc(100% - 32px); } }
.logo .logo-hinh, .logo img.logo-hinh { height: 56px; }
.menu-chinh a { border: 2px solid transparent; color: var(--ink); min-height: 44px; }
.menu-chinh a:hover { background: var(--nen-2); color: var(--ink); }
.menu-chinh a[aria-current="page"] { background: var(--mau-ph); color: #fff; border-color: var(--line); box-shadow: 0 3px 0 var(--line); }
.o-sao { border: 2px solid var(--line) !important; box-shadow: 0 3px 0 var(--line) !important; background: var(--helmet) !important; color: var(--ink) !important; }
/* Màn hình vừa: nút Trình chiếu chỉ còn biểu tượng (vẫn đọc được bằng trình đọc màn hình) */
@media (max-width: 1439.98px) {
  .nut-trinh-chieu { padding: 6px 10px; }
  .nut-trinh-chieu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .o-sao-chu { display: none; }
}
@media (max-width: 767.98px) { .thanh-tren { padding: 8px 8px 0; } .thanh-tren .khung { min-height: 58px; } .logo .logo-hinh, .logo img.logo-hinh { height: 48px; } }
main#app { padding-top: 22px; }

/* ---------- 4. DOCK ĐÁY (điện thoại, máy tính bảng) ---------- */
.menu-duoi {
  left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom));
  border: var(--bd) solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line), 0 -6px 24px rgba(27, 30, 63, .12);
  padding: 4px;
}
.menu-duoi a { color: var(--ink-2); min-height: 58px; white-space: nowrap; text-align: center; justify-content: center; align-items: center; letter-spacing: -.01em; padding-inline: 2px; min-width: 0; transition: transform .18s var(--ease-bounce), background .18s; }
/* Mọi mục cùng khung (viền trong suốt 2px) để mục đang chọn không bị lệch; mục đang chọn nằm giữa ô của nó, không nhô lên */
.menu-duoi { align-items: center; }
.menu-duoi a { border: 2px solid transparent; margin: 0 2px; }
.menu-duoi a[aria-current="page"] { background: var(--mau-ph); color: #fff; border-color: var(--line); box-shadow: 0 3px 0 var(--line); }
.menu-duoi a[aria-current="page"] img { background: #fff; border-radius: 10px; }
.menu-duoi a img, .menu-duoi a .anh-giu-cho { object-fit: contain; }
/* Linh vật không có khung như các biểu tượng khác: đặt vào ô vuông cùng cỡ cho đồng bộ */
.menu-duoi a[data-route="gioi-thieu"] img { background: var(--sky-100); border: 2px solid var(--sky-700); border-radius: 8px; padding: 1px; }
@media (max-width: 1023.98px) { :root { --bottom-nav-h: 88px; } }

/* ---------- 5. BIỂU NGỮ PHÂN HỆ (.tieu-de-trang) ---------- */
.tieu-de-trang {
  position: relative; isolation: isolate;
  margin: 6px 0 26px; padding: 22px 22px 30px;
  background: #fff; border: var(--bd) solid var(--line); border-radius: var(--r-bento);
  box-shadow: 0 6px 0 var(--line), var(--shadow-soft);
  overflow: hidden;
}
.tieu-de-trang::after { /* dải thổ cẩm ở chân biểu ngữ */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(90deg, var(--sky-700) 0 18px, var(--ink) 18px 22px, var(--sky-300) 22px 30px, var(--tho-cam) 30px 32px, var(--sky-700) 32px 50px, #fff 50px 56px);
}
.tieu-de-trang h1 { color: var(--mau-ph-dam); margin-bottom: 8px; }
.tieu-de-trang p { color: var(--ink-2); font-weight: 600; }
.tieu-de-trang > :last-child { margin-bottom: 0; }
/* Biểu tượng phân hệ ở góc phải (chỉ khi biểu ngữ không có ảnh riêng) */
@media (min-width: 700px) {
  .tieu-de-trang:not(:has(img, .anh-giu-cho)) { padding-right: 190px; min-height: 150px; }
  .tieu-de-trang:not(:has(img, .anh-giu-cho))::before {
    content: ''; position: absolute; right: 22px; top: 50%; width: 140px; height: 140px; translate: 0 -50%;
    background: var(--bieu-tuong-ph, url('../assets/web/icon/ui_logo_icon.webp')) center / contain no-repeat;
    filter: drop-shadow(0 6px 0 rgba(27, 30, 63, .18));
    z-index: -1;
  }
}

/* ---------- 6. PHÂN HỆ: màu + không gian riêng, cùng một nhận diện ---------- */
/* Mô phỏng – bảng nhiệm vụ */
body[data-phan-he="mo-phong"] { --mau-ph: #0369A1; --mau-ph-dam: #0C4A6E; --mau-ph-nhat: #E0F2FE; --bieu-tuong-ph: url('../assets/web/icon/ui_menu_mophong.webp'); }
body[data-phan-he="mo-phong"] .tieu-de-trang { background: #fff radial-gradient(circle at 1px 1px, rgba(43, 59, 192, .16) 1.5px, transparent 0) 0 0 / 18px 18px; }
body[data-phan-he="mo-phong"] .tieu-de-trang h1::before { content: 'NHIỆM VỤ'; display: block; width: max-content; margin-bottom: 8px; padding: 2px 12px; font-size: .78rem; letter-spacing: .12em; color: #fff; background: var(--mau-ph); border: 2px solid var(--line); border-radius: var(--r-pill); }

/* Trò chơi – khu trò chơi đêm (arcade) */
body[data-phan-he="tro-choi"] { --mau-ph: #0369A1; --mau-ph-dam: var(--helmet); --mau-ph-nhat: #163A5C; --bieu-tuong-ph: url('../assets/web/icon/ui_menu_trochoi.webp'); }
body[data-phan-he="tro-choi"] .tieu-de-trang {
  background: var(--dem) radial-gradient(circle at 20% 30%, rgba(255, 200, 30, .18) 0 2px, transparent 3px) 0 0 / 46px 46px;
  border-color: var(--line); color: #fff;
}
body[data-phan-he="tro-choi"] .tieu-de-trang h1 { color: var(--helmet); text-shadow: 0 3px 0 #000, 0 0 18px rgba(255, 200, 30, .45); }
body[data-phan-he="tro-choi"] .tieu-de-trang p { color: #DCEEFB; }
body[data-phan-he="tro-choi"] .tieu-de-trang a { color: var(--helmet); }

/* Truyện tranh – kệ truyện, chấm tram */
body[data-phan-he="truyen-tranh"] { --mau-ph: #3D6FD1; --mau-ph-dam: #24509E; --mau-ph-nhat: #E6EEFF; --bieu-tuong-ph: url('../assets/web/icon/linhvat_khen.webp'); }
body[data-phan-he="truyen-tranh"] .tieu-de-trang { background: #F0F6FF radial-gradient(circle, rgba(79, 124, 217, .22) 1.6px, transparent 2px) 0 0 / 12px 12px; }
body[data-phan-he="truyen-tranh"] .tieu-de-trang h1 { display: inline-block; padding: 4px 16px; background: #fff; border: var(--bd) solid var(--line); border-radius: 18px; box-shadow: 4px 4px 0 var(--line); text-transform: uppercase; letter-spacing: .01em; }

/* Kiến thức – sổ tay giấy kẻ */
body[data-phan-he="kien-thuc"] { --mau-ph: #4F5BC9; --mau-ph-dam: #333D9A; --mau-ph-nhat: #ECEEFF; --bieu-tuong-ph: url('../assets/web/icon/ui_menu_luat.webp'); }
body[data-phan-he="kien-thuc"] .tieu-de-trang {
  background: #fff repeating-linear-gradient(180deg, transparent 0 31px, rgba(109, 63, 214, .16) 31px 33px);
  padding-left: 46px;
}
body[data-phan-he="kien-thuc"] .tieu-de-trang > :first-child::before { content: ''; position: absolute; left: 28px; top: 0; bottom: 0; width: 3px; background: rgba(79, 91, 201, .35); }

/* Chuyên hiệu – sổ huy hiệu bìa da */
body[data-phan-he="chuyen-hieu"] { --mau-ph: #1D5E86; --mau-ph-dam: #FFE08A; --mau-ph-nhat: #E6F2FA; --bieu-tuong-ph: url('../assets/web/icon/linhvat_cup.webp'); }
body[data-phan-he="chuyen-hieu"] .tieu-de-trang { background: #123A5C repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 6px, transparent 6px 12px); outline: 2px dashed rgba(255, 214, 102, .7); outline-offset: -10px; }
body[data-phan-he="chuyen-hieu"] .tieu-de-trang h1 { color: #FFE08A; text-shadow: 0 2px 0 #061C30; }
body[data-phan-he="chuyen-hieu"] .tieu-de-trang p { color: #E3F1FB; }
body[data-phan-he="chuyen-hieu"] .tieu-de-trang a { color: #FFE08A; }

/* Hồ sơ xe, kỹ năng – giấy bản vẽ kỹ thuật */
body[data-phan-he="ho-so"] { --mau-ph: #0B6BCB; --mau-ph-dam: #fff; --mau-ph-nhat: #E3F0FF; --bieu-tuong-ph: url('../assets/web/icon/linhvat_bang_thiet_ke.webp'); }
body[data-phan-he="ho-so"] .tieu-de-trang {
  background: #0B5CB0 linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px) 0 0 / 24px 24px, #0B5CB0 linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px) 0 0 / 24px 24px;
}
body[data-phan-he="ho-so"] .tieu-de-trang h1 { color: #fff; }
body[data-phan-he="ho-so"] .tieu-de-trang p { color: #DDEBFF; }
body[data-phan-he="ho-so"] .tieu-de-trang a { color: var(--helmet); }

/* Giới thiệu – kể chuyện, đất đỏ */
body[data-phan-he="gioi-thieu"] { --mau-ph: #0284C7; --mau-ph-dam: #075985; --mau-ph-nhat: var(--bazan-50); --bieu-tuong-ph: url('../assets/web/icon/linhvat_chao.webp'); }
body[data-phan-he="gioi-thieu"] .tieu-de-trang { background: linear-gradient(180deg, #fff 0 60%, var(--bazan-50) 60%); }

/* Công cụ giáo viên, phụ huynh, khảo sát… – bảng điều khiển gọn */
body[data-phan-he="cong-cu"] { --mau-ph: #0369A1; --mau-ph-dam: #0C4A6E; --bieu-tuong-ph: url('../assets/web/icon/ui_menu_bando.webp'); }
body[data-phan-he="cong-cu"] .tieu-de-trang { border-left-width: 12px; border-left-color: var(--mau-ph); }

/* Trò chơi Đường đến trường dùng biểu ngữ có ảnh: giữ ảnh, không tô nền đêm quá đậm */
body[data-phan-he="tro-choi"] .tieu-de-trang.ddt-dau { padding: 14px 14px 28px; }

/* ---------- 7. TRANG CHỦ ---------- */
/* 7a. Cảnh mở đầu điện ảnh – parallax nhiều lớp */
:root { --cao-dau: 74px; }
@media (max-width: 767.98px) { :root { --cao-dau: 66px; } }
body[data-phan-he="trang-chu"] main#app { padding-top: 0; }
.hero-cn { position: relative; margin-top: calc(-1 * var(--cao-dau)); overflow: hidden; isolation: isolate; }
.hero-cn-canh { position: relative; height: clamp(600px, 86vh, 780px); overflow: hidden; }
.hero-cn-lop { position: absolute; inset: 0; will-change: transform; }
.hero-cn-lop.anh img, .hero-cn-lop.anh .anh-giu-cho { position: absolute; inset: -6% 0 0; width: 100%; height: 106%; object-fit: cover; object-position: 66% 60%; }
.hero-cn-lop.toi { background: linear-gradient(90deg, rgba(12, 74, 110, .5) 0%, rgba(12, 74, 110, .2) 42%, transparent 68%); pointer-events: none; }
.hero-cn-lop.may { pointer-events: none; }
.hero-cn-lop.may svg { position: absolute; width: 190px; fill: #fff; opacity: .85; filter: drop-shadow(0 6px 0 rgba(27, 30, 63, .12)); }
.hero-cn-dai {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74px; z-index: 2;
  background: #4D6475; border-top: var(--bd) solid var(--line);
  box-shadow: inset 0 10px 0 rgba(0, 0, 0, .08);
}
.hero-cn-dai::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 4px dashed rgba(255, 255, 255, .8); }
/* Hai làn, đi bên phải: xe chạy sang phải ở làn dưới, xe chạy sang trái ở làn trên (ảnh sa bàn đầu xe hướng lên) */
.hero-cn-xe { position: absolute; top: 72%; height: 40px; width: auto; translate: 0 -50%; rotate: 90deg; transform-origin: center; }
.hero-cn-xe.nguoc { top: 30%; rotate: -90deg; }
.hero-cn-xe.lon { height: 58px; }
.hero-cn-noi { position: absolute; inset: calc(var(--cao-dau) + 10px) 0 74px; z-index: 3; display: flex; align-items: center; }
.hero-cn-the {
  max-width: 560px; padding: 22px 22px 18px;
  background: rgba(255, 255, 255, .95); border: var(--bd) solid var(--line); border-radius: var(--r-bento);
  box-shadow: 0 8px 0 var(--line), 0 30px 50px rgba(12, 74, 110, .25);
}
.hero-cn-the .logo-hero img { max-width: 300px; width: 100%; height: auto; }
.hero-cn-the .hero-en { color: var(--bazan-dark); font-weight: 800; letter-spacing: .02em; margin: 4px 0; font-size: .9rem; }
.hero-cn-the .hero-vi { font-size: 1.08rem; font-weight: 700; color: var(--ink); }
.hero-cn-the .hero-nut { gap: 12px; }
.hero-cn-the .hero-nut .nut { flex: 1 1 220px; }
.hero-cn-the .hud { margin-top: 10px; }
.hero-cn-linh-vat { position: absolute; right: 4%; bottom: 60px; z-index: 3; width: clamp(110px, 14vw, 190px); height: auto; filter: drop-shadow(0 10px 0 rgba(27, 30, 63, .2)); }
@media (max-width: 760px) {
  .hero-cn-canh { height: auto; overflow: visible; }
  .hero-cn-lop.anh { position: relative; height: calc(56vw + var(--cao-dau)); min-height: 280px; overflow: hidden; }
  .hero-cn-lop.toi, .hero-cn-lop.may { display: none; }
  .hero-cn-dai { position: relative; height: 54px; }
  .hero-cn-noi { position: relative; inset: auto; margin-top: -28px; }
  .hero-cn-the { padding: 16px; }
  .hero-cn-linh-vat { width: 92px; right: 10px; bottom: auto; top: calc(56vw + var(--cao-dau) - 128px); }
}

/* 7b. Bản đồ hành trình (adventure map) */
.ht { position: relative; }
.ht-dau { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ht-dau h2 { margin: 0; }
.ban-do-hanh-trinh {
  position: relative; padding: 20px 14px 24px;
  background: #DDF1FC radial-gradient(circle at 12px 12px, rgba(3, 105, 161, .13) 5px, transparent 6px) 0 0 / 46px 40px; /* nền trời nhạt */
  border: var(--bd) solid var(--line); border-radius: var(--r-bento); box-shadow: 0 6px 0 var(--line), var(--shadow-soft);
  overflow: hidden;
}
.ht-duong { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ht-ngang { display: none; }
@media (min-width: 900px) { .ht-ngang { display: block; } .ht-doc { display: none; } }
.ht-ds { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tram-ht { position: relative; }
.tram-ht a {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 22px; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .96); border: var(--bd) solid var(--line); box-shadow: 0 5px 0 var(--line);
  transition: transform .2s var(--ease-bounce), box-shadow .2s;
}
.tram-ht a:hover { transform: translateY(-4px); box-shadow: 0 9px 0 var(--line); color: var(--ink); }
.tram-ht a:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--line); }
.tram-be { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #fff; border: var(--bd) solid var(--line); box-shadow: inset 0 -8px 0 rgba(27, 30, 63, .12); }
.tram-be img, .tram-be .anh-giu-cho { width: 54px; height: 54px; object-fit: contain; border-radius: 12px; font-size: 0; padding: 0; }
.tram-vong { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); rotate: -90deg; }
.tram-vong circle { fill: none; stroke-width: 6; }
.tram-vong .nen-vong { stroke: rgba(27, 30, 63, .12); }
.tram-vong .muc-vong { stroke: var(--bazan); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease-out); }
.tram-so { position: absolute; left: -6px; top: -6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--helmet); border: 2px solid var(--line); font-weight: 900; font-size: .85rem; }
.tram-ht.xong .tram-so { background: var(--ok); color: #fff; }
.tram-chu strong { display: block; font-size: 1.05rem; line-height: 1.3; }
.tram-chu span { display: block; color: var(--ink-2); font-size: .88rem; line-height: 1.35; }
.tram-chu .tram-tt { margin-top: 4px; font-weight: 800; color: var(--bazan-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.tram-ht.o-day a { border-color: var(--line); background: #FFF6CC; box-shadow: 0 5px 0 var(--line), 0 0 0 5px rgba(125, 211, 252, .6); }
.tram-o-day { /* nhãn ghim ở mép trên thẻ, giữa, không che số trạm và biểu tượng */
  position: absolute; left: 50%; top: 0; translate: -50% -55%; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px; width: max-content; max-width: calc(100% + 16px);
  padding: 3px 10px; font-size: .7rem; line-height: 1.3; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  background: var(--sky-700); color: #fff; border: 2px solid var(--line); border-radius: 999px; box-shadow: 0 3px 0 var(--line);
}
.tram-ht.o-day a { margin-top: 6px; }
@media (min-width: 900px) {
  .ban-do-hanh-trinh { padding: 26px 18px 30px; }
  .ht-ds { grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: start; min-height: 330px; }
  .tram-ht:nth-child(even) { margin-top: 120px; }
  .tram-ht a { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 14px 8px 12px; }
  .tram-be { width: 90px; height: 90px; }
  .tram-be img, .tram-be .anh-giu-cho { width: 64px; height: 64px; }
}

/* 7c. Bento grid */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
.o-bento {
  position: relative; min-width: 0; padding: 18px;
  background: #fff; border: var(--bd) solid var(--line); border-radius: var(--r-bento); box-shadow: 0 6px 0 var(--line);
  overflow: hidden;
}
.o-bento > h2, .o-bento > h3 { margin-top: 0; }
.o-bento.cobalt { background: var(--sky-700); color: #fff; }
.o-bento.cobalt h2, .o-bento.cobalt h3, .o-bento.cobalt a:not(.nut) { color: #fff; }
.o-bento.nang { background: var(--helmet); }
.o-bento.dat { background: var(--bazan); }
.o-bento.dem { background: var(--dem); color: #DCEEFB; }
.o-bento.dem h2, .o-bento.dem h3 { color: var(--helmet); }
.o-bento.kem { background: var(--nen-2); }
a.o-bento { display: block; color: inherit; text-decoration: none; transition: transform .2s var(--ease-bounce), box-shadow .2s; }
a.o-bento:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 10px 0 var(--line); color: inherit; }
a.o-bento:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--line); }
.o-bento .so-to { display: block; font-size: clamp(2.4rem, 2rem + 2vw, 3.6rem); font-weight: 900; line-height: 1; color: inherit; letter-spacing: -.03em; }
.o-bento .nhan-hud { display: inline-block; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 2px 10px; border: 2px solid var(--line); border-radius: var(--r-pill); background: #fff; color: var(--ink); margin-bottom: 8px; }
.o-bento .goc-anh { position: absolute; right: -8px; bottom: -8px; width: 42%; max-width: 180px; height: auto; pointer-events: none; }
.bento-nv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bento-nv a { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 2px solid var(--line); border-radius: 18px; background: var(--sky-50); text-decoration: none; color: var(--ink); font-weight: 800; font-size: .86rem; text-align: center; box-shadow: 0 3px 0 var(--line); transition: transform .18s var(--ease-bounce); }
.bento-nv a:hover { transform: translateY(-3px); color: var(--ink); }
.bento-nv img, .bento-nv .anh-giu-cho { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; font-size: 0; }
.bento-ds { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bento-ds a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: 0 3px 0 var(--line); transition: transform .15s; }
.bento-ds a:hover { transform: translateX(4px); color: var(--ink); }
.bento-ds .bd-bt { font-size: 1.3rem; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } .o-bento.rong { grid-column: span 2; } }
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; }
  .o-bento.rong { grid-column: span 2; }
  .o-bento.cao { grid-row: span 2; }
  .o-bento.rat-rong { grid-column: span 4; }
}

/* 7d. Kể chuyện theo cuộn (cinematic scrollytelling) */
.ke-chuyen { display: grid; gap: 18px; }
.kc-hinh { position: relative; border: var(--bd) solid var(--line); border-radius: var(--r-bento); overflow: hidden; box-shadow: 0 6px 0 var(--line); background: var(--dem); aspect-ratio: 3 / 2; }
.kc-hinh img, .kc-hinh .anh-giu-cho { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .6s ease, transform 1.2s var(--ease-out); }
.kc-hinh img.hien, .kc-hinh .anh-giu-cho.hien { opacity: 1; transform: scale(1); }
.kc-nhan { position: absolute; left: 12px; top: 12px; z-index: 2; }
.kc-cac-buoc { display: grid; gap: 14px; }
.kc-buoc { padding: 18px; border: var(--bd) solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 5px 0 var(--line); opacity: .55; transition: opacity .3s, transform .3s var(--ease-bounce), background .3s; }
.kc-buoc.dang { opacity: 1; background: #FFF6CC; transform: translateX(-4px); }
.kc-buoc h3 { margin: 0 0 6px; }
.kc-buoc .kc-so { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 8px; border-radius: 50%; background: var(--sky-700); color: #fff; border: 2px solid var(--line); font-weight: 900; }
.kc-buoc p { margin: 0; }
@media (min-width: 900px) {
  .ke-chuyen { grid-template-columns: 1.15fr 1fr; align-items: start; gap: 28px; }
  .kc-dinh { position: sticky; top: 96px; }
  .kc-cac-buoc { gap: 34vh; padding: 10vh 0 18vh; }
}

/* 7e. Kệ truyện cuộn ngang */
.ke-truyen .luoi-truyen { grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; }
.ke-truyen .luoi-truyen > * { scroll-snap-align: start; }

/* Khối dưới màn hình đầu: trình duyệt bỏ qua vẽ khi chưa cuộn tới (nhẹ máy) */
.tre-ve { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* ---------- 8. CHUYỂN ĐỘNG CÓ CHỨC NĂNG ---------- */
@media (prefers-reduced-motion: no-preference) {
  html:not(.tiet-kiem) main#app.vao-trang { animation: vao-trang .34s var(--ease-out); }
  html:not(.tiet-kiem) .hien-dan { opacity: 0; translate: 0 22px; transition: opacity .55s var(--ease-out), translate .55s var(--ease-out); transition-delay: var(--tre, 0s); }
  html:not(.tiet-kiem) .hien-dan.da-hien { opacity: 1; translate: 0 0; }
  /* Mọi trạm nhấp nháy to nhỏ, lệch nhịp nhau thành làn sóng dọc bản đồ; trạm "Em đang ở đây" nháy mạnh và nhanh hơn */
  html:not(.tiet-kiem) .tram-ht .tram-be { animation: nhip-nhe 2.4s ease-in-out infinite; }
  html:not(.tiet-kiem) .tram-ht:nth-child(2) .tram-be { animation-delay: .3s; }
  html:not(.tiet-kiem) .tram-ht:nth-child(3) .tram-be { animation-delay: .6s; }
  html:not(.tiet-kiem) .tram-ht:nth-child(4) .tram-be { animation-delay: .9s; }
  html:not(.tiet-kiem) .tram-ht:nth-child(5) .tram-be { animation-delay: 1.2s; }
  html:not(.tiet-kiem) .tram-ht:nth-child(6) .tram-be { animation-delay: 1.5s; }
  html:not(.tiet-kiem) .tram-ht.o-day .tram-be { animation: nhip 1.4s ease-in-out infinite; animation-delay: 0s; }
  html:not(.tiet-kiem) .tram-ht a:hover .tram-be { animation-duration: .9s; }
  html:not(.tiet-kiem) .hero-cn-xe { animation: xe-qua var(--giay, 12s) linear infinite; animation-delay: var(--tre, 0s); }
  html:not(.tiet-kiem) .hero-cn-lop.may svg { animation: may-troi var(--giay, 60s) linear infinite; animation-delay: var(--tre, 0s); }
  html:not(.tiet-kiem) .hero-cn-linh-vat { animation: lo-lung 3.4s ease-in-out infinite; }
}
@keyframes vao-trang { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes xe-qua { from { left: -8%; } to { left: 108%; } }
@keyframes may-troi { from { transform: translateX(-30vw); } to { transform: translateX(110vw); } }
.hero-cn-xe.nguoc { animation-direction: reverse !important; }
.hero-cn-dai .hero-cn-xe { left: -10%; }
body.an-tab *:not(main#app), body.an-tab *::before { animation-play-state: paused !important; } /* không dừng hoạt cảnh vào trang, tránh nội dung kẹt ở trạng thái mờ */

/* ---------- 9. TIẾT KIỆM / GIẢM CHUYỂN ĐỘNG ---------- */
html.tiet-kiem .hero-cn-lop { transform: none !important; }
html.tiet-kiem .hero-cn-xe, html.tiet-kiem .hero-cn-lop.may { display: none; }
html.tiet-kiem .thanh-tren .khung, html.tiet-kiem .menu-duoi { backdrop-filter: none; background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .hero-cn-lop { transform: none !important; }
  .hero-cn-xe, .hero-cn-lop.may { display: none; }
}
html.trinh-chieu .hero-cn-canh { height: clamp(380px, 60vh, 620px); }

/* In: bỏ trang trí */
@media print {
  .thanh-tren .khung, .tieu-de-trang, .the, .o-bento { box-shadow: none !important; }
  .tieu-de-trang::after, .tieu-de-trang::before, .chan-trang::before { display: none !important; }
  body[data-phan-he] .tieu-de-trang { background: #fff !important; color: #000 !important; }
  body[data-phan-he] .tieu-de-trang h1, body[data-phan-he] .tieu-de-trang p { color: #000 !important; text-shadow: none !important; }
}

/* Nhãn không được đẩy tràn thẻ hẹp (vd. thẻ cử chỉ trò chơi) */
.nhan { max-width: 100%; }
.the-cu-chi .nhan { white-space: normal; }
@media (max-width: 760px) { .hero-cn-xe { height: 30px; } .hero-cn-xe.lon { height: 42px; } }

/* =========================================================
   10. TRỢ LÝ MŨ VÀNG (js/chatbot.js) – hỏi đáp an toàn giao thông
   ========================================================= */
.cb-mo {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 6px;
  font: 800 .95rem var(--font); color: var(--ink); background: #fff;
  border: var(--bd) solid var(--line); border-radius: 999px; box-shadow: 0 5px 0 var(--line), 0 12px 28px rgba(12, 74, 110, .22);
  cursor: pointer; transition: transform .18s var(--ease-out);
}
.cb-mo:hover { transform: translateY(-3px); }
.cb-mo:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--line); }
.cb-mo-anh { width: 48px; height: 48px; border-radius: 50%; background: var(--sky-100); object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.tiet-kiem) .cb-mo-anh { animation: lo-lung 3.4s ease-in-out infinite; }
}
@media (max-width: 1023.98px) {
  .cb-mo { right: 12px; bottom: calc(var(--bottom-nav-h, 88px) + 12px); padding: 4px; }
  .cb-mo-chu { display: none; }
  body.cb-dang-mo .cb-mo { display: none; }
}

.cb-khung {
  position: fixed; right: 18px; bottom: 96px; z-index: 61;
  width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100vh - 200px)); min-height: 360px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--sky-50); border: var(--bd) solid var(--line); border-radius: 26px;
  box-shadow: 0 8px 0 var(--line), 0 30px 60px rgba(12, 74, 110, .3);
}
.cb-khung[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.tiet-kiem) .cb-khung:not([hidden]) { animation: cb-hien .22s var(--ease-out); }
}
@keyframes cb-hien { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 1023.98px) {
  .cb-khung { left: 8px; right: 8px; width: auto; top: 74px; height: auto; bottom: calc(var(--bottom-nav-h, 88px) + 8px); border-radius: 22px; }
}

.cb-dau { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; color: #fff; background: linear-gradient(120deg, var(--sky-500), var(--sky-700)); border-bottom: var(--bd) solid var(--line); }
.cb-ava { position: relative; flex: none; width: 52px; height: 52px; border-radius: 16px; background: #fff; border: 2px solid var(--line); }
.cb-ava img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.cb-cham { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
.cb-ten { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.cb-ten strong { font-size: 1.12rem; font-weight: 800; }
.cb-ten small { font-size: .78rem; opacity: .95; display: flex; align-items: center; gap: 6px; }
.cb-xanh { width: 8px; height: 8px; border-radius: 50%; background: #86EFAC; flex: none; }
.cb-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font: 800 1.25rem/1 var(--font); cursor: pointer; }
.cb-icon:hover { background: rgba(255, 255, 255, .3); }

.cb-ds-tin { flex: 1; overflow-y: auto; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.cb-tin { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.cb-tin.em { justify-content: flex-end; }
.cb-ava-nho { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #fff; border: 1.5px solid var(--sky-200); object-fit: contain; }
.cb-bong { min-width: 0; max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.55; }
.cb-tin.bot .cb-bong { background: #fff; border: 1.5px solid var(--sky-200); border-top-left-radius: 6px; color: var(--ink); }
.cb-tin.em .cb-bong { background: var(--sky-700); color: #fff; border-top-right-radius: 6px; }
.cb-bong p { margin: 0 0 6px; }
.cb-bong p:last-child { margin-bottom: 0; }
.cb-tieu { font-weight: 800; color: var(--sky-800); margin-top: 8px !important; }
.cb-muc { font-size: .9rem; }
.cb-nhan { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--sky-100); color: var(--sky-800); }
.cb-nhan.phat { background: var(--bad-50); color: #7F1D1D; }
.cb-bong .tien { color: #9F1239; }
.cb-nho { font-weight: 800; color: var(--sky-800); background: var(--helmet-50); border-radius: 10px; padding: 6px 10px; }
.cb-ds { margin: 4px 0 6px; padding-left: 20px; font-size: .9rem; }
.cb-ds li { margin-bottom: 4px; }
.cb-lien { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cb-nut-lien { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 800; text-decoration: none; color: #fff; background: var(--sky-700); }
.cb-nut-lien:hover { background: var(--sky-800); color: #fff; }
.cb-doc { margin-top: 8px; padding: 3px 10px; border: 1.5px solid var(--sky-200); border-radius: 999px; background: var(--sky-50); color: var(--sky-800); font: 700 .8rem var(--font); cursor: pointer; }
.cb-goi-y-tin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cb-chip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--sky-200); background: var(--sky-100); color: var(--ink); font: 700 .88rem/1.3 var(--font); text-align: left; cursor: pointer; transition: background .15s, transform .15s; }
.cb-chip:hover { background: var(--sky-200); transform: translateY(-1px); }
.cb-chip.nho { flex: none; background: #fff; white-space: nowrap; }

.cb-go { display: inline-flex; gap: 4px; padding: 4px 2px; }
.cb-go i { width: 7px; height: 7px; border-radius: 50%; background: var(--sky-500); animation: cb-nhay 1s infinite ease-in-out; }
.cb-go i:nth-child(2) { animation-delay: .15s; } .cb-go i:nth-child(3) { animation-delay: .3s; }
@keyframes cb-nhay { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.cb-goi-y { display: flex; align-items: center; gap: 8px; padding: 8px 0 8px 12px; border-top: 1.5px solid var(--sky-200); background: #fff; }
.cb-goi-y-nhan { flex: none; font-size: .78rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--sky-700); }
.cb-goi-y-cuon { display: flex; gap: 8px; overflow-x: auto; padding-right: 12px; scrollbar-width: thin; }
.cb-dai { height: 5px; flex: none; }
.cb-form { display: flex; gap: 8px; padding: 10px 12px 4px; background: #fff; }
.cb-nhap { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 2px solid var(--sky-500); border-radius: 999px; font: 500 1rem var(--font); color: var(--ink); background: #fff; }
.cb-nhap:focus { outline: none; box-shadow: 0 0 0 4px rgba(14, 165, 233, .25); }
.cb-gui { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--sky-700); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cb-gui svg { width: 22px; height: 22px; }
.cb-chan { margin: 0; padding: 4px 14px 10px; font-size: .72rem; color: var(--ink-2); background: #fff; }
@media print { .cb-mo, .cb-khung { display: none !important; } }

/* =========================================================
   11. ÂM THANH (js/amthanh.js): nút Nhạc + bảng bật/tắt
   ========================================================= */
.nut-am-thanh { margin-left: 8px; white-space: nowrap; }
.nut-am-thanh + .nut-trinh-chieu { margin-left: 6px; }
.nut-am-thanh .gach { display: none; }
.nut-am-thanh.tat .gach { display: inline; }
.nut-am-thanh.tat { color: var(--ink-2); }
.nut-am-thanh:not(.tat) .bt { color: var(--sky-700); }
@media (max-width: 1439.98px) { .nut-am-thanh span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (prefers-reduced-motion: no-preference) {
  html:not(.tiet-kiem) .nut-am-thanh:not(.tat) .bt { animation: nhac-nhun 1.3s ease-in-out infinite; transform-origin: 50% 80%; }
}
@keyframes nhac-nhun { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

.bang-am-thanh {
  position: fixed; z-index: 70; width: min(300px, calc(100vw - 16px)); padding: 14px;
  background: #fff; border: var(--bd) solid var(--line); border-radius: 20px;
  box-shadow: 0 6px 0 var(--line), 0 20px 40px rgba(12, 74, 110, .25);
}
.bang-am-thanh[hidden] { display: none; }
.bang-am-thanh .bat-tieu { margin: 0 0 8px; font-size: .78rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--sky-700); }
.cong-tac { display: flex; align-items: center; gap: 12px; padding: 8px 4px; cursor: pointer; border-radius: 12px; }
.cong-tac:hover { background: var(--sky-50); }
.cong-tac input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cong-tac .ray { flex: none; position: relative; width: 46px; height: 26px; border-radius: 999px; background: #CBD5E1; border: 2px solid var(--line); transition: background .2s; }
.cong-tac .ray::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: transform .2s var(--ease-out); }
.cong-tac input:checked + .ray { background: var(--sky-500); }
.cong-tac input:checked + .ray::after { transform: translateX(20px); }
.cong-tac input:focus-visible + .ray { outline: 3px solid var(--sky-300); outline-offset: 2px; }
.cong-tac strong { display: block; font-size: .95rem; }
.cong-tac small { display: block; font-size: .78rem; color: var(--ink-2); }
.am-luong { display: grid; gap: 4px; padding: 8px 4px 2px; font-size: .85rem; font-weight: 700; }
.am-luong input { width: 100%; accent-color: var(--sky-700); }
@media print { .nut-am-thanh, .bang-am-thanh { display: none !important; } }
/* Điện thoại hẹp: chữ thanh đáy nhỏ lại một chút để "Trang chủ", "Giới thiệu" không tràn ô */
@media (max-width: 420px) { .menu-duoi a { font-size: .68rem; margin: 0 1px; letter-spacing: -.02em; } }

@keyframes nhip-nhe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* Bản đồ hành trình có ảnh nền (ddt_ban_do): phủ lớp trời sáng để chữ trên thẻ trạm vẫn rõ */
.ban-do-hanh-trinh.co-anh {
  background: linear-gradient(rgba(240, 249, 255, .28), rgba(240, 249, 255, .4)), var(--nen-ht) center 45% / cover no-repeat, #DDF1FC;
}
html.tiet-kiem .ban-do-hanh-trinh.co-anh { background: #DDF1FC; } /* máy yếu: bỏ ảnh nền cho nhẹ */

/* =====================================================================
   12. TÔNG MÁT NHẸ – xanh da trời chủ đạo, bớt màu tối/nổi/nóng
   (bổ sung đè lên trên, không xóa quy tắc cũ)
   ===================================================================== */
:root {
  --line: #2C5A85;          /* viền & bóng khối: xanh biển dịu thay cho xanh đêm */
  --mat-bac-ha: #DDF4F1;    /* bạc hà nhạt */
  --mat-oai-huong: #E6ECFD; /* tím xanh nhạt */
  --mat-ngoc: #D8F0F8;      /* ngọc lam nhạt */
  --helmet-50: #EAF5FC;     /* nền thẻ nhấn: đổi kem vàng sang trời nhạt */
}
.nhan-cam { background: var(--mat-ngoc); }
.nhan-vang { background: var(--mat-ngoc); border-color: var(--line); color: var(--sky-800); }
.o-bento.cobalt { background: var(--sky-100); color: var(--ink); }
.o-bento.cobalt h2, .o-bento.cobalt h3, .o-bento.cobalt a:not(.nut) { color: var(--sky-800); }
.o-bento.cobalt .so-to { color: var(--sky-700); }
.o-bento.nang { background: var(--mat-bac-ha); }
.o-bento.nang .so-to { color: #0F766E; }
.o-bento.dat { background: var(--mat-oai-huong); color: var(--ink); }
.o-bento.dat .so-to { color: #3B5BC4; }
.o-bento.dem { background: var(--mat-ngoc); color: var(--ink); }
.o-bento.dem h2, .o-bento.dem h3 { color: var(--sky-800); }
.tram-so, .hud-o .hud-bt { background: #fff; color: var(--sky-800); }
/* Khu trò chơi: đổi nền đêm sang trời xanh nhạt */
body[data-phan-he="tro-choi"] { --mau-ph-dam: var(--sky-800); --mau-ph-nhat: var(--sky-100); }
body[data-phan-he="tro-choi"] .tieu-de-trang { background: linear-gradient(135deg, #E0F2FE, #D8F0F8); color: var(--ink); }
body[data-phan-he="tro-choi"] .tieu-de-trang h1 { color: var(--sky-800); text-shadow: none; }
body[data-phan-he="tro-choi"] .tieu-de-trang p { color: var(--ink-2); }
body[data-phan-he="tro-choi"] .tieu-de-trang a { color: var(--sky-700); }
/* Sắp xếp lại: ô Giáo viên và Góp ý trải hết hàng, không còn ô trống bị kéo giãn */
.bento > .the-gv, .bento > .hd-gop-y { grid-column: 1 / -1; }
.bento > .hd-gop-y { padding: 14px 18px; }
/* Sửa lỗi thanh tiêu đề ở màn rộng 1440–1679px: không đủ chỗ cho chữ "Nhạc"/"Trình chiếu"/"Chuyên hiệu"
   → nút bị bóp còn 48px và chữ tràn chồng lên nhau. Chỉ hiện chữ khi màn hình ≥1680px. */
.thanh-tren .nut-am-thanh, .thanh-tren .nut-trinh-chieu, .thanh-tren .o-sao { flex: none; }
@media (max-width: 1679.98px) {
  .nut-am-thanh, .nut-trinh-chieu { padding: 6px 10px; }
  .nut-am-thanh span:not(.bt):not(.gach), .nut-trinh-chieu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .o-sao-chu { display: none; }
}
/* Đám mây trang trí trên nền ảnh thật trông như ô trống → ẩn khi hero có ảnh nền */
.hero-cn-canh:has(.hero-cn-lop.anh) .hero-cn-lop.may { display: none; }
