/* Trang chủ cuộn qua từng môn (src/views/landing.tsx). Chỉ tải ở trang chủ. Hoạ tiết nền vẽ bằng gradient — không thêm ảnh nào. */
@property --acc { syntax: '<color>'; inherits: true; initial-value: #f5c76a }
body { transition: --acc .9s ease }

/* ===== hero ===== */
.lx-hero { position: relative; overflow: hidden }
.lx-lop { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 0 }
.lx-lop span { color: var(--ink2); font-size: 13px; font-weight: 600; margin-right: 6px }
.lx-lop button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: var(--ink2); font: 600 13px var(--font); cursor: pointer; transition: .15s }
.lx-lop button:hover { border-color: var(--acc); color: var(--ink) } .lx-lop button.on { background: var(--acc); border-color: var(--acc); color: #160f0a }
.lx-orbit { position: relative; justify-self: center; width: min(300px, 80vw); aspect-ratio: 1 }
.lx-orbit span { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; display: grid; place-items: center; border-radius: 16px; font-size: 22px; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, #140e0b); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  transform: rotate(calc(var(--i) * 45deg)) translate(120px) rotate(calc(var(--i) * -45deg)); animation: lx-orb 40s linear infinite }
@keyframes lx-orb { to { transform: rotate(calc(var(--i) * 45deg + 360deg)) translate(120px) rotate(calc(var(--i) * -45deg - 360deg)) } }

/* ===== thanh môn: máy tính dọc bên phải, điện thoại dính trên cùng ===== */
.lx-rail { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 6px }
.lx-rail a { display: flex; align-items: center; gap: 8px; justify-content: flex-end; color: var(--muted); font-size: 12px; font-weight: 600 }
.lx-rail a span { opacity: 0; transform: translateX(6px); transition: .2s; white-space: nowrap; background: rgba(15, 11, 9, .85); padding: 3px 8px; border-radius: 6px }
.lx-rail a i { font-style: normal; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(20, 14, 11, .7); border: 1px solid var(--line2); color: var(--c); transition: .2s }
.lx-rail:hover a span, .lx-rail a.on span { opacity: 1; transform: none } .lx-rail a.on i { background: var(--c); color: #140e0b; border-color: var(--c); transform: scale(1.1) }
@media (max-width: 1280px) { .lx-rail a span { display: none } }
@media (min-width: 901px) { main.wide { padding-right: 64px } }     /* chừa chỗ cho thanh môn, khỏi đè nội dung */
@media (max-width: 900px) {
  .lx-rail { position: sticky; top: 0; right: auto; transform: none; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 8px 12px; gap: 6px;
    background: rgba(15, 11, 9, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
  .lx-rail::-webkit-scrollbar { display: none }
  .lx-rail a { flex: none; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 10px; border: 1px solid var(--line) } .lx-rail a span { display: inline; opacity: 1; transform: none; background: none; padding: 0 }
  .lx-rail a i { width: 26px; height: 26px; border-radius: 7px } .lx-rail a.on { border-color: var(--c); color: var(--ink) }
}

/* ===== khung chờ + lỗi ===== */
.lx-skel { display: grid; gap: 14px; padding: 6px 0 } .lx-skel-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px }
.lx-skel i { display: block; aspect-ratio: 9 / 11; border-radius: var(--r); background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .07) 50%, rgba(255, 255, 255, .03) 70%) 0 0 / 300% 100%; animation: lx-sh 1.6s infinite }
@keyframes lx-sh { to { background-position: -150% 0 } }
@media (max-width: 700px) { .lx-skel-row { grid-template-columns: repeat(2, 1fr) } .lx-skel-row i:nth-child(n+3) { display: none } }
.lx-lazy.busy > .lsb { opacity: .45; transition: opacity .2s } .lx-err { padding: 30px; text-align: center; color: var(--muted) }

/* ===== dải biên tập viên chọn + kệ cuộn ngang ===== */
.lx-ed-wrap { margin: 34px 0 10px; min-height: 280px }
.lx-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 196px); gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: thin }
.lx-shelf > * { scroll-snap-align: start }
.lx-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 12px }
.lx-sub { margin-top: 26px } .lx-sub h3 { font-size: 15px; color: var(--ink2); margin-bottom: 10px }

/* ===== khung một môn: màn mở đầu ghim toàn màn hình (parallax theo --e / --p do landing.js đặt) + thân tải lười ===== */
body { overflow-x: clip }
.lx-prog { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none }
.lx-prog i { display: block; height: 100%; background: var(--acc); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 14px var(--acc) }
.ls { position: relative; padding-bottom: 110px }
.ls::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -2; pointer-events: none;
  background: radial-gradient(60% 45% at 72% 22%, color-mix(in srgb, var(--c) 17%, transparent), transparent 70%), linear-gradient(180deg, transparent 0, color-mix(in srgb, var(--c) 5%, transparent) 40%, transparent 100%) }
.ls + .ls::after { content: ''; position: absolute; top: 0; left: 50%; width: min(1200px, 90vw); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c) 45%, transparent), transparent) }
.ls-intro { position: relative; height: 165vh; --e: 1; --p: 0 }
.ls-pin { position: sticky; top: 0; height: 100vh; min-height: 600px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 2vw; overflow: clip; isolation: isolate }
.ls-pat { position: absolute; inset: 0 -20vw; z-index: -2; opacity: calc(.25 + var(--e) * .75); -webkit-mask-image: radial-gradient(60% 70% at 62% 50%, #000, transparent); mask-image: radial-gradient(60% 70% at 62% 50%, #000, transparent) }
.ls-word { position: absolute; left: 50%; top: 52%; z-index: -1; font-weight: 800; font-size: clamp(96px, 17vw, 300px); line-height: .8; letter-spacing: -.045em; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--c) 38%, transparent); opacity: calc(var(--e) * .85); pointer-events: none; user-select: none;
  transform: translate(calc(-50% + (.5 - var(--p)) * 34vw), -50%) }
.ls-copy { position: relative; z-index: 4; transform: translateY(calc((1 - var(--e)) * 90px)); opacity: min(1, calc(var(--e) * 1.6 - .25)) }
.ls-k { display: flex; align-items: center; gap: 14px; font: 700 12px/1 var(--font); letter-spacing: .24em; color: var(--c) } .ls-k::after { content: ''; width: 56px; height: 1px; background: currentColor; opacity: .7 }
.ls-copy h2 { margin: 20px 0 18px; font-size: clamp(46px, 6.4vw, 108px); font-weight: 800; letter-spacing: -.04em; line-height: .94;
  background: linear-gradient(175deg, #fff 35%, color-mix(in srgb, var(--c) 75%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent }
.ls-copy p { margin: 0; max-width: 44ch; color: var(--ink2); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6 }
.ls-st { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 30px 0 32px }
.ls-st span { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.ls-st b { font-size: clamp(28px, 2.6vw, 40px); font-weight: 800; letter-spacing: -.03em; text-transform: none; color: var(--ink); line-height: 1 }
.ls-cue { display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); transition: background .25s, color .25s }
.ls-cue i { font-style: normal; transition: transform .25s } .ls-cue:hover { background: var(--c); color: #140e0b } .ls-cue:hover i { transform: translateY(3px) }
.ls-stage { position: relative; height: min(78vh, 760px); transform: translateY(calc((1 - var(--e)) * 140px + var(--p) * -50px)) scale(calc(.86 + var(--e) * .14)); transform-origin: 50% 80% }
.ls-stage::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: 3%; height: 26%; border-radius: 50%; filter: blur(14px);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 38%, transparent), transparent) }
.ls-stage::after { content: ''; position: absolute; left: 13%; right: 13%; bottom: 8%; height: 13%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  box-shadow: 0 0 0 26px color-mix(in srgb, var(--c) 4%, transparent), 0 0 0 60px color-mix(in srgb, var(--c) 2%, transparent) }
.ls-glyph { position: absolute; inset: 0 0 10%; display: grid; place-items: center; font-size: clamp(120px, 17vw, 260px); color: color-mix(in srgb, var(--c) 75%, transparent); text-shadow: 0 0 90px var(--c); transition: opacity .6s }
.ls-stage.has .ls-glyph { opacity: 0 }
.ls-body { position: relative; z-index: 2; max-width: 1360px; margin: 0 auto }
.ls:not(.in) .ls-body { opacity: 0; transform: translateY(40px) } .ls .ls-body { transition: opacity .8s ease, transform .8s ease }
.ls-compact .ls-intro { height: auto } .ls-compact .ls-pin { position: relative; height: auto; min-height: 0; padding: 90px 0 30px } .ls-compact .ls-stage { height: 340px }
.ls-compact .ls-copy h2 { font-size: clamp(40px, 4.6vw, 72px) } .ls-compact .ls-word { font-size: clamp(80px, 12vw, 200px) }
@media (max-width: 900px) {
  .ls-intro { height: 140vh } .ls-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: center; gap: 0; padding: 64px 0 12px; height: 100svh; min-height: 560px }
  .ls-stage { height: auto; min-height: 300px; align-self: stretch; margin-top: 8px }      /* sân khấu chiếm hết phần màn còn lại dưới chữ */ .ls-copy h2 { margin: 12px 0 10px } .ls-st { margin: 16px 0 18px; gap: 10px 24px } .ls-copy p { font-size: 14px }
  .ls-word { top: 70%; font-size: 30vw } .ls-compact .ls-stage { height: 240px } .ls-compact .ls-pin { padding-top: 50px }
}

/* sân khấu hook: nhân vật giữa to đứng trên sàn sáng, hai bên nhỏ lùi sau, trôi nhẹ theo cuộn */
.lsb-hero { position: absolute; inset: 0; animation: lx-rise 1s cubic-bezier(.2, .7, .2, 1) both } @keyframes lx-rise { from { opacity: 0; transform: translateY(40px) } }
.lsb-hero .hk { position: absolute; display: block; max-width: none; background: none; border: 0; border-radius: 0; overflow: visible }
.lsb-hero .hk .ac-stage { position: absolute; inset: 0; aspect-ratio: auto; background: none; overflow: visible }
.lsb-hero .hk .ac-stage > img, .lsb-hero .hk .ac-stage > canvas { inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 34px 34px rgba(0, 0, 0, .6)) }
.lsb-hero .hk .mc-tags { display: none }
.hk-0 { left: 18%; right: 18%; top: 0; bottom: 9%; z-index: 3 }
.hk-1, .hk-2 { top: 20%; bottom: 13%; width: 36%; z-index: 2; filter: brightness(.72) saturate(.85); transition: filter .3s }
.hk-1 { left: -2%; transform: translateX(calc(var(--p) * -36px)) } .hk-2 { right: -2%; transform: translateX(calc(var(--p) * 36px)) }
.hk-1:hover, .hk-2:hover { filter: none }
.hero-n1 .hk-0 { left: 10%; right: 10% } .hero-n2 .hk-0 { left: 24%; right: 4% } .hero-n2 .hk-1 { left: -2% }
.hk-flat .ac-stage > img { inset: 10% 6% 14% !important; width: 88% !important; height: 76% !important; object-fit: cover; border-radius: 20px; box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); filter: none }
.hk-1.hk-flat .ac-stage > img { transform: perspective(900px) rotateY(18deg) } .hk-2.hk-flat .ac-stage > img { transform: perspective(900px) rotateY(-18deg) }
.hk-cap { position: absolute; left: 50%; bottom: -4%; transform: translateX(-50%); white-space: nowrap; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink2);
  background: rgba(12, 9, 8, .72); border: 1px solid var(--line2); backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s }
.hk-0 .hk-cap, .hk:hover .hk-cap { opacity: 1 }
.hero-theater { display: flex; flex-direction: column; justify-content: center; gap: 10px }
.hero-theater .cth { grid-template-columns: 1fr; margin: 0 }
.hero-theater .cth-stage { background: none; border: 0; border-radius: 0; overflow: visible; aspect-ratio: 16 / 9 } .hero-theater .cth-stage::after { display: none }
.hero-theater .cth-cap { background: none; padding: 0 6px; position: absolute; left: 0; right: 0; bottom: -8px; align-items: center; text-align: center }
.hero-theater .cth-bar { left: 25%; right: 25%; bottom: -26px; border-radius: 3px; overflow: hidden }
.hero-theater .cth-list { flex-direction: row; overflow-x: auto; max-height: none; padding: 26px 0 4px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent) }
.hero-theater .cth-list::-webkit-scrollbar { display: none } .hero-theater .cth-list li { flex: none; width: 210px } .hero-theater .cth-list li:first-child { margin-left: 24px }
@media (max-width: 900px) { .hero-theater .cth-stage { aspect-ratio: 16 / 10 } .hero-theater .cth-list li { width: 180px } .hk-0 { left: 12%; right: 12% } }

/* hàng cuộn ngang: không lộ thanh cuộn, mép mờ, nút ‹ › */
.lx-sc { position: relative }
.lx-sc > .lx-shelf, .lx-sc > .tl { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent) }
.lx-sc.s0 > * { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent) }
.lx-sc.s0.s1 > * { -webkit-mask-image: none; mask-image: none }
.lx-sc.s1:not(.s0) > * { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); mask-image: linear-gradient(90deg, transparent, #000 48px) }
.lx-sc > .lx-shelf::-webkit-scrollbar, .lx-sc > .tl::-webkit-scrollbar { display: none }
.lx-scb { position: absolute; top: 50%; z-index: 5; width: 46px; height: 46px; margin-top: -23px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2);
  background: rgba(18, 13, 10, .82); backdrop-filter: blur(10px); color: var(--ink); font: 400 26px/1 var(--font); cursor: pointer; opacity: 0; transition: opacity .2s, transform .2s, background .2s }
.lx-sc:hover .lx-scb:not(:disabled) { opacity: 1 } .lx-scb:hover { background: var(--c, var(--acc)); color: #140e0b; transform: scale(1.06) } .lx-scb:disabled { pointer-events: none }
.lx-scp { left: -14px } .lx-scn { right: -14px } @media (hover: none) { .lx-scb { display: none } }
.lx-sc.drag > * { cursor: grabbing; scroll-snap-type: none; user-select: none }

/* chọn lớp trong môn */
.lg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 18px 0 16px }
.lg button { border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: var(--ink2); padding: 6px 12px; border-radius: 9px; font: 600 13px var(--font); cursor: pointer }
.lg button small { margin-left: 5px; color: var(--muted); font-weight: 500 } .lg button.on { background: var(--c); border-color: var(--c); color: #140e0b } .lg button.on small { color: rgba(20, 14, 11, .7) }
.lg-all { margin-left: auto; font-size: 13px; color: var(--c); font-weight: 600 }
.lsb-foot { margin: 22px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.lx-soon { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 22px; border: 1px dashed color-mix(in srgb, var(--c) 35%, transparent); border-radius: 16px; margin: 16px 0 }
.lt-more { display: inline-block; margin-top: 12px; color: var(--c); font-size: 13px; font-weight: 600 }

/* ===== hook: nguyên liệu biên tập viên chọn ===== */
.lh { display: grid; gap: 12px }
.lh .ac { background: color-mix(in srgb, var(--c) 7%, rgba(0, 0, 0, .3)); border-color: color-mix(in srgb, var(--c) 18%, transparent) } .lh .ac.big { max-width: none }
.lh .ac-stage { aspect-ratio: auto; height: 100% }
.lh-cap { position: absolute; left: 10px; bottom: 8px; right: 10px; font-size: 12px; font-weight: 600; color: var(--ink2); text-shadow: 0 1px 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.lh-top { grid-template-columns: 1.7fr 1fr 1fr 1fr; grid-auto-rows: 210px }
.lh-top .lh-big { grid-row: span 1 }
@media (max-width: 760px) { .lh-top { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px } .lh-top .lh-big { grid-column: span 2; grid-row: auto } .lh-top .lh-i:nth-child(4) { display: none } }
.lh .ac { animation: lx-in .6s both; animation-delay: calc(var(--i) * 90ms) } @keyframes lx-in { from { opacity: 0; transform: translateY(14px) scale(.98) } }

/* ===== Toán: bảng đen + lộ trình ===== */
.ls-board .ls-pat { background: radial-gradient(800px 400px at 0% 0%, rgba(99, 216, 255, .08), transparent 60%) }
.lt-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start }
.lt-board { position: relative; border-radius: 18px; padding: 18px; min-height: 360px; border: 8px solid #3a2a1c; box-shadow: inset 0 0 60px rgba(0, 0, 0, .6);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .05), transparent 60%), linear-gradient(160deg, #1d2b26, #141f1b) }
.chalk { width: 100%; height: auto; display: block } .chalk .ck { fill: none; stroke: rgba(240, 244, 236, .85); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 700; stroke-dashoffset: 700 }
.chalk .ct { fill: rgba(240, 244, 236, .88); font: 600 20px 'Be Vietnam Pro', cursive; opacity: 0 } .chalk .ct.big { font-size: 28px; fill: #f5c76a }
.ls.in .chalk .ck { animation: lx-draw 1.6s ease forwards } .ls.in .chalk .ct { animation: lx-fade .6s ease forwards .9s }
.ls.in .chalk .d2 { animation-delay: .9s } .ls.in .chalk .d4 { animation-delay: 1.4s } .ls.in .chalk .d5 { animation-delay: 1.9s } .ls.in .chalk .d6 { animation-delay: 2.4s }
@keyframes lx-draw { to { stroke-dashoffset: 0 } } @keyframes lx-fade { to { opacity: 1 } }
.lh-row { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 120px; margin-top: 10px } .lh-row .lh-big { grid-column: auto }
.lt-path h3 { font-size: 15px; color: var(--ink2) } .lt-path ol { list-style: none; margin: 0; padding: 0; position: relative }
.lt-path ol::before { content: ''; position: absolute; left: 19px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--c), transparent) }
.lt-path li a { position: relative; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px 8px 0; border-radius: 12px; transition: background .2s }
.lt-path li a:hover { background: rgba(255, 255, 255, .04) }
.lt-path .n { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #120d0b; border: 2px solid var(--c); font-weight: 800; color: var(--c); z-index: 1 }
.lt-path .t { min-width: 0; display: flex; flex-direction: column } .lt-path .t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .lt-path .t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.lt-path em { font-style: normal; font-size: 12px; color: var(--muted) } .lt-path li.off { opacity: .5 } .lt-path li.off .n { border-style: dashed }
@media (max-width: 900px) { .lt-grid { grid-template-columns: 1fr } .lt-board { min-height: 0 } }

/* ===== Lịch sử: dòng thời gian ===== */
.ls-timeline .ls-pat { background: repeating-linear-gradient(90deg, transparent 0 119px, rgba(245, 199, 106, .05) 119px 120px) }
.lh-march { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; margin-bottom: 6px }
.lh-march .ac { animation: lx-in .6s both, lx-bob 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms), calc(var(--i) * .4s) }
@keyframes lx-bob { 50% { transform: translateY(-5px) } }
@media (max-width: 760px) { .lh-march { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px } }
.tl { overflow-x: auto; padding: 8px 2px 16px; scrollbar-width: thin; outline: none }
.tl-track { display: flex; gap: 0; min-width: max-content; position: relative; padding-top: 34px }
.tl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 14px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent)) }
.tl-era { position: relative; padding: 0 22px 0 0 } .tl-era + .tl-era { padding-left: 22px; border-left: 1px dashed color-mix(in srgb, var(--c) 30%, transparent) }
.tl-mark { position: absolute; top: -34px; left: 0; max-width: 360px; font-size: 12px; font-weight: 700; color: var(--c); background: #140e0b; padding: 2px 10px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tl-era + .tl-era .tl-mark { left: 22px } .tl-mark::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: -1px; box-shadow: 0 0 0 4px #140e0b }
.tl-items { display: flex; gap: 12px }
.tl-ev { width: 200px; display: flex; flex-direction: column; gap: 6px; transition: transform .3s cubic-bezier(.2, .7, .2, 1) }
.tl-ev:hover { transform: translateY(-6px) }
.tl-ev img, .tl-ev .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #1f1712; box-shadow: 0 16px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .3s }
.tl-ev:hover img { box-shadow: 0 22px 44px rgba(0, 0, 0, .55), 0 0 0 2px var(--c) } .tl-ev .ph { display: grid; place-items: center; font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, .1) }
.tl-ev b { font-size: 14px; margin-top: 4px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden } .tl-ev small { color: var(--muted); font-size: 11px } .tl-ev.off { opacity: .55 }

/* ===== Hoá & Vật lí: thí nghiệm ===== */
.ls-chem .ls-pat { background: radial-gradient(500px 300px at 85% 10%, rgba(121, 226, 166, .1), transparent 70%) }
.ls-phys .ls-pat { background: radial-gradient(600px 360px at 10% 100%, rgba(165, 139, 255, .12), transparent 70%), repeating-radial-gradient(circle at 90% 0%, transparent 0 38px, rgba(165, 139, 255, .05) 38px 39px) }
.lc2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; margin-top: 16px }
@media (max-width: 960px) { .lc2 { grid-template-columns: 1fr } }
.ml-card { display: flex; flex-direction: column; gap: 10px }
.ml { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: #0d0a09; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); overflow: hidden }
.ml canvas { display: block; width: 100%; height: var(--h, 300px) } .ml-load { display: grid; place-items: center; height: var(--h, 300px); color: var(--muted); font-size: 13px }
.ml-read { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line) } .ml-read b { color: var(--ink) }
.ml-read .ml-task { flex-basis: 100%; color: var(--ink2) } .ml-read .ml-warn { color: #ff8a7a; font-weight: 600 }
.ml-ui { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px } .ml-ui .btn { user-select: none; -webkit-user-select: none; touch-action: none }
.ml-ui .btn[data-p]:active { transform: scale(.97) }
.ml-3d { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.ml-frame { border-radius: 16px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: #000; margin-bottom: 10px }
.ml-frame-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #15100d } .ml-frame-bar b { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ml-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 70vh; border: 0 }
@media (max-width: 700px) { .ml-frame iframe { aspect-ratio: 3 / 4 } }
.pt h3, .pl h3 { font-size: 15px; color: var(--ink2) }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px }
.pt-el { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8px 6px; border-radius: 10px; text-align: center;
  background: color-mix(in srgb, var(--h, #79e2a6) 13%, #120d0b); border: 1px solid color-mix(in srgb, var(--h, #79e2a6) 38%, transparent); transition: transform .2s, box-shadow .2s }
.pt-el:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 30px color-mix(in srgb, var(--h, #79e2a6) 25%, transparent) }
.pt-el small { position: absolute; top: 5px; left: 7px; font-size: 10px; color: var(--muted) } .pt-el i { position: absolute; top: 5px; right: 7px; font-style: normal; font-size: 10px; color: var(--h, #79e2a6) }
.pt-el b { font-size: 26px; font-weight: 800; color: var(--h, #79e2a6); line-height: 1.1 } .pt-el span { font-size: 10.5px; color: var(--ink2); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.pt-el.g8 { --h: #79e2a6 } .pt-el.g9 { --h: #63d8ff } .pt-el.g10 { --h: #f5c76a } .pt-el.g11 { --h: #ff9f7a } .pt-el.g12 { --h: #ff8ac2 } .pt-el.g0 { --h: #a58bff } .pt-el.g6, .pt-el.g7 { --h: #b6e36a }
.pl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px } @media (max-width: 520px) { .pl-grid { grid-template-columns: 1fr } }
.pl-el { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 8%, #120d0b); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent) }
.pl-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 18px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); margin-bottom: 4px }
.pl-el small { color: var(--muted); font-size: 12px; margin-bottom: 6px } .pl-el .row { gap: 6px; margin-top: auto }

/* phòng chiếu thí nghiệm: một clip tách nền phát giữa sân khấu, danh sách bên cạnh */
.cth { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-bottom: 6px; align-items: start }
.cth-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  background: radial-gradient(60% 55% at 50% 58%, color-mix(in srgb, var(--c) 22%, #1b1411), #0b0807 75%), #0b0807 }
.cth-stage::after { content: ''; position: absolute; left: 14%; right: 14%; bottom: 14%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); pointer-events: none }
.cth-screen.ac.big { position: absolute; inset: 0 0 10% 0; display: block; max-width: none; background: none; border: 0; border-radius: 0; z-index: 1 }
.cth-screen > canvas, .cth-screen > video { position: absolute; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .5)) }
.cth-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; border: 0; background: var(--c); color: #140e0b; font-size: 24px; cursor: pointer; display: none; z-index: 2 }
.lite .cth:not(.on) .cth-play { display: grid; place-items: center }
.cth-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(8, 6, 5, .85)) }
.cth-k { font: 700 10px var(--font); letter-spacing: .14em; color: var(--c) } .cth-cap b { font-size: clamp(15px, 1.6vw, 19px) } .cth-cap a { font-size: 13px; color: var(--c); font-weight: 600 }
.cth-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255, 255, 255, .08) } .cth-bar i { display: block; height: 100%; background: var(--c); transform-origin: left; transform: scaleX(0); transition: transform .25s linear }
.cth-list { list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 440px; overflow-y: auto; scrollbar-width: thin; position: relative }
.cth-list button { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); font: inherit; cursor: pointer; transition: .15s }
.cth-list button:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent) } .cth-list button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent) }
.cth-list b { font-size: 13px; font-weight: 600; line-height: 1.3 } .cth-list small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cth-list button.on b::before { content: '▶ '; color: var(--c); font-size: 11px }
@media (max-width: 900px) {
  .cth { grid-template-columns: 1fr } .cth-stage { aspect-ratio: 4 / 3 }
  .cth-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 0 0 6px } .cth-list li { flex: none; width: 210px }
}
.lx-vids { margin-top: 10px } .lx-vids + .lc2 { margin-top: 26px }

/* ===== Sinh học: hình tròn mềm ===== */
.ls-bio .ls-pat { background: radial-gradient(circle at 92% 8%, rgba(182, 227, 106, .12) 0 120px, transparent 121px), radial-gradient(circle at 4% 96%, rgba(182, 227, 106, .08) 0 160px, transparent 161px) }
.lh-bio .ac { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52% } .lh-bio .ac:nth-child(2n) { border-radius: 58% 42% 45% 55% / 52% 58% 42% 48% }
.lsb-bio .lc { border-radius: 22px 22px 22px 6px }

/* ===== Địa lí: đường đồng mức + bưu thiếp ===== */
.ls-geo .ls-pat { background: repeating-radial-gradient(ellipse at 80% 30%, transparent 0 22px, rgba(95, 196, 168, .07) 22px 23px), repeating-radial-gradient(ellipse at 10% 90%, transparent 0 30px, rgba(95, 196, 168, .05) 30px 31px) }
.pcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; padding: 6px }
.pc { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 14px; background: #f3ece0; color: #2a2018; border-radius: 4px; transform: rotate(var(--r)); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: transform .25s }
.pc:hover { transform: rotate(0) translateY(-4px) } .pc img, .pc .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #d8cdbb; display: grid; place-items: center; font-weight: 800; font-size: 28px; color: #b3a68f }
.pc b { font-size: 13px; line-height: 1.3 } .pc-st { position: absolute; top: 16px; right: 16px; padding: 3px 7px; border: 2px dashed #a2412f; color: #a2412f; font: 700 10px var(--font); background: #f3ece0; transform: rotate(6deg) } .pc.off { opacity: .6 }

/* ===== Ngữ văn: mục lục trên giấy ô ly ===== */
.ls-book .ls-pat { background: linear-gradient(rgba(255, 159, 122, .06) 1px, transparent 1px) 0 0 / 100% 28px, linear-gradient(90deg, rgba(255, 159, 122, .04) 1px, transparent 1px) 0 0 / 28px 100% }
.toc { list-style: none; margin: 0; padding: 18px 22px; background: #f6efe2; color: #2c2219; border-radius: 6px 14px 14px 6px; box-shadow: inset 6px 0 0 #e7a48a, 0 14px 40px rgba(0, 0, 0, .35);
  background-image: linear-gradient(rgba(60, 120, 200, .12) 1px, transparent 1px); background-size: 100% 34px }
.toc li a { display: flex; align-items: baseline; gap: 8px; line-height: 34px; font-size: 15px } .toc li a i { flex: 1; border-bottom: 2px dotted rgba(44, 34, 25, .3) } .toc em { font-style: normal; font-size: 13px; color: #8a6a55 } .toc li.off { opacity: .5 }

/* ===== KH & CN (và môn khác): bản vẽ kỹ thuật ===== */
.ls-blue .ls-pat { background: linear-gradient(rgba(255, 138, 194, .06) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(255, 138, 194, .06) 1px, transparent 1px) 0 0 / 24px 24px }

/* ===== cuối trang ===== */
.lx-end { grid-template-columns: 1fr }

/* tiết kiệm dữ liệu / giảm chuyển động */
.lite .lx-orbit span, .lite .lh-march .ac { animation: none }
@media (prefers-reduced-motion: reduce) {
  body { transition: none } .ls .ls-head, .ls .ls-body { transition: none; opacity: 1 !important; transform: none !important }
  .lx-orbit span, .lh .ac, .lh-march .ac, .lx-skel i { animation: none } .chalk .ck { stroke-dashoffset: 0 !important; animation: none !important } .chalk .ct { opacity: 1 !important; animation: none !important }
}

/* chữ trong thân môn: tiêu đề phụ kiểu biên tập, kệ biên tập viên chọn */
.lx-sub h3, .lt-path h3, .pt h3, .pl h3 { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); margin-bottom: 16px }
.lx-sub h3::after, .lt-path h3::after, .pt h3::after, .pl h3::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent) }
.lx-ed .head { align-items: flex-end; margin-bottom: 22px } .lx-ed .head h2 { font-size: clamp(30px, 3.4vw, 52px); font-weight: 800; letter-spacing: -.035em }
.lx-ed-wrap { margin: 80px 0 40px }
.lx-shelf { grid-auto-columns: minmax(190px, 220px); gap: 18px; padding: 6px 2px 18px }
.lx-shelf .lc { border: 0; background: none; box-shadow: none } .lx-shelf .lc .lc-stage { border-radius: 16px; box-shadow: 0 16px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06) }
.lx-shelf .lc:hover { transform: translateY(-6px) } .lx-shelf .lc-foot { padding: 12px 4px 0 }
.lx-scroll { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase }
.lx-scroll span { width: 22px; height: 34px; border: 2px solid var(--line2); border-radius: 12px; position: relative } .lx-scroll em { font-style: normal }
.lx-scroll span::after { content: ''; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--acc); animation: lx-wheel 1.8s ease-in-out infinite }
@keyframes lx-wheel { 60% { transform: translateY(9px); opacity: 0 } 61% { transform: none; opacity: 0 } }
.lx-hero h1 { background: linear-gradient(175deg, #fff 40%, color-mix(in srgb, var(--acc) 70%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent }
@media (prefers-reduced-motion: reduce) { .ls-intro { --e: 1 !important; --p: .5 !important } .lsb-hero, .lx-scroll span::after { animation: none } }

/* điện thoại hook: khung 9:16 giữa sân khấu phát đoạn mở đầu của bài (t2play chế độ preview) */
.hero-hook .hkp { position: absolute; left: 50%; top: 0; bottom: 4%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 12px }
.hkp-frame { position: relative; flex: 1; min-height: 0; aspect-ratio: 9 / 16; border-radius: 30px; overflow: hidden; background: #000; border: 7px solid #1e1713;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 80px color-mix(in srgb, var(--c) 25%, transparent) }
.hkp-frame::before { content: ''; position: absolute; top: 8px; left: 50%; width: 70px; height: 18px; margin-left: -35px; border-radius: 10px; background: #0b0807; z-index: 6 }
.hkp-poster, .hkp-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover } .hkp-ph { display: grid; place-items: center; font-size: 64px; color: var(--c); background: radial-gradient(circle, color-mix(in srgb, var(--c) 18%, #120d0b), #0b0807) }
.hkp-player { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .5s } .hkp.live .hkp-player { opacity: 1 }
.hkp-player .t2p, .hkp-player .t2p-stage { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; max-width: none; border: 0; border-radius: 0; background: none; box-shadow: none }
.hkp-player .t2p-cv { width: 100% !important; height: 100% !important; display: block; object-fit: cover }
.hkp-player .t2p-wide .t2p-cv { object-fit: contain }   /* bài khung 16:9 trong khung điện thoại dọc: hiện trọn, không cắt hai bên */
.t2p-preview .t2p-bar, .t2p-preview .t2p-lock, .t2p-preview .t2p-loading, .t2p-preview .t2p-buf, .t2p-preview .t2p-msg { display: none !important }
.t2p-preview .t2p-stage:has(.t2p-loading) canvas { opacity: 0 }
.hkp-link { position: absolute; inset: 0; z-index: 3 }
.hkp-snd, .hkp-go { position: absolute; z-index: 5; border: 0; cursor: pointer; color: #fff; backdrop-filter: blur(8px) }
.hkp-snd { right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .55); font-size: 17px }
.hkp-go { inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: var(--c); color: #140e0b; font-size: 22px; display: none }
.lite .hkp:not(.on) .hkp-go { display: grid; place-items: center }
.hkp:not(.live).on .hkp-frame::after { content: ''; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; z-index: 4; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--c); animation: lx-spin .9s linear infinite }
@keyframes lx-spin { to { transform: rotate(360deg) } }
.hkp-cap { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; max-width: 340px }
.hkp-k { font: 700 10px var(--font); letter-spacing: .18em; color: var(--c) } .hkp-t { font-weight: 700; font-size: 15px; line-height: 1.3 } .hkp-t:hover { color: var(--c) }
.hkp-dots { display: flex; gap: 7px } .hkp-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .25); cursor: pointer; transition: width .3s, background .3s }
.hkp-dots button.on { width: 26px; background: var(--c) }
.hero-hook .hk-1 { left: 0; width: 32%; top: 24% } .hero-hook .hk-2 { right: 2%; width: 32%; top: 24% }
.ls-compact .hero-hook .hkp { bottom: 0 } .ls-compact .hkp-cap { display: none }
@media (max-width: 900px) { .hero-hook .hk-1, .hero-hook .hk-2 { width: 30%; top: 30% } .hkp-frame { border-width: 5px; border-radius: 22px } .hkp-cap { max-width: 260px } .hkp-t { font-size: 13px } }

/* ===== Khoa học tự nhiên (lớp 6–9): lộ trình theo sách, mỗi chương một khối có nhãn mạch nội dung ===== */
.ls-khtn .ls-pat { background: radial-gradient(circle at 20% 30%, rgba(79, 209, 197, .10) 0 2px, transparent 3px) 0 0 / 34px 34px, radial-gradient(circle at 70% 60%, rgba(79, 209, 197, .07) 0 1.5px, transparent 2.5px) 0 0 / 22px 22px }
.kb { display: grid; gap: 18px; margin-top: 6px }
.kb-h { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); margin: 0 }
.kb-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent) }
.kb-ch { position: relative; padding: 16px 16px 4px 22px; border-radius: 18px; background: linear-gradient(90deg, color-mix(in srgb, var(--k) 8%, transparent), transparent 70%) }
.kb-ch::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--k) }
.kb-ch header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px }
.kb-ch header b { font-size: 17px; font-weight: 700 } .kb-ch header small { color: var(--muted); font-size: 12px }
.kb-st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--k, var(--c)); background: color-mix(in srgb, var(--k, var(--c)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--k, var(--c)) 35%, transparent) }
.kb-ch .lx-shelf { grid-auto-columns: minmax(160px, 180px) }
.kb-do .kb-labs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px } .kb-do .ml-card .kb-st { align-self: flex-start }
@media (max-width: 960px) { .kb-do .kb-labs { grid-template-columns: 1fr } }
.lsb-chem .pt, .lsb-phys .pl { margin-top: 10px }
.ls-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }
.ls-lab { background: var(--c); color: #140e0b; border-color: transparent } .ls-lab i { color: #140e0b } .ls-lab:hover { filter: brightness(1.08); color: #140e0b } .ls-lab:hover i { transform: none }
