/* Huy hiệu, danh hiệu, đốm sáng */
.gm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; text-decoration: none; color: inherit; min-height: 44px; font-size: var(--fs-meta); }
.gm__cap { font-weight: 700; padding: 3px 12px; border-radius: 999px; background: #ffd21f; color: #0d1b30; }
.gm__d b { font-weight: 800; font-size: var(--fs-body); }
.gm__dots { display: inline-flex; gap: 5px; }
.gm__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.gm__dots i.on { background: #ffd21f; box-shadow: 0 0 8px #ffdc4a; }
.gm:hover .gm__d { text-decoration: underline; }

.gm-b { flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; }
.gm-b--on { background: radial-gradient(circle at 30% 25%, #ffe680, #ffd21f 60%, #f5bd00); color: #0b3585; box-shadow: 0 0 0 4px rgba(255, 210, 31, .28), 0 6px 16px rgba(245, 189, 0, .35); }
.gm-b--off { background: var(--surface-2); color: var(--ink-2); opacity: .7; }
.gm-b--s { width: 32px; height: 32px; box-shadow: none; } .gm-b--s .ic { width: 18px; height: 18px; }
.gm-b--l { width: 76px; height: 76px; } .gm-b--l .ic { width: 34px; height: 34px; }
.gm-toast { display: inline-flex; align-items: center; gap: 10px; }

.gmp { gap: 28px; }
.gmp__hd { display: grid; justify-items: start; gap: 10px; padding: 32px 36px; border-radius: 28px; color: #fff;
  background: radial-gradient(circle at 88% 18%, rgba(255, 210, 31, .30) 0 2px, transparent 3px) 0 0 / 26px 26px, radial-gradient(120% 140% at 100% 0%, #2f7bff 0%, #1257d6 45%, #0b3585 100%); }
.gmp__k { font-size: var(--fs-meta); color: rgba(255, 255, 255, .85); margin: 0; }
.gmp__cap { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: 0; color: #ffd21f; }
.gmp__bar { width: 100%; max-width: 420px; }
.gmp__bar progress { display: block; width: 100%; height: 10px; border: 0; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, .28); accent-color: #ffd21f; }
.gmp__bar progress::-webkit-progress-bar { background: rgba(255, 255, 255, .28); } .gmp__bar progress::-webkit-progress-value { background: #ffd21f; border-radius: 5px; } .gmp__bar progress::-moz-progress-bar { background: #ffd21f; }
.gmp__n { margin: 0; font-size: var(--fs-meta); } .gmp__n b { font-size: var(--fs-h2); font-weight: 800; }
.gmp__hd .btn--primary { background: #ffd21f; color: #0d1b30; border-color: #ffd21f; margin-top: 6px; } .gmp__hd .btn--primary:hover { background: #ffdc4a; color: #0d1b30; }
.gmp__hd :focus-visible { outline-color: #ffd21f; }
.gmp__t { font-size: 1.375rem; font-weight: 700; color: var(--accent); margin: 0; }
.gmp__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 16px; padding: 0; }
.gmp__i { display: grid; justify-items: center; text-align: center; gap: 4px; text-decoration: none; color: var(--ink); padding: 4px; }
.gmp__i .gm-b { margin-bottom: 8px; transition: transform .15s; } .gmp__i:hover .gm-b { transform: translateY(-3px) rotate(-4deg); }
.gmp__ten { font-weight: 700; } .gmp__i.is-on .gmp__ten { color: var(--accent); }
.gmp__viec { font-size: var(--fs-meta); color: var(--ink-2); }
@media (max-width: 599px) { .gmp__hd { padding: 20px 18px; border-radius: 22px; } .gmp__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 8px; } .gm-b--l { width: 60px; height: 60px; } .gm-b--l .ic { width: 28px; height: 28px; } .gmp__viec { font-size: var(--fs-nho); } }
@media (prefers-reduced-motion: reduce) { .gmp__i .gm-b { transition: none; } }
.home2 .hd .hd__sub { font-size: 1.0625rem; font-weight: 500; }
@media (max-width: 599px) { .home2 .hd .hd__lk { display: none; } }
.toast:has(.gm-toast) { width: max-content; max-width: calc(100vw - 24px); }

/* Huy hiệu vẽ riêng (huy chương vàng cam, nền xanh) */
.gm-b, .gm-b--on, .gm-b--off { background: none; box-shadow: none; border-radius: 0; opacity: 1; }
.gm-b .hh { display: block; width: 100%; height: 100%; overflow: visible; }
.gm-b--on .hh { filter: drop-shadow(0 6px 10px rgba(232, 101, 10, .35)); }
.gm-b--off .hh { filter: grayscale(1); opacity: .38; }
.gm-b--l { width: 112px; height: 112px; } .gm-b--s { width: 36px; height: 36px; }
.gm-b--s .hh { filter: none; }
.gmp__grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gmp__i.is-on .gmp__ten { color: var(--ink); } .gmp__i.is-on .gmp__viec { color: #b24a00; font-weight: 700; }
.gm__cap, .gmp__hd .btn--primary, .home2 .hd .btn--primary { background: linear-gradient(100deg, #ffd21f 0%, #ffb21f 100%); }
.gm__dots i.on { background: #ff8a1f; box-shadow: 0 0 8px #ffb21f; }
.home2 .entries .entry:nth-child(3) .entry__i { background: #ff8a1f; color: #0d1b30; }
@media (max-width: 599px) { .gm-b--l { width: 84px; height: 84px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gmp__i.is-on .gmp__viec { color: #ffb21f; } }
:root[data-theme="dark"] .gmp__i.is-on .gmp__viec { color: #ffb21f; }

/* Danh hiệu: khiên lớn trong khối đầu trang và nấc thang bốn danh hiệu */
.gmp__hd { grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: stretch; gap: 24px; }
.gmp__l { display: grid; justify-items: start; gap: 10px; min-width: 0; }
.gmp__em { width: 190px; height: 190px; margin-right: 24px; filter: drop-shadow(0 0 26px rgba(255, 210, 31, .55)) drop-shadow(0 10px 18px rgba(7, 26, 59, .45)); animation: dh-noi 3.6s ease-in-out infinite; }
.dh { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes dh-noi { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.gmp__cap { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); text-shadow: 0 2px 0 rgba(7, 26, 59, .35); }
.gmp__lad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0; position: relative; }
.gmp__lad::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 36px; height: 4px; border-radius: 2px; background: var(--line); }
.gmp__lad li { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; }
.gmp__lad .dh { width: 72px; height: 72px; margin-bottom: 6px; filter: grayscale(1); opacity: .4; }
.gmp__lad li.is-on .dh { filter: drop-shadow(0 4px 8px rgba(232, 101, 10, .3)); opacity: 1; }
.gmp__lad li.is-now .dh { width: 88px; height: 88px; margin-top: -8px; }
.gmp__lad li.is-now .gmp__ten { background: linear-gradient(transparent 50%, var(--yel) 50%); padding: 0 6px; }
.gmp__lad li.is-now .gmp__viec { color: #b24a00; font-weight: 700; }
.gm__em { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 0 8px rgba(255, 210, 31, .6)); }
@media (max-width: 599px) { .gmp__em { width: 104px; height: 104px; margin-right: 0; } .gmp__hd { gap: 12px; } .gmp__lad .dh { width: 52px; height: 52px; } .gmp__lad li.is-now .dh { width: 64px; height: 64px; } .gmp__lad::before { top: 26px; } .gmp__lad .gmp__ten { font-size: var(--fs-meta); } }
@media (prefers-reduced-motion: reduce) { .gmp__em { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gmp__lad li.is-now .gmp__ten { color: #0d1b30; } :root:not([data-theme="light"]) .gmp__lad li.is-now .gmp__viec { color: #ffb21f; } }
:root[data-theme="dark"] .gmp__lad li.is-now .gmp__ten { color: #0d1b30; } :root[data-theme="dark"] .gmp__lad li.is-now .gmp__viec { color: #ffb21f; }
@media (max-width: 599px) { .gmp__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Trang hồ sơ */
.hs { gap: 24px; }
.hs__hd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 32px 36px; border-radius: 28px; color: #fff;
  background: radial-gradient(circle at 88% 18%, rgba(255, 210, 31, .30) 0 2px, transparent 3px) 0 0 / 26px 26px, radial-gradient(120% 140% at 100% 0%, #2f7bff 0%, #1257d6 45%, #0b3585 100%); }
.hs__av { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 2.75rem; font-weight: 800; color: #0b3585; background: linear-gradient(135deg, #ffe566, #ffd21f 45%, #ff8a1f); box-shadow: 0 0 0 6px rgba(255, 255, 255, .22), 0 10px 24px rgba(7, 26, 59, .4); }
.hs__l { display: grid; gap: 8px; min-width: 0; }
.hs__ten { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: 0; color: #fff; overflow-wrap: anywhere; }
.hs__meta { margin: 0; font-size: var(--fs-meta); color: rgba(255, 255, 255, .88); } .hs__meta:empty { display: none; }
.hs__ks { display: flex; flex-wrap: wrap; gap: 6px 32px; margin-top: 4px; }
.hs__k { display: grid; text-decoration: none; color: #fff; min-height: 44px; } .hs__k b { font-size: 1.625rem; font-weight: 800; line-height: 1.15; color: #ffd21f; font-variant-numeric: tabular-nums; } .hs__k span { font-size: var(--fs-meta); color: rgba(255, 255, 255, .88); }
.hs__k:hover span { text-decoration: underline; color: #fff; }
.hs__pt { display: flex; align-items: center; gap: 12px; font-size: var(--fs-meta); max-width: 420px; }
.hs__pt progress { flex: 1; height: 8px; border: 0; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .28); accent-color: #ff8a1f; }
.hs__pt progress::-webkit-progress-bar { background: rgba(255, 255, 255, .28); } .hs__pt progress::-webkit-progress-value { background: linear-gradient(90deg, #ffd21f, #ff8a1f); border-radius: 4px; } .hs__pt progress::-moz-progress-bar { background: #ffb21f; }
.hs__dh { display: grid; justify-items: center; gap: 6px; text-decoration: none; color: #ffd21f; font-weight: 800; font-size: var(--fs-h2); }
.hs__dh .dh { width: 132px; height: 132px; filter: drop-shadow(0 0 22px rgba(255, 210, 31, .5)) drop-shadow(0 8px 14px rgba(7, 26, 59, .45)); }
.hs__hd :focus-visible { outline-color: #ffd21f; }
.hs h2 { color: var(--accent); }
.hs__g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 899px) { .hs__hd { grid-template-columns: auto minmax(0, 1fr); padding: 20px 18px; border-radius: 22px; gap: 14px; align-items: start; } .hs__av { width: 64px; height: 64px; font-size: 1.75rem; }
  .hs__dh { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; } .hs__dh .dh { width: 56px; height: 56px; } .hs__ks { gap: 6px 22px; } .hs__k b { font-size: 1.375rem; } }
@media (max-width: 599px) { .hs__g2 { grid-template-columns: minmax(0, 1fr); } }

/* Logo trường */
.lg { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.lg--chu { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--fs-nho); letter-spacing: -0.01em; box-shadow: inset 0 -5px 0 var(--yel); }
.lg--anh { background: #fff; box-shadow: 0 0 0 1px var(--line); } .lg--anh img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.lg--l { width: 72px; height: 72px; border-radius: 18px; } .lg--l.lg--chu { font-size: var(--fs-meta); }
.scard--lg { position: relative; padding-left: 76px; min-height: 76px; } .scard--lg > .lg { position: absolute; left: 14px; top: 14px; }

/* Soát cắt chữ, rớt từ (320 đến 1808px, zoom 125%) */
/* Trang Huy hiệu ở màn hẹp: khiên thu nhỏ nằm góc phải trên, chữ và nút dùng trọn bề ngang nên nút không xuống hai dòng. */
.gmp__hd .btn { white-space: nowrap; }
@media (max-width: 479px) {
  .gmp__hd { grid-template-columns: minmax(0, 1fr); position: relative; }
  .gmp__em { position: absolute; right: 14px; top: 14px; width: 84px; height: 84px; }
  .gmp__k, .gmp__cap { padding-right: 96px; } .gmp__bar { max-width: none; }
}
/* Nấc thang danh hiệu: tên danh hiệu không rớt từ. */
.gmp__lad .gmp__ten { white-space: nowrap; }
@media (max-width: 359px) { .gmp__lad { gap: 2px; } .gmp__lad li.is-now .gmp__ten { padding: 0 2px; } }
/* Dải danh hiệu trang chủ trên điện thoại: khiên, tên danh hiệu và số đốm sáng cùng một hàng khi đủ chỗ. */
@media (max-width: 599px) { .gm { gap: 4px 8px; } }
/* Gom thang chữ trang chủ về các cặp dùng chung của toàn app (không đổi bố cục): câu hỏi = tiêu đề mục, lời nhắn = chữ thường,
   số thống kê = bậc số liệu lớn, nhãn nhỏ không có độ đậm riêng. */
.page.home2 .hd__q { font-size: var(--fs-h2); font-weight: var(--fw-h2); }
.page.home2 .hd .hd__sub { font-size: var(--fs-body); font-weight: var(--fw-body); }
.page.home2 .scope .stat__n { font-size: var(--fs-so); font-weight: 800; }
.page.home2 .gm__d b { font-weight: 700; }
.page.home2 .gm__cap, .page.home2 .entry__g { font-weight: 400; }

/* Nhãn cảnh báo dòng điểm học bạ chưa đối chiếu */
.nq { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #ffe9c7; color: #7a3d00; font-size: var(--fs-nho); font-weight: 400; line-height: 1.5; }
.nq .ic { flex: none; } .rc__nq, .mchart__nq { margin: 2px 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nq { background: #4a2c00; color: #ffd9a0; } }
:root[data-theme="dark"] .nq { background: #4a2c00; color: #ffd9a0; }

/* KT4-01: chữ nằm trên vệt tô vàng luôn dùng màu tối, kể cả ở chế độ tối */
.entry__g, .home2 .scope li:nth-child(2) .stat__n, .gmp__lad li.is-now .gmp__ten, .home2 a.cd b, .home2 .hd a.cd b { color: #0d1b30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .entry__g, :root:not([data-theme="light"]) .home2 .scope li:nth-child(2) .stat__n, :root:not([data-theme="light"]) .gmp__lad li.is-now .gmp__ten { color: #0d1b30; } }
:root[data-theme="dark"] .entry__g, :root[data-theme="dark"] .home2 .scope li:nth-child(2) .stat__n, :root[data-theme="dark"] .gmp__lad li.is-now .gmp__ten { color: #0d1b30; }

/* KT4-06: mỗi cặp "năm số" trên thẻ kết quả đi liền nhau, chỉ xuống dòng ở dấu chấm giữa */
.rc__p { white-space: nowrap; } .rc__yr { white-space: normal; overflow-wrap: normal; }
/* KT4-10: nhãn chương trình và dòng phụ của thẻ kết quả hiện đủ, xuống dòng khi dài */
.rc__sub { flex-wrap: wrap; white-space: normal; overflow: visible; row-gap: 3px; }
.rc__sub .rc__ct { max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip; border-radius: 10px; overflow-wrap: anywhere; }
.rc__sub > span:not(.rc__ct):not(.lvl) { overflow: visible; text-overflow: clip; }
/* KT4-11: trên điện thoại câu vị trí phổ điểm chiếm trọn bề rộng, thanh và liên kết xuống hàng dưới */
@media (max-width: 599px) { .pd { flex-wrap: wrap; row-gap: 6px; } .pd__t { flex: 1 1 100%; } .pd__x { margin-left: auto; } }
/* KT4-07: màn hẹp, hình Đomđóm thu về góc phải trên để chữ và nút dùng trọn bề rộng; dải danh hiệu gọn hai hàng */
@media (max-width: 480px) {
  .home2 .hd { grid-template-columns: minmax(0, 1fr); }
  .home2 .hd__art { position: absolute; right: 14px; top: 14px; width: 60px; height: 60px; box-shadow: 0 0 0 6px rgba(255, 210, 31, .22); }
  .home2 .hd__art .dom { width: 56px; height: 56px; }
  .home2 .hd a.cd, .home2 .hd .hd__t { padding-right: 72px; }
  .home2 .hd .hd__act .btn { white-space: nowrap; }
  .gm { gap: 6px 10px; } .gm__dots { flex: 1 1 100%; gap: 4px; } .gm__dots i { width: 8px; height: 8px; }
}

/* KT4-01 (chấm lại): ở chế độ tối, vệt vàng phủ kín chiều cao chữ để chữ tối đọc được trọn vẹn */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .entry__g, :root:not([data-theme="light"]) .home2 .scope li:nth-child(2) .stat__n, :root:not([data-theme="light"]) .gmp__lad li.is-now .gmp__ten,
  :root:not([data-theme="light"]) .gso b + b, :root:not([data-theme="light"]) .gso span + b, :root:not([data-theme="light"]) .home2 a.cd b { background: #ffd21f; color: #0d1b30; border-radius: 4px; }
}
:root[data-theme="dark"] .entry__g, :root[data-theme="dark"] .home2 .scope li:nth-child(2) .stat__n, :root[data-theme="dark"] .gmp__lad li.is-now .gmp__ten,
:root[data-theme="dark"] .gso b + b, :root[data-theme="dark"] .gso span + b, :root[data-theme="dark"] .home2 a.cd b { background: #ffd21f; color: #0d1b30; border-radius: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thap b { background: #ffd21f; color: #0d1b30; border-radius: 4px; } }
:root[data-theme="dark"] .thap b { background: #ffd21f; color: #0d1b30; border-radius: 4px; }
