/* ==========================================================================
   Luyện thi — khung chung (H2): dải hệ sinh thái, đầu trang, menu tài khoản, ngăn kéo điện thoại, chân trang.
   Cùng kiểu Tài Liệu Toán (theme skin.css: header trắng + thước kẻ màu, menu viên thuốc trong khung kem,
   nút đăng nhập navy nổi khối, chân trang navy viền sóng). Cần token.css + thanh-phan.css.
   Mốc: < 1024px dùng ngăn kéo (menu + tài khoản), ≥ 1024px hiện dải hệ sinh thái, menu ngang, ảnh đại diện.
   ========================================================================== */
.lt-icon { flex: none; }

/* ---------- Đầu trang: trắng, dưới là thước kẻ nhiều màu ---------- */
.lt-dau { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 6px 18px rgba(19, 42, 79, 0.06); }
.lt-dau::after { content: ""; display: block; height: 5px; background: var(--lt-thuoc); }
.lt-dau__trong { display: flex; align-items: center; gap: 16px; min-height: 64px; padding-top: env(safe-area-inset-top, 0); }
.lt-hieu { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--lt-navy); text-decoration: none; flex: none; }
.lt-hieu__logo { display: block; width: auto; height: 56px; } /* logo ngang hệ sinh thái: Tài Liệu Toán + "— Luyện Thi —" */
@media (max-width: 639px) { .lt-hieu__logo { height: 46px; } }

.lt-menu { display: none; margin-left: 8px; }
@media (min-width: 1024px) { .lt-menu { display: block; } }
.lt-menu__ds { display: flex; align-items: center; gap: 2px; margin: 0; padding: 4px; list-style: none; background: var(--lt-nen); border: 2px solid var(--lt-vien); border-radius: 999px; }
.lt-menu__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: #334155; font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
/* 1024–1199: 5 mục menu + logo ngang + nút "Vào luyện thi" vừa khít một hàng (trước đây tràn 16px ở 1024) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .lt-menu { margin-left: 4px; }
  .lt-menu__link { padding: 0 10px; font-size: 0.875rem; }
  .lt-hieu__logo { height: 50px; }
}
.lt-menu__link:hover { background: var(--lt-mem); color: var(--lt-navy); }
.lt-menu__link[aria-current="page"] { background: var(--lt-chu-dao); color: var(--lt-tren-chu-dao); box-shadow: inset 0 -3px 0 var(--lt-chu-dao-day); }

.lt-dau__phai { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lt-dau__mo {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--lt-vien);
  border-radius: 14px;
  background: #fff;
  color: var(--lt-navy);
  cursor: pointer;
}
.lt-dau__mo:hover { border-color: var(--lt-cam); }
@media (min-width: 1024px) { .lt-dau__mo { display: none; } }
/* Điện thoại: chỉ logo + nút cam + nút menu; đăng nhập và tài khoản nằm trong ngăn kéo. */
@media (max-width: 1023px) {
  .lt-dau__vao, .lt-dau__phai > .lt-tk, .lt-dau__phai > .lt-ud { display: none; }
}
@media (max-width: 399px) { /* 360px (Android): logo ngang + nút cam + nút menu vừa một hàng */
  .lt-dau__trong { gap: 8px; }
  .lt-dau__phai { gap: 8px; }
  .lt-hieu__logo { height: 40px; }
}
@media (max-width: 359px) {
  .lt-dau__cta { display: none; } /* 320px: logo + nút + menu không vừa một hàng; lối vào còn ở hero và ngăn kéo */
}

/* ---------- Menu tài khoản (cùng kiểu .gt-user của theme) ---------- */
.lt-tk { position: relative; }
.lt-tk__nut { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 2px 8px 2px 2px; border: 2px solid var(--lt-vien); border-radius: 999px; background: #fff; color: var(--lt-navy); cursor: pointer; }
.lt-tk__nut:hover, .lt-tk__nut[aria-expanded="true"] { border-color: var(--lt-cam); }
.lt-tk__anh { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lt-xanh); color: #fff; font: 800 1.1rem/1 var(--lt-font-tieu-de); }
.lt-tk.is-thanh-vien .lt-tk__anh { box-shadow: 0 0 0 3px var(--lt-vang); }
.lt-tk__anh--lon { width: 48px; height: 48px; font-size: 1.3rem; flex: none; }
.lt-tk__bang {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 50;
  width: 300px;
  max-height: min(70dvh, 560px);
  overflow: auto;
  padding: 8px;
  border: 2px solid var(--lt-vien);
  border-top: 5px solid var(--lt-cam);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--lt-bong-noi);
}
.lt-tk__dau { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; border-bottom: 2px dashed var(--lt-vien); }
.lt-tk__ai { display: flex; flex-direction: column; min-width: 0; }
.lt-tk__ai strong { color: var(--lt-navy); overflow-wrap: anywhere; }
.lt-tk__ai span { color: var(--lt-chu-phu); font-size: 0.8125rem; }
.lt-tk__nang { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--lt-cam-nhat); color: var(--lt-cam-chu); text-decoration: none; }
.lt-tk__nang strong { display: block; color: var(--lt-navy); }
.lt-tk__nang span span { font-size: 0.8125rem; }
.lt-tk__nhom { margin: 10px 8px 2px; color: var(--lt-chu-phu); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.lt-tk__ds { margin: 0; padding: 0; list-style: none; }
.lt-tk__ds a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--lt-navy); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.lt-tk__ds a:hover { background: var(--lt-mem); }
.lt-tk__ds a .lt-icon { color: var(--lt-xanh); }
.lt-tk__ds em { margin-left: auto; color: var(--lt-chu-phu); font-size: 0.8125rem; font-style: normal; }
.lt-tk__ds--cuoi { margin-top: 6px; padding-top: 6px; border-top: 2px dashed var(--lt-vien); }

/* ---------- Nút chuyển ứng dụng (ô 9 chấm) — chỗ duy nhất có link sang Tài Liệu Toán ---------- */
.lt-ud { position: relative; }
.lt-ud__nut { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid transparent; border-radius: 14px; background: transparent; color: var(--lt-chu-phu); cursor: pointer; }
.lt-ud__nut:hover, .lt-ud__nut[aria-expanded="true"] { background: var(--lt-mem); color: var(--lt-navy); }
.lt-ud__bang {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 50;
  width: 320px;
  padding: 8px;
  border: 2px solid var(--lt-vien);
  border-top: 5px solid var(--lt-chu-dao);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--lt-bong-noi);
}
.lt-ud__ds { margin: 0; padding: 0; list-style: none; }
.lt-ud__muc { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 10px; border-radius: 12px; color: var(--lt-navy); text-decoration: none; }
a.lt-ud__muc:hover { background: var(--lt-mem); }
.lt-ud__muc.is-dang { background: var(--lt-cam-nhat); }
.lt-ud__muc > .lt-icon { margin-left: auto; color: var(--lt-chu-phu); }
.lt-ud__logo { flex: none; display: block; width: 36px; height: 36px; object-fit: contain; } /* ký hiệu chuẩn, không ô màu bọc */
.lt-ud__chu { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lt-ud__chu small { color: var(--lt-chu-phu); font-size: 0.8125rem; }
.lt-ud__ghi { margin: 6px 10px 4px; color: var(--lt-chu-phu); font-size: 0.8125rem; }
.lt-ngan__ud { margin-top: auto; padding-top: 16px; }

/* ---------- Trang pháp lý trong khung Luyện thi ---------- */
.lt-phap-ly { max-width: 820px; }
.lt-phap-ly__ngay { margin: -6px 0 20px; color: var(--lt-chu-phu); font-size: 0.875rem; }
.lt-phap-ly__noi-dung { padding: 24px; border: 2px solid var(--lt-vien); border-radius: var(--lt-bo); background: #fff; line-height: 1.7; }
.lt-phap-ly__noi-dung h2, .lt-phap-ly__noi-dung h3 { color: var(--lt-navy); font-family: var(--lt-font-tieu-de); line-height: 1.3; }
@media (min-width: 768px) { .lt-phap-ly__noi-dung { padding: 32px 40px; } }

/* ---------- Ngăn kéo (< 1024px) ---------- */
.lt-ngan { position: fixed; inset: 0; z-index: 60; }
.lt-ngan[hidden] { display: none; }
.lt-ngan__nen { position: absolute; inset: 0; background: rgba(11, 26, 51, 0.5); }
.lt-ngan__bang {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(360px, 92vw);
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(12px + env(safe-area-inset-top, 0)) 16px calc(20px + env(safe-area-inset-bottom, 0));
  background: var(--lt-nen);
  box-shadow: -12px 0 32px rgba(11, 26, 51, 0.25);
  animation: lt-ngan-vao 0.24s var(--lt-em);
}
@keyframes lt-ngan-vao { from { transform: translateX(100%); } }
.lt-ngan__dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lt-ngan__sp { display: flex; flex: 1; padding: 4px; border: 2px solid var(--lt-vien); border-radius: 999px; background: #fff; }
.lt-ngan__sp a { flex: 1; display: grid; place-items: center; min-height: 44px; border-radius: 999px; color: #334155; font-weight: 700; font-size: 0.875rem; text-decoration: none; text-align: center; }
.lt-ngan__sp a[aria-current="page"] { background: var(--lt-chu-dao); color: var(--lt-tren-chu-dao); }
.lt-ngan__ten { font: 800 1.3rem/1 var(--lt-font-tieu-de); color: var(--lt-navy); }
.lt-ngan__dong { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 2px solid var(--lt-vien); border-radius: 14px; background: #fff; color: var(--lt-navy); cursor: pointer; }
.lt-ngan__menu ul { margin: 0; padding: 0; list-style: none; }
.lt-ngan__menu a { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border-radius: 14px; color: var(--lt-navy); font-weight: 700; font-size: 1.0625rem; text-decoration: none; }
.lt-ngan__menu a:hover { background: var(--lt-mem); }
.lt-ngan__menu a[aria-current="page"] { background: #fff; box-shadow: inset 4px 0 0 var(--lt-cam); }
.lt-ngan__tk { margin-top: 12px; padding: 8px; border: 2px solid var(--lt-vien); border-radius: 16px; background: #fff; }
.lt-ngan__vao { display: grid; gap: 12px; margin-top: 16px; }
.lt-ngan__vao p { margin: 0; color: var(--lt-chu-phu); font-size: 0.875rem; text-align: center; }
body.lt-khoa-cuon { overflow: hidden; }

/* ---------- Chân trang: GIỐNG HỆT chân trang Tài Liệu Toán (.mlib-footer, theme tailieutoan-hoc-duong) — số đo lấy từ trang thật:
   khung 1200 (đệm 36/16/20), ≥1100px 5 cột 1.2fr 1fr 0.8fr 0.9fr 1.5fr gap 24; 640–1099px lưới 6 phần (Giới thiệu ½ + Facebook ½, cột link chia đều);
   < 640px 2 cột (Giới thiệu, Facebook cả hàng). Logo 112px, tiêu đề cột 12px in hoa vàng, link 14px cao 32px (cảm ứng 44px). ---------- */
.lt-chan { position: relative; margin-top: 56px; background: var(--lt-navy); color: #e2e8f0; font-size: 0.875rem; }
.lt-chan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -17px;
  height: 18px;
  background: radial-gradient(circle at 12px 18px, var(--lt-navy) 12px, transparent 12.5px) repeat-x;
  background-size: 24px 18px;
}
.lt-chan__trong { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; max-width: 1200px; margin: 0 auto; padding: 36px 16px 20px; }
.lt-chan__gioi-thieu, .lt-chan__fb-cot { grid-column: 1 / -1; }
@media (min-width: 640px) and (max-width: 1099px) {
  .lt-chan__trong { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px 24px; }
  .lt-chan__gioi-thieu { order: -2; grid-column: span 3; }
  .lt-chan__fb-cot { order: -1; grid-column: span 3; }
  .lt-chan__cot:not(.lt-chan__fb-cot) { grid-column: span 2; }
  .lt-chan__gioi-thieu p { max-width: 42ch; }
}
@media (min-width: 1100px) {
  .lt-chan__trong { grid-template-columns: 1.2fr 1fr 0.8fr 0.9fr 1.5fr; gap: 24px; }
  .lt-chan__gioi-thieu, .lt-chan__fb-cot { grid-column: auto; }
}
.lt-chan__hieu { display: block; width: fit-content; border-radius: 12px; }
.lt-chan__hieu { margin: 0 auto; } /* < 1100px: logo căn giữa cột như Tài Liệu Toán */
@media (min-width: 1100px) { .lt-chan__hieu { margin: 0 0 0 53px; } } /* đo từ chân trang Tài Liệu Toán: logo lùi 53px trong cột Giới thiệu */
.lt-chan__logo { display: block; width: 112px; height: auto; margin: -6px 0 14px; transition: filter 0.15s ease; }
.lt-chan__hieu:hover .lt-chan__logo { filter: brightness(1.12); }
.lt-chan__gioi-thieu p { margin: 0; color: #94a3b8; line-height: 1.6; }
.lt-chan__tieu-de { margin: 0 0 12px; color: var(--lt-vang); font: 700 0.75rem/1.2 var(--lt-font); text-transform: uppercase; letter-spacing: 0.06em; }
.lt-chan__cot ul { margin: 0; padding: 0; list-style: none; }
.lt-chan__cot a { display: inline-flex; align-items: center; min-height: 32px; color: #e2e8f0; text-decoration: none; transition: color 0.15s ease, transform 0.15s ease; }
@media (max-width: 639px) { .lt-chan__cot a { line-height: 1.3; } }
@media (pointer: coarse) { .lt-chan__cot a, .lt-chan__phap-ly a { min-height: 44px; } }
.lt-chan a:hover, .lt-chan a:focus-visible { color: var(--lt-vang); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lt-chan__cot:not(.lt-chan__fb-cot) a:hover { transform: translateX(3px); }
.lt-chan a:focus-visible { outline: 3px solid var(--lt-vang); outline-offset: 3px; border-radius: 4px; }

/* Khung Facebook (như .mlib-fbp): thẻ trắng 280px, ảnh đại diện 52px, nút Theo dõi xanh Facebook + Chia sẻ */
.lt-fbp { max-width: 280px; border-radius: 14px; overflow: hidden; background: #fff; color: var(--lt-navy);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 12px 26px rgba(0, 0, 0, 0.28); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.lt-fbp:hover, .lt-fbp:focus-within { box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.6), 0 14px 30px rgba(0, 0, 0, 0.32); transform: translateY(-2px); }
.lt-chan .lt-fbp a { text-decoration: none; }
.lt-fbp__dau { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px; color: var(--lt-navy); }
.lt-fbp__anh { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 10px; background: #fff; border: 1px solid #dbe3ef; }
.lt-fbp__anh img { width: 40px; height: 40px; }
.lt-fbp__ten { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lt-chan .lt-fbp__ten strong { color: #1561d6; font-size: 1.0625rem; font-weight: 800; }
.lt-fbp__ten span { color: #475569; font-size: 0.8125rem; }
.lt-chan .lt-fbp__dau:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.lt-fbp__nut-ds { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; background: #f1f4f8; border-top: 1px solid #e2e8f0; }
.lt-chan .lt-fbp__nut { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid #cfd8e3; border-radius: 10px; background: #fff; color: #1e293b; font-size: 0.875rem; font-weight: 700; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.lt-fbp__nut::after { content: ""; position: absolute; inset: -4px 0; } /* vùng chạm 44px */
.lt-chan .lt-fbp__nut:first-child { background: #1561d6; border-color: #1561d6; color: #fff; }
.lt-chan .lt-fbp__nut:hover { background: #eef4fd; border-color: #1561d6; color: #0e4fb3; text-decoration: none; }
.lt-chan .lt-fbp__nut:first-child:hover { background: #0e4fb3; border-color: #0e4fb3; color: #fff; }
.lt-chan .lt-fbp__nut:focus-visible, .lt-chan .lt-fbp__dau:focus-visible { outline: 3px solid #f7931e; outline-offset: 2px; }
.lt-fbp__nut .lt-icon { width: 16px; height: 16px; }

/* Dải dưới: "Cần hỗ trợ?" + giờ | điện thoại · Zalo · email; rồi © + liên kết pháp lý (như .mlib-footer__help / __legal) */
.lt-chan__duoi { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.lt-chan__trong.lt-chan__trong--duoi { display: flex; flex-direction: column; gap: 0; padding-top: 0; padding-bottom: env(safe-area-inset-bottom, 0); }
.lt-chan__ho-tro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 10px; }
.lt-chan__ho-tro-chu { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; line-height: 1.2; }
.lt-chan__ho-tro-chu strong { color: #fff; font-size: 0.9375rem; font-weight: 800; }
.lt-chan__ho-tro-chu span { display: inline-flex; align-self: center; align-items: center; gap: 7px; color: #94a3b8; font-size: 0.8125rem; }
.lt-chan__ho-tro-chu .lt-icon, .lt-chan__lh .lt-icon { flex: none; width: 16px; height: 16px; color: var(--lt-vang); }
.lt-chan__lh { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.lt-chan__lh a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: #e2e8f0; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
@media (max-width: 639px) { .lt-chan__lh { gap: 0 18px; } .lt-chan__lh a { min-height: 44px; } }
.lt-chan__phap-ly { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding: 2px 0 16px; color: #94a3b8; font-size: 0.8125rem; }
.lt-chan__phap-ly p { margin: 0; }
.lt-chan__phap-ly strong { color: #e2e8f0; }
.lt-chan__phap-ly nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.lt-chan__phap-ly a { display: inline-flex; align-items: center; min-height: 32px; color: #cbd5e1; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .lt-chan a, .lt-chan__logo, .lt-fbp, .lt-fbp__nut { transition: none; } .lt-chan__cot a:hover, .lt-fbp:hover { transform: none; } }

/* ---------- Màn làm bài: chế độ tập trung (React gắn lớp lth-tap-trung lên <body>) ---------- */
body.lth-tap-trung .lt-dau, body.lth-tap-trung .lt-chan { display: none; }

@media (prefers-reduced-motion: reduce) {
  .lt-ngan__bang { animation: none; }
}

/* ---------- Thước kẻ chạy khi chuyển trang (05/11) — đồng bộ Tài Liệu Toán (skin.css .is-navigating .mlib-header::after):
   khung.js gắn html.lt-dang-chuyen khi bấm link nội bộ / gửi biểu mẫu; dải màu trôi liên tục + vệt sáng lướt qua. ---------- */
.lt-dang-chuyen .lt-dau::after {
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.85) 50%, transparent 100%) -320px 0 / 320px 100% no-repeat,
    linear-gradient(90deg, #15803d, #1560bd, #f7931e, #ffd166, #be185d, #15803d) 0 0 / 640px 100% repeat-x;
  box-shadow: 0 0 10px rgba(247, 147, 30, 0.55);
  animation: lt-thuoc-chay 1.4s linear infinite;
}
/* Vệt sáng lướt hết chiều ngang; dải màu trôi đúng 2 ô (2 × 640px) nên vòng lặp liền mạch. */
@keyframes lt-thuoc-chay { from { background-position: -320px 0, 0 0; } to { background-position: calc(100vw + 320px) 0, 1280px 0; } }
@media (prefers-reduced-motion: reduce) {
  .lt-dang-chuyen .lt-dau::after { animation: none; opacity: 0.6; }
}

/* ---- Mục "Thi đua": vương miện vàng + pháo giấy lâu lâu bung (06/11) ---- */
.lt-menu__link--thi-dua { display: inline-flex; align-items: center; gap: 6px; }
.lt-vuong-mien { position: relative; display: inline-grid; place-items: center; flex: none; }
.lt-vuong-mien svg { display: block; transform-origin: 50% 90%; }
.lt-giay { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.lt-giay i { position: absolute; left: -3px; top: -2px; width: 6px; height: 4px; border-radius: 1px; opacity: 0; }
.lt-giay i:nth-child(1) { background: #F43F5E; --x: -26px; --y: -20px; --r: 220deg; }
.lt-giay i:nth-child(2) { background: #FBBF24; --x: -14px; --y: -30px; --r: -160deg; }
.lt-giay i:nth-child(3) { background: #38BDF8; --x: 2px; --y: -34px; --r: 300deg; }
.lt-giay i:nth-child(4) { background: #34D399; --x: 16px; --y: -28px; --r: -240deg; }
.lt-giay i:nth-child(5) { background: #A78BFA; --x: 28px; --y: -16px; --r: 180deg; }
.lt-giay i:nth-child(6) { background: #F97316; --x: -22px; --y: 4px; --r: -200deg; width: 4px; height: 4px; border-radius: 50%; }
.lt-giay i:nth-child(7) { background: #1560BD; --x: 24px; --y: 6px; --r: 260deg; width: 4px; height: 4px; border-radius: 50%; }
.lt-giay i:nth-child(8) { background: #FDE047; --x: -4px; --y: -40px; --r: -320deg; }
@keyframes lt-giay-bung { 0%, 78% { opacity: 0; transform: translate(0, 0) rotate(0); } 80% { opacity: 1; } 92% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)); } 100% { opacity: 0; transform: translate(calc(var(--x) * 1.15), calc(var(--y) + 18px)) rotate(var(--r)); } }
@keyframes lt-vm-nay { 0%, 76%, 100% { transform: none; } 79% { transform: translateY(-4px) rotate(-10deg) scale(1.15); } 83% { transform: translateY(0) rotate(8deg) scale(1.05); } 87% { transform: rotate(0) scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .lt-giay i { animation: lt-giay-bung 9s cubic-bezier(0.2, 0.7, 0.3, 1) infinite; }
  .lt-vuong-mien svg { animation: lt-vm-nay 9s ease-in-out infinite; }
}

/* ---- Nút lên đầu trang (06/11): cùng kiểu Tài Liệu Toán — ô cam bo 16px, mũi tên navy (không chữ trắng trên cam) ---- */
.lt-len-dau { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); z-index: 40; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 16px; background: var(--lt-cam, #F7931E); color: var(--lt-navy, #132A4F); box-shadow: 0 3px 0 #c2410c, 0 8px 18px rgba(19, 42, 79, 0.18);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, bottom 0.2s ease; }
.lt-len-dau.is-hien { opacity: 1; visibility: visible; transform: none; }
.lt-len-dau:hover { background: #ffa53d; color: var(--lt-navy, #132A4F); }
.lt-len-dau:active { transform: translateY(2px); box-shadow: 0 1px 0 #c2410c; }
.lt-len-dau:focus-visible { outline: 3px solid var(--lt-xanh, #1560BD); outline-offset: 3px; }
.lt-len-dau svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .lt-len-dau { transition: none; } }
#noi-dung:focus { outline: none; }

/* ---- Nút "Vào luyện thi" ở đầu trang (06/11): lắc gây chú ý như nút "Tìm kiếm tài liệu" bên Tài Liệu Toán —
   cứ 5 giây lắc nhanh ~0,6 giây + vòng sáng cam lan ra; đứng yên khi rê chuột / focus; tắt khi giảm chuyển động. ---- */
@keyframes lt-cta-lac {
  0%, 86%, 100% { transform: none; box-shadow: 0 3px 0 #c2410c, 0 0 0 0 rgba(247, 147, 30, 0); }
  88% { transform: rotate(-5deg) scale(1.06); box-shadow: 0 3px 0 #c2410c, 0 0 0 0 rgba(247, 147, 30, 0.55); }
  90% { transform: rotate(5deg) scale(1.06); }
  92% { transform: rotate(-4deg) scale(1.05); }
  94% { transform: rotate(3deg) scale(1.04); }
  96% { transform: rotate(-1.5deg) scale(1.02); box-shadow: 0 3px 0 #c2410c, 0 0 0 10px rgba(247, 147, 30, 0); }
  98% { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .lt-dau__cta { transform-origin: 50% 60%; animation: lt-cta-lac 5s ease-in-out 2s infinite; will-change: transform; }
  .lt-dau__cta:hover, .lt-dau__cta:focus-visible { animation: none; }
}

/* ---- Đồ dùng đi thi lấp ló sau viền sóng chân trang (06/11, Khung::do_dung_thi + khung.js) — cùng cách Tài Liệu Toán ---- */
.lt-chan--dc { margin-top: 160px; } /* chừa chỗ đồ dùng thò lên, không đè nội dung cuối trang */
.lt-chan::before { z-index: 1; }
.lt-dc { position: absolute; z-index: 0; left: 0; right: 0; bottom: 100%; height: 150px; overflow: hidden; pointer-events: none; }
.lt-dc__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.lt-dc__mon { position: absolute; bottom: calc(var(--tho) - var(--h)); width: var(--w); height: var(--h); transform: rotate(var(--goc)); transform-origin: 50% 100%; }
.lt-dc__nang { display: block; filter: drop-shadow(0 6px 8px rgba(19, 42, 79, 0.22)); transform: translateY(calc(var(--h) + 24px)); }
.lt-dc__nang svg { display: block; overflow: visible; }
.lt-dc.is-len .lt-dc__nang { transform: none; transition: transform 0.75s cubic-bezier(0.34, 1.5, 0.64, 1) var(--tre); }
@media (prefers-reduced-motion: reduce) { .lt-dc__nang { transform: none; } }
@media (max-width: 1100px) { .lt-dc__mon { scale: 0.85; } .lt-dc__mon.is-an-md { display: none; } }
@media (max-width: 760px) {
  .lt-chan--dc { margin-top: 110px; }
  .lt-dc__mon { scale: 0.7; }
  .lt-dc__mon.is-an-sm { display: none; }
  .lt-dc__mon.is-sm-phai { right: 6% !important; } /* điện thoại: thước (trái) + máy tính (phải) */
}
/* Rê chuột vào đồ dùng thì nhấc lên + lắc nhẹ (như dụng cụ Toán bên Tài Liệu Toán; chỉ máy có chuột, tôn trọng giảm chuyển động) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lt-dc__mon { pointer-events: auto; cursor: default; }
  .lt-dc__nang svg { transform-origin: 50% 100%; transition: transform 0.35s cubic-bezier(0.34, 1.6, 0.64, 1); }
  .lt-dc__mon:hover .lt-dc__nang svg { transform: translateY(-16px); animation: lt-dc-lac 0.7s ease-in-out 0.15s; }
}
@keyframes lt-dc-lac { 0%, 100% { rotate: 0deg; } 25% { rotate: -6deg; } 50% { rotate: 5deg; } 75% { rotate: -3deg; } }
