.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid #2a3040;
  background: #0d1016;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}
.site-header-inner {
  width: 100%;
  max-width: 2200px;
  height: 58px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.site-brand img {
  display: block;
  width: auto;
  height: 28px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a,
.site-mobile-menu a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
  transition: color 140ms ease, background-color 140ms ease;
}
.site-nav a {
  padding: 9px 12px;
}
.site-nav a:hover,
.site-mobile-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}
.site-nav a.active,
.site-mobile-menu a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.site-menu-button {
  margin-left: auto;
  width: 40px;
  height: 40px;
  display: none;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.site-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}
.site-header-inner > .public-theme-toggle {
  margin-left: auto;
}
.public-theme-toggle {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
  cursor: pointer;
}
.public-theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.public-theme-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}
.public-theme-toggle .theme-icon-sun,
html[data-theme="light"] .public-theme-toggle .theme-icon-sun {
  display: none;
}
.public-theme-toggle .theme-icon-moon,
html[data-theme="light"] .public-theme-toggle .theme-icon-moon {
  display: block;
}
html[data-theme="dark"] .public-theme-toggle .theme-icon-sun {
  display: block;
}
html[data-theme="dark"] .public-theme-toggle .theme-icon-moon {
  display: none;
}
.public-theme-toggle.is-menu {
  width: 100%;
  min-height: 46px;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 4px;
  padding: 0 13px;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 700;
}
.site-mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #2a3040;
  background: #0d1016;
  padding: 8px 16px 16px;
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.35);
}
.site-mobile-menu[hidden] {
  display: none;
}
.site-mobile-menu a {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  font-size: 14px;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(165, 58, 46, 0.10), transparent 34%),
    #0a0c10;
  color: var(--text);
}
.app { max-width: 1160px; }
.screen { border-radius: 8px; }
.welcome { max-width: 780px; margin-left: auto; margin-right: auto; }
.welcome h2 { font-size: 28px; }
.preview-notice { font-size: 14px !important; color: #1d4ed8 !important; text-align: center; }
.scenario-head { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.scenario-head > div:first-child { flex: 1 1 360px; min-width: 0; }
.scenario-title { font-size: 24px; overflow-wrap: anywhere; }
.scenario-counter { max-width: 100%; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 1 auto; flex-wrap: wrap; }
.found-counter, .flag-score-pill, .step-pill { margin-left: 0; white-space: nowrap; }
.content-message { width: 100%; max-width: 520px; margin: auto; border: 1px solid #d1d5db; border-radius: 8px; color: #1f2937; font-family: inherit; overflow: hidden; }
.message-channel { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; background: #f3f4f6; font-size: 12px; color: #4b5563; }
.message-header { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid #e5e7eb; }
.message-header > div { min-width: 0; overflow-wrap: anywhere; }
.message-avatar { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #e7eefc; color: #1d4ed8; font-weight: 800; }
.message-detail { font-size: 12px; color: #6b7280; }
.message-body { padding: 18px; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.message-block + .message-block { margin-top: 16px; }
.block-heading { font-size: 19px; font-weight: 800; }
.block-link { color: #1d4ed8; text-decoration: underline; }
.block-action { padding-top: 12px; border-top: 1px solid #e5e7eb; font-weight: 700; }
.layout-chat .message-body, .layout-sms .message-body { background: #f7f8fa; }
.layout-chat .message-block, .layout-sms .message-block { width: fit-content; max-width: 94%; padding: 10px 14px; border-radius: 8px; background: #e8edf3; }
.layout-chat .message-channel { background: #e7eefc; color: #1d4ed8; }
.layout-sms .message-avatar { background: #ecfdf5; color: #15803d; }
.layout-page .message-channel { background: #ecfdf5; color: #15803d; }
.message-footer { padding: 12px 16px; border-top: 1px solid #e5e7eb; font-size: 12px; color: #6b7280; }
.qr-placeholder { display: grid; place-items: center; width: 96px; height: 96px; border: 5px dashed #6b7280; margin-bottom: 12px; font-size: 24px; font-weight: 800; color: #6b7280; }
.content-message .flag { white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.content-message .flag:focus-visible { outline: 3px solid #1d4ed8; }
.flag.missed-correct { background: #eff6ff; outline-color: #2563eb; color: #1e40af; }
.flag.missed-correct::after { color: #fff; background: #1d4ed8; }
.scenario-tag, .step-pill, .q-label { letter-spacing: 0; }
.layout-screenshot { max-width: 420px; }
.sign-review { width: 100%; max-width: 100%; margin: 0; padding: 22px 20px; background: #eef0f5; border: 1px solid #e5e7eb; border-radius: 8px; min-width: 0; }
.sign-review h3 { font-size: 18px; margin: 0 0 10px; color: #1f2937; }
.sign-review ul { list-style: none; padding: 0; }
.sign-review li { padding: 12px 0; border-bottom: 1px solid #d1d5db; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.sign-review li:last-child { border-bottom: 0; padding-bottom: 0; }
.sign-review li b { display: block; margin-bottom: 4px; }
.review-found b, .reveal-note .found { color: #15803d; }
.review-missed b, .reveal-note .missed { color: #1d4ed8; }
.quiz-feedback p { margin-top: 10px; }
.safety-takeaway { border-top: 1px solid #d1d5db; padding-top: 12px; }
.case-workspace.question-mode { grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; justify-content: center; }
.question-mode .quiz-q { margin-top: 0; }
.question-mode .content-message { max-width: 420px; font-size: 14px; }
.quiz-opt, .btn { font-family: inherit; white-space: normal; overflow-wrap: anywhere; }
.quiz-opt span:last-child { min-width: 0; }
#submit-status { text-align: center; padding: 14px 0; }
.result-score { text-align: center; font-size: 26px; color: #A53A2E; font-weight: 800; margin-bottom: 12px; }
.result-share { margin: 20px auto 0; text-align: center; }
.result-share-image { display: block; width: 100%; max-width: 600px; height: auto; margin: 0 auto 20px; }
.result-share .facebook-share { background: #0866ff; color: #fff; text-decoration: none; white-space: normal; max-width: 100%; box-sizing: border-box; }
.result-share .facebook-share:hover { background: #0754ce; }
.result-share .facebook-share:focus-visible { outline: 3px solid #A53A2E; outline-offset: 4px; }
.result-share p { color: #555; font-size: 13px; line-height: 1.6; margin: 10px 0 0; }
.poster-stage { position: relative; width: 100%; max-height: 600px; overflow: auto; line-height: 0; background: #f3f4f6; }
.poster-canvas { position: relative; width: 100%; min-height: 1px; }
.poster-stage img { display: block; width: 100%; height: auto; margin: 0; user-select: none; }
.poster-stage.poster-interactive { cursor: crosshair; }
.poster-stage .poster-hotspot { position: absolute; display: block; margin: 0; padding: 0; min-width: 0; min-height: 0; max-width: none; border: 0; border-radius: 3px; outline: 0; box-shadow: none; background: transparent; color: transparent; transform: none; cursor: inherit; }
.poster-stage .poster-hotspot:hover { background: transparent; outline: 0; transform: none; box-shadow: none; }
.poster-stage .poster-hotspot:focus-visible { outline: 3px solid #A53A2E; outline-offset: -3px; }
.poster-stage .poster-hotspot.found-correct { background: rgb(21 128 61 / 18%); outline: 3px solid #15803d; outline-offset: -3px; }
.poster-stage .poster-hotspot.missed-correct { background: rgb(37 99 235 / 12%); outline: 3px dashed #2563eb; outline-offset: -3px; }
.poster-stage .poster-hotspot.found-wrong { background: rgb(220 38 38 / 10%); outline: 2px solid #dc2626; outline-offset: -2px; }
.poster-stage .poster-hotspot::after { top: 0; right: 0; }
.hotspot-index { display: none; }
.review-quote { color: #4b5563; margin-bottom: 5px; font-style: italic; }
.poster-tools { display: flex; justify-content: flex-end; padding: 6px 10px; background: #fff; border-top: 1px solid #e5e7eb; }
.poster-zoom, .poster-close { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; color: #A53A2E; font: 26px Arial,sans-serif; cursor: pointer; }
.reference-only:has(.poster-stage) { pointer-events: auto; }
.reference-only .poster-stage, .reference-only .message-body { pointer-events: none; }
.poster-dialog { margin: auto; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); width: fit-content; padding: 0; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #1f2937; }
.poster-dialog::backdrop { background: rgb(0 0 0 / 60%); }
.poster-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 15px; font-weight: 700; }
.poster-close { flex-shrink: 0; }
.poster-scroll { overflow: auto; max-width: calc(100vw - 26px); max-height: calc(100dvh - 210px); }
.poster-dialog-feedback { max-width: 600px; padding: 12px 16px; font-size: 14px; line-height: 1.5; }
.poster-dialog-feedback:empty { display: none; }
.poster-unavailable .poster-hotspot { display: none; }
.image-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; font-size: 16px; line-height: 1.5; color: #A53A2E; }
html[data-theme="dark"] .screen,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .chart-card,
html[data-theme="dark"] .quiz-badge-list,
html[data-theme="dark"] .quiz-badge-item,
html[data-theme="dark"] .tutorial-step {
  background: var(--panel);
  border-color: var(--border-soft);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}
html[data-theme="dark"] .welcome .meta div,
html[data-theme="dark"] .sound-toggle,
html[data-theme="dark"] .progress,
html[data-theme="dark"] .debrief {
  background: var(--panel-2);
  border-color: var(--border);
}
html[data-theme="dark"] #participant-name {
  background: #0f1219 !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] #participant-name::placeholder {
  color: var(--muted);
}
html[data-theme="dark"] .briefing,
html[data-theme="dark"] .tutorial-intro,
html[data-theme="dark"] .badge-good,
html[data-theme="dark"] .badge-warn,
html[data-theme="dark"] .badge-bad {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--text);
}
html[data-theme="dark"] .instruction {
  background: rgba(245, 184, 93, 0.14);
  border-color: rgba(245, 184, 93, 0.48);
  color: #f6d29b;
}
html[data-theme="dark"] .content-message {
  background: #111722;
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .message-channel,
html[data-theme="dark"] .message-footer,
html[data-theme="dark"] .poster-tools {
  background: #171d29;
  border-color: var(--border-soft);
  color: var(--muted);
}
html[data-theme="dark"] .message-header {
  border-color: var(--border-soft);
}
html[data-theme="dark"] .message-avatar {
  background: rgba(122, 167, 255, 0.16);
  color: var(--accent);
}
html[data-theme="dark"] .message-detail,
html[data-theme="dark"] .review-quote,
html[data-theme="dark"] .result-share p,
html[data-theme="dark"] .stat-card .label,
html[data-theme="dark"] .quiz-badge-item .qbi-tag {
  color: var(--muted);
}
html[data-theme="dark"] .layout-chat .message-body,
html[data-theme="dark"] .layout-sms .message-body,
html[data-theme="dark"] .layout-page .message-body {
  background: #121824;
}
html[data-theme="dark"] .layout-chat .message-block,
html[data-theme="dark"] .layout-sms .message-block {
  background: #202839;
  color: var(--text);
}
html[data-theme="dark"] .layout-chat .message-channel {
  background: rgba(122, 167, 255, 0.13);
  color: var(--accent);
}
html[data-theme="dark"] .layout-sms .message-avatar,
html[data-theme="dark"] .layout-page .message-channel {
  background: rgba(86, 194, 140, 0.14);
  color: var(--green);
}
html[data-theme="dark"] .block-link,
html[data-theme="dark"] .content-message .flag:focus-visible {
  color: var(--accent);
}
html[data-theme="dark"] .block-action,
html[data-theme="dark"] .safety-takeaway {
  border-color: var(--border-soft);
}
html[data-theme="dark"] .quiz-q,
html[data-theme="dark"] .sign-review {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .sign-review h3,
html[data-theme="dark"] .quiz-q .q-text,
html[data-theme="dark"] .stat-card .val,
html[data-theme="dark"] .quiz-badge-title,
html[data-theme="dark"] .cat-bar-count {
  color: var(--text);
}
html[data-theme="dark"] .sign-review li {
  border-color: var(--border);
}
html[data-theme="dark"] .quiz-opt {
  background: #111722;
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .quiz-opt:hover:not(:disabled) {
  background: #162033;
  border-color: var(--accent);
}
html[data-theme="dark"] .quiz-opt.correct {
  background: rgba(86, 194, 140, 0.16);
  color: #d7f7e7;
}
html[data-theme="dark"] .quiz-opt.wrong {
  background: rgba(255, 117, 109, 0.15);
  color: #ffe0dd;
}
html[data-theme="dark"] .quiz-feedback {
  color: var(--text);
}
html[data-theme="dark"] .progress-text {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .btn.ghost {
  color: var(--text-soft);
  border-color: var(--border);
}
html[data-theme="dark"] .btn.ghost:hover {
  background: var(--panel-2);
  color: var(--text);
}
html[data-theme="dark"] .flag.found-correct,
html[data-theme="dark"] .tutorial-demo .demo-target.active {
  background: rgba(86, 194, 140, 0.18);
  outline-color: var(--green);
}
html[data-theme="dark"] .flag.found-wrong {
  background: rgba(255, 117, 109, 0.16);
  outline-color: var(--red);
}
html[data-theme="dark"] .flag.missed-correct {
  background: rgba(122, 167, 255, 0.16);
  color: #cfe0ff;
  outline-color: var(--accent);
}
html[data-theme="dark"] .poster-stage {
  background: #111722;
}
html[data-theme="dark"] .poster-zoom,
html[data-theme="dark"] .poster-close,
html[data-theme="dark"] .poster-dialog {
  background: #111722;
  border-color: var(--border);
  color: var(--primary);
}
html[data-theme="dark"] .poster-dialog-head {
  color: var(--text);
}
html[data-theme="dark"] .tutorial-demo {
  background: #121824;
  border-color: var(--border);
}
html[data-theme="dark"] .tutorial-demo .fake-ui {
  background: #0f1219;
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] .tutorial-demo .gmail-head {
  border-color: var(--border-soft);
}
html[data-theme="dark"] .tutorial-demo .gmail-head .from,
html[data-theme="dark"] .tutorial-demo .gmail-head .subject,
html[data-theme="dark"] .tutorial-demo .gmail-body {
  color: var(--text);
}
html[data-theme="dark"] .tutorial-demo .gmail-head .email,
html[data-theme="dark"] .tutorial-demo .gmail-head .to,
html[data-theme="dark"] .tutorial-demo .gmail-body .small-url {
  color: var(--muted);
}
html[data-theme="dark"] .category-chart svg text {
  fill: var(--text);
}
html[data-theme="dark"] .cat-bar-track {
  background: #0f1219;
}
@media (min-width: 768px) and (max-width: 820px) {
  .case-workspace.question-mode { grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 18px; }
  .question-mode .content-message, .layout-screenshot { max-width: 360px; }
}
@media (max-width: 1100px) {
  .scenario-head > div:first-child { flex-basis: 100%; }
  .scenario-counter { flex: 1 1 100%; justify-content: flex-start; }
}
@media (max-width: 767px) {
  .case-workspace.question-mode { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .case-workspace.question-mode .ui-wrap { position: static; }
  .site-header-inner { height: 58px; padding: 0 14px; gap: 12px; }
  .site-nav { display: none; }
  .site-header-inner > .public-theme-toggle { display: none; }
  .site-menu-button { display: grid; }
  .app { padding: 12px 10px 40px; }
  .screen { padding: 18px 14px; }
  .scenario-title { font-size: 21px; }
  .welcome h2 { font-size: 24px; }
  .message-header { padding: 12px; }
  .message-body { padding: 12px; font-size: 14px; }
  .message-block + .message-block { margin-top: 12px; }
  .block-heading { font-size: 17px; }
  .question-mode .message-header { padding: 10px 12px; }
  .question-mode .message-body { font-size: 13px; line-height: 1.6; }
  .question-mode .message-block + .message-block { margin-top: 10px; }
  .content-message, .question-mode .content-message, .layout-screenshot { max-width: 100%; }
  .poster-stage { max-height: 58vh; }
  .sign-review { padding: 18px 14px; }
  .tutorial-demo { padding: 10px; }
  .nav-row .btn { flex: 1 1 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
