/* IZI Class — trang làm bài Test kiểu thi IELTS trên máy tính */
.tp-root { --tp-ink: #111; --tp-muted: #555; --tp-line: #d9d9d9; --tp-band: #f1f1f1; --tp-accent: #1f5fd1; --tp-bg: #fff; --tp-fs: 15px;
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--tp-bg); color: var(--tp-ink); font-size: var(--tp-fs); font-family: Arial, Helvetica, sans-serif; }
.tp-root.size-s { --tp-fs: 13px; } .tp-root.size-l { --tp-fs: 18px; } .tp-root.size-xl { --tp-fs: 21px; }
.tp-root.contrast { --tp-ink: #ffe600; --tp-muted: #ffe600; --tp-line: #ffe600; --tp-band: #000; --tp-bg: #000; --tp-accent: #ffe600; }
.tp-root.contrast input, .tp-root.contrast textarea { background: #000; color: #ffe600; border-color: #ffe600; }

.tp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--tp-line); }
.tp-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tp-who .brand-mark { width: 32px; height: 32px; font-size: 16px; flex: 0 0 auto; }
.tp-who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-who small { display: block; font-size: 12px; color: var(--tp-muted); }
.tp-clock { font-weight: 700; font-size: 15px; text-align: center; white-space: nowrap; }
.tp-clock.warn { color: #c4320a; }
.tp-tools { display: flex; justify-content: flex-end; gap: 6px; }
.tp-tool { width: 38px; height: 38px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--tp-ink); border-radius: 8px; }
.tp-tool:hover, .tp-tool.on { background: var(--tp-band); }
.tp-sections { display: flex; gap: 4px; padding: 6px 16px 0; }
.tp-sections button { border: 1px solid var(--tp-line); border-bottom: 0; background: var(--tp-band); padding: 6px 14px; border-radius: 8px 8px 0 0; cursor: pointer; font: inherit; color: var(--tp-ink); }
.tp-sections button.active { background: var(--tp-bg); font-weight: 700; }
.tp-banner { margin: 10px 16px 6px; background: var(--tp-band); border: 1px solid var(--tp-line); border-radius: 4px; padding: 10px 14px; display: grid; gap: 4px; }
.tp-banner b { font-size: 1em; }
.tp-error { margin: 0 16px; background: #fdecea; color: #b42318; padding: 8px 12px; border-radius: 6px; }

.tp-main { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0 0 0 16px; }
.tp-top, .tp-sections, .tp-banner, .tp-error, .tp-nav { flex: 0 0 auto; }
.tp-single, .tp-split { height: 100%; min-height: 0; }
.tp-single .tp-pane { height: 100%; overflow: auto; padding: 8px 16px 90px 0; }
.tp-split { display: grid; grid-template-columns: 50% 14px 1fr; }
.tp-pane { min-height: 0; overflow: auto; padding: 8px 16px 90px 0; }
.tp-split .tp-pane:last-child { padding-left: 12px; }
.tp-divider { display: grid; place-items: center; cursor: col-resize; color: var(--tp-muted); font-size: 12px; user-select: none; border-left: 1px solid var(--tp-line); border-right: 1px solid var(--tp-line); background: var(--tp-band); touch-action: none; }
.tp-divider:focus-visible { outline: 2px solid var(--tp-accent); }
.tp-pane h2 { font-size: 1.1em; margin: 6px 0 10px; }
.tp-body, .tp-prompt { line-height: 1.6; }
.tp-prompt { white-space: pre-wrap; font-weight: 700; }
.tp-body img { max-width: 100%; height: auto; }
.tp-hl { background: #fff200; color: #111; }
.tp-intro { white-space: pre-wrap; margin: 6px 0 12px; font-weight: 700; line-height: 1.5; }
.tp-audio { margin-bottom: 10px; }

.tp-q { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 8px 6px; border-radius: 4px; }
.tp-q.current { background: rgba(31, 95, 209, .07); }
.tp-root.contrast .tp-q.current { background: #222; }
.tp-qno { min-width: 26px; height: 26px; display: inline-grid; place-items: center; font-weight: 700; border: 1px solid transparent; border-radius: 3px; }
.tp-q.current .tp-qno { border-color: var(--tp-ink); }
.tp-q.flagged .tp-qno { background: #ffd666; color: #111; }
.tp-text { line-height: 2; }
.tp-gap { height: 30px; min-width: 120px; width: 160px; margin: 0 6px; border: 1px solid #888; border-radius: 3px; padding: 0 8px; font: inherit; text-align: center; color: inherit; background: #fff; }
.tp-gap.wide { width: min(360px, 100%); margin: 6px 0 0; text-align: left; }
.tp-gap:focus { outline: 2px solid var(--tp-accent); border-color: var(--tp-accent); }
.tp-choices { display: grid; gap: 8px; margin-top: 6px; }
.tp-choice { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.tp-choice input { width: 16px; height: 16px; accent-color: var(--tp-accent); }
.tp-write { display: grid; grid-template-rows: 1fr auto; gap: 6px; }
.tp-essay { width: 100%; box-sizing: border-box; min-height: 320px; height: 100%; border: 1px solid #999; border-radius: 3px; padding: 10px 12px; font: inherit; line-height: 1.6; resize: none; color: inherit; background: #fff; }
.tp-essay.short { min-height: 120px; height: auto; resize: vertical; margin-top: 6px; }
.tp-label { display: block; font-weight: 700; margin-top: 12px; }
.tp-wordcount { font-size: .9em; color: var(--tp-muted); }

.tp-arrows { position: fixed; right: 16px; bottom: 72px; display: flex; gap: 6px; z-index: 2; }
.tp-arrow { width: 48px; height: 48px; border: 0; background: #d9d9d9; color: #fff; font-size: 24px; font-weight: 700; cursor: pointer; border-radius: 2px; }
.tp-arrow.dark { background: #111; }
.tp-root.contrast .tp-arrow { background: #ffe600; color: #000; }
.tp-arrow:focus-visible, .tp-num:focus-visible, .tp-navpart:focus-visible, .tp-submit:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 2px; }

.tp-nav { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--tp-line); padding: 6px 0 6px 12px; background: var(--tp-bg); min-width: 0; }
.tp-review { display: flex; align-items: center; gap: 6px; font-size: .9em; white-space: nowrap; }
.tp-navparts { display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; min-width: 0; scrollbar-width: thin; }
.tp-navpart { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; padding: 6px 10px; font: inherit; color: var(--tp-ink); cursor: pointer; white-space: nowrap; }
.tp-navpart small { color: var(--tp-muted); }
.tp-navpart.active { flex: 0 1 auto; cursor: default; }
.tp-nums { display: flex; gap: 2px; }
.tp-num { position: relative; min-width: 24px; height: 28px; border: 1px solid transparent; background: none; font: inherit; font-size: .95em; color: var(--tp-ink); cursor: pointer; border-radius: 2px; padding: 0 3px; }
.tp-num::before { content: ''; position: absolute; left: 2px; right: 2px; top: -4px; height: 3px; background: #c9c9c9; border-radius: 2px; }
.tp-num.answered::before { background: #1a7f4b; }
.tp-num.current { border-color: var(--tp-ink); }
.tp-num.flagged { background: #ffd666; color: #111; border-radius: 50%; }
.tp-submit { width: 56px; height: 48px; border: 0; background: #e6e6e6; font-size: 20px; cursor: pointer; color: #111; flex: 0 0 auto; }
.tp-submit:hover { background: #1a7f4b; color: #fff; }

.tp-overlay { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, .72); display: grid; place-items: center; padding: 16px; }
.tp-overlay-box { max-width: 560px; text-align: center; color: #fff; display: grid; gap: 12px; justify-items: center; }
.tp-overlay-box.light { background: #fff; color: #111; padding: 24px; border-radius: 10px; text-align: left; justify-items: stretch; }
.tp-overlay-box.light h2 { margin: 0; }
.tp-overlay-actions { display: flex; justify-content: flex-end; gap: 10px; }
.tp-headphones { font-size: 64px; line-height: 1; }
.tp-play { background: #111; color: #fff; border: 1px solid #fff; padding: 10px 22px; font: inherit; font-weight: 700; cursor: pointer; border-radius: 3px; }
.tp-sheet { position: absolute; inset: 0; z-index: 6; background: var(--tp-bg); padding: 16px; display: grid; align-content: start; justify-items: center; gap: 10px; overflow: auto; }
.tp-sheet > * { width: min(520px, 100%); }
.tp-sheet-head { display: flex; justify-content: space-between; align-items: center; }
.tp-sheet-head h2 { margin: 0; font-size: 1.2em; }
.tp-x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--tp-ink); }
.tp-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--tp-line); border-radius: 4px; padding: 14px 16px; background: var(--tp-bg); color: var(--tp-ink); font: inherit; text-align: left; }
.tp-opt.danger { background: #c62f3c; color: #fff; border-color: #c62f3c; cursor: pointer; font-weight: 700; }
.tp-seg { display: flex; gap: 4px; flex-wrap: wrap; }
.tp-seg button { border: 1px solid var(--tp-line); background: var(--tp-bg); color: var(--tp-ink); padding: 5px 10px; border-radius: 4px; cursor: pointer; font: inherit; font-size: .9em; }
.tp-seg button.on { background: var(--tp-accent); color: #fff; border-color: var(--tp-accent); }
.tp-root.contrast .tp-seg button.on { color: #000; }
.tp-notes { position: absolute; top: 56px; right: 12px; bottom: 70px; width: min(320px, calc(100vw - 24px)); z-index: 4; background: var(--tp-bg); border: 1px solid var(--tp-line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 12px; display: grid; grid-template-rows: auto 1fr; gap: 8px; }
.tp-notes textarea { width: 100%; box-sizing: border-box; height: 100%; border: 1px solid var(--tp-line); border-radius: 6px; padding: 10px; font: inherit; resize: none; background: #fffbe6; color: #111; }
.tp-hlmenu { position: fixed; z-index: 100; display: flex; background: #111; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.tp-hlmenu button { border: 0; background: none; color: #fff; padding: 8px 12px; font: 13px Arial, sans-serif; cursor: pointer; }
.tp-hlmenu button:hover { background: #333; }

@media (max-width: 760px) {
  .tp-top { grid-template-columns: 1fr auto; }
  .tp-clock { grid-column: 1 / -1; grid-row: 2; }
  .tp-main { overflow: auto; padding: 0 12px; }
  .tp-split { display: block; height: auto; }
  .tp-split .tp-pane { overflow: visible; padding: 8px 0 12px; }
  .tp-split .tp-pane:last-child { padding: 8px 0 120px; border-top: 1px solid var(--tp-line); }
  .tp-divider { display: none; }
  .tp-single .tp-pane { padding: 8px 0 120px; }
  .tp-review { font-size: .8em; }
}

/* Note / Highlight */
.tp-pop { position: fixed; z-index: 120; display: flex; gap: 2px; background: #fff; border: 1px solid #9a9a9a; border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); padding: 6px; font-family: Arial, Helvetica, sans-serif; }
.tp-pop-arrow { position: absolute; top: -9px; width: 16px; height: 16px; background: #fff; border-left: 1px solid #9a9a9a; border-top: 1px solid #9a9a9a; transform: rotate(45deg); }
.tp-pop.above .tp-pop-arrow { top: auto; bottom: -9px; transform: rotate(225deg); }
.tp-pop-btn { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 76px; padding: 6px 10px; border: 0; background: none; color: #555; font: 14px Arial, sans-serif; cursor: pointer; border-radius: 6px; }
.tp-pop-btn.wide { min-width: 110px; }
.tp-pop-btn:hover, .tp-pop-btn:focus-visible { background: #f0f0f0; color: #111; outline: none; }
.tp-hl { background: #fff200; color: #111; cursor: pointer; padding: 0; }
.tp-note { background: #1f4fc4; color: #fff; cursor: pointer; padding: 0 1px; }
.tp-note.active { outline: 2px solid #ffbf00; }
.tp-root.notes-open > :not(.tp-notecol):not(.tp-overlay):not(.tp-sheet) { margin-right: 340px; }
.tp-root.notes-open .tp-arrows { right: 356px; }
.tp-notecol { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; z-index: 3; background: #e9e9e9; border-left: 1px solid var(--tp-line); display: flex; flex-direction: column; }
.tp-notecol-head { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 10px 16px; border-bottom: 1px solid var(--tp-line); box-shadow: 0 2px 4px rgba(0, 0, 0, .08); }
.tp-notecol-head h2 { margin: 0; font-size: 1.1em; font-weight: 400; color: #111; }
.tp-notecol-list { flex: 1; overflow: auto; display: grid; align-content: start; gap: 6px; padding: 6px 0; }
.tp-notecard { background: #fff; padding: 14px 16px; display: grid; gap: 10px; cursor: pointer; color: #111; }
.tp-notecard.active { background: #1f4fc4; color: #fff; }
.tp-notecard-head b { margin-right: 6px; }
.tp-notecard textarea { width: 100%; box-sizing: border-box; min-height: 64px; border: 1px solid #888; padding: 8px; font: inherit; resize: vertical; color: #111; background: #fff; }
.tp-notecard.active textarea { border: 2px solid #9db4ff; }
.tp-note-del { justify-self: end; border: 0; background: none; font: inherit; color: #1f4fc4; cursor: pointer; }
.tp-notecard.active .tp-note-del { color: #fff; }
.tp-note-empty { margin: 12px 16px; color: #555; line-height: 1.5; }
@media (max-width: 760px) { .tp-root.notes-open > :not(.tp-notecol):not(.tp-overlay):not(.tp-sheet) { margin-right: 0; } .tp-notecol { width: 100%; top: 40%; } .tp-root.notes-open .tp-arrows { right: 16px; } }

/* Các dạng câu: trắc nghiệm, chọn nhiều, nối / kéo thả */
.tp-block { margin-bottom: 18px; }
.tp-intro p { margin: 0 0 6px; font-weight: 400; }
.tp-intro p:first-child { font-weight: 700; }
.tp-mcq { display: grid; gap: 4px; margin-top: 6px; }
.tp-opt-row { display: grid; grid-template-columns: 18px 28px 1fr; align-items: start; gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; line-height: 1.4; }
.tp-opt-row:hover { background: rgba(0, 0, 0, .04); }
.tp-opt-row.on { background: #e8eefb; }
.tp-root.contrast .tp-opt-row.on { background: #333; }
.tp-opt-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--tp-accent); }
.tp-opt-row input:disabled + .tp-letter { opacity: .45; }
.tp-letter { font-weight: 700; }
.tp-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid var(--tp-line); border-radius: 4px; background: var(--tp-band); margin: 6px 0 4px; }
.tp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #8a8a8a; border-radius: 3px; background: #fff; color: #111; cursor: grab; user-select: none; line-height: 1.3; max-width: 100%; }
.tp-chip:focus-visible { outline: 2px solid var(--tp-accent); }
.tp-chip.picked { outline: 2px solid var(--tp-accent); background: #e8eefb; }
.tp-chip.used { opacity: .35; cursor: default; }
.tp-chip.dragging { opacity: .5; }
.tp-chip.in { border: 0; padding: 0 4px; background: none; cursor: grab; }
.tp-hint { margin: 0 0 10px; font-size: .85em; color: var(--tp-muted); }
.tp-zone { display: inline-flex; align-items: center; gap: 4px; min-width: 150px; min-height: 30px; margin: 2px 6px; padding: 0 6px; border: 1px dashed #777; border-radius: 3px; background: #fff; color: #888; font-weight: 700; justify-content: center; vertical-align: middle; cursor: pointer; }
.tp-zone.filled { border-style: solid; color: #111; justify-content: flex-start; font-weight: 400; }
.tp-zone.over { border-color: var(--tp-accent); background: #e8eefb; }
.tp-zone:focus-visible { outline: 2px solid var(--tp-accent); }
.tp-zone-x { border: 0; background: none; color: #777; font-size: 16px; cursor: pointer; margin-left: auto; padding: 0 2px; }
.tp-root.contrast .tp-chip, .tp-root.contrast .tp-zone { background: #000; color: #ffe600; border-color: #ffe600; }

.tp-ghost { position: fixed; z-index: 130; pointer-events: none; box-shadow: 0 8px 20px rgba(0,0,0,.25); opacity: .95; }
.tp-chip { touch-action: none; }

/* ===== Báo cáo điểm Listening / Reading ===== */
.tr-page { position: fixed; inset: 0; z-index: 40; overflow: auto; background: #f5f6f8; color: #1d2433; padding: 20px 24px 40px; font-family: 'DM Sans', Arial, sans-serif; }
.tr-page > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.tr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tr-head small { display: block; color: #6b7489; font-size: 13px; }
.tr-page h1 { font-size: 26px; margin: 12px auto 14px; }
.tr-top { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(220px, 1fr); gap: 16px; margin-bottom: 16px; }
.tr-card { background: #fff; border: 1px solid #e4e8ef; border-radius: 16px; padding: 22px 24px; margin-bottom: 16px; }
.tr-top .tr-card { margin-bottom: 0; }
.tr-card h2 { font-size: 20px; margin: 0 0 6px; }
.tr-sub { margin: 0 0 16px; font-size: 13px; }
.tr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #e9edf4; border-bottom: 1px solid #e9edf4; margin-top: 22px; padding: 18px 0; }
.tr-stats > div { padding: 0 14px; display: grid; gap: 8px; align-content: start; border-left: 1px solid #e9edf4; }
.tr-stats > div:first-child { border-left: 0; padding-left: 0; }
.tr-stats span { color: #8a92a6; font-size: 14px; }
.tr-stats b { font-size: 30px; }
.tr-stats .g { color: #5cc08a; } .tr-stats .r { color: #e8572a; } .tr-stats .o { color: #f2a93b; } .tr-stats .bl { color: #3a7cf6; }
.tr-score { background: linear-gradient(180deg, #fff 0%, #eef2ff 100%); }
.tr-big { font-size: 56px; font-weight: 800; color: #e8572a; line-height: 1.1; margin: 6px 0 8px; }
.tr-big small { font-size: 22px; color: #6b7489; margin-left: 4px; }
.tr-score p { margin: 0 0 8px; }
.tr-score hr { border: 0; border-top: 1px solid #c9cfdc; margin: 10px 0 14px; }
.tr-score h3 { margin: 0 0 8px; font-size: 18px; }
.tr-small { font-size: 13px; color: #47506a; line-height: 1.5; }
.tr-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; margin-bottom: 26px; }
.tr-type { display: grid; grid-template-columns: 150px 44px 1fr; align-items: center; gap: 8px; font-size: 13px; }
.tr-type b { color: #3a7cf6; }
.tr-type i { height: 8px; background: #edf1fb; border-radius: 99px; overflow: hidden; }
.tr-type em { display: block; height: 100%; background: #5cc08a; border-radius: 99px; }
.tr-legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: 13px; margin-bottom: 18px; }
.tr-legend .right { color: #2f9e62; } .tr-legend .wrong { color: #e8572a; } .tr-legend .empty { color: #f2a93b; }
.tr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.tr-part { display: grid; grid-template-columns: 60px 1fr; gap: 10px; font-size: 13px; }
.tr-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-tile { width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; border: 1.5px solid; }
.tr-tile.sm { width: 30px; height: 30px; }
.tr-tile.right { background: #e8f7ee; border-color: #5cc08a; color: #2f9e62; }
.tr-tile.wrong { background: #fdeee9; border-color: #e8572a; color: #c4320a; }
.tr-tile.empty { background: #fff7ea; border-color: #f2a93b; color: #e08a00; }
.tr-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tr-tabs button { border: 1.5px solid #f3b9a6; background: #fff4f0; color: #e8572a; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.tr-tabs button.active { border-color: #e8572a; background: #fff; }
.tr-table-wrap { overflow-x: auto; }
.tr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tr-table th { text-align: left; color: #6b7489; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid #e9edf4; }
.tr-table td { padding: 8px 10px; border-bottom: 1px solid #f0f2f7; }
.tr-table tr.right td:last-child { color: #2f9e62; font-weight: 600; } .tr-table tr.wrong td:last-child { color: #c4320a; font-weight: 600; } .tr-table tr.empty td:last-child { color: #e08a00; }
.tr-note { color: #6b7489; font-size: 13px; }
.tr-actions { display: flex; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
.tr-btn { min-width: 210px; height: 56px; border: 0; border-radius: 12px; background: #5a7bef; color: #fff; font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 16px rgba(90, 123, 239, .3); }
.tr-btn:hover { background: #4a6be0; }
.tr-btn:focus-visible, .tr-tabs button:focus-visible { outline: 2px solid #1d2433; outline-offset: 2px; }
@media (max-width: 760px) {
  .tr-page { padding: 16px; }
  .tr-top, .tr-types, .tr-grid { grid-template-columns: 1fr; }
  .tr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; }
  .tr-stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .tr-type { grid-template-columns: 130px 40px 1fr; }
  .tr-btn { flex: 1; min-width: 0; font-size: 17px; }
}
/* Xem lại bài */
.tp-root.review .tp-zone, .tp-root.review .tp-chip { cursor: default; }
.tp-root.review .tp-options { opacity: .75; }
.tp-num.r-right::before { background: #2f9e62; } .tp-num.r-wrong::before { background: #e8572a; } .tp-num.r-empty::before { background: #f2a93b; }
.tp-num.r-right { color: #2f9e62; } .tp-num.r-wrong { color: #c4320a; }

/* Đã nộp bài (Writing / Speaking / Thi thử) + Feedback */
.tr-submitted { text-align: center; display: grid; gap: 6px; justify-items: center; padding: 30px 24px; }
.tr-submitted h1 { margin: 6px 0 0; font-size: 26px; }
.tr-submitted p { margin: 0; color: #47506a; }
.tr-done-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #e8f7ee; color: #2f9e62; font-size: 28px; font-weight: 800; }
.fb-ok { color: #2f9e62; } .fb-wait { color: #e08a00; }
.tr-btn.ghost { background: #fff; color: #3a5bd9; border: 2px solid #5a7bef; box-shadow: none; }
.fb-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(15, 23, 42, .55); display: grid; place-items: center; padding: 16px; }
.fb-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 16px; padding: 22px 24px; display: grid; gap: 14px; color: #17233d; font-family: 'DM Sans', Arial, sans-serif; }
.fb-head { display: flex; justify-content: space-between; gap: 10px; }
.fb-head h2 { margin: 0; font-size: 20px; } .fb-head p { margin: 4px 0 0; color: #6b7489; font-size: 14px; }
.fb-x { border: 0; background: none; font-size: 24px; cursor: pointer; color: #6b7489; }
.fb-stale { margin: 0; background: #fff4e5; color: #b54708; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.fb-score { display: flex; align-items: baseline; gap: 10px; background: #f6f8fc; border-radius: 12px; padding: 12px 16px; }
.fb-score span { color: #6b7489; } .fb-score b { font-size: 26px; color: #e8572a; } .fb-score small { margin-left: auto; color: #6b7489; }
.fb-text h3 { margin: 0 0 6px; font-size: 15px; } .fb-text p { margin: 0; line-height: 1.6; } .fb-empty { color: #6b7489; }
.fb-actions { display: flex; justify-content: flex-end; }

/* Ảnh biểu đồ Writing Task 1 */
.tp-graph { margin: 16px 0 0; }
.tp-graph img { display: block; max-width: 100%; height: auto; border: 1px solid #e3e7ef; border-radius: 6px; background: #fff; }
.wg-field { display: grid; gap: 8px; }
.wg-drop { border: 2px dashed #c9d3e6; border-radius: 12px; min-height: 120px; display: grid; place-items: center; padding: 14px; cursor: pointer; background: #f8faff; text-align: center; color: #47506a; }
.wg-drop:hover, .wg-drop:focus-visible { border-color: #3a7cf6; outline: none; }
.wg-drop.has-img { border-style: solid; background: #fff; }
.wg-drop img { max-width: 100%; max-height: 320px; border-radius: 6px; }
.wg-drop small { display: block; margin-top: 4px; color: #6b7489; font-size: 12px; }
.wg-row { display: flex; gap: 8px; }
.wg-row input { flex: 1; min-width: 0; }
.wg-msg { color: #47506a; min-height: 1em; }

/* ===== Dạng câu bổ sung: bảng chọn, danh sách thả xuống, khung điền, bản đồ, giới hạn số từ ===== */
.tp-optlist { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.tp-optlist li b { display: inline-block; min-width: 22px; }
.tp-grid { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14px; }
.tp-grid th, .tp-grid td { border: 1px solid #c9ced8; padding: 8px 10px; text-align: center; background: #fff; }
.tp-grid thead th { background: #eef0f4; }
.tp-grid tbody th { text-align: left; font-weight: 400; width: 52%; }
.tp-grid tr.current th, .tp-grid tr.current td { background: #fff7d6; }
.tp-grid input[type=radio] { width: 18px; height: 18px; cursor: pointer; }
.tp-select { max-width: 100%; margin-top: 6px; padding: 7px 10px; border: 1px solid #aeb5c2; border-radius: 6px; background: #fff; font: inherit; }
.tp-mapimg { margin: 8px 0 14px; text-align: center; }
.tp-mapimg img { max-width: 100%; border: 1px solid #c9ced8; border-radius: 6px; }
.tp-tplwrap { margin: 8px 0 14px; }
.tp-tplq { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin: 2px 2px; flex-wrap: wrap; }
.tp-tplq .tp-qno { flex: none; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tp-table th, .tp-table td { border: 1px solid #aab1be; padding: 9px 11px; text-align: left; vertical-align: middle; background: #fff; }
.tp-table th { background: #eef0f4; }
.tp-note, .tp-form { border: 1px solid #aab1be; border-radius: 6px; padding: 12px 16px; background: #fff; font-size: 14.5px; }
.tp-note h4, .tp-form h4 { margin: 4px 0 8px; font-size: 15px; }
.tp-note ul, .tp-form ul { margin: 4px 0 8px; padding-left: 22px; display: grid; gap: 8px; }
.tp-note p, .tp-form p { margin: 6px 0; }
.tp-form { background: #fbfbfd; }
.tp-flow { display: grid; justify-items: center; gap: 0; }
.tp-flowbox { width: min(100%, 460px); border: 2px solid #8a93a4; border-radius: 6px; padding: 10px 14px; background: #fff; text-align: center; font-size: 14.5px; }
.tp-flowarrow { font-size: 22px; line-height: 1.1; color: #6a7384; }
.tp-gap.tp-over { border-color: #c0392b; background: #fff1ef; }
.tp-limitnote { flex-basis: 100%; color: #c0392b; font-size: 12px; font-weight: 600; }
.tp-grid tr.tp-q { display: table-row; }
.tp-tplwrap { color: #1d2330; }
.tp-tplwrap .tp-tplq { display: inline-flex; grid-template-columns: none; padding: 0; margin: 2px 4px; vertical-align: middle; }
.tp-tplwrap .tp-tplq .tp-gap { margin: 0; width: 150px; min-width: 90px; }
.tp-table { border: 1px solid #aab1be; }
.tp-table td, .tp-table th { color: #1d2330; }
.tp-grid th, .tp-grid td { color: #1d2330; }
.tp-optlist { color: inherit; }
.qt-guide { margin: 10px 0; border: 1px solid #e5d9bf; border-radius: 12px; background: #fff9ec; padding: 8px 12px; font-size: 12.5px; }
.qt-guide summary { cursor: pointer; font-weight: 800; color: #540b0e; }
.qt-guide p { margin: 8px 0 4px; line-height: 1.5; }
.qt-guide code { background: #fff3b0; padding: 1px 5px; border-radius: 4px; }
.qt-ex { margin: 4px 0 8px; padding: 8px 10px; background: #fff; border: 1px dashed #d9c9a3; border-radius: 8px; white-space: pre-wrap; font-size: 12px; }

/* ===== Kho bài lẻ / ghép Full test ===== */
.qb-tabs { display: flex; gap: 6px; margin: 4px 0 12px; border-bottom: 2px solid #e8d9bc; }
.qb-tabs button { border: 0; background: none; padding: 9px 14px; font-weight: 800; color: #8a7468; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.qb-tabs button.active { color: #9e2a2b; border-bottom-color: #9e2a2b; }
.qb-modal { width: min(720px, 100%); }
.qb-search { width: 100%; border: 2px solid #e8d9bc; border-radius: 12px; padding: 9px 12px; margin-bottom: 10px; font: inherit; }
.qb-skills { display: flex; gap: 8px; margin-bottom: 8px; }
.qb-note { margin: 6px 0 10px; color: #8a7468; font-size: 13px; }
.qb-slot { display: grid; gap: 4px; margin: 8px 0; font-weight: 800; font-size: 13px; }
.qb-slot select { border: 2px solid #e8d9bc; border-radius: 12px; padding: 9px 10px; font: inherit; background: #fff; }
.qb-chip { display: inline-block; margin: 4px 4px 0 0; padding: 2px 9px; border-radius: 999px; background: #fff3b0; color: #540b0e; font-style: normal; font-size: 11px; font-weight: 800; }
.qb-unit small { display: block; color: #8a7468; margin: 2px 0 8px; }
