/* Lớp giao diện "Ốc đảo" cho app THPTQG/HSA (nạp sau app.css). */
.tile { background: var(--tint-L); } .tile.sk-V { background: var(--V); } .tile.sk-R { background: var(--R); } .tile.sk-L { background: var(--L); }
.today-top { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.ring { width: 130px; height: 130px; flex: none; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 14; }
.ring-fg { fill: none; stroke: var(--ok); stroke-width: 14; stroke-linecap: round; transition: stroke-dasharray .4s; }
.ring-num { font: 800 34px var(--font); fill: var(--ink); text-anchor: middle; }
.ring-sub { font: 700 12px var(--font); fill: var(--ink-2); text-anchor: middle; }
.today-text { flex: 1; min-width: 0; }
.bubble-text { font-weight: 700; font-size: 1.05rem; margin: 0 0 8px; }
.chain-row { display: flex; flex-direction: column; gap: 4px; }
.dots .d.on i { background: var(--ok); }
.dots .d.miss i { background: var(--bad); opacity: .45; }
.test-card { background: var(--amber); color: #000; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.mcard { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 3px solid var(--edge); border-radius: 18px; background: var(--surface-2); color: var(--ink); text-decoration: none; box-shadow: 3px 3px 0 var(--drop); }
.mcard.done { background: var(--tint-V); }
.mcard .mi { font-size: 1.5rem; }
.mcard .stamp { position: absolute; top: 6px; right: 8px; font-size: .7rem; font-weight: 800; color: var(--ok); }
.plan-card { margin-bottom: 22px; }

/* Bản đồ */
.sea { list-style: none; padding: 18px 10px; margin: 0 0 12px; border-radius: 28px; border: 3px solid var(--edge); box-shadow: 6px 6px 0 var(--drop);
  background: radial-gradient(circle at 20% 10%, #bfe9ff 0 6%, transparent 7%), radial-gradient(circle at 80% 40%, #bfe9ff 0 5%, transparent 6%), linear-gradient(180deg, #63C7F5, #2F8FD8);
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.isl.l { justify-self: start; }
.isl.r { justify-self: end; margin-top: 34px; }
.isl > a, .isl > div { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; width: 150px; padding: 10px 8px 12px;
  background: #F7E3A1; border: 3px solid #000; border-radius: 48% 52% 44% 56% / 58% 50% 50% 42%; color: #000; text-decoration: none; box-shadow: 4px 4px 0 #000; }
.isl .isl-ico { font-size: 1.8rem; line-height: 1; }
.isl .isl-n { font-weight: 800; font-size: .8rem; }
.isl .isl-name { font-size: .86rem; line-height: 1.2; }
.isl .isl-st { font-size: .72rem; font-weight: 700; }
.isl.done > a { background: #9BE7A6; }
.isl.yellow > a { background: #FFE14D; }
.isl.current > a { background: #FFF3C4; outline: 4px solid #fff; animation: glow 1.6s ease-in-out infinite alternate; }
.isl.locked > div { background: #DDE6EE; opacity: .85; }
.isl.missing > div { background: #E8EDF2; opacity: .7; }
@keyframes glow { from { box-shadow: 4px 4px 0 #000, 0 0 0 0 rgba(255, 255, 255, .7); } to { box-shadow: 4px 4px 0 #000, 0 0 0 10px rgba(255, 255, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .isl.current > a { animation: none; } }
.pdot, .colour-map .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #000; background: #ccc; }
.isl .pdot { position: absolute; top: 6px; right: 14px; }
.pdot.c-green, .colour-map .c-green .dot { background: #1FA463; }
.pdot.c-yellow, .colour-map .c-yellow .dot { background: #FFD43B; }
.pdot.c-red, .colour-map .c-red .dot { background: #E5383B; }
.colour-map { columns: 2; padding-left: 0; list-style: none; }
.colour-map li { margin: 3px 0; break-inside: avoid; }
.colour-map li .dot { margin-right: 6px; vertical-align: -2px; }
.center { text-align: center; }

/* Chặng */
.stage-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.stab { padding: 6px 14px; border: 3px solid var(--edge); border-radius: 99px; background: var(--surface); color: var(--ink); font-weight: 800; text-decoration: none; }
.stab.cur { background: var(--amber); color: #000; }
.stab.locked { opacity: .55; }
.tasks { list-style: none; padding: 0; display: grid; gap: 12px; }
.task-row .tt { flex: 1; display: flex; flex-direction: column; }
.task-row .ok { color: var(--ok); font-weight: 800; font-size: 1.3rem; }
.task-row .num { background: var(--surface-2); }

/* Bài luyện */
.kind-label { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 0 0 6px; }
.rw-q { margin: 0 0 12px; padding: 10px 14px; border-left: 6px solid var(--sky); background: var(--surface-2); border-radius: 10px; font-weight: 700; }
.gap-in.inline { display: inline-block; width: 11em; padding: 4px 8px; }
.err-s { line-height: 2.3; }
.err-part { border: 2px dashed var(--edge); background: var(--surface); border-radius: 10px; padding: 0 6px; margin: 0 2px; font: inherit; color: var(--ink); }
.err-part sub { font-weight: 800; color: var(--sky); margin-left: 2px; }
.err-part.sel { background: var(--amber); color: #000; border-style: solid; }
.order-built { min-height: 60px; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 3px dashed var(--edge); border-radius: 16px; margin-bottom: 12px; align-items: center; }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.order-built .tile, .order-pool .tile { display: inline-block; padding: 8px 12px; border: 3px solid var(--edge); border-radius: 12px; font-weight: 700; background: var(--surface); color: var(--ink); box-shadow: 2px 2px 0 var(--drop); }
.order-built .tile { background: var(--tint-L); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mcol { display: flex; flex-direction: column; gap: 8px; }
.mitem { text-align: left; padding: 10px 12px; border: 3px solid var(--edge); border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 600; }
.mitem.sel { outline: 4px solid var(--amber); }
.mitem[data-pair="p0"] { background: #FFD9E5; color: #000; }
.mitem[data-pair="p1"] { background: #D3F1FF; color: #000; }
.mitem[data-pair="p2"] { background: #D6F7DF; color: #000; }
.mitem[data-pair="p3"] { background: #FFE6C2; color: #000; }
.mitem[data-pair="p4"] { background: #E5DCFF; color: #000; }
.fb { padding: 12px 14px; border-radius: 14px; border: 3px solid var(--edge); margin: 12px 0; }
.fb.is-right { background: var(--tint-V); }
.fb.is-wrong { background: var(--tint-S); }
.why-line { margin: 6px 0 0; font-weight: 500; }
.opt.sel { background: var(--amber); color: #000; }
.counter { font-weight: 800; color: var(--ink-2); font-size: .85rem; }

/* Bài giảng, bài đọc, điền từ */
.rule { margin: 16px 0; }
.rule h4 { margin: 12px 0 4px; }
.rule table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.rule td, .rule th { border: 2px solid var(--edge); padding: 6px 8px; text-align: left; vertical-align: top; }
.rule th { background: var(--surface-2); }
.more-videos { font-weight: 600; }
.gloss { font: inherit; border: 0; background: none; padding: 0; color: inherit; text-decoration: underline dotted var(--sky) 3px; text-underline-offset: 4px; cursor: help; }
.gloss-pop, .cloze-opts { position: sticky; bottom: 84px; z-index: 4; }
@media (min-width: 900px) { .gloss-pop, .cloze-opts { bottom: 12px; } }
.gloss-pop { background: var(--amber); color: #000; padding: 8px 12px; border-radius: 12px; border: 3px solid #000; font-weight: 600; }
.cloze { line-height: 2.1; margin-bottom: 14px; }
.cloze-head { margin: 0 0 6px; text-align: center; }
.cloze-leaflet { background: #FFFBEA; color: #000; border-style: double; border-width: 6px; }
.cloze-notice { background: #F4F7FA; color: #000; }
.slot { font: inherit; border: 0; border-bottom: 3px solid #000; background: rgba(255, 255, 255, .7); padding: 0 6px; border-radius: 6px 6px 0 0; color: #000; }
.slot.active { background: #FFE14D; }
.slot.is-right { background: #9BE7A6; }
.slot.is-wrong { background: #FFB3B3; }
.cloze-why { padding-left: 20px; }
.cloze-why li { margin: 6px 0; }
.cloze-why .is-wrong b { color: var(--bad); }

/* Test */
.test-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.test-meta { font-weight: 800; }
.test-text { max-height: 46vh; overflow: auto; margin-bottom: 12px; }
.qgrid { margin-top: 14px; }
.qgrid .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin-top: 8px; }
.gq { border: 2px solid var(--edge); border-radius: 10px; padding: 6px 0; background: var(--surface); color: var(--ink); font-weight: 800; }
.gq.done { background: var(--tint-V); }
.gq.cur { outline: 3px solid var(--amber); }
.result .kpi { display: inline-flex; flex-direction: column; margin: 0 16px 12px 0; }
.result .kl { font-weight: 700; font-size: .85rem; }
.result .kv { font-size: 2rem; font-weight: 800; }
.review-list { padding-left: 18px; }
.review-list li { margin: 10px 0; padding: 8px 12px; border-radius: 12px; background: var(--tint-S); }

/* Làm quen, cài đặt, tiến bộ */
.exam-pick { display: grid; gap: 10px; margin: 10px 0 14px; }
.exam-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 44px; border: 3px solid var(--edge); border-radius: 16px; background: var(--surface); position: relative; cursor: pointer; }
.exam-card input { position: absolute; left: 14px; top: 16px; width: 20px; height: 20px; }
.exam-card:has(input:checked) { background: var(--amber); color: #000; }
.rounds { margin-bottom: 14px; }
.chk { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-weight: 600; }
.chk input { width: 20px; height: 20px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { padding: 10px; border: 3px solid var(--edge); border-radius: 16px; background: var(--surface-2); opacity: .6; display: flex; flex-direction: column; gap: 2px; }
.badge.got { opacity: 1; background: var(--tint-V); }
.badge .bm { font-size: 1.5rem; }
.badge small { font-size: .74rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 560px) {
  .today-top { flex-direction: column; text-align: center; }
  .chain-row { align-items: center; }
  .isl > a, .isl > div { width: 136px; }
  .match { grid-template-columns: 1fr; }
  .colour-map { columns: 1; }
}
.task-head .eyebrow { white-space: normal; max-width: 100%; line-height: 1.35; }
