.word-radar-flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(20px, 3vw);
  background: rgba(48, 53, 58, 0.34);
  -webkit-backdrop-filter: blur(12px) saturate(0.88);
  backdrop-filter: blur(12px) saturate(0.88);
  opacity: 0;
  transition: opacity 180ms ease;
}

.word-radar-flash.is-open { opacity: 1; }

.word-radar-flash-dialog {
  box-sizing: border-box;
  width: min(760px, calc(100vw - 40px));
  max-height: min(82dvh, 760px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: clamp(26px, 4vw, 46px);
  background: rgba(76, 81, 86, 0.82);
  -webkit-backdrop-filter: blur(22px) saturate(0.9);
  backdrop-filter: blur(22px) saturate(0.9);
  box-shadow: 0 22px 60px rgba(20, 24, 28, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  transform: translateY(18px) scale(0.985);
  transition: transform 220ms ease;
}

.word-radar-flash.is-open .word-radar-flash-dialog { transform: translateY(0) scale(1); }

.word-radar-flash-head,
.word-radar-result-head,
.word-radar-results-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.word-radar-flash-head { justify-content: space-between; }

.word-radar-kicker {
  color: #fdba74;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.word-radar-flash-close {
  min-width: 46px;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.word-radar-flash-word {
  margin: clamp(22px, 4vh, 38px) 0 8px;
  color: #fff;
  font-size: clamp(44px, 7vw, 82px);
  letter-spacing: 0;
  line-height: 0.98;
}

.word-radar-flash-meaning {
  display: none;
  margin: 0 0 clamp(12px, 2vh, 24px);
  color: #fdba74;
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.2;
}

.word-radar-flash-context {
  display: -webkit-box;
  margin: 0 0 clamp(18px, 3vh, 28px);
  max-width: 78ch;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.72);
  font-size: clamp(14px, 1.6vw, 19px);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.word-radar-flash-question { display: none; }
.word-radar-question-loading { margin: 0; color: rgba(255, 255, 255, 0.68); font-size: 18px; line-height: 1.45; }

.word-radar-flash-options,
.word-radar-result-options { display: grid; gap: 8px; }

.word-radar-option,
.word-radar-result-options button {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.word-radar-option:hover,
.word-radar-result-options button:hover { border-color: #fdba74; background: rgba(251, 146, 60, 0.18); }
.word-radar-option:focus {
  outline: 3px solid rgba(253, 186, 116, 0.65);
  outline-offset: 2px;
  border-color: #fdba74;
  background: rgba(251, 146, 60, 0.2);
}
.word-radar-option:active,
.word-radar-result-options button:active { transform: scale(0.98); }
.word-radar-option.is-correct { border-color: #4ade80; background: rgba(34, 197, 94, 0.2); }
.word-radar-option.is-picked:not(.is-correct) { border-color: #f87171; background: rgba(239, 68, 68, 0.2); }
.word-radar-option.is-secondary,
.word-radar-result-options button.is-secondary { background: #f8fafc; color: #475569; }

.word-radar-option.is-correct { color: #dcfce7; }
.word-radar-option.is-picked:not(.is-correct) { color: #fee2e2; }
.word-radar-option-key {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}
.word-radar-option-text { min-width: 0; }

.word-radar-flash-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.word-radar-feedback { min-height: 20px; margin: 0; font-weight: 700; }
.word-radar-feedback.is-good { color: #bbf7d0; }
.word-radar-feedback.is-bad { color: #fecaca; }
.word-radar-flash-explanation { margin: 8px 0 0; color: rgba(248, 250, 252, 0.72); font-size: 13px; line-height: 1.45; }
.word-radar-flash-voice { color: rgba(255, 255, 255, 0.72); font-size: 15px; }

.word-radar-results {
  margin-top: 24px;
  border-top: 1px solid rgba(120, 84, 42, 0.18);
  padding-top: 24px;
}

.word-radar-results h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.word-radar-results-intro { margin: 8px 0 16px; color: #64748b; }
.word-radar-results-meta { flex-wrap: wrap; margin-bottom: 16px; color: #475569; font-size: 13px; }
.word-radar-results-meta span { border-radius: 999px; padding: 6px 10px; background: #fff7ed; }
.word-radar-results-list { display: grid; gap: 12px; }
.word-radar-result-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; background: rgba(255, 255, 255, 0.86); }
.word-radar-result-head { margin-bottom: 8px; }
.word-radar-result-head > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #ffedd5; color: #9a3412; font-size: 12px; font-weight: 800; }
.word-radar-result-head strong { font-size: 18px; }
.word-radar-result-head small { margin-left: auto; color: #b45309; font-variant-numeric: tabular-nums; }
.word-radar-result-card p { margin: 0 0 10px; color: #64748b; font-size: 14px; line-height: 1.45; }
.word-radar-result-feedback { display: block; min-height: 19px; margin-top: 8px; color: #15803d; font-weight: 700; }
.word-radar-result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.word-radar-result-actions button {
  min-height: 44px;
  border: 1px solid #c2410c;
  border-radius: 8px;
  padding: 10px 14px;
  background: #c2410c;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.word-radar-result-actions button:hover { background: #9a3412; border-color: #9a3412; }
.word-radar-result-actions button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }
.word-radar-result-actions button:disabled { cursor: default; opacity: 0.7; }
.word-radar-result-actions button.is-secondary {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}
.word-radar-result-actions button.is-secondary:hover { border-color: #94a3b8; background: #f1f5f9; }

.word-radar-review-link strong,
.word-radar-results-action strong {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.word-radar-review-link.has-due strong,
.word-radar-results-action.has-due strong { background: #b45309; color: #fff; }
.word-radar-results-action {
  width: fit-content;
  min-height: 44px;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #d9a365;
  border-radius: 8px;
  color: #7c3f16;
  background: #fff7ed;
  text-decoration: none;
  font-weight: 800;
}
.word-radar-results-action:hover { border-color: #b45309; background: #ffedd5; }

#wordRadarToggle.is-active { border-color: rgba(245, 158, 11, 0.55); color: #92400e; background: #fff7ed; }

.word-radar-preheat {
  position: absolute;
  top: 76px;
  right: 22px;
  z-index: 5;
  width: min(214px, calc(100% - 44px));
  padding: 10px 11px 9px;
  border: 1px solid rgba(255, 224, 154, 0.30);
  border-radius: 8px;
  background: rgba(8, 17, 31, 0.60);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px) saturate(1.08);
  pointer-events: none;
}

.word-radar-preheat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 244, 200, 0.92);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.word-radar-preheat-mark {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(253, 186, 116, 0.62);
  border-radius: 50%;
  color: #fdba74;
  font-size: 12px;
  line-height: 1;
}

.word-radar-preheat-count {
  margin-left: auto;
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.20);
  color: #fed7aa;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.word-radar-preheat-list {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.word-radar-preheat-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  line-height: 1.3;
}

.word-radar-preheat-list strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.96);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-radar-preheat-list span {
  flex: 0 0 auto;
  color: rgba(253, 186, 116, 0.86);
  white-space: nowrap;
}

.speaking-modal-dialog.is-immersive-reading-mode .word-radar-preheat { display: none; }

@media (min-width: 760px) {
  .word-radar-flash { place-items: center; }
  .word-radar-flash-dialog { padding: clamp(30px, 4vw, 46px); }
  .word-radar-results-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 759px) {
  .word-radar-flash { padding: 12px; }
  .word-radar-flash-dialog {
    width: min(100%, 620px);
    max-height: calc(100dvh - 24px);
    padding: 22px 18px;
    border-radius: 12px;
  }
  .word-radar-flash-word { margin-top: 24px; }
  .word-radar-option { min-height: 62px; padding: 12px 14px; }
  .word-radar-flash-footer { align-items: flex-start; flex-direction: column; }

  .word-radar-preheat {
    top: auto;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 14px;
    width: auto;
    padding: 7px 10px;
  }

  .word-radar-preheat-head { display: inline-flex; }
  .word-radar-preheat-list {
    display: flex;
    gap: 8px;
    margin-top: 5px;
    overflow: hidden;
  }

  .word-radar-preheat-list li {
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 5px;
  }

  .word-radar-preheat-list li:not(:last-child)::after {
    content: "·";
    margin-left: 3px;
    color: rgba(255, 255, 255, 0.34);
  }
}

@media (max-width: 520px) {
  .word-radar-result-actions { display: grid; grid-template-columns: 1fr; }
  .word-radar-result-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .word-radar-flash,
  .word-radar-flash-dialog,
  .word-radar-option,
  .word-radar-result-options button { transition: none; }
}
