/* Kho đề kiểm tra định kỳ & Phòng thi thử — Đồng bộ thẩm mỹ Góc Học Tập */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #dff1ff 0%, #eaf5ff 360px, #f3f9ff 100%);
  color: #162642;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  line-height: 1.6;
}
button, input { font-family: inherit; }
a { color: inherit; }

/* ---------- Thanh điều hướng kính trắng đồng bộ trang chủ ---------- */
.dt-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid #d4e6ff;
  box-shadow: 0 4px 18px rgba(22, 104, 227, .07);
}
.dt-top-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dt-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.dt-brand svg { width: 40px; height: 40px; flex-shrink: 0; }
.dt-brand b {
  display: block;
  font: 800 22px/1 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  color: #10326b;
}
.dt-brand b i { color: #f97316; font-style: normal; }
.dt-brand small {
  display: block;
  font: 700 10px/1.1 'Be Vietnam Pro', sans-serif;
  letter-spacing: .08em;
  color: #4f6792;
  margin-top: 2px;
}
.dt-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dt-nav::-webkit-scrollbar { display: none; }
.dt-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px 0 9px;
  border-radius: 999px;
  font: 700 14px/1 'Be Vietnam Pro', sans-serif;
  color: #203760;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, color .15s, transform .15s;
}
.dt-nav a:hover { background: #eef5ff; color: #1668e3; transform: translateY(-1px); }
.dt-nav a.active {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, .26);
}
.dt-nav-ic { width: 22px; height: 22px; display: inline-flex; flex-shrink: 0; }
.dt-nav-ic svg { width: 100%; height: 100%; }

/* ---------- Khung chính & Footer ---------- */
.dt-wrap {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 18px 50px;
}
.dt-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #53698f;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dt-crumb a { color: #1668e3; font-weight: 700; text-decoration: none; }
.dt-crumb a:hover { text-decoration: underline; }

.dt-foot {
  background: #072973;
  color: rgba(255, 255, 255, .88);
  padding: 18px 16px;
  text-align: center;
  font-size: 13.5px;
}
.dt-foot-nav {
  display: flex;
  justify-content: center;
  gap: 10px 20px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.dt-foot-nav a { color: #dbeeff; text-decoration: none; font-weight: 600; }
.dt-foot-nav a:hover { color: #fff; text-decoration: underline; }
.dt-copy { font-size: 12.5px; color: rgba(219, 238, 255, .72); }

.dt-loading, .dt-empty {
  background: #fff;
  border: 2px solid #d5e7ff;
  border-radius: 24px;
  padding: 40px 24px;
  text-align: center;
  color: #465a7d;
  box-shadow: 0 10px 26px rgba(22, 104, 227, .07);
}
.dt-empty h3 {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  color: #10326b;
  margin: 0 0 8px;
  font-size: 23px;
}

/* ---------- Hero Banner 2 cột rực rỡ ---------- */
.dt-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 24px 28px;
  margin-bottom: 18px;
  color: #fff;
  background: linear-gradient(135deg, #1668e3 0%, #208cf2 54%, #10b981 100%);
  box-shadow: 0 16px 36px rgba(22, 104, 227, .18);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .85fr);
  gap: 20px;
  align-items: center;
}
.dt-hero::before, .dt-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  pointer-events: none;
}
.dt-hero::before { width: 270px; height: 270px; right: -60px; top: -85px; }
.dt-hero::after { width: 170px; height: 170px; left: 38%; bottom: -75px; background: rgba(255, 255, 255, .09); }
.dt-hero-left { position: relative; z-index: 2; }
.dt-hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dt-hbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .36);
  font-weight: 700;
  font-size: 12.5px;
}
.dt-hero h1 {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.15;
  margin: 0 0 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}
.dt-hero p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .95);
  max-width: 660px;
}
.dt-acc-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, .18);
  border: 1.5px solid rgba(255, 255, 255, .36);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 9px 14px;
  font-size: 13.5px;
  color: #fff;
}
.dt-acc-box b { font-weight: 800; }
.dt-acc-link {
  color: #fef08a;
  font-weight: 800;
  text-decoration: underline;
  font-size: 13px;
}
.dt-hero-art {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 175px;
}
.dt-hero-art img {
  height: 168px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(10, 30, 80, .24));
}
.dt-hero-art img.sub { height: 144px; margin-left: -12px; }

/* ---------- Bộ lọc 3D đồng bộ trang chủ ---------- */
.dt-filters {
  background: rgba(255, 255, 255, .95);
  border: 2px solid #cde2ff;
  border-radius: 22px;
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(22, 104, 227, .07);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dt-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dt-filter-label {
  font: 800 14px/1.2 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  color: #10326b;
  min-width: 72px;
}
.dt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #cfe0ff;
  background: #fff;
  color: #1c448e;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 2px 0 #dce9ff;
  transition: transform .14s, background .14s, color .14s, border-color .14s;
}
.dt-chip i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 12px/1 'Baloo 2', sans-serif;
  color: #fff;
  font-style: normal;
}
.dt-chip.l1 i { background: #2563eb; }
.dt-chip.l2 i { background: #10b981; }
.dt-chip.l3 i { background: #f59e0b; }
.dt-chip.l4 i { background: #8b5cf6; }
.dt-chip.l5 i { background: #f43f5e; }
.dt-chip.has-dot { padding-left: 8px; }
.dt-chip:hover { border-color: #1668e3; background: #eef6ff; transform: translateY(-1px); }
.dt-chip.active {
  background: linear-gradient(135deg, #1668e3, #2f8bff);
  color: #fff;
  border-color: #1668e3;
  box-shadow: 0 3px 0 #0f4db3, 0 6px 14px rgba(22, 104, 227, .24);
}
.dt-chip.active i { background: rgba(255, 255, 255, .28); }

.dt-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dt-count-note {
  font: 800 16px/1.2 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  color: #10326b;
}
.dt-count-note b { color: #1668e3; }
.dt-grade-hubs {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #465a7d;
}
.dt-grade-hubs a {
  color: #1668e3;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  border: 1.5px solid #cde0ff;
  padding: 5px 12px;
  border-radius: 999px;
  transition: background .14s;
}
.dt-grade-hubs a:hover { background: #e8f2ff; }

/* ---------- Lưới thẻ đề kiểm tra minh họa đẹp mắt ---------- */
.dt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 780px) { .dt-grid { grid-template-columns: 1fr; } }

.dt-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px 22px;
  background: #fff;
  border: 2px solid #d5e7ff;
  box-shadow: 0 10px 26px rgba(22, 104, 227, .07);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s, box-shadow .15s;
}
.dt-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(22, 104, 227, .12); }
.dt-card.sub-toan { background: linear-gradient(145deg, #ffffff 42%, #ebf4ff 100%); border-color: #b7d6ff; }
.dt-card.sub-ta { background: linear-gradient(145deg, #ffffff 42%, #fff6e0 100%); border-color: #fde09b; }

.dt-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.dt-card-img {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
  padding: 5px;
  box-shadow: 0 6px 14px rgba(22, 104, 227, .12);
  flex-shrink: 0;
}
.dt-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
}
.dt-tag {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e9f3ff;
  color: #1668e3;
}
.dt-tag.mon-toan { background: #dbeafe; color: #1d4ed8; }
.dt-tag.mon-ta { background: #fef3c7; color: #b45309; }
.dt-tag.ky { background: #d1fae5; color: #047857; }
.dt-tag.mau { background: #ede9fe; color: #6d28d9; }

.dt-card h2 {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  font-size: 20px;
  line-height: 1.24;
  margin: 0;
  color: #10326b;
}
.dt-card p { margin: 0; font-size: 14px; color: #465a7d; flex: 1; line-height: 1.6; }
.dt-meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  color: #465a7d;
  padding-top: 8px;
  border-top: 1px dashed #d5e4fa;
}
.dt-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dt-meta-item svg { width: 15px; height: 15px; color: #1668e3; flex-shrink: 0; }
.dt-card.sub-ta .dt-meta-item svg { color: #d97706; }

.dt-best-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #a7f3d0;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}
.dt-best-score svg { width: 16px; height: 16px; color: #f59e0b; flex-shrink: 0; }

.dt-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.dt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  height: 42px;
  padding: 0 20px;
  font: 800 14.5px/1 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  cursor: pointer;
  background: linear-gradient(135deg, #1668e3, #2f8bff);
  color: #fff;
  box-shadow: 0 3px 0 #0f4db3, 0 6px 16px rgba(22, 104, 227, .24);
  transition: transform .14s;
}
.dt-btn:hover { transform: translateY(-2px); }
.dt-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.dt-card.sub-ta .dt-btn {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 3px 0 #b45309, 0 6px 16px rgba(217, 119, 6, .24);
}
.dt-btn.sec {
  background: #fff;
  color: #164ea8;
  border: 1.5px solid #c9ddff;
  box-shadow: 0 2px 0 #dce9ff;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
}
.dt-btn.sec:hover { background: #edf4ff; }
.dt-btn.green {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 3px 0 #047857, 0 6px 16px rgba(5, 150, 105, .24);
}
.dt-btn.warn {
  background: #fff7ed;
  color: #c2410c;
  border: 1.5px solid #fed7aa;
  box-shadow: 0 2px 0 #fed7aa;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
}

/* ---------- Phòng thi thử (Sticky Bar + Layout) ---------- */
.dt-runner-bar {
  position: sticky;
  top: 66px;
  z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border: 2px solid #c4dcff;
  border-radius: 22px;
  padding: 12px 18px;
  box-shadow: 0 10px 26px rgba(22, 104, 227, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.dt-runner-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 240px;
}
.dt-runner-title b {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  font-size: 18.5px;
  color: #10326b;
  line-height: 1.2;
}
.dt-prog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dt-prog {
  width: 150px;
  height: 8px;
  border-radius: 999px;
  background: #e5effd;
  overflow: hidden;
}
.dt-prog > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1668e3, #10b981);
  border-radius: 999px;
  transition: width .25s ease;
}
.dt-runner-title span { font-size: 12.5px; color: #52688f; font-weight: 700; }

.dt-timer-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dt-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  font-size: 21px;
  font-weight: 800;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: #eef5ff;
  color: #1668e3;
  border: 1.5px solid #c7dfff;
  min-width: 104px;
}
.dt-timer svg { width: 18px; height: 18px; flex-shrink: 0; }
.dt-timer.low {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.dt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 920px) { .dt-layout { grid-template-columns: 1fr; } }

.dt-questions { display: flex; flex-direction: column; gap: 16px; }
.dt-paused-mask {
  background: #fff;
  border: 2px dashed #9cc3ff;
  border-radius: 24px;
  padding: 48px 20px;
  text-align: center;
}
.dt-paused-mask h3 {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  margin: 0 0 8px;
  font-size: 24px;
  color: #10326b;
}

/* ---------- Thẻ câu hỏi ---------- */
.dt-q {
  background: #fff;
  border: 2px solid #d5e7ff;
  border-radius: 22px;
  padding: 22px;
  scroll-margin-top: 150px;
  box-shadow: 0 6px 20px rgba(22, 104, 227, .05);
  transition: border-color .15s, box-shadow .15s;
}
.dt-q.is-active { border-color: #2f8bff; box-shadow: 0 8px 24px rgba(22, 104, 227, .12); }
.dt-q.review-ok { border-color: #22c55e; background: #fcfffd; }
.dt-q.review-err { border-color: #ef4444; background: #fffcfc; }

.dt-q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dt-q-num {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #1668e3;
  background: #eef5ff;
  padding: 4px 14px;
  border-radius: 999px;
}
.dt-q-pts { font-size: 12.5px; font-weight: 700; color: #5b6e91; }
.dt-q-status { font-size: 12.5px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.dt-q-status.ok { background: #dcfce7; color: #15803d; }
.dt-q-status.err { background: #fee2e2; color: #b91c1c; }

.dt-q-prompt {
  font-size: 16.5px;
  font-weight: 600;
  color: #14233d;
  margin-bottom: 15px;
  white-space: pre-line;
  line-height: 1.6;
}

/* MCQ Options */
.dt-opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 600px) { .dt-opts { grid-template-columns: 1fr; } }

.dt-opt {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 16px;
  border: 2px solid #d5e7ff;
  background: #f9fcff;
  color: #1d2b45;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
}
.dt-opt:hover:not(:disabled) { border-color: #5ca0ff; background: #eef6ff; transform: translateY(-1px); }
.dt-opt.selected { border-color: #1668e3; background: #e3efff; color: #0e3f99; }
.dt-opt.correct { border-color: #16a34a; background: #dcfce7; color: #14532d; }
.dt-opt.wrong { border-color: #dc2626; background: #fee2e2; color: #7f1d1d; }
.dt-opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #bfd7ff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13.5px;
  flex-shrink: 0;
}
.dt-opt.selected .dt-opt-letter { background: #1668e3; color: #fff; border-color: #1668e3; }
.dt-opt.correct .dt-opt-letter { background: #16a34a; color: #fff; border-color: #16a34a; }
.dt-opt.wrong .dt-opt-letter { background: #dc2626; color: #fff; border-color: #dc2626; }

/* Fill-in-the-blank */
.dt-fill-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dt-fill-input {
  flex: 1;
  min-width: 190px;
  max-width: 340px;
  padding: 12px 15px;
  border-radius: 15px;
  border: 2px solid #bfd7ff;
  background: #f9fcff;
  font-size: 16px;
  font-weight: 700;
  color: #10326b;
  outline: none;
}
.dt-fill-input:focus { border-color: #1668e3; background: #fff; box-shadow: 0 0 0 3px rgba(22, 104, 227, .12); }
.dt-fill-input.ok { border-color: #16a34a; background: #f0fdf4; color: #14532d; }
.dt-fill-input.err { border-color: #dc2626; background: #fef2f2; color: #7f1d1d; }
.dt-fill-unit { font-weight: 700; color: #465a7d; font-size: 15px; }

/* True/False */
.dt-tf-row { display: flex; gap: 12px; flex-wrap: wrap; }
.dt-tf-btn {
  min-width: 140px;
  padding: 12px 20px;
  border-radius: 16px;
  border: 2px solid #d5e7ff;
  background: #f9fcff;
  font-size: 15.5px;
  font-weight: 800;
  color: #1d2b45;
  cursor: pointer;
  transition: all .12s;
}
.dt-tf-btn:hover:not(:disabled) { border-color: #5ca0ff; background: #eef6ff; }
.dt-tf-btn.selected { border-color: #1668e3; background: #e3efff; color: #0e3f99; }
.dt-tf-btn.correct { border-color: #16a34a; background: #dcfce7; color: #14532d; }
.dt-tf-btn.wrong { border-color: #dc2626; background: #fee2e2; color: #7f1d1d; }

/* Explanation box */
.dt-explain {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 16px;
  background: #f3f8ff;
  border: 1.5px solid #cce0ff;
  font-size: 14px;
  color: #1e3a6d;
}
.dt-explain b { color: #10326b; }
.dt-ans-line { margin-bottom: 4px; font-weight: 700; }

/* Question Palette (Sidebar) */
.dt-palette-card {
  position: sticky;
  top: 156px;
  background: #fff;
  border: 2px solid #cde2ff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(22, 104, 227, .07);
}
.dt-palette-card h3 {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  margin: 0 0 12px;
  font-size: 18.5px;
  color: #10326b;
}
.dt-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.dt-pbtn {
  height: 38px;
  border-radius: 12px;
  border: 1.5px solid #cde0ff;
  background: #f8fbff;
  font-weight: 800;
  font-size: 14px;
  color: #3f5275;
  cursor: pointer;
}
.dt-pbtn.done { background: #1668e3; color: #fff; border-color: #1668e3; }
.dt-pbtn.active { outline: 3px solid #ffd43b; outline-offset: 1px; }
.dt-pbtn.ok { background: #16a34a; color: #fff; border-color: #16a34a; }
.dt-pbtn.err { background: #dc2626; color: #fff; border-color: #dc2626; }
.dt-legend { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #5b6e91; }
.dt-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Result Summary Card */
.dt-result {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #ecfdf5 100%);
  border: 2px solid #9cc3ff;
  border-radius: 26px;
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px rgba(22, 104, 227, .1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.dt-score-circle {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1668e3, #10b981);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(22, 104, 227, .28);
  flex-shrink: 0;
}
.dt-score-circle b {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  font-size: 36px;
  line-height: 1;
}
.dt-score-circle span { font-size: 12.5px; opacity: .94; font-weight: 700; }
.dt-result-info { flex: 1; min-width: 220px; }
.dt-result-info h2 {
  font-family: 'Baloo 2', 'Be Vietnam Pro', sans-serif;
  margin: 0 0 6px;
  font-size: 25px;
  color: #10326b;
}
.dt-result-info p { margin: 0 0 12px; color: #3f5275; font-size: 14.8px; }

/* Print A4 */
.dt-print-sheet { display: none; }
@page { size: A4; margin: 14mm; }
@media print {
  body { background: #fff !important; color: #000 !important; font-size: 11.5pt; line-height: 1.45; }
  .no-print, .dt-top, .dt-foot, .dt-runner-bar, .dt-palette-card, .dt-card-actions { display: none !important; }
  .dt-wrap { max-width: 100%; padding: 0; }
  .dt-layout { display: block; }
  .dt-print-sheet {
    display: block;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 14px;
  }
  .dt-print-sheet h1 { font-size: 16pt; margin: 0 0 6px; color: #000; text-align: center; }
  .dt-print-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 10.5pt; margin-top: 6px; }
  .dt-q {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff !important;
    box-shadow: none !important;
  }
  .dt-q-num { background: none; color: #000; padding: 0; }
  .dt-opts { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .dt-opt, .dt-tf-btn { border: 1px solid #94a3b8; background: #fff !important; color: #000 !important; padding: 6px 10px; font-size: 10.5pt; }
  .dt-fill-input { border: 0; border-bottom: 1px dashed #334155; border-radius: 0; background: #fff; }
  .dt-explain { background: #f8fafc; border: 1px solid #cbd5e1; font-size: 10pt; }
  .dt-result { border: 1px solid #94a3b8; background: #fff; padding: 12px; box-shadow: none; }
  .dt-score-circle { background: #fff; color: #000; border: 2px solid #000; box-shadow: none; width: 76px; height: 76px; }
  .dt-score-circle b { font-size: 20pt; }
}

@media (max-width: 920px) {
  .dt-hero { grid-template-columns: 1fr; padding: 20px; }
  .dt-hero-art { min-height: 128px; justify-content: flex-start; }
  .dt-hero-art img { height: 128px; }
  .dt-hero-art img.sub { height: 112px; }
}
@media (max-width: 680px) {
  .dt-top-in { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .dt-brand b { font-size: 20px; }
  .dt-wrap { padding: 14px 12px 36px; }
  .dt-filters { padding: 14px 12px; border-radius: 18px; }
  .dt-filter-label { width: 100%; margin-bottom: -2px; }
  .dt-runner-bar { top: 4px; padding: 10px 12px; border-radius: 16px; gap: 10px; }
  .dt-runner-title b { font-size: 15.5px; }
  .dt-timer-group { width: 100%; justify-content: space-between; gap: 6px; }
  .dt-timer { font-size: 18px; min-width: 82px; height: 38px; padding: 0 10px; }
  .dt-timer-group .dt-btn { height: 38px; padding: 0 12px; font-size: 13px; }
  .dt-q { padding: 16px 14px; border-radius: 18px; }
  .dt-q-prompt { font-size: 15.5px; }
  .dt-tf-btn { flex: 1; min-width: 110px; text-align: center; }
  .dt-palette-card { position: static; padding: 14px; }
  .dt-palette-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .dt-pbtn { height: 34px; font-size: 13px; }
  .dt-result { padding: 18px 16px; justify-content: center; text-align: center; }
}
