/* Phòng thi – Thầy Quyền Math
   Bố cục: một phòng thi thật. Bảng đen phía trước (ngày, môn, đồng hồ), túi đề niêm phong theo khối,
   giấy thi có đường cắt phách, ô "Điểm / Lời phê" chấm bằng bút đỏ. Mực tím là phần học sinh viết.
   Một giao diện sáng duy nhất (giấy), cùng chất liệu với Toán Lab. */
:root {
  color-scheme: light;
  /* tường, bảng, phấn (dùng chung với Toán Lab) */
  --wall: #E8EEE3;
  --board: #1C4A36;
  --board-edge: #123524;
  --chalk: #F4F7EF;
  --chalk-dim: rgba(244, 247, 239, .68);
  --chalk-faint: rgba(244, 247, 239, .24);
  --chalk-green: #BFE095;
  --chalk-yellow: #F5D46A;
  --chalk-red: #FFA294;
  /* giấy, phong bì */
  --paper: #FFFFFF;
  --paper-2: #FAFCF6;
  --phong: #EEF2E2;
  --phong-nap: #DDE7C8;
  --phong-mep: #C5D3AC;
  --rule: #DFE9DA;
  --rule-strong: #C2D5BA;
  --margin: #E59A9A;
  /* mực */
  --ink: #123524;
  --ink-soft: #3E5247;
  --muted: #66766B;
  --tim: #4A3A99;
  --tim-nen: #F3F1FB;
  --do: #C4342C;
  --deep: #0A6A3B;
  --green: #2E8B57;
  --pastel: #9DC46E;
  --mint: #EFF6EA;
  --olive: #DCE8C9;
  --yellow: #F2C94C;
  /* chữ */
  --f-body: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-head: "Barlow Condensed", "Be Vietnam Pro", "Arial Narrow", sans-serif;
  --f-hand: "Patrick Hand", "Be Vietnam Pro", "Segoe Print", cursive;
  --f-chalk: "Fuzzy Bubbles", "Patrick Hand", "Segoe Print", cursive;
  --chalk-tex: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAHxklEQVR42nVZMZLkMAjsdW25iAj5//sUKqKc6AI1COy9nbqbGY8kS9A0Df5ZyD8DMAAoJv8JBoSfHROKBzcmxwscAuDm+P6nANdwTAiQa8ycq8AFgUEBCAYmFIoJwwPBhMNwAwCXiI0BAvDXG4BCoFAIj7E3vf8fHKtcXwCAswb8p1hAoBioFvnfN8NI+9zt7HGDkTYCBDcPuD/vec7Nrv2ShaVLlyxZupAvXbJsYdnShWXllz3LFpbmdVuS8/Z6Vq5rzhKOsQWs70uXcZByqnERyYWxhO/ntpo3+W5oXxNuWvLA+P0YWTDpayEOgJlG9cSI02FaIPwQYNUBxvnx5wnbBwpBGlGLBcCdW55F+M3SXcdFMceKkc84o9GtOFTyHnJhwCCYEBiDZcKgMIJJeUYrdlAIhGfboShQOB6e/KZtFCBQnbDd1rjTahkFG537hg+UOFU8cG5qm9QaxsFgigjYo0G+eOAwMsngFuUdWb88x81bAA9u+uks/UAxeY6whvNmnt5+Cj1tHtlbdTiPM18hC8jPiug3LrjtYCSccENcR5LQ+5M3Hgz3bNsFg1am4YzjAn/Fg8G53/Op3lLpTwPgNH6wXGw+3oXbmEneT1IU0a6JdSlR/KaciGwp5BXztVFQjwk0GjpRIwtBNpa8ValEyiQp37UsJGWDltyn5YaaVBb/7FzFH+xlheGsMVlwoBRGsMIQ9YRGrqzjhMeQtJOei/oh4/1es4D+Qdsom5HcsjZiO/bpW8HSAOHObUrAnBhWAm1wzAQIpEOsPf+fvKccHVpBi6KIKBtohrN2snPyAFmc1YqlOhjjk7YEVO0hZU1bQBonknEFWtzCXkbvY877SbsVjJqr1ijbo+SiKR5McqCXiN8OiVgWMmVwhpFaggM3W4KMP5ljjoOUOWDkugL/Tb47OQGFVjx/D+XjMHJ73L7S62S22PjxTD/Id09ZNyGbCeMMmyy9CMxIP4eClRJTyY6dJe9kPS/i9i3YPOnZIV3JSAbMiW9tZFIDUgo+5BWiWkJNGviQLGALC1d6b5/XiwIyDOYvb0kmzLlz48hwtHTXVgtOB3pJdcowlsidF4w3MZp75pQB4Oayk95HZjOjEDFu6klMgIIktoLCG4DCMOC4KetLTH6j+AjImpbw4cY6whqrVDd0suacKwNj0PhKOSG8qgmfKD8qBz68ChYmWn4bdINQhAWDnisGXOnVvRiSDY78unNR52Zn1j87x0/iwpM9UNSxw/BklAQenu3krYhicmijQUj2KDdu4WE4SgnBs/B8KaMapkdjpQC6cFMTHuh47juKyjD6YKUQN9qW0IyMYL6arIKalPYb1MlGt2XC1NTuoWa0yBJt4JGWiPDROvJRVF+m4EpREf5V+1nLY9rE2yGliJP6i/0h6c4GtR4LTadYq+GESsfSRlVWnHNKuy1aPaTJqLXOKon7SrBpVvHhveMzUEpsXDzJjDso70SElIoKuAnUzpnKZLYjQy/cBNHAzbIUr1hHCVTP7RqT7kiAOTzTcHBg7SkoSX9mSlfMnyVNVkkptCa+7RvLzHhnTtDUDE8SzcmpJ4car5ys+2wqtoJ/vPxpRcVY5rE3Pf9PpuqnspAGS1vStb9lc+JsKTBeSxN5aWRtrYi6EXQB9lLWuuQ3GcoJlSeNKCylJwkXyfBBLrMw5E10PFmGGlO6krI8dZaQewGvYVMVrDRJqtx9L9u+bpDCAVFthI62F59wnQNCyT5eQOtA7HD5TK1gpNRzmjpHStFvWReM1lUwAOM3mwheOF2TzZ/E8Q7Uu4WmUyE6BHd2iHYwShvVc8zIvEpReqRiDUVNP87iX8uTaZOjM7uCzhqqfjt5MrR2hGx6XVuI2AfRh1D/Lkr0hQxp3UFpEVHudZHPTvlgpe8jWZRoavrRKgBhO692VJDx4pmgT81oLIFo+QtW+l2R4yO87hSdUuolS0xoI+yqoJVU61nwOul7UEcFdD/BZ0lJ8hKhhymrEU+f8a/qQRoBWWbQbONGZSTZjtfMZtGwOzCzAi1k6+rIOYPj4elDsAVAb1LUged29SuHv4WEpTiv/VAp9pHWjsFr5FstWGmH2NKlKCJEuZi0LpEW5EoxYpcyKG0XyW5CrzOQhV7ZZm8j6atdIcXD9spt5/fTcOhVoLQeUj1YSVQ9O333LKVFba0vZqX7L+05gLTnBvJJwc3R1ytyd3mirPqC7UaKckned4anw6mq7kK9jlNvaMm40kr9fGJixWxVlPRgsgIpfT0beT/w0MaJUnpOXbzLxerF2aQHiWdkyAXVTJ5NKVKPTrRS89Qqy0lbd2ncjiz5wobthBWAWnTMedBg5cRaeF4+1XMH46k9+ss6+LT1uzr/9dDqbCipBK1FvbwK8l6qyO4V4xPLaP6v/WBtaH/3kuWPOqgeLgqV1gDenVKlErTyQOJOyp0lI1Yq/lbQkqlolnfL5zDO8sWLVmz9jkoRUjDdf5XGDyhNabw6IycVSSvkSsRcmRr7zpHYlRRY8RBm93YGFd7+5SmFl5dayTL3hxL0HLct/Xo8h3aWT0cn/autN94f8nVWsRIHta7eowoGvD1qHNlYq2opVI1S56PZTrMLXp8t1YdifzyT/llouRrlaegsArRPjOw/Wl/ZS8M39EI8b5OXsM1m3z9khBvLR0f1XQAAAABJRU5ErkJggg==");
}
* { box-sizing: border-box; }
html { background: var(--wall); }
body {
  margin: 0; color: var(--ink-soft); font-family: var(--f-body); font-size: 16px; line-height: 1.55;
  background-color: var(--wall);
  /* giấy ô li mờ */
  background-image: linear-gradient(rgba(18, 53, 36, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 53, 36, .05) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 72px;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.15; font-family: var(--f-head); font-weight: 800; text-wrap: balance; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; }
.wide { max-width: 1180px; }
.narrow { max-width: 860px; margin-inline: auto; }
.small { font-size: .86rem; color: var(--muted); }
.lead { color: var(--ink-soft); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hand { font-family: var(--f-hand); color: var(--tim); font-size: 1.28rem; line-height: 1.2; }
.err { color: var(--do); font-size: .9rem; min-height: 1.4em; }

/* ---------- thanh trên ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .96rem; min-width: 0; }
.brand img { width: 40px; height: 40px; display: block; background: #fff; border-radius: 10px; }
.brand small { display: block; font-weight: 500; font-size: .76rem; color: var(--ink-soft); }
.who { display: flex; align-items: center; gap: 10px; font-size: .88rem; min-width: 0; }
.who img { width: 32px; height: 32px; border-radius: 50%; flex: none; border: 2px solid #fff; }
.who .nm { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }

/* ---------- nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border: 2px solid var(--ink);
  background: var(--deep); border-color: var(--deep); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; border-radius: 0;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:hover { background: #08592F; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: #fff; color: var(--deep); border-color: var(--ink); }
.btn.ghost:hover { background: var(--mint); }
.btn.warn { background: var(--do); border-color: var(--do); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .86rem; border-width: 1.5px; box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; font-size: .88rem; font-weight: 600; }
:is(.btn, .cbtn, .opt, .tfb, .mv, .cell, .khoi, .tab, input, select, .link, .ghi-chu, .muc-nd h3 a):focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- bảng đen ---------- */
.board {
  position: relative; color: var(--chalk); min-width: 0;
  background-color: var(--board);
  background-image:
    radial-gradient(ellipse 60% 40% at 18% 28%, rgba(255, 255, 255, .07), transparent 70%),
    radial-gradient(ellipse 50% 45% at 78% 72%, rgba(255, 255, 255, .05), transparent 70%),
    var(--chalk-tex);
  border: 10px solid var(--board-edge);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .35), 0 14px 30px -18px rgba(18, 53, 36, .7);
  padding: 16px clamp(14px, 3vw, 30px) 20px;
}
.board-top { display: flex; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; font-family: var(--f-chalk); font-size: clamp(.84rem, 2.4vw, 1.02rem); color: var(--chalk-dim); }
.chalk { font-family: var(--f-chalk); color: var(--chalk); }
.chalk-title { font-family: var(--f-chalk); font-weight: 700; color: var(--chalk); font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1.1; text-shadow: 0 0 1px rgba(255, 255, 255, .4); }
.chalk-line { font-family: var(--f-chalk); font-size: clamp(1rem, 2.8vw, 1.22rem); line-height: 1.45; color: var(--chalk); }
.chalk-line b { color: var(--chalk-yellow); font-weight: 700; }
.chalk-y { color: var(--chalk-yellow); }
.chalk-ul { display: block; width: min(320px, 70%); height: 12px; color: var(--chalk-green); margin: 6px 0 12px; }
.board svg { overflow: visible; }
.board svg text { font-family: var(--f-chalk); fill: currentColor; }
.cbtn { font-family: var(--f-chalk); font-weight: 700; font-size: 1.05rem; color: var(--chalk); background: transparent; border: 2px dashed var(--chalk-dim);
  border-radius: 0; padding: 6px 16px; min-height: 46px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.cbtn:hover { border-style: solid; }
.cbtn.solid { background: var(--chalk); color: var(--board); border-style: solid; border-color: var(--chalk); }
.tray { position: absolute; left: 6%; right: 6%; bottom: -24px; height: 14px; background: var(--board-edge); box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .5); }
.tray i { position: absolute; bottom: 12px; height: 7px; background: var(--chalk); border-radius: 2px; }
.tray i:nth-child(1) { left: 40%; width: 46px; transform: rotate(-3deg); }
.tray i:nth-child(2) { left: 46%; width: 30px; background: var(--chalk-yellow); transform: rotate(4deg); }
.tray i:nth-child(3) { left: 58%; width: 78px; height: 18px; bottom: 12px; background: #3A6B4F; border-top: 6px solid #9DB8A4; border-radius: 1px; }

/* bảng mở đầu */
.hero { margin: 0; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px 30px; align-items: center; padding: 18px 0 8px; }
.hero-kicker { font-size: clamp(1rem, 2.6vw, 1.15rem); }
.hero-art { width: 100%; height: auto; color: var(--chalk); }
@media (max-width: 760px) { .hero-in { grid-template-columns: 1fr; } .hero-art { max-width: 380px; justify-self: center; } }

/* dải bảng ở đầu trang phòng thi */
.strip { padding-bottom: 18px; }
.strip .chalk-title { margin-top: 10px; }
.strip .chalk-line { margin-top: 6px; color: var(--chalk-dim); }
.so-lon { color: var(--chalk-yellow); font-size: 1.35em; line-height: .8; }

/* ---------- giấy thi ---------- */
.giay { --pl: clamp(16px, 4vw, 40px); --pr: clamp(16px, 4vw, 40px); position: relative; background: var(--paper); border: 1px solid var(--rule-strong);
  box-shadow: 0 1px 0 var(--rule), 0 18px 28px -20px rgba(18, 53, 36, .55); padding: 22px var(--pr) 26px var(--pl); min-width: 0; }
.giay + .giay { margin-top: 20px; }
.giay-head { display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; align-items: start; }
.giay-head b { display: block; font-family: var(--f-head); font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; line-height: 1.1; }
.giay-head span { display: block; font-size: .8rem; color: var(--muted); }
.giay-head .so-phach { display: inline; font-size: .95rem; }
.giay-head .r { text-align: right; }
.giay-head .r b { font-size: 1.5rem; letter-spacing: .14em; }
.giay-fields { display: flex; flex-wrap: wrap; gap: 4px 26px; margin-top: 14px; font-size: .92rem; color: var(--ink); align-items: baseline; }
.giay-fields > p { flex: 1 1 260px; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.giay-fields > p.ngan { flex: 0 1 170px; }
.dien { flex: 1; min-width: 0; border-bottom: 1.5px dotted var(--muted); min-height: 1.6em; padding: 0 6px; font-family: var(--f-hand); color: var(--tim); font-size: 1.3rem; line-height: 1.25; overflow-wrap: anywhere; }
.dien.mo { color: var(--muted); font-family: var(--f-body); font-size: .82rem; font-style: italic; }
/* đường cắt phách */
.phach { position: relative; margin: 18px calc(-1 * var(--pr)) 18px calc(-1 * var(--pl)); border-top: 2px dashed var(--muted); height: 0; }
.phach::before { content: "✂"; position: absolute; left: 10px; top: -15px; font-size: 1.2rem; color: var(--muted); background: var(--paper); padding: 0 4px; line-height: 1.2; }
.phach span { position: absolute; right: 14px; top: -11px; background: var(--paper); padding: 0 6px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* lề đỏ của giấy thi */
.giay.ke { --pl: 44px; background-image: linear-gradient(90deg, transparent 28px, var(--margin) 28px, var(--margin) 30px, transparent 30px); }
@media (min-width: 640px) { .giay.ke { --pl: 72px; background-image: linear-gradient(90deg, transparent 50px, var(--margin) 50px, var(--margin) 52px, transparent 52px); } }

/* ô Điểm / Lời phê (bút đỏ) */
.diem-loi { display: grid; grid-template-columns: minmax(130px, .42fr) 1fr; border: 1.5px solid var(--ink); }
.diem-loi > div { padding: 8px 14px 12px; min-height: 120px; display: flex; flex-direction: column; }
.diem-loi > div + div { border-left: 1.5px solid var(--ink); }
.o-nhan { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.so-do { font-family: var(--f-hand); color: var(--do); font-size: clamp(3.4rem, 11vw, 4.6rem); line-height: 1; margin-top: 6px; transform: rotate(-4deg); transform-origin: left; }
.chu-do { font-family: var(--f-hand); color: var(--do); font-size: 1.05rem; margin-top: auto; }
.phe { font-family: var(--f-hand); color: var(--do); font-size: clamp(1.25rem, 3.6vw, 1.5rem); line-height: 1.3; margin-top: 8px; }
.cho-do { font-family: var(--f-hand); color: var(--muted); font-size: 1.15rem; margin-top: 10px; }
@media (max-width: 460px) { .diem-loi { grid-template-columns: 1fr; } .diem-loi > div + div { border-left: 0; border-top: 1.5px solid var(--ink); } .diem-loi > div { min-height: 0; } }

/* ---------- sân khấu: giấy đặt chồng lên bảng ----------
   Không xếp hộp thẳng hàng: bảng là nền, giấy thi, nội quy, thẻ dự thi được đặt đè lên mép bảng,
   lệch và xoay nhẹ như đồ vật thật trên bàn. */
.stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 22px; align-items: start; margin: 6px 0 48px; }
.stage > * { min-width: 0; }
.stage .board { grid-column: 1 / -1; grid-row: 1; }
.lay { position: relative; z-index: 2; box-shadow: 0 2px 3px rgba(18, 53, 36, .08), 0 26px 34px -22px rgba(18, 53, 36, .65); }
.nam-cham { position: absolute; top: -13px; left: 50%; width: 26px; height: 26px; border-radius: 50%; transform: translateX(-50%); z-index: 3;
  background: radial-gradient(circle at 35% 30%, #FFE7A0, var(--yellow) 45%, #C9A42A); box-shadow: 0 3px 4px rgba(0, 0, 0, .3); }
.nam-cham.xanh { background: radial-gradient(circle at 35% 30%, #D6EDB9, var(--pastel) 45%, #6E9A45); }

/* trang đăng nhập */
.stage-gate .hero { padding-bottom: 88px; }
.stage-gate .g-login { grid-column: 1 / 8; grid-row: 2; margin-top: -64px; transform: rotate(-.6deg); }
.stage-gate .noiquy { grid-column: 8 / 13; grid-row: 2; margin-top: -92px; transform: rotate(2.2deg); }
.giay-body { display: grid; gap: 12px; }
.giay-body h2 { font-size: 1.8rem; }
#gbtn { min-height: 44px; }
.noiquy { position: relative; background: var(--paper-2); border: 1px solid var(--rule-strong); padding: 30px 22px 22px;
}
.noiquy h2 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.noiquy ol { margin: 14px 0 0; padding-left: 0; list-style: none; counter-reset: dieu; display: grid; gap: 10px; font-size: .92rem; color: var(--ink-soft); }
.noiquy li { counter-increment: dieu; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.noiquy li::before { content: "Điều " counter(dieu) "."; font-weight: 800; color: var(--deep); white-space: nowrap; }
.noiquy li b { color: var(--ink); }
.noiquy .ky { margin-top: 16px; text-align: right; font-family: var(--f-hand); color: var(--tim); font-size: 1.3rem; }
.tape { position: absolute; top: -11px; left: 50%; width: 112px; height: 24px; transform: translateX(-50%) rotate(-2.5deg); background: rgba(157, 196, 110, .6); z-index: 3;
  clip-path: polygon(0 12%, 4% 0, 8% 14%, 12% 2%, 16% 10%, 100% 0, 97% 30%, 100% 55%, 96% 78%, 100% 100%, 0 100%, 3% 70%, 0 45%); }

/* ---------- chọn khối: bốn số phấn viết trên bảng, chạm vào là khoanh tròn ---------- */
.stage-khoi .chon { padding-bottom: 76px; }
.chon .chalk-title { margin: 14px 0 4px; }
.stage-khoi .g-form { grid-column: 2 / 12; grid-row: 2; margin-top: -52px; transform: rotate(.5deg); }
.khoi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; }
.khoi { position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px 6px 8px; background: none; border: 0; color: var(--chalk); cursor: pointer; min-width: 0; }
.khoi + .khoi { border-left: 2px dashed var(--chalk-faint); }
.khoi .so { font-family: var(--f-chalk); font-weight: 700; font-size: clamp(4.4rem, 15vw, 7.6rem); line-height: .95; text-shadow: 0 0 1px rgba(255, 255, 255, .5);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), color .2s; }
.khoi:nth-child(odd) .so { transform: rotate(-4deg); }
.khoi:nth-child(even) .so { transform: rotate(3deg); }
.khoi:hover .so { transform: translateY(-6px) rotate(0); }
.khoi > svg:not(.vong) { width: clamp(46px, 11vw, 70px); height: auto; color: var(--chalk-green); }
.khoi .lop { font-family: var(--f-chalk); font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; color: var(--chalk-dim); }
.khoi .dem { font-family: var(--f-chalk); font-size: .95rem; color: var(--chalk-yellow); margin-top: 4px; }
.khoi .dem.khong { color: var(--chalk-dim); }
.vong { position: absolute; left: 50%; top: 30px; width: min(150px, 92%); height: auto; transform: translateX(-50%); pointer-events: none; overflow: visible; color: var(--chalk-yellow); }
.vong path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.khoi[aria-checked="true"] .vong path { animation: khoanh .55s ease-out forwards; }
.khoi[aria-checked="true"] .so { color: var(--chalk-yellow); transform: rotate(0); }
@keyframes khoanh { to { stroke-dashoffset: 0; } }

.dong { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 10px; font-size: .92rem; font-weight: 600; color: var(--ink); }
.dong input { border: 0; border-bottom: 1.5px dotted var(--muted); background: transparent; padding: 2px 6px; min-height: 44px; font-family: var(--f-hand); font-size: 1.45rem; color: var(--tim); border-radius: 0; min-width: 0; width: 100%; }
.dong input:focus { outline: none; border-bottom: 2px solid var(--tim); background: var(--tim-nen); }
.dong input::placeholder { font-family: var(--f-body); font-size: .86rem; color: #9AA59D; font-style: italic; }
.form-khoi { display: grid; gap: 14px; }
.form-khoi .row { margin-top: 4px; }

/* ---------- phòng thi của khối ---------- */
.stage-phong .room-board { grid-column: 1 / 10; padding-right: clamp(14px, 6vw, 64px); }
.stage-phong .the { grid-column: 9 / 13; grid-row: 1 / span 2; margin-top: 44px; transform: rotate(2.6deg); }
.stage-phong .board-top { padding-right: 10%; }
.stage-ben { grid-column: 1 / 9; grid-row: 2; align-self: center; padding-top: 30px; display: grid; gap: 14px; justify-items: start; }
.stage-ben:empty { display: none; }
.stage-ben .notice, .stage-ben .tabs { margin: 0; }
/* thẻ dự thi, kẹp bằng ghim giấy */
.the { position: relative; background: var(--paper); border: 1.5px solid var(--ink); display: flex; flex-direction: column; min-width: 0; align-self: start; }
.ghim { position: absolute; top: -26px; left: 26px; width: 22px; height: 58px; z-index: 3; color: #8A968C; }
.the-head { background: var(--deep); color: #fff; font-family: var(--f-head); font-weight: 800; font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase; padding: 8px 14px 8px 58px; display: flex; justify-content: space-between; align-items: center; }
.the-head small { font-family: var(--f-body); font-size: .72rem; letter-spacing: .04em; text-transform: none; font-weight: 600; opacity: .85; }
.the-body { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 14px; align-items: start; }
.anh { width: 76px; height: 96px; border: 1px solid var(--rule-strong); background: var(--mint); display: grid; place-items: center; overflow: hidden;
  font-family: var(--f-head); font-weight: 800; font-size: 2.4rem; color: var(--deep); }
.anh img { width: 100%; height: 100%; object-fit: cover; display: block; }
.the dl { margin: 0; display: grid; gap: 2px; min-width: 0; }
.the dt { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.the dd { margin: 0 0 4px; min-width: 0; overflow-wrap: anywhere; }
.the dd.hand { font-size: 1.35rem; }
.the-foot { border-top: 1px dashed var(--rule-strong); padding: 6px 14px 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ghi chú viết tay bên lề, có mũi tên */
.ghi-chu { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 6px; color: var(--tim); text-decoration: none; font-family: var(--f-hand); font-size: 1.35rem; line-height: 1.2; transform: rotate(-1.2deg); }
.ghi-chu u { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ghi-chu svg { flex: none; width: 54px; height: auto; }
.ghi-chu .muiten { width: 64px; transition: transform .2s; }
.ghi-chu:hover .muiten { transform: translateX(6px); }

.ke-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 24px 0 0; padding-bottom: 8px; border-bottom: 3px solid var(--ink); }
.ke-h h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); text-transform: uppercase; letter-spacing: .02em; }
.ke-h p { font-size: .88rem; color: var(--muted); }

/* túi đề = mục lục: số lớn rỗng ruột, gạch ngang ngăn cách, bút dạ quang lướt qua tên đề */
.muc { list-style: none; margin: 0; padding: 0; }
.muc-i { position: relative; display: grid; grid-template-columns: clamp(64px, 11vw, 120px) minmax(0, 1fr) auto; gap: 6px 22px; align-items: center; padding: 22px 0; border-bottom: 1.5px solid var(--ink); }
.muc-so { font-family: var(--f-head); font-weight: 800; font-size: clamp(3.4rem, 9vw, 5.6rem); line-height: .8; color: transparent; -webkit-text-stroke: 2px var(--deep); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muc-i.st-dong .muc-so { -webkit-text-stroke-color: #A9B4AB; }
.muc-i.st-lam .muc-so { color: var(--pastel); -webkit-text-stroke-color: var(--deep); }
.muc-nd { display: grid; gap: 4px; min-width: 0; }
.muc-tren { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muc-nd h3 { font-size: clamp(1.45rem, 3.6vw, 1.95rem); line-height: 1.12; }
.muc-nd h3 a { color: inherit; text-decoration: none; }
.hl { background-image: linear-gradient(transparent 58%, rgba(157, 196, 110, .55) 58%, rgba(157, 196, 110, .55) 92%, transparent 92%);
  background-repeat: no-repeat; background-size: 0% 100%; transition: background-size .35s ease-out; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.muc-i:hover .hl, .muc-i:focus-within .hl, .hl.on { background-size: 100% 100%; }
.muc-phu { font-size: .9rem; color: var(--ink-soft); }
.muc-phu b { color: var(--ink); font-variant-numeric: tabular-nums; }
.muc-phu .cham { color: var(--pastel); margin: 0 6px; }
.han { font-family: var(--f-hand); color: var(--do); font-size: 1.2rem; line-height: 1.2; transform: rotate(-1deg); transform-origin: left; }
.muc-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.dau-s { display: inline-block; padding: 1px 8px; border: 1.5px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px; transform: rotate(-3deg);
  font-size: .68rem; letter-spacing: .14em; color: var(--deep); background: rgba(255, 255, 255, .6); }
.dau-s.st-dong { color: #8A968C; }
.dau-s.st-lam { color: var(--tim); }
.muc-i.want { background: linear-gradient(90deg, rgba(242, 201, 76, .28), transparent 70%); }
.muc-i.want::before { content: "đề em vừa quét"; position: absolute; top: 8px; right: 0; font-family: var(--f-hand); color: var(--do); font-size: 1.1rem; transform: rotate(-2deg); }
.diem-do { flex: none; min-width: 66px; height: 54px; padding: 0 10px; border: 2.5px solid var(--do); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--f-hand); color: var(--do); font-size: 1.8rem; line-height: 1; transform: rotate(-8deg); }
.trong { padding: 30px 4px; font-family: var(--f-hand); color: var(--muted); font-size: 1.4rem; line-height: 1.3; border-bottom: 1.5px solid var(--ink); }
.trong b { display: block; color: var(--ink); font-size: 1.7rem; }

/* túi đề trong phòng thi: mỗi túi là một tờ giấy dày viền mực, dải số kiểu bảng đen bên trái,
   bóng đổ đặc, hơi lệch; nút bóc túi màu vàng nhấn */
.tui-list { display: grid; gap: 26px; margin-top: 26px; }
.tui-list .muc-i { grid-template-columns: clamp(84px, 12vw, 136px) minmax(0, 1fr) auto; gap: 6px 26px; align-items: stretch; padding: 0 22px 0 0;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); transition: transform .18s, box-shadow .18s; }
.tui-list .muc-i:nth-child(odd) { transform: rotate(-.4deg); }
.tui-list .muc-i:nth-child(even) { transform: rotate(.35deg); }
.tui-list .muc-i:hover, .tui-list .muc-i:focus-within { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--ink); }
.tui-list .muc-so { position: relative; display: grid; place-items: center; align-self: stretch; padding: 18px 0;
  font-family: var(--f-chalk); font-weight: 700; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1; letter-spacing: 0; color: var(--chalk); -webkit-text-stroke: 0;
  background-color: var(--board); background-image: radial-gradient(ellipse 80% 60% at 30% 25%, rgba(255, 255, 255, .09), transparent 70%), var(--chalk-tex);
  border-right: 2px solid var(--ink); }
.tui-list .muc-so::after { content: ""; position: absolute; right: -15px; top: 50%; width: 14px; height: 30px; transform: translateY(-50%);
  background: var(--ink); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.tui-list .muc-nd { padding: 20px 0 18px; }
.tui-list .muc-nd h3 { font-size: clamp(1.55rem, 3.8vw, 2.15rem); }
.tui-list .muc-act { padding: 16px 0; }
.tui-list .st-lam .muc-so { background-color: var(--tim); color: #fff; }
.tui-list .st-dong { background: #F1F3EE; border-color: #8A968C; box-shadow: 7px 7px 0 #B7C0B9; }
.tui-list .st-dong .muc-so { background-color: #7E8B82; color: rgba(255, 255, 255, .85); border-color: #8A968C; }
.tui-list .st-dong .muc-so::after { background: #8A968C; }
.tui-list .st-dong h3 { color: var(--ink-soft); }
.tui-list .muc-i.want { background: #FFFBEA; outline: 4px solid var(--yellow); outline-offset: 6px; }
.tui-list .muc-i.want::before { top: -34px; right: 6px; font-size: 1.25rem; }
.btn.boc { background: var(--yellow); border-color: var(--ink); color: var(--ink); min-height: 54px; padding: 12px 26px; font-size: 1.06rem; box-shadow: 4px 4px 0 var(--ink); }
.btn.boc:hover { background: #F6D768; }
.btn.boc::after { content: "→"; font-weight: 800; transition: transform .15s; }
.btn.boc:hover::after { transform: translateX(4px); }

/* trạng thái kích hoạt dưới mỗi số khối */
.khoi .kh { font-family: var(--f-body); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-dim);
  border: 1.5px dashed var(--chalk-faint); padding: 1px 8px; margin-top: 4px; }
.khoi .kh.co { color: var(--chalk-green); border-style: solid; border-color: var(--chalk-green); }

/* màn kích hoạt: ổ khoá phấn trên bảng, ô nhập mã viết tay trên giấy */
.kh-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 30px; align-items: center; }
.kh-in .chalk-title { margin-top: 10px; }
.o-khoa { width: clamp(84px, 14vw, 140px); height: auto; color: var(--chalk); transform: rotate(-6deg); }
.ma-o { display: grid; gap: 6px; margin-top: 18px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ma-o input { width: 100%; max-width: 420px; border: 0; border-bottom: 2.5px solid var(--ink); background: var(--tim-nen); border-radius: 0; padding: 8px 14px 6px; min-height: 64px;
  font-family: var(--f-hand); font-size: clamp(2.2rem, 7vw, 2.9rem); line-height: 1; letter-spacing: .14em; color: var(--tim); font-variant-numeric: tabular-nums; }
.ma-o input:focus { outline: none; border-bottom-color: var(--tim); background: #EAE6F8; }
.ma-o input::placeholder { color: #C9C2E6; }
.kh-luu { margin: 14px 0 0; padding-left: 18px; font-size: .9rem; color: var(--ink-soft); display: grid; gap: 4px; }
.kh-luu b { color: var(--ink); }
@media (max-width: 560px) { .kh-in { grid-template-columns: 1fr; } .o-khoa { display: none; } }

/* thầy chọn khối để xem: chữ gạch chân bằng bút dạ, không đóng khung */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 14px; }
.tab { border: 0; background: transparent; padding: 6px 2px; min-height: 40px; font-weight: 700; cursor: pointer; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  background-image: linear-gradient(transparent 62%, rgba(242, 201, 76, .7) 62%, rgba(242, 201, 76, .7) 90%, transparent 90%); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size .25s; }
.tab:hover { color: var(--ink); }
.tab[aria-current="true"], .tab[aria-pressed="true"] { color: var(--ink); background-size: 100% 100%; }
.tab small { font-weight: 500; opacity: .8; }

@media (max-width: 820px) {
  .stage { column-gap: 0; }
  .stage-gate .hero, .stage-khoi .chon { padding-bottom: 48px; }
  .stage-gate .g-login, .stage-khoi .g-form { grid-column: 1 / -1; margin: -32px 6px 0; transform: rotate(-.5deg); }
  .stage-gate .noiquy { grid-column: 1 / -1; grid-row: 3; margin: 34px 10px 0; transform: rotate(1.4deg); }
  .stage-phong .room-board { grid-column: 1 / -1; padding-right: clamp(14px, 3vw, 30px); padding-bottom: 46px; }
  .stage-phong .the { grid-column: 1 / -1; grid-row: 2; margin: -30px 10px 0 34px; transform: rotate(1.6deg); }
  .stage-phong .board-top { padding-right: 0; }
  .stage-ben { grid-column: 1 / -1; grid-row: 3; padding-top: 34px; }
  .the-body { grid-template-columns: 56px 1fr; padding: 10px 14px; } .the .anh { width: 56px; height: 70px; font-size: 1.8rem; }
  .the dl { grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; } .the dd { margin: 0; }
}
@media (max-width: 620px) {
  .khoi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .khoi:nth-child(3) { border-left: 0; }
  .khoi:nth-child(n+3) { border-top: 2px dashed var(--chalk-faint); }
  .muc-i { grid-template-columns: 58px minmax(0, 1fr); align-items: start; gap: 8px 14px; }
  .muc-so { padding-top: 4px; -webkit-text-stroke-width: 1.5px; }
  .muc-act { grid-column: 2; justify-content: flex-start; }
  .muc-i.want::before { position: static; grid-column: 1 / -1; }
  .tui-list { gap: 22px; }
  .tui-list .muc-i { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; padding: 0 14px 0 0; box-shadow: 5px 5px 0 var(--ink); }
  .tui-list .muc-so { grid-row: 1 / span 2; font-size: 2.4rem; padding: 14px 0; }
  .tui-list .muc-so::after { right: -11px; width: 10px; height: 22px; }
  .tui-list .muc-nd { padding: 14px 0 0; }
  .tui-list .muc-act { grid-column: 2; padding: 6px 0 16px; }
  .tui-list .muc-i.want::before { position: absolute; top: -30px; grid-column: auto; }
  .tui-list .muc-i.want { margin-top: 18px; }
  .ghi-chu { font-size: 1.2rem; }
  .ghi-chu svg { width: 42px; }
}

.notice { border: 1.5px dashed var(--rule-strong); background: var(--paper-2); padding: 14px 16px; font-size: .92rem; margin-bottom: 16px; }
.notice.warn { border-color: var(--do); color: var(--do); }
.notice .row { margin-top: 10px; }

/* ---------- đồng hồ (dải bảng dính trên cùng) ---------- */
.clock { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  padding: 8px clamp(12px, 3vw, 22px); border-width: 6px; }
.time { font-family: var(--f-chalk); font-weight: 700; font-size: clamp(1.9rem, 6vw, 2.4rem); line-height: 1; color: var(--chalk); min-width: 4.4ch; font-variant-numeric: tabular-nums; }
.time.low { color: var(--chalk-red); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .5; } }
.clock-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; font-family: var(--f-chalk); }
.prog { color: var(--chalk); font-size: .98rem; }
.saved { color: var(--chalk-dim); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock .cbtn { flex: none; }

/* đầu đề */
.de-head { text-align: center; display: grid; gap: 4px; margin-bottom: 8px; }
.de-loai { font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.de-head h1 { font-size: clamp(1.6rem, 4.6vw, 2.2rem); }
.de-head p { font-size: .92rem; }
.so-phach { font-family: var(--f-head); font-weight: 800; letter-spacing: .12em; color: var(--do); }

/* ---------- câu hỏi ---------- */
.sec { margin-top: 26px; }
.sec h2 { font-size: 1.35rem; display: inline-block; border-bottom: 3px solid var(--pastel); padding-bottom: 2px; }
.sec .note { font-size: .86rem; color: var(--muted); font-style: italic; margin-top: 6px; }
.q { padding: 18px 0; border-bottom: 1px dashed var(--rule-strong); scroll-margin-top: 92px; }
.q:last-child { border-bottom: 0; }
.qt { color: var(--ink); }
.qt .no { font-weight: 800; color: var(--deep); margin-right: 4px; }
.qt .pt { font-size: .78rem; color: var(--muted); font-weight: 500; }
.qimg { display: block; max-width: min(100%, 560px); height: auto; margin: 12px auto; }

.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-top: 12px; }
@media (max-width: 560px) {
  .opts { grid-template-columns: 1fr; }
}
.opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; background: transparent; border: 1px solid transparent; text-align: left; cursor: pointer; border-radius: 0; }
.opt:hover { background: transparent; }
.bub { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: var(--ink); background: #fff; }
.opt:hover .bub { background: var(--tim-nen); }
/* chọn đáp án = tô kín bong bóng bằng mực tím, chữ chuyển màu mực, không đóng khung */
.opt[aria-checked="true"] .bub { background: var(--tim); border-color: var(--tim); color: #fff; box-shadow: 0 0 0 4px var(--tim-nen); }
.opt[aria-checked="true"] { color: var(--tim); font-weight: 600; }
.opt[aria-checked="true"]:hover { background: transparent; }

.tf { width: 100%; border-collapse: collapse; margin-top: 12px; }
.tf td { border-top: 1px solid var(--rule); padding: 8px 6px; vertical-align: middle; }
.tf td.lt { width: 30px; font-weight: 700; color: var(--ink); }
.tf td.ch { width: 132px; white-space: nowrap; text-align: right; }
.tfb { min-width: 56px; min-height: 40px; border: 1.5px solid var(--ink); background: #fff; cursor: pointer; font-weight: 700; border-radius: 0; }
.tfb + .tfb { margin-left: 6px; }
.tfb[aria-pressed="true"] { background: var(--tim); border-color: var(--tim); color: #fff; }
@media (max-width: 560px) {
  /* câu đúng/sai trên điện thoại: chữ của ý chiếm cả dòng, nút Đ/S xuống dưới */
  .tf tr { display: grid; grid-template-columns: 26px minmax(0, 1fr); border-top: 1px solid var(--rule); padding: 6px 0; }
  .tf td { border-top: 0; padding: 4px 4px; }
  .tf td.ch { grid-column: 2; width: auto; text-align: left; }
}

.gap { display: inline-block; width: 7.5em; min-height: 40px; margin: 2px 4px; padding: 4px 8px; border: 0; border-bottom: 2px solid var(--ink); background: var(--tim-nen);
  font-family: var(--f-hand); font-size: 1.3rem; color: var(--tim); text-align: center; border-radius: 0; vertical-align: baseline; }
.gap:focus { outline: none; border-bottom-color: var(--tim); background: #EAE6F8; }
select.pick { width: auto; min-width: 6.5em; max-width: 100%; font-family: var(--f-body); font-size: .95rem; text-align: left; padding: 6px 8px; min-height: 40px; cursor: pointer; color: var(--tim); font-weight: 600; }
select.pick.now, .gap.now { box-shadow: 0 0 0 3px var(--yellow); }
img.stepfig { position: sticky; top: 74px; z-index: 5; background: #fff; border: 1px solid var(--rule); }

.ord { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.ord li { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--rule-strong); background: var(--paper-2); padding: 6px 8px; }
.ord .k { flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: var(--tim); color: #fff; font-weight: 700; font-size: .85rem; }
.ord .tx { flex: 1; min-width: 0; color: var(--ink); }
.mvs { flex: none; display: flex; flex-direction: column; gap: 4px; }
.mv { width: 44px; height: 34px; border: 1.5px solid var(--ink); background: #fff; cursor: pointer; font-size: 1.1rem; border-radius: 0; }
.mv:disabled { opacity: .3; }

/* ---------- phiếu trả lời (lưới số câu) ---------- */
.card { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cell { width: 42px; height: 42px; border: 1.5px solid var(--ink); background: #fff; font-weight: 700; cursor: pointer; border-radius: 50%; font-size: .86rem; font-variant-numeric: tabular-nums; }
.cell.done { background: var(--tim); border-color: var(--tim); color: #fff; }
.cell.right { background: var(--deep); border-color: var(--deep); color: #fff; }
.cell.part { background: var(--yellow); border-color: #C9A42A; color: var(--ink); }
.cell.paper { border-style: dashed; color: var(--muted); }
.cell.wrong, .cell.blank-r { background: #fff; border-color: var(--do); color: var(--do); border-width: 2px; }
.chu-thich { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.chu-thich i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); vertical-align: -1px; margin-right: 5px; }
.chu-thich .t { background: var(--tim); border-color: var(--tim); }
.chu-thich .g { border-style: dashed; border-color: var(--muted); }

/* ---------- chấm bài (bút đỏ) ---------- */
.rv { margin-top: 10px; padding: 10px 12px; background: var(--paper-2); border-left: 3px solid var(--rule-strong); font-size: .93rem; }
.rv.right { border-left-color: var(--deep); }
.rv.part { border-left-color: var(--yellow); }
.rv.wrong, .rv.blank { border-left-color: var(--do); }
.rv.paper { border-left-color: var(--rule-strong); }
.rv .tag { font-family: var(--f-hand); font-size: 1.2rem; }
.rv .tag.right { color: var(--deep); } .rv .tag.part { color: #9A7A10; } .rv .tag.wrong, .rv .tag.blank { color: var(--do); } .rv .tag.paper { color: var(--muted); }
.ok-ans { color: var(--deep); font-weight: 600; }
.sol { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--rule-strong); color: var(--ink); line-height: 1.7; }
.sol b { color: var(--deep); }
.your { color: var(--tim); }
.opt.is-right .bub { background: var(--deep); border-color: var(--deep); color: #fff; }
.opt.is-wrong .bub { background: var(--do); border-color: var(--do); color: #fff; }
.tfb.is-right { background: var(--deep); border-color: var(--deep); color: #fff; }
.tfb.is-wrong { background: var(--do); border-color: var(--do); color: #fff; }
.review .opt, .review .tfb, .review .mv { cursor: default; }
.review img.stepfig { position: static; }

/* cũ, còn dùng ở trang giáo viên và trang lớp 9 */
.sheet { background: var(--paper); border: 1px solid var(--rule-strong); box-shadow: 0 1px 0 var(--rule), 0 18px 28px -20px rgba(18, 53, 36, .55); padding: 26px clamp(18px, 4vw, 40px); }
.sheet + .sheet { margin-top: 18px; }
.gate { display: grid; gap: 22px; padding-top: 6vh; }
.gate h1 { font-size: clamp(2rem, 6vw, 3rem); }
.stamp { display: inline-block; color: var(--do); border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px;
  padding: 2px 10px; font-weight: 800; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-3deg); width: max-content; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--ink); font-size: .92rem; }
.field input, .field select { min-height: 48px; padding: 10px 14px; border: 1.5px solid #CBD5CE; background: #fff; border-radius: 0; font-weight: 500; }
.field input:focus { border-color: var(--green); outline: none; }
.slips { display: grid; gap: 16px; margin-top: 18px; }
.slip { background: var(--paper); border: 1px solid var(--rule-strong); border-left: 6px solid var(--deep); padding: 18px 20px; display: grid; gap: 10px; box-shadow: 0 16px 22px -20px rgba(18, 53, 36, .6); }
.slip h3 { font-size: 1.45rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; }
.mark-score { font-family: var(--f-hand); color: var(--do); font-size: 1.5rem; line-height: 1; }

/* ---------- hộp xác nhận, thông báo ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(18, 53, 36, .5); display: grid; place-items: center; padding: 16px; }
.modal .sheet { max-width: 460px; width: 100%; box-shadow: 6px 6px 0 var(--ink); border: 1.5px solid var(--ink); }
.modal h2 { font-size: 1.6rem; margin-bottom: 8px; }
.modal .row { margin-top: 18px; justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--board); color: var(--chalk);
  font-family: var(--f-chalk); padding: 10px 18px; z-index: 60; font-size: .98rem; max-width: calc(100vw - 32px); border: 4px solid var(--board-edge); }

/* ---------- trang giáo viên ---------- */
.tbl-wrap { overflow-x: auto; margin-top: 14px; border: 1.5px solid var(--ink); background: #fff; }
table.t { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.t th, table.t td { padding: 9px 10px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
table.t td.wrap-cell { white-space: normal; min-width: 220px; }
table.t th { background: var(--mint); color: var(--ink); font-weight: 700; position: sticky; top: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #F6FAF3; }
.khoi-o { font-family: var(--f-head); font-weight: 800; font-size: 1.3rem; color: var(--deep); }
.dots { display: flex; gap: 3px; }
.dot { width: 14px; height: 14px; border: 1px solid var(--rule-strong); }
.dot.right { background: var(--deep); border-color: var(--deep); }
.dot.part { background: var(--yellow); border-color: #C9A42A; }
.dot.wrong { background: #fff; border-color: var(--do); }
.dot.blank { background: repeating-linear-gradient(45deg, #fff 0 3px, #F2D3D1 3px 5px); border-color: var(--do); }
.dot.paper { border-style: dashed; }
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.sw input { width: 20px; height: 20px; accent-color: var(--deep); }
.pill { display: inline-block; padding: 2px 10px; border: 1px solid currentColor; font-size: .76rem; font-weight: 700; }
.pill.on { color: var(--deep); background: var(--mint); }
.pill.off { color: var(--muted); }

.katex { font-size: 1.06em; }

@media (max-width: 520px) {
  .brand small { display: none; }
  .brand { font-size: .88rem; }
  .who .nm { max-width: 34vw; }
  .who .link { white-space: nowrap; }
  .clock { gap: 10px; }
  .clock .cbtn { padding: 6px 12px; }
  .giay-head .r b { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .time.low { animation: none; }
  .slate, .btn { transition: none; }
}

/* ---------- túi đề theo chương ---------- */
.chuong-h { margin: 34px 0 -8px; font-family: var(--f-hand); font-weight: 400; font-size: 1.55rem; color: var(--deep); transform: rotate(-.6deg); }
.chuong-h::before { content: "§ "; color: var(--do); }
/* ---------- thư mục ở trang giáo viên ---------- */
tr.thu-muc td { background: var(--board); color: var(--chalk); font-weight: 600; letter-spacing: .01em; padding: 8px 12px; }
tr.thu-muc i { font-style: normal; color: var(--chalk-yellow); margin: 0 10px; }
/* ---------- ảnh bài tự luận ---------- */
.anh { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; align-items: flex-start; }
.anh.dang { opacity: .5; pointer-events: none; }
.anh.dang::after { content: "đang gửi ảnh…"; font-family: var(--f-hand); color: var(--do); font-size: 1.2rem; align-self: center; }
.anh-i { position: relative; margin: 0; padding: 6px 6px 14px; background: #fff; box-shadow: 0 2px 0 var(--ink), 0 6px 14px rgba(0,0,0,.12); transform: rotate(-1.2deg); }
.anh-i:nth-child(even) { transform: rotate(1.4deg); }
.anh-i img { display: block; width: 116px; height: 150px; object-fit: cover; }
.anh-x { position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border: 1.5px solid var(--ink); background: var(--chalk-yellow); color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.anh-them { display: grid; place-items: center; width: 128px; height: 170px; border: 2px dashed var(--deep); color: var(--deep); font-weight: 600; cursor: pointer; background: rgba(239, 246, 234, .7); }
.anh-them:hover, .anh-them:focus-within { background: var(--chalk-yellow); }
.anh-trong { margin-top: 10px; font-style: italic; }

/* ---------- bảng xếp hạng lớp, cúp ----------
   Bục vinh quang vẽ phấn trên bảng đen, cúp là miếng nam châm màu dán lên bảng;
   tủ cúp là tấm thẻ giấy; bảng điểm cả lớp là tờ giấy kẻ có lề đỏ. */
svg.cup { width: 44px; height: auto; overflow: visible; flex: none; }
svg.cup .cup-than, svg.cup .cup-de { stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
svg.cup .cup-quai { stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }
svg.cup .cup-sang { stroke: rgba(255, 255, 255, .75); stroke-width: 2.6; stroke-linecap: round; }
svg.cup .cup-de { fill: var(--deep); }
svg.cup.cup-vang .cup-than { fill: #F2C94C; }
svg.cup.cup-bac .cup-than { fill: #D3DCD6; }
svg.cup.cup-dong .cup-than { fill: #D9925B; }
svg.cup text, .board svg.cup text { font-family: var(--f-head); font-weight: 800; font-size: 17px; fill: var(--ink); }
svg.cup.nho { width: 22px; }
svg.cup.nho text { display: none; }
svg.cup.lon { width: clamp(54px, 9vw, 78px); filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .28)); }

.xh-ke { margin-top: 44px; }
.xh { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; margin-top: 22px; align-items: start; }
.xh-board { grid-column: 1 / -1; padding-bottom: 0; overflow: hidden; }
.xh:has(.tu-cup) .xh-board { grid-column: 1 / 9; }
.tu-cup { grid-column: 9 / 13; margin-top: 18px; transform: rotate(-1.6deg); box-shadow: 6px 6px 0 var(--ink); }

.bvq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: clamp(6px, 2vw, 18px); margin-top: 14px; }
.bvq-cot { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.bvq-ten { display: grid; gap: 2px; font-family: var(--f-chalk); font-weight: 700; color: var(--chalk); font-size: clamp(.92rem, 2.6vw, 1.15rem); line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.bvq-ten .em { color: var(--chalk-yellow); }
.bvq-khoi { width: 100%; display: grid; place-content: center; gap: 0; border: 3px solid var(--chalk); border-bottom: 0; color: var(--chalk);
  background: rgba(255, 255, 255, .06); font-family: var(--f-chalk); }
.bvq-khoi span { font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; line-height: 1; }
.bvq-khoi small { font-size: .82rem; color: var(--chalk-dim); }
.h1 .bvq-khoi { height: clamp(110px, 17vw, 150px); border-color: var(--chalk-yellow); }
.h1 .bvq-khoi span { color: var(--chalk-yellow); }
.h2 .bvq-khoi { height: clamp(82px, 12vw, 110px); }
.h3 .bvq-khoi { height: clamp(62px, 9vw, 82px); }
.bvq-cot.trong .bvq-khoi { border-style: dashed; border-color: var(--chalk-faint); color: var(--chalk-faint); }
.bvq-cot.trong .bvq-khoi span { color: var(--chalk-faint); }
.bvq-trong { padding: 18px 0 22px; }
.h1 svg.cup.lon { animation: cup-nay .9s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes cup-nay { from { transform: translateY(-14px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .h1 svg.cup.lon { animation: none; } }

.tu-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 16px; align-items: center; padding: 14px 14px 6px; }
.tu-hang { display: grid; justify-items: center; }
.so-hang { min-width: 70px; height: 62px; padding: 0 10px; border: 2.5px solid var(--do); border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-hand); color: var(--do); font-size: 2.3rem; line-height: 1; transform: rotate(-8deg); margin: 4px 0; }
.tu-hang small { font-size: .74rem; color: var(--muted); }
.tu-ke { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 6px solid var(--ink); padding-bottom: 4px; }
.tu-o { display: grid; justify-items: center; gap: 0; }
.tu-o svg.cup { width: 40px; }
.tu-o b { font-family: var(--f-head); font-size: 1.3rem; color: var(--ink); line-height: 1.1; }
.tu-o small { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tu-o.rong svg.cup { opacity: .22; filter: grayscale(1); }
.tu-o.rong b { color: var(--muted); }
.tu-huy { list-style: none; margin: 0; padding: 8px 14px 4px; display: grid; gap: 2px; font-size: .9rem; }
.tu-huy li { border-bottom: 1px dashed var(--rule-strong); padding: 3px 0; }
.tu-huy b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tu-loi { padding: 6px 14px 12px; font-family: var(--f-hand); color: var(--do); font-size: 1.2rem; line-height: 1.25; }

.xh-giay { margin-top: 30px; }
.xh-h { font-size: clamp(1.4rem, 3.4vw, 1.8rem); text-transform: uppercase; }
.xh-h small { font-family: var(--f-body); font-size: .85rem; font-weight: 600; text-transform: none; color: var(--muted); margin-left: 8px; }
.xh-ds { list-style: none; margin: 10px 0 0; padding: 0; }
.xh-ds li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto 76px; gap: 4px 16px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.xh-hang { font-family: var(--f-head); font-weight: 800; font-size: 1.6rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.xh-ds li.top .xh-hang { color: var(--deep); }
.xh-ten { color: var(--ink); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.xh-ten small { display: block; font-weight: 400; font-size: .76rem; color: var(--muted); }
.xh-ten em { font-style: normal; font-family: var(--f-hand); color: var(--do); font-size: 1.15rem; margin-left: 4px; }
.xh-cup { display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: flex-end; }
.cup-dem { display: inline-flex; align-items: center; gap: 1px; }
.cup-dem b { font-size: .82rem; color: var(--ink); }
.xh-so { display: flex; gap: 12px; font-size: .86rem; color: var(--ink-soft); white-space: nowrap; }
.xh-so b { color: var(--ink); font-variant-numeric: tabular-nums; }
.xh-tong { font-family: var(--f-hand); color: var(--do); font-size: 1.6rem; line-height: 1; text-align: right; }
.xh-ds li.em { background: linear-gradient(transparent 12%, rgba(242, 201, 76, .42) 12%, rgba(242, 201, 76, .42) 88%, transparent 88%); }
.xh-ds li.em .xh-ten { font-family: var(--f-hand); color: var(--tim); font-weight: 400; font-size: 1.3rem; line-height: 1.15; }
.xh-luat { margin-top: 12px; font-size: .82rem; color: var(--muted); }

.xh-de { margin-top: 26px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.xh-de summary { cursor: pointer; padding: 14px 18px; font-family: var(--f-head); font-weight: 800; font-size: 1.35rem; color: var(--ink); text-transform: uppercase; list-style-position: inside; }
.xh-de summary small { font-family: var(--f-body); font-size: .82rem; font-weight: 600; text-transform: none; color: var(--muted); margin-left: 6px; }
.xh-de summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.xh-de-ds { list-style: none; margin: 0; padding: 0 18px 8px; }
.xh-de-ds li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 18px; padding: 12px 0; border-top: 1px dashed var(--rule-strong); align-items: center; }
.xh-de-ds b { display: block; color: var(--ink); line-height: 1.3; }
.xh-de-ds li small { font-size: .78rem; color: var(--muted); }
.xh-de-cup { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.xh-de-cup span { display: inline-flex; align-items: center; gap: 5px; font-size: .92rem; color: var(--ink); }
.xh-de-cup span.em { font-family: var(--f-hand); color: var(--tim); font-size: 1.15rem; }
.xh-de-cup i { font-style: normal; font-family: var(--f-hand); color: var(--do); font-size: 1.05rem; }

/* tem cúp trên tờ bài đã chấm */
.tem-cup { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 14px; border: 2px dashed var(--do); transform: rotate(-1deg); }
.tem-cup svg.cup { width: 54px; }
.tem-cup p { font-family: var(--f-hand); color: var(--do); font-size: 1.3rem; line-height: 1.2; }

@media (max-width: 860px) {
  .xh:has(.tu-cup) .xh-board, .tu-cup { grid-column: 1 / -1; }
  .tu-cup { transform: rotate(-1deg); margin: 6px 6px 0 0; }
}
@media (max-width: 620px) {
  .xh-ds li { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "h t g" "h c g" "h s g"; gap: 2px 10px; }
  .xh-hang { grid-area: h; font-size: 1.35rem; }
  .xh-ten { grid-area: t; }
  .xh-cup { grid-area: c; justify-content: flex-start; }
  .xh-cup:empty { display: none; }
  .xh-so { grid-area: s; font-size: .8rem; }
  .xh-tong { grid-area: g; font-size: 1.45rem; }
  .xh-de-ds li { grid-template-columns: 1fr; }
  .tu-in { grid-template-columns: 1fr; justify-items: stretch; }
  .tu-hang { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
}
/* ---------- bảng theo dõi lớp ---------- */
.lop-dau { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; }
.bang-lop th, .bang-lop td { text-align: center; vertical-align: middle; }
.bang-lop th:first-child, .bang-lop td:first-child, .bang-lop td:last-child { text-align: left; }
.bang-lop td.o-chua { color: var(--muted, #6B7280); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(210, 70, 59, .07) 6px 12px); }
.bang-lop td.o-co { cursor: pointer; }
.bang-lop td.o-co:hover { background: var(--chalk-yellow, #F2C94C); }
.bang-lop .thieu { color: var(--do, #C4342C); font-weight: 600; }
.bang-lop tr.ngoai td:first-child::after { content: " (khác lớp)"; font-size: .8rem; color: var(--do, #C4342C); }
.dang-sai { list-style: none; padding: 0; margin: 0; max-width: 640px; }
.dang-sai li { display: grid; grid-template-columns: minmax(0, 15em) 1fr 3.2em; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line, #DCE8C9); }
.dang-sai i { height: 12px; background: linear-gradient(90deg, var(--do, #C4342C) var(--p), rgba(18, 53, 36, .08) var(--p)); }
.dang-sai b { text-align: right; }

.anh-them { font-size: 1rem; line-height: 1.3; text-align: center; }
.anh-them span { font-size: 1rem; }
.katex:has(.mtable) { display: inline-block; max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: middle; padding-bottom: 4px; }
.bang-lop .ten-de { max-width: 11em; margin-inline: auto; white-space: normal; font-weight: 400; }

.anh-them { display: flex; align-items: center; justify-content: center; }
.gap.pick { width: auto; min-width: 3.4em; }

/* ================= Phòng thi (bản sắp xếp lại): đầu trang gọn, ba thẻ Túi đề / Tiến độ / Xếp hạng ================= */
.ph-dau { padding-bottom: 20px; }
.ph-dau-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; align-items: end; margin-top: 8px; }
.ph-dau .chalk-line { color: var(--chalk-dim); margin-top: 4px; }
.ph-so { display: flex; gap: 0; margin: 0; }
.ph-so > div { padding: 2px 18px; border-left: 2px dashed var(--chalk-faint); text-align: center; }
.ph-so > div:first-child { border-left: 0; }
.ph-so dt { font-family: var(--f-chalk); font-size: .82rem; color: var(--chalk-dim); white-space: nowrap; }
.ph-so dd { margin: 0; font-family: var(--f-chalk); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.1; color: var(--chalk); }
.ph-so .nong dd { color: var(--chalk-yellow); }
.ph-so .bam { cursor: pointer; } .ph-so .bam:hover dd { text-decoration: underline; }
.ph-phu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 12px 2px 6px; font-size: .88rem; color: var(--muted); }
.ph-phu > span:empty { display: none; }
.ph-tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 0; margin: 14px -2px 0; background: var(--wall); border-bottom: 3px solid var(--ink); }
.ph-tab { flex: 1 1 0; position: relative; min-height: 50px; border: 0; background: transparent; font-family: var(--f-head); font-weight: 800; font-size: 1.25rem;
  letter-spacing: .02em; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ph-tab[aria-selected="true"] { color: var(--ink); background: var(--paper); box-shadow: inset 0 -5px 0 var(--yellow); }
.ph-tab:focus-visible { outline: 3px solid var(--tim); outline-offset: -3px; }
.cham-do { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--do); color: #fff; font-family: var(--f-body); font-size: .78rem; display: inline-grid; place-items: center; }
.nhom { margin-top: 8px; }
.nhom .ke-h { margin-top: 30px; }
.nhom-gap .ke-h { border-bottom-color: var(--do); }
.nhom-gap .ke-h h2 { color: var(--do); }
.han.gap { font-weight: 700; background: linear-gradient(transparent 55%, rgba(196, 52, 44, .14) 55%); display: inline-block; }
.ph-vo { margin-top: 18px; }
/* đề đã làm: một dòng gọn */
.tui-list .muc-i.gon { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; padding: 12px 18px 12px 12px; box-shadow: 4px 4px 0 var(--ink); transform: none; }
.tui-list .muc-i.gon:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.tui-list .muc-i.gon .muc-nd { padding: 0; }
.tui-list .muc-i.gon h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); }
.tui-list .muc-i.gon .muc-act { padding: 0; gap: 8px; }
.diem-do.cho { border-style: dashed; color: var(--muted); border-color: var(--muted); }
@media (max-width: 620px) {
  .ph-dau-in { grid-template-columns: 1fr; }
  .ph-so > div { flex: 1; padding: 2px 6px; }
  .ph-tab { font-size: 1.1rem; }
  .tui-list .muc-i.gon { grid-template-columns: 64px minmax(0, 1fr); }
  .tui-list .muc-i.gon .muc-act { grid-column: 2; justify-content: flex-start; }
}

/* ----- Tiến độ cả khoá ----- */
.td { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.td-o, .td-k { background: var(--paper); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 16px 18px; min-width: 0; }
.td-o { display: grid; align-content: start; gap: 2px; }
.td-xong { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.td-nhan { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.td-so { font-family: var(--f-hand); font-size: 2.6rem; line-height: 1.05; color: var(--tim); }
.td-so b { font-weight: 400; }
.td-so small { font-size: 1.2rem; }
.td-so.do { color: var(--do); }
.td-phu { font-size: .84rem; color: var(--ink-soft); }
.td-o.nhac { background: #FFF8E0; }
.td-vong { width: 74px; height: 74px; transform: rotate(-90deg); }
.td-vong circle { fill: none; stroke: var(--olive); stroke-width: 12; }
.td-vong .v { stroke: var(--deep); stroke-linecap: round; }
.td-k { grid-column: span 2; }
.td-k.td-bieu { grid-column: 1 / -1; }
.td-k h3 { font-size: 1.4rem; margin-bottom: 10px; }
.bd { width: 100%; height: auto; display: block; }
.bd .moc { stroke: var(--rule-strong); stroke-width: 1; }
.bd .moc.m5 { stroke: var(--do); stroke-dasharray: 4 5; opacity: .55; }
.bd .moc.m8 { stroke: var(--deep); stroke-dasharray: 4 5; opacity: .55; }
.bd rect.tot { fill: var(--deep); } .bd rect.dat { fill: var(--pastel); } .bd rect.yeu { fill: var(--do); }
.bd text { font-family: var(--f-body); font-size: 12px; font-weight: 700; fill: var(--ink); }
.bd text.tr { font-weight: 500; fill: var(--muted); font-size: 11px; }
.td-ds { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.td-ds li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto 3.2em; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--rule-strong); font-size: .92rem; }
.td-dang li { grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto; }
.td-ds .td-dau { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.td-thanh { height: 10px; background: var(--olive); position: relative; overflow: hidden; }
.td-thanh i { position: absolute; inset: 0 auto 0 0; background: var(--deep); }
.td-thanh.do i { background: var(--do); }
.td-ti { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-soft); }
.td-tb { font-family: var(--f-hand); color: var(--do); font-size: 1.2rem; text-align: right; }
@media (max-width: 900px) { .td { grid-template-columns: repeat(2, minmax(0, 1fr)); } .td-k { grid-column: 1 / -1; } }
@media (max-width: 420px) { .td { gap: 12px; } .td-o { padding: 12px; } .td-so { font-size: 2.1rem; } .td-vong { width: 56px; height: 56px; } }

/* ----- Nộp ảnh tự luận: một chỗ cho cả bài ----- */
.nop-anh .ke-h { margin-top: 0; }
.nop-anh .ke-h h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
#anh-khu { position: relative; }
#anh-khu.dang { opacity: .6; pointer-events: none; }
#anh-khu.dang::after { content: "đang gửi ảnh " attr(data-tien) "…"; position: absolute; left: 0; bottom: -28px; font-family: var(--f-hand); color: var(--do); font-size: 1.2rem; }
.anh-ds { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; align-items: flex-start; }
.anh-ds .anh-i figcaption { position: absolute; left: 8px; bottom: 16px; min-width: 22px; padding: 0 6px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; text-align: center; }
.anh-ds .anh-them { width: 128px; height: 170px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 1rem; }
.nop-anh.xem { margin-top: 10px; }

.nhom:first-child .ke-h { margin-top: 22px; }
.td-o { position: relative; }
@media (max-width: 520px) {
  .td-xong { grid-template-columns: 1fr; }
  .td-xong .td-vong { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; }
  .td-nhan { font-size: .7rem; letter-spacing: .06em; padding-right: 2px; }
  .bd { max-width: 100%; }
}
.bd { max-height: 260px; }

.han.cho { color: var(--tim); }
.mo-luc { display: grid; text-align: center; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 2px dashed var(--rule-strong); padding: 8px 14px; }
.mo-luc b { font-family: var(--f-hand); font-size: 1.2rem; text-transform: none; letter-spacing: 0; color: var(--tim); }
.tui-list .st-sap .muc-so { background-color: #6E6A8E; }

.lop-khoa { margin: -4px 0 4px; font-size: .86rem; color: var(--ink-soft); }
.lop-khoa b { color: var(--ink); }
.dong input[readonly] { color: var(--ink); background: var(--mint); cursor: not-allowed; }
.khoi:disabled { opacity: .35; cursor: not-allowed; }

/* Phiếu theo ngày: thứ + ngày thật to ở ô bên trái */
.tui-list .muc-i.co-ngay { grid-template-columns: clamp(150px, 22vw, 220px) minmax(0, 1fr) auto; }
.tui-list .muc-so.co-ngay { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 16px 8px; text-align: center; }
.muc-so.co-ngay .ms-stt { font-family: var(--f-chalk); font-size: 1.05rem; line-height: 1; opacity: .6; letter-spacing: .04em; }
.muc-so.co-ngay .ms-thu { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.15rem, 2.8vw, 1.6rem); line-height: 1.1; color: var(--yellow); text-transform: uppercase; letter-spacing: .02em; margin-top: 4px; }
.muc-so.co-ngay .ms-ngay { font-family: var(--f-head); font-weight: 800; font-size: clamp(2.6rem, 6.6vw, 4.2rem); line-height: 1; color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.muc-so.co-ngay .ms-den { font-family: var(--f-head); font-weight: 600; font-size: .95rem; line-height: 1.2; color: rgba(255, 255, 255, .85); margin-top: 4px; }
.muc-so.co-ngay .ms-den b { display: block; font-size: 1.5rem; font-weight: 800; color: #fff; }
.tui-list .st-dong .muc-so.co-ngay .ms-thu { color: #E8ECE4; }
.ngay-chip { display: inline-block; margin: 0 0 4px; padding: 2px 10px; background: var(--deep); color: #fff; font-family: var(--f-head); font-weight: 600; font-size: .95rem; }
.ngay-chip b { color: var(--yellow); font-weight: 800; font-size: 1.1rem; }
@media (max-width: 620px) {
  .tui-list .muc-i.co-ngay { grid-template-columns: 100px minmax(0, 1fr); }
  .muc-so.co-ngay .ms-thu { font-size: 1.05rem; }
  .muc-so.co-ngay .ms-ngay { font-size: 1.95rem; }
  .muc-so.co-ngay .ms-den b { font-size: 1.2rem; }
}

/* Nộp ảnh: báo lỗi rõ ngay dưới ô ảnh, mẹo mở bằng trình duyệt; ảnh ở trang kết quả */
#kq-anh { position: relative; }
#kq-anh.dang { opacity: .6; pointer-events: none; }
#kq-anh.dang::after { content: "đang gửi ảnh " attr(data-tien) "…"; position: absolute; left: 0; bottom: -28px; font-family: var(--f-hand); color: var(--do); font-size: 1.2rem; }
.anh-loi { margin: 34px 0 0; padding: 10px 14px; border-left: 4px solid var(--do, #C4342C); background: #FDECEC; color: #8A1F18; font-weight: 600; }
.anh-meo { margin-top: 30px; color: var(--muted, #6B7280); }
.anh-loi:not([hidden]) + .anh-meo { margin-top: 8px; }
.kq-anh { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line, #DCE8C9); }

.btn.do { background: var(--do, #C4342C); border-color: var(--do, #C4342C); color: #fff; }

/* ===== Ảnh tự luận (anh.js) ===== */
.anh-khu .anh-ds { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; align-items: flex-start; }
.anh-khu .anh-them { width: 128px; height: 170px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 8px; font-size: 1rem; line-height: 1.25; }
.anh-khu .anh-them svg { width: 38px; height: 38px; }
.anh-khu .anh-them.chup { background: var(--chalk-yellow, #F2C94C); }
.anh-khu .anh-them.chon { background: rgba(239, 246, 234, .9); }
.anh-i img { transition: transform .2s; background: #fff; }
.anh-xoay { position: absolute; top: -10px; left: -10px; width: 30px; height: 30px; padding: 4px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; border-radius: 50%; }
.anh-xoay svg { width: 100%; height: 100%; display: block; }
.anh-tag { position: absolute; right: 8px; bottom: 16px; padding: 1px 6px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--do, #C4342C); }
.anh-tag.gv { background: var(--deep, #0A6A3B); }
.anh-tag.muon + .anh-tag.gv { bottom: 36px; }
.anh-i.cho img, .anh-i.cho .anh-xl { display: block; width: 116px; height: 150px; object-fit: cover; opacity: .55; background: #EFF6EA; }
.anh-i.cho .anh-tien { position: absolute; inset: 6px 6px 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: var(--deep, #0A6A3B); }
.anh-i.cho .anh-bar { position: absolute; left: 6px; bottom: 8px; height: 5px; background: var(--deep, #0A6A3B); }
.anh-i.cho.hong .anh-tien { color: var(--do, #C4342C); }
.anh-cho-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; background: #FFF6DB; border-left: 4px solid #F59E0B; font-weight: 600; }
.anh-khu .anh-loi { margin: 16px 0 0; }
.anh-khu .anh-meo { margin-top: 12px; }
.bang-tt { margin: 12px 0 14px; padding: 14px 16px; background: #FFF6DB; border: 2px solid #F2C94C; color: #123524; }
.bang-tt p { margin: 0 0 10px; } .bang-tt p.small { margin: 10px 0 0; }
.bang-tt .row { gap: 8px; flex-wrap: wrap; }
.the-muon { margin-top: 10px; padding: 8px 12px; background: #FDECEC; border-left: 4px solid var(--do, #C4342C); color: #8A1F18; }
.chip-muon { display: inline-block; padding: 1px 8px; background: var(--do, #C4342C); color: #fff; font-size: .8rem; }
.ban-moi { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; background: #123524; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.3); font-weight: 600; }
.ban-moi .btn { background: #F2C94C; color: #123524; border-color: #F2C94C; }

/* Nhãn trạng thái bài */
.tt-chip { display: inline-block; width: fit-content; margin: 6px 0 0; padding: 2px 10px; font-size: .82rem; font-weight: 700; letter-spacing: .01em; border: 1.5px solid currentColor; background: #fff; }
.muc-nd > .tt-chip { margin: 0 0 4px; }
.tt-chip.chua { color: #425466; } .tt-chip.sap { color: #3B82F6; }
.tt-chip.qua { color: #fff; background: var(--do, #C4342C); border-color: var(--do, #C4342C); }
.tt-chip.lo { color: #6B7280; text-decoration: line-through; }
.tt-chip.muon { color: #B45309; background: #FFF6DB; }
.tt-chip.xong { color: var(--deep, #0A6A3B); background: #EFF6EA; }
.tui-list .muc-i.st-muon .muc-so { background: var(--do, #C4342C); }
.btn.boc.do { background: var(--do, #C4342C); color: #fff; }
.bien-nhan { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 0 0 16px; padding: 12px 16px; background: #EFF6EA; border-left: 5px solid var(--deep, #0A6A3B); font-weight: 600; color: #123524; }
.bien-nhan .ok { font-weight: 800; color: var(--deep, #0A6A3B); }
.bien-nhan .muon { color: var(--do, #C4342C); font-weight: 800; }
.stage-gate > .bang-tt { margin: 0 0 16px; }

/* Mở trong Zalo/Facebook: hướng dẫn mở bằng Safari/Chrome */
.g-trong-app { margin: 0 0 18px; padding: 20px 20px 16px; border: 3px solid #F2C94C; background: #FFFBEA; }
.mo-tt-dau { font-size: 1.08rem; line-height: 1.5; margin: 0 0 12px; }
.mo-tt-ds { margin: 0; padding: 0; list-style: none; counter-reset: b; display: grid; gap: 12px; }
.mo-tt-ds li { counter-increment: b; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; background: #fff; border: 1.5px solid #DCE8C9; font-size: 1.02rem; }
.mo-tt-ds li::before { content: "Cách " counter(b); font-weight: 800; color: #fff; background: #0A6A3B; padding: 2px 10px; }
.ba-cham { display: inline-block; padding: 0 8px; border: 1.5px solid #123524; border-radius: 6px; letter-spacing: 2px; }

/* Sửa bài */
.the-sua { margin-top: 12px; padding: 10px 14px; background: #EFF6EA; border-left: 4px solid var(--deep, #0A6A3B); color: #123524; }
.sua-dong { margin: 4px 0 0; font-size: .92rem; color: var(--deep, #0A6A3B); }
.btn.sua { background: #F2C94C; color: #123524; border-color: #123524; }
.pill.sua { background: #F2C94C; color: #123524; }
.sua-gv { color: #B45309; font-weight: 700; }

/* Túi đề + cột "Vừa nộp" */
.tui-luoi { display: grid; gap: 22px; }
.gan-day { order: -1; padding: 14px 16px; background: #fff; border: 2px solid var(--ink, #123524); box-shadow: 4px 4px 0 rgba(18,53,36,.15); }
.gd-dau { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.gd-dau h2 { font-size: 1.25rem; margin: 0; }
.gan-day ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gan-day li button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 8px 10px; background: #F7F8FA; border: 1px solid #D9DEE5; cursor: pointer; font: inherit; color: inherit; }
.gan-day li button:hover { border-color: var(--deep, #0A6A3B); background: #EFF6EA; }
.gd-diem { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border: 2.5px solid var(--do, #C4342C); border-radius: 50%; color: var(--do, #C4342C); font-family: var(--f-hand, inherit); font-size: 1.35rem; font-weight: 700; }
.gd-nd { display: grid; gap: 2px; min-width: 0; }
.gd-nd b { font-size: .98rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gd-nd small { color: #6B7280; }
.gd-nd .tt-chip { margin: 2px 0 0; }
@media (min-width: 1100px) {
  .tui-luoi { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .gan-day { order: 0; position: sticky; top: 76px; }
}
@media (max-width: 1099px) { .gan-day ol { grid-auto-flow: column; grid-auto-columns: minmax(250px, 82%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; } .gan-day li { scroll-snap-align: start; } }
.dem-tab { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #EFF6EA; color: var(--deep, #0A6A3B); font-size: .78rem; font-weight: 700; }
.dl-tom { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 18px; }
.dl-tom > div { padding: 12px 14px; background: #fff; border: 1.5px solid #DCE8C9; display: grid; }
.dl-tom b { font-size: 1.7rem; color: var(--deep, #0A6A3B); line-height: 1.1; }
.dl-tom span { font-size: .88rem; color: #6B7280; }
.dl-tom .do b { color: var(--do, #C4342C); }

/* ===== Trang giáo viên: thanh điều hướng + tổng quan ===== */
.gv-nav { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 2px solid var(--ink); box-shadow: 0 4px 12px rgba(18,53,36,.06); }
.gv-nav-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.gv-nav-in::-webkit-scrollbar { display: none; }
.gv-nav a { flex: none; padding: 13px 14px 11px; font-weight: 700; font-size: .95rem; color: var(--ink-soft); text-decoration: none; border-bottom: 4px solid transparent; white-space: nowrap; }
.gv-nav a:hover { color: var(--ink); background: var(--mint, #EFF6EA); }
.gv-nav a[aria-current] { color: var(--deep, #0A6A3B); border-bottom-color: var(--deep, #0A6A3B); }
.gv-nav .gv-hs { margin-left: auto; font-weight: 600; color: var(--muted); }
.gv-h1 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 18px 0 6px; line-height: 1.15; }
.tq-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.tq-kpi > div { padding: 14px 16px; background: #fff; border: 1.5px solid var(--rule-strong); display: grid; gap: 2px; }
.tq-kpi b { font-size: 2rem; line-height: 1; color: var(--deep, #0A6A3B); }
.tq-kpi span { font-size: .88rem; color: var(--muted); }
.tq-kpi .do b { color: var(--do, #C4342C); }
.tq-kpi.nho b { font-size: 1.6rem; }
.tq-loc { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; margin: 4px 0 8px; }
.tq-loc label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
table.tq th, table.tq td { vertical-align: top; }
table.tq thead th { text-align: center; min-width: 150px; }
table.tq thead th:first-child { text-align: left; min-width: 260px; }
.tq-de { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; font-weight: 400; min-width: 260px; box-shadow: 2px 0 0 var(--rule-strong); }
.tq-de-in { display: flex; gap: 12px; align-items: flex-start; }
@media (max-width: 700px) {
  .tq-de { min-width: 168px; max-width: 190px; } table.tq thead th:first-child { min-width: 168px; }
  .tq-de-in { flex-direction: column; gap: 6px; } .tq-ngay { width: auto; display: flex; gap: 6px; padding: 2px 8px; }
  .tq-o, table.tq thead th { min-width: 108px; } .tq-thanh { max-width: 90px; } .tq-phu { font-size: .74rem; }
}
.tq-ngay { flex: none; width: 58px; padding: 6px 0; text-align: center; background: var(--board, #1C4A36); color: #fff; display: grid; line-height: 1.1; }
.tq-ngay span { font-size: .78rem; color: var(--chalk-yellow, #F5D46A); font-weight: 700; }
.tq-ngay b { font-size: 1.15rem; }
.tq-ten a { font-weight: 700; color: var(--ink); text-decoration: none; }
.tq-ten a:hover { text-decoration: underline; }
.tq-o { text-align: center; min-width: 150px; }
.tq-o.click:hover { background: var(--mint, #EFF6EA); outline: 2px solid var(--deep, #0A6A3B); outline-offset: -2px; }
.tq-so { font-size: 1.05rem; color: var(--muted); } .tq-so b { font-size: 1.6rem; color: var(--ink); }
.tq-thanh { height: 8px; margin: 6px auto 6px; max-width: 140px; background: #E5E7EB; }
.tq-thanh i { display: block; height: 100%; background: var(--deep, #0A6A3B); }
.tq-phu { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.tq-phu .do, td .do { color: var(--do, #C4342C); font-weight: 700; }
.tq-khong { color: #C7CCD3; vertical-align: middle !important; }
.pill.muon { color: #B45309; background: #FFF6DB; }

.ph-tab { white-space: nowrap; }
@media (max-width: 520px) { .ph-tab { font-size: 1rem; padding-left: 4px; padding-right: 4px; } .ph-tab .dem-tab { display: none; } }
.tui-luoi > * { min-width: 0; }
.lop-khoa.sai-ten { color: var(--do); }
.lop-khoa.sai-ten .link { font-weight: 700; display: inline; min-height: 0; padding: 0; text-align: left; }

/* ---------- trang giáo viên: quản lí học sinh ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gv-h1 small { font-family: var(--f-body); font-weight: 600; margin-left: 6px; }
.hs-viecs { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }
.hs-viec { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 8px 14px; background: #fff; border: 2px solid var(--ink); color: var(--ink);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.hs-viec b { font-family: var(--f-head); font-size: 1.4rem; line-height: 1; }
.hs-viec.do b { color: var(--do); }
.hs-viec[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; transform: translate(3px, 3px); }
.hs-viec[aria-pressed="true"] b { color: var(--yellow); }
.hs-loc { position: sticky; top: 52px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; background: var(--wall); border-bottom: 2px solid var(--ink); }
.hs-loc select, .hs-tim input { min-height: 42px; padding: 0 12px; border: 1.5px solid var(--rule-strong); background: #fff; font: inherit; font-size: .92rem; color: var(--ink); }
.hs-tim { flex: 1 1 240px; }
.hs-tim input { width: 100%; }
.hs-tim input:focus, .hs-loc select:focus { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--ink); }
.hs-dem { font-size: .85rem; color: var(--muted); margin-left: auto; }
.hs-ds { list-style: none; margin: 0; padding: 0; }
.hs-o { width: 100%; display: grid; grid-template-columns: minmax(0, 2.2fr) 70px 104px 116px 104px 110px 118px; gap: 4px 14px; align-items: center; text-align: left;
  padding: 12px 8px; background: transparent; border: 0; border-bottom: 1px solid var(--rule); font: inherit; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.hs-o:hover { background: rgba(157, 196, 110, .14); }
.hs-o:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
.hs-ten b { color: var(--ink); font-size: .98rem; }
.hs-ten small { display: block; font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-lop { font-weight: 700; color: var(--ink); }
.hs-o i { font-style: normal; color: var(--do); font-size: .8rem; }
.hs-o.hs-ra, .hs-o.hs-het { opacity: .6; }
.hs-h2 { font-size: 1.4rem; margin: 30px 0 8px; scroll-margin-top: 70px; }
.hs-h2.do { color: var(--do); }
.hs-ngan { position: fixed; inset: 0; z-index: 80; background: rgba(18, 53, 36, .35); display: flex; justify-content: flex-end; }
.hs-ngan-in { width: min(520px, 100%); height: 100%; overflow-y: auto; background: var(--paper, #fff); border-left: 3px solid var(--ink); padding: 18px 22px 40px;
  box-shadow: -10px 0 30px rgba(18, 53, 36, .2); animation: hs-vao .25s ease-out; }
@keyframes hs-vao { from { transform: translateX(40px); opacity: 0; } }
body.hs-mo { overflow: hidden; }
.hs-ngan-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 14px; }
.hs-ngan-h h2 { font-size: 1.6rem; }
.hs-form { display: grid; gap: 10px; }
.hs-form .field input { width: 100%; }
.hs-h3 { font-family: var(--f-body); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--do); margin: 22px 0 8px; }
.hs-act { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hs-act li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hs-act .btn { margin-left: auto; }
.hs-bai-ds { list-style: none; margin: 0; padding: 0; }
.hs-bai-ds li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 8px 0; border-bottom: 1px dashed var(--rule-strong); }
.hs-bai-ds li a { color: var(--ink); font-weight: 600; }
.hs-bai-ds li .small { grid-column: 1; }
.hs-bai-ds li b { grid-column: 2; grid-row: 1 / 3; align-self: center; font-family: var(--f-hand); color: var(--do); font-size: 1.3rem; font-weight: 400; }
.hs-xoa { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; padding-top: 14px; border-top: 1px dashed var(--do); }
@media (max-width: 900px) {
  .hs-o { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ten lop" "ns tt" "sdt bai" "dn dn"; gap: 2px 12px; }
  .hs-ten { grid-area: ten; } .hs-lop { grid-area: lop; text-align: right; } .hs-ns { grid-area: ns; } .hs-sdt { grid-area: sdt; }
  .hs-bai { grid-area: bai; text-align: right; } .hs-dn { grid-area: dn; font-size: .8rem; color: var(--muted); } .hs-tt { grid-area: tt; text-align: right; }
  .hs-loc { top: 48px; }
  .hs-loc select { flex: 1 1 30%; }
  .hs-ngan-in { border-left: 0; padding: 14px 16px 40px; }
}
.hs-ngan-h .btn { white-space: nowrap; flex: none; }
