/* Doctor Spin — "Arcane Portal Wheel" theme.
   Sorcery-genre visuals (rune wheel, glowing sigils, ember particles) —
   a broad fantasy trope, not any one franchise's. Deliberately avoids the
   MCU orange-portal signature, the sling-ring gesture, and any character
   silhouette; every mark here is original geometry, not a lifted asset. */

:root {
  --bg-deep: #000000;
  --violet: #009DD9;
  --violet-deep: #0B2D71;
  --magenta: #BA3093;
  --gold: #FAAB18;
  --gold-bright: #FFFFFF;
  --text: #FFFFFF;
  --muted: #8C8F93;
  --card-bg: rgba(58, 13, 54, 0.66);
  --card-border: rgba(250, 171, 24, 0.35);
  --field-bg: rgba(255, 255, 255, 0.05);
  --field-border: rgba(250, 171, 24, 0.22);
  --error-bg: rgba(226, 24, 54, 0.12);
  --error-fg: #E21836;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.1rem;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 18% 18%, rgba(0, 157, 217, 0.26), transparent 60%),
    radial-gradient(ellipse 55% 40% at 82% 28%, rgba(186, 48, 147, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 95%, rgba(250, 171, 24, 0.12), transparent 65%),
    var(--bg-deep);
}

/* Decorative ley lines, fixed behind everything. */
.ley-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Ambient ember particles drifting upward. */
.embers {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ember {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bright), var(--gold) 60%, transparent 75%);
  box-shadow: 0 0 6px 2px rgba(250, 171, 24, 0.55);
  opacity: 0;
  animation-name: ember-rise;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}

@keyframes ember-rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.9; }
  85% { opacity: 0.4; }
  100% { transform: translateY(-105vh) translateX(18px); opacity: 0; }
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.flash-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.flash {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 8px;
  background: var(--error-bg);
  color: var(--error-fg);
  border: 1px solid rgba(226, 24, 54, 0.25);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 157, 217, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: card-arrive 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes card-arrive {
  0% { opacity: 0; transform: scale(0.94) translateY(6px); filter: blur(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.sigil-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(250, 171, 24, 0.5));
  animation: sigil-pulse 4s ease-in-out infinite;
}

@keyframes sigil-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.95; }
  50% { transform: scale(1.05) rotate(4deg); opacity: 1; }
}

.kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}

h1 {
  margin: 0 0 4px;
  font-size: 1.7rem;
  letter-spacing: 0.01em;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

.placeholder-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

form {
  text-align: left;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  color: var(--muted);
}

input,
select {
  width: 100%;
  padding: 14px 12px;
  margin-bottom: 18px;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--field-bg);
  color: var(--text);
}

select option {
  background: #000000;
  color: var(--text);
}

input::placeholder {
  color: rgba(243, 236, 255, 0.35);
}

input:focus,
select:focus {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
}

.email-entry {
  display: flex;
  align-items: stretch;
  margin-bottom: 18px;
}
.email-entry input {
  min-width: 0;
  margin-bottom: 0;
  border-radius: 10px 0 0 10px;
}
.email-domain {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--field-border);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: rgba(0, 157, 217, 0.18);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.email-entry:focus-within .email-domain {
  border-color: var(--violet);
}

button,
.link-button {
  width: 100%;
  display: block;
  padding: 14px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--violet), var(--magenta) 55%, var(--gold));
  color: #000000;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.sage-quote {
  margin: 0 0 22px;
  padding: 14px 16px;
  text-align: left;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
}

.sage-quote p {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.5;
  font-style: italic;
}

.sage-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

button:hover,
.link-button:hover {
  filter: brightness(1.08);
}

.link-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--field-border);
  margin-bottom: 12px;
}

.link-button:last-child {
  margin-bottom: 0;
}

.link-button.primary {
  background: linear-gradient(135deg, var(--violet), var(--magenta) 55%, var(--gold));
  color: #000000;
  border: none;
  font-weight: 700;
}

/* --- Organizer Event Command -------------------------------------- */
.admin-shell { max-width: 1100px; margin: 0 auto; }
.admin-hero, .admin-panel, .admin-scenarios {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28); backdrop-filter: blur(18px);
}
.admin-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 32px; }
.admin-hero h1, .admin-panel h2, .admin-scenarios h2 { margin: 0; }
.admin-hero p:not(.kicker), .admin-panel p, .admin-section-heading > p { color: var(--muted); line-height: 1.5; }
.admin-status { padding: 9px 13px; border-radius: 999px; color: #B2CC34; background: rgba(118, 146, 49, .12); border: 1px solid rgba(118, 146, 49, .35); font-weight: 700; white-space: nowrap; }
.admin-status.is-paused { color: #FAAB18; background: rgba(250, 171, 24, .13); border-color: rgba(250, 171, 24, .4); }
.admin-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.admin-metrics article { padding: 22px 16px; text-align: center; border-radius: 14px; background: rgba(58, 13, 54, .65); border: 1px solid var(--field-border); }
.admin-metrics strong { display: block; font-size: 2rem; color: var(--gold); }
.admin-metrics span { color: var(--muted); font-size: .82rem; }
.admin-panel { margin: 16px 0; padding: 24px; display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.admin-panel > div { max-width: 690px; }.admin-panel p { margin-bottom: 0; }.admin-panel form { min-width: 180px; }
.admin-inline-action { width: auto; margin: 0; white-space: nowrap; }.danger-action { background: linear-gradient(135deg, #E21836, #FAAB18) !important; color: #000000 !important; }.secondary-action { background: rgba(255, 255, 255,.08) !important; color: var(--text) !important; border: 1px solid var(--field-border) !important; }
.admin-reset-form { width: 230px; }.admin-reset-form input { margin-bottom: 9px; }
.admin-scenarios { margin-top: 18px; padding: 26px; }.admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }.admin-section-heading > p { margin: 0; }
.admin-scenario-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }.admin-scenario { padding: 17px; border: 1px solid var(--field-border); border-radius: 12px; background: rgba(0, 0, 0, .35); display: flex; justify-content: space-between; gap: 15px; }.admin-scenario.is-retired { opacity: .65; border-color: rgba(226, 24, 54, .4); }.admin-scenario span { color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }.admin-scenario h3 { margin: 3px 0 8px; }.admin-scenario p { margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.4; }.admin-scenario form { min-width: 88px; }.admin-scenario button { font-size: .82rem; padding: 10px 9px; }.admin-signout { display: block; color: var(--muted); text-align: center; margin: 22px 0 5px; }

[data-portal-nav][aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.scenario-prompt {
  text-align: left;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 20px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 16px;
}

/* --- Wide "stage" layout ------------------------------------------- */

.page.page-wide {
  max-width: 1100px;
  width: 100%;
}

.stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stage-header h1 {
  font-size: 1.6rem;
  margin: 0;
}

.ghost-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 14px;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  white-space: nowrap;
}

.ghost-link:hover {
  color: var(--text);
  border-color: var(--violet);
}

/* --- The Wheel ------------------------------------------------------ */

.wheel-frame {
  position: relative;
  width: min(440px, 88vw);
  aspect-ratio: 1 / 1;
  margin: 12px auto 24px;
}

.wheel-svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 34px rgba(0, 157, 217, 0.35));
}

.wheel-rotor {
  transform-origin: 200px 200px;
  transition: transform 3.4s cubic-bezier(0.15, 0.65, 0.1, 1);
}

.wheel-rim {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  opacity: 0.75;
}

.wheel-tick {
  stroke: rgba(250, 171, 24, 0.45);
  stroke-width: 1.5;
}

.wedge {
  stroke: rgba(250, 171, 24, 0.5);
  stroke-width: 1.5;
}

.wedge-a {
  fill: rgba(11, 45, 113, 0.55);
}

.wedge-b {
  fill: rgba(0, 0, 0, 0.6);
}

.wedge-bonus {
  fill: rgba(250, 171, 24, 0.3);
}

.wedge-glyph {
  font-size: 30px;
  pointer-events: none;
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  line-height: 1;
  color: var(--gold);
  filter: drop-shadow(0 0 10px rgba(250, 171, 24, 0.85));
  z-index: 3;
}

.wheel-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.core-glow {
  position: absolute;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bright), rgba(0, 157, 217, 0.4) 55%, transparent 75%);
  filter: blur(2px);
  animation: core-pulse 3.4s ease-in-out infinite;
}

.core-mark {
  position: relative;
  color: var(--gold-bright);
  font-size: 1.4rem;
  text-shadow: 0 0 10px rgba(250, 171, 24, 0.9);
}

@keyframes core-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.14); opacity: 1; }
}

.spin-panel {
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
}

.spin-status {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
  min-height: 1.2em;
}

#spin-btn {
  padding: 16px 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--magenta) 55%, var(--gold));
  color: #000000;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

#spin-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

#spin-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

/* --- Dimensional gateway transition --------------------------------
   Plays once after the wheel lands, before the scenario page loads.
   Original geometry — gold/violet glow, no orange-spark signature. */

.portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.portal-overlay.opening {
  opacity: 1;
}

.portal-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-bright);
  filter: blur(8px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.portal-overlay.opening .portal-flash {
  animation: portal-flash-pulse 0.5s ease-out forwards;
}

@keyframes portal-flash-pulse {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  30% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.6); }
}

.portal-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  transition: width 0.5s cubic-bezier(0.22, 0.8, 0.2, 1), height 0.5s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.portal-overlay.expanding .portal-ring {
  transition: width 0.65s cubic-bezier(0.3, 0.7, 0.15, 1), height 0.65s cubic-bezier(0.3, 0.7, 0.15, 1);
}

.portal-ring-outer {
  border: 5px solid var(--gold);
  box-shadow:
    0 0 50px 12px rgba(250, 171, 24, 0.75),
    inset 0 0 60px 14px rgba(0, 157, 217, 0.55);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.97) 70%);
}

.portal-ring-inner {
  border: 2px dashed rgba(186, 48, 147, 0.8);
  animation: portal-spin 2.4s linear infinite;
}

@keyframes portal-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.portal-overlay.opening .portal-ring-outer {
  width: 170px;
  height: 170px;
}

.portal-overlay.opening .portal-ring-inner {
  width: 120px;
  height: 120px;
}

.portal-overlay.expanding .portal-ring-outer {
  width: 240vmax;
  height: 240vmax;
}

.portal-overlay.expanding .portal-ring-inner {
  width: 200vmax;
  height: 200vmax;
}

.portal-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px 3px rgba(250, 171, 24, 0.9);
  opacity: 0;
}

.portal-overlay.opening .portal-spark {
  animation: portal-spark-burst 650ms ease-out forwards;
}

@keyframes portal-spark-burst {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--ang)) translateX(6px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--ang)) translateX(150px) scale(0.3); }
}

/* --- Option selection ------------------------------------------------ */

.option-item {
  cursor: pointer;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  user-select: none;
}

.option-item:hover {
  border-color: rgba(0, 157, 217, 0.6);
  background: rgba(0, 157, 217, 0.08);
}

.option-item.selected {
  border-color: var(--violet);
  background: rgba(0, 157, 217, 0.18);
  box-shadow: 0 0 0 2px rgba(0, 157, 217, 0.35);
}

.option-item.selected .option-letter {
  background: var(--violet);
  color: #fff;
}

.option-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 157, 217, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--violet);
  transition: background 0.18s, color 0.18s;
}

.option-hint {
  color: #E21836;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0 0 8px;
  text-align: center;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.options-shake {
  animation: shake 0.5s ease;
}

/* --- Reveal screen --------------------------------------------------- */

.reveal-layout {
  display: flex;
  gap: 32px;
  width: 100%;
  align-items: flex-start;
}

.reveal-sidebar {
  flex: 0 0 240px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.reveal-score-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}

.reveal-score-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--gold-bright);
  margin: 0 0 4px;
  line-height: 1;
  text-shadow: 0 0 24px rgba(250, 171, 24, 0.6);
}

.reveal-bonus-tag {
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 20px;
  letter-spacing: 0.06em;
}

.reveal-breakdown {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
}

.reveal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reveal-row:last-child {
  border-bottom: none;
}

.reveal-total-row {
  color: var(--text);
  font-weight: 600;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--field-border);
  border-bottom: none;
}

.reveal-pts {
  font-weight: 700;
  font-size: 1rem;
}

.pts-green { color: #B2CC34; }
.pts-red   { color: #E21836; }
.pts-gold  { color: var(--gold); }

.reveal-card {
  flex: 1;
  min-width: 0;
}

.verdict-block {
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.verdict-good {
  background: rgba(178, 204, 52, 0.08);
  border-color: rgba(178, 204, 52, 0.3);
}

.verdict-bad {
  background: rgba(226, 24, 54, 0.08);
  border-color: rgba(226, 24, 54, 0.3);
}

.verdict-block-label {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: var(--text);
}

.verdict-block-detail {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.reveal-explanation {
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 16px;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.55;
}

.reveal-explain-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}

.reveal-explanation p:last-child {
  margin: 0;
}

@media (max-width: 700px) {
  .reveal-layout {
    flex-direction: column;
  }
  .reveal-sidebar {
    flex: none;
    width: 100%;
  }
}

/* ── Scenario page: wide two-column stage ─────────────────────────── */

.scenario-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  width: 100%;
}

/* ── SAGE character panel (left column) ───────────────────────────── */

.sage-panel {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sage-system-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
  text-shadow: 0 0 18px rgba(250, 171, 24, 0.55);
}

.sage-system-sub {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: -10px 0 0;
}

/* Three avatars side-by-side */
.sage-trio {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.sage-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  opacity: 0.45;
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
  cursor: default;
}

.sage-avatar svg {
  width: 100%;
  height: auto;
  filter: saturate(0.6) brightness(0.75);
  transition: filter 0.4s ease;
}

.sage-avatar-name {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  transition: color 0.4s ease;
}

/* Active / speaking character */
.sage-avatar.sage-active {
  opacity: 1;
  transform: translateY(-6px) scale(1.06);
  filter: drop-shadow(0 0 14px rgba(250, 171, 24, 0.65));
}

.sage-avatar.sage-active svg {
  filter: saturate(1) brightness(1);
  animation: sage-float 3.6s ease-in-out infinite;
}

.sage-avatar.sage-active .sage-avatar-name {
  color: var(--gold);
}

@keyframes sage-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* Speech bubble */
.sage-speech-bubble {
  background: var(--card-bg);
  border: 1px solid rgba(250, 171, 24, 0.55);
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  position: relative;
  box-shadow:
    0 0 22px rgba(250, 171, 24, 0.18),
    0 0 0 1px rgba(255, 255, 255,0.03) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: bubble-arrive 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}

/* Upward pointer arrow */
.sage-speech-bubble::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: rgba(250, 171, 24, 0.55);
}

@keyframes bubble-arrive {
  0%   { opacity: 0; transform: translateY(8px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0)   scale(1); }
}

.sage-bubble-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}

.sage-bubble-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.58;
  font-style: italic;
  color: var(--text);
}

.sage-trust-hint {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
  letter-spacing: 0.04em;
}

/* ── Scenario card (right column) ─────────────────────────────────── */

.scenario-card {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.scenario-card h1 {
  margin-bottom: 14px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

/* Trust / Challenge action row — cinematic Kamar-Taj sigils */
.trust-challenge-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.trust-btn,
.challenge-btn {
  flex: 1;
  width: auto;
  padding: 18px 16px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, filter 0.2s, box-shadow 0.3s;
}

/* Shimmer sweep on hover */
.trust-btn::after,
.challenge-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255,0.18) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.trust-btn:hover::after,
.challenge-btn:hover::after {
  transform: translateX(100%);
}

/* Accept the Prophecy — blue-cyan arcane */
.trust-btn {
  background: linear-gradient(135deg, #0B2D71 0%, #0066B2 50%, #009DD9 100%);
  color: #FFFFFF;
  border-color: rgba(0, 157, 217, 0.5);
  box-shadow:
    0 0 20px rgba(0, 157, 217, 0.3),
    0 0 0 1px rgba(0, 157, 217, 0.15) inset;
  animation: trust-pulse 3s ease-in-out infinite;
}

.challenge-btn {
  background: linear-gradient(135deg, #711B00 0%, #E5601F 50%, #FAAB18 100%);
  color: #FFFFFF;
  border-color: rgba(255, 180, 60, 0.5);
  box-shadow:
    0 0 20px rgba(255, 160, 40, 0.3),
    0 0 0 1px rgba(255, 180, 60, 0.15) inset;
  animation: challenge-pulse 3s ease-in-out infinite 1.5s;
}

@keyframes trust-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 157, 217,0.3), 0 0 0 1px rgba(0, 157, 217,0.15) inset; }
  50%       { box-shadow: 0 0 36px rgba(0, 157, 217,0.6), 0 0 0 1px rgba(0, 157, 217,0.25) inset; }
}

@keyframes challenge-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 160, 40,0.3), 0 0 0 1px rgba(255, 180, 60,0.15) inset; }
  50%       { box-shadow: 0 0 36px rgba(255, 160, 40,0.65), 0 0 0 1px rgba(255, 180, 60,0.3) inset; }
}

.trust-btn:hover,
.challenge-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px) scale(1.02);
}

.trust-btn:active,
.challenge-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ── Responsive: stack vertically on narrow viewports ─────────────── */
@media (max-width: 700px) {
  .scenario-layout {
    flex-direction: column;
  }
  .sage-panel {
    flex: none;
    width: 100%;
  }
}

/* Anomaly heading — dramatic warning style */
.anomaly-heading {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow:
    0 0 20px rgba(250, 171, 24, 0.7),
    0 0 40px rgba(250, 171, 24, 0.3);
  margin-bottom: 14px;
  animation: anomaly-flicker 4s ease-in-out infinite;
}

@keyframes anomaly-flicker {
  0%, 92%, 100% { opacity: 1; }
  94%            { opacity: 0.7; }
  96%            { opacity: 1; }
  98%            { opacity: 0.8; }
}

/* "The Oracle has spoken" hint — gold, centered */
.sage-trust-hint {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin: 0;
  text-shadow: 0 0 12px rgba(250, 171, 24, 0.4);
}

/* --- Sage solo � single character per round ------------------------- */

.sage-solo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.sage-solo-frame {
  width: 148px;
  height: 207px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  animation: sage-float 3.6s ease-in-out infinite;
  flex-shrink: 0;
}

.sage-solo-frame svg {
  width: 100%;
  height: 100%;
  display: block;
  background: rgba(0, 0, 0, 0.65);
}

.sage-solo-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
  text-shadow: 0 0 14px rgba(250, 171, 24, 0.55);
}

/* Per-character glow auras */
.aura-gold {
  box-shadow:
    0 0 0 2px rgba(250, 171, 24, 0.5),
    0 0 28px 8px rgba(250, 171, 24, 0.22),
    0 0 56px 16px rgba(250, 171, 24, 0.09);
}

.aura-violet {
  box-shadow:
    0 0 0 2px rgba(0, 157, 217, 0.6),
    0 0 28px 8px rgba(0, 157, 217, 0.26),
    0 0 56px 16px rgba(0, 157, 217, 0.1);
}

.aura-blue {
  box-shadow:
    0 0 0 2px rgba(0, 157, 217, 0.5),
    0 0 28px 8px rgba(0, 157, 217, 0.22),
    0 0 56px 16px rgba(0, 102, 178, 0.09);
}

/* --- Tour overlay --------------------------------------------------- */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.tour-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.tour-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px 28px 24px;
  max-width: 420px;
  width: 92%;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(0, 157, 217, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: card-arrive 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tour-slides {
  min-height: 370px;
  display: flex;
  flex-direction: column;
}

.tour-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.tour-slide.active {
  display: flex;
  animation: slide-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tour-portrait {
  width: 100px;
  height: 80px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.tour-portrait svg {
  width: 100%;
  height: 100%;
  display: block;
  background: rgba(0, 0, 0, 0.75);
}

.tour-speaker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

.tour-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  letter-spacing: 0.01em;
}

.tour-body {
  font-size: 0.91rem;
  color: var(--muted);
  line-height: 1.62;
  margin: 0;
}

.tour-body strong {
  color: var(--text);
  font-weight: 600;
}

.tour-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0;
  transition: background 0.22s, transform 0.22s;
  width: auto;
}

.tour-dot {
  width: 8px;
  height: 8px;
}

.tour-dot.active {
  background: var(--gold);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(250, 171, 24, 0.6);
}

.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tour-skip-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  width: auto;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  filter: none;
}

.tour-skip-btn:hover {
  color: var(--text);
  filter: none;
}

.tour-nav-arrows {
  display: flex;
  gap: 8px;
}

.tour-arrow {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--field-border);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  width: auto;
  letter-spacing: 0;
  text-transform: none;
  transition: filter 0.18s;
}

.tour-arrow:hover {
  filter: brightness(1.12);
}

.tour-arrow-primary {
  background: linear-gradient(135deg, var(--violet), var(--magenta) 60%);
  border-color: transparent;
  color: #fff;
}

/* --- Villain characters (Thanos / Wanda) --------------------------- */
.aura-thanos {
  box-shadow: 0 0 22px 8px rgba(117, 18, 105, 0.55),
              0 0 50px 16px rgba(117, 18, 105, 0.22);
  border-color: #751269;
  background: radial-gradient(ellipse at top, rgba(117, 18, 105,0.18) 0%, transparent 70%);
}

.aura-wanda {
  box-shadow: 0 0 22px 8px rgba(151, 0, 46, 0.55),
              0 0 50px 16px rgba(151, 0, 46, 0.22);
  border-color: #58001C;
  background: radial-gradient(ellipse at top, rgba(151, 0, 46,0.18) 0%, transparent 70%);
}

.villain-name {
  color: #E21836 !important;
  text-shadow: 0 0 10px rgba(226, 24, 54,0.6);
}

.villain-quote {
  color: #E21836 !important;
  font-style: italic;
}

.reveal-char-quote {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
  margin-top: 6px;
  text-align: center;
  padding: 0 8px;
}

.score-zero {
  color: #E21836 !important;
  text-shadow: 0 0 16px rgba(226, 24, 54,0.7);
}

/* Red flash overlay on villain reveal */
.villain-flash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(88, 0, 28, 0.0);
  transition: background 0.12s ease;
}
.villain-flash.active {
  background: rgba(88, 0, 28, 0.45);
  transition: none;
}

/* --- SAGE Portal entrance animation ---------------------------------- */

/* body flash on entrance */
@keyframes sage-distort {
  0%   { filter: none; }
  45%  { filter: brightness(0.75) saturate(1.5) hue-rotate(8deg); }
  100% { filter: none; }
}
.sage-entering { animation: sage-distort 0.4s ease forwards; }

/* wrapper: sizes to the sage-content beneath */
.portal-wrapper {
  position: relative;
  min-height: 340px;
}

/* portal animation stage overlays sage-content */
.portal-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: auto;
  transition: opacity 0.5s ease;
}
.portal-stage.done { opacity: 0; pointer-events: none; }

#portal-canvas {
  display: block;
  position: relative;
  z-index: 1;
}

/* rune ring � positioned to match canvas dimensions */
.portal-rune-ring {
  position: absolute;
  width: 220px;
  height: 220px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

/* each rune: rotated to position on ring, then counter-rotated so glyph stays upright */
.pr {
  position: absolute;
  width: 20px;
  height: 20px;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--gold);
  opacity: 0;
  transform: rotate(var(--a)) translateY(-95px) rotate(calc(-1 * var(--a)));
  transition: opacity 0.35s ease, text-shadow 0.35s ease;
  text-shadow: none;
}
.pr.lit {
  opacity: 1;
  text-shadow: 0 0 10px var(--gold), 0 0 22px rgba(250, 171, 24,0.5);
  animation: rune-pulse 2.5s ease-in-out infinite;
}
@keyframes rune-pulse {
  0%, 100% { text-shadow: 0 0 8px var(--gold); opacity: 1; }
  50%       { text-shadow: 0 0 18px var(--gold), 0 0 36px rgba(250, 171, 24,0.5); opacity: 0.82; }
}

/* nebula center glow behind avatar */
.portal-nebula {
  position: absolute;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(100, 55, 210,0.42) 0%,
    rgba(0, 157, 217,0.18) 42%,
    transparent 70%);
  opacity: 0;
  transition: opacity 0.85s ease;
  pointer-events: none;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.portal-nebula.active {
  opacity: 1;
  animation: nebula-breathe 3.2s ease-in-out infinite;
}
@keyframes nebula-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%       { transform: translate(-50%, -50%) scale(1.09); }
}

/* skip button */
.portal-skip-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255,0.05);
  border: 1px solid rgba(255, 255, 255,0.11);
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  z-index: 10;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.portal-skip-btn:hover { background: rgba(255, 255, 255,0.12); color: var(--text); }

/* sage-content: hidden until revealed by animation */
.sage-content {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.sage-content.revealed { opacity: 1; transform: translateY(0); }

/* ─── Top navigation bar ─────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(250, 171, 24,0.18);
}
.top-bar-logo {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.top-bar-rounds {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 18px;
  letter-spacing: 0.06em;
}
.depart-btn {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E21836;
  border: 1px solid rgba(226, 24, 54,0.4);
  border-radius: 8px;
  padding: 6px 16px;
  text-decoration: none;
  background: rgba(226, 24, 54,0.07);
  transition: background 0.2s, border-color 0.2s;
}
.depart-btn:hover {
  background: rgba(226, 24, 54,0.18);
  border-color: rgba(226, 24, 54,0.7);
  color: #E21836;
}

/* push page content below top bar */
.page { padding-top: 60px; }

/* ─── Round counter badge in scenario card ──────────────────────── */
.round-counter-badge {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin: -4px 0 12px;
  opacity: 0.8;
}

/* ─── Two-step challenge reveal ─────────────────────────────────── */
.options-reveal {
  margin-top: 16px;
}
.options-reveal-label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.challenge-confirm-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.challenge-confirm-btn {
  flex: 1;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 12px;
  border: 2px solid rgba(0, 157, 217,0.6);
  background: rgba(0, 157, 217,0.15);
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.challenge-confirm-btn:hover {
  background: rgba(0, 157, 217,0.3);
  border-color: var(--violet);
}
.challenge-back-btn {
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255,0.12);
  background: transparent;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.challenge-back-btn:hover { color: var(--text); border-color: rgba(255, 255, 255,0.3); }

.home-signout {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}
.home-signout:hover { color: var(--text); }

/* ─── Game over screen ───────────────────────────────────────────── */
.gameover-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 32px 16px;
}
.gameover-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 38px 40px;
}
.gameover-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  line-height: 1.6;
}
.gameover-mission {
  margin: 18px 0;
  color: var(--text);
  font-weight: 700;
}
.gameover-score-block {
  margin: 22px 0;
}
.gameover-score-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.gameover-score-number {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 32px rgba(250, 171, 24,0.5);
  margin: 0;
}
.gameover-score-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}
.gameover-tier { margin: 20px 0; }
.tier-badge {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.tier-gold   { color: var(--gold); text-shadow: 0 0 14px rgba(250, 171, 24,0.5); }
.tier-silver { color: #8C8F93; }
.tier-bronze { color: #E5601F; }
.tier-red    { color: #E21836; }
.tier-desc   { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.gameover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}
.gameover-actions .link-button { margin: 0; }
.takeaway-guide { margin: 25px 0; padding: 22px; text-align: left; border-radius: 14px; background: linear-gradient(145deg, rgba(71, 39, 122, .35), rgba(16, 33, 61, .35)); border: 1px solid rgba(0, 157, 217, .42); }
.takeaway-guide h2 { margin: 0 0 5px; font-size: 1.24rem; }.takeaway-priority { margin: 0 0 15px; color: var(--gold-bright); font-weight: 700; }
.takeaway-actions { margin: 0; padding-left: 22px; color: var(--text); }.takeaway-actions li { padding: 6px 0 6px 5px; line-height: 1.45; }.takeaway-actions li::marker { color: var(--gold); font-weight: 800; }
.takeaway-lessons { margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .12); }.takeaway-lessons > p { margin: 0 0 10px; color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.takeaway-lessons div { margin-top: 8px; color: var(--muted); font-size: .85rem; line-height: 1.45; }.takeaway-lessons span { display: block; color: var(--text); font-weight: 700; font-size: .78rem; margin-bottom: 2px; }
.text-download { width: auto; margin: 18px auto 0; padding: 0; color: var(--gold); background: transparent; border: 0; font-size: .86rem; text-decoration: underline; }
.grand-finale-shell { max-width: 900px; margin: 0 auto; text-align: center; }.grand-finale-hero { padding: 28px 20px 14px; }.grand-finale-hero h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); margin: 8px 0; text-shadow: 0 0 36px rgba(250, 171, 24, .4); }.grand-finale-hero > p:last-child { max-width: 650px; margin: 0 auto; color: var(--muted); line-height: 1.6; }.finale-comet { display: inline-block; color: var(--gold); font-size: 3rem; animation: finale-comet 3s ease-in-out infinite; filter: drop-shadow(0 0 16px var(--gold)); }@keyframes finale-comet { 50% { transform: translate(12px, -6px) rotate(-10deg); } }
.grand-seal, .finale-departments { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; padding: 28px; margin-top: 20px; backdrop-filter: blur(18px); }.grand-energy strong { display: block; font-size: 4.3rem; line-height: 1; color: var(--gold); text-shadow: 0 0 28px rgba(250, 171, 24,.55); }.grand-energy span { display: block; color: var(--muted); margin-top: 7px; }.grand-meter { height: 18px; overflow: hidden; margin: 24px auto 12px; border-radius: 999px; background: rgba(255, 255, 255,.08); border: 1px solid rgba(250, 171, 24,.25); }.grand-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--magenta), var(--gold)); box-shadow: 0 0 22px var(--gold); transition: width .7s ease; }.grand-finale-shell[data-sealed="true"] .grand-meter span { animation: seal-glow 1.8s ease-in-out infinite; }@keyframes seal-glow { 50% { filter: brightness(1.35); } }.grand-seal p, #leading-department { color: var(--muted); margin: 0; }.finale-departments { text-align: left; }.finale-departments h2 { margin: 3px 0 10px; }.finale-team-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }.finale-team-list article { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; padding: 13px; background: rgba(6, 4, 14,.35); border: 1px solid var(--field-border); border-radius: 12px; }.constellation-star { color: var(--gold); text-shadow: 0 0 12px var(--gold); }.finale-team-list strong, .finale-team-list small { display: block; }.finale-team-list small { color: var(--muted); font-size: .73rem; margin-top: 3px; }.finale-team-list b { color: var(--gold); font-size: 1.2rem; }.finale-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; }.finale-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }.finale-actions .link-button { margin: 0; }
.gameover-footer {
  margin-top: 28px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(140, 143, 147,0.45);
}

/* ─── One-spin mission spectacle ─────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sound-toggle {
  width: auto;
  padding: 6px 12px;
  border: 1px solid rgba(250, 171, 24,0.3);
  border-radius: 8px;
  background: rgba(250, 171, 24,0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.mission-reveal {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: rgba(58, 13, 54, 0.9);
  box-shadow: 0 0 28px rgba(250, 171, 24,0.18);
}

.mission-reveal-active { animation: mission-awaken 650ms ease both; }
.mission-glyph { display: block; font-size: 2rem; }
.mission-reveal strong { display: block; color: var(--gold-bright); font-size: 1.05rem; margin: 4px 0; }
.mission-reveal span:last-child { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

@keyframes mission-awaken {
  from { opacity: 0; transform: scale(0.82); filter: blur(7px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.artifact-meter {
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid rgba(250, 171, 24,0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255,0.025);
}

.artifact-copy,
.artifact-segments {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.artifact-copy { margin-bottom: 9px; }
.artifact-name { color: var(--gold); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.artifact-count { color: var(--muted); font-size: 0.68rem; }

.artifact-segment {
  flex: 1;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255,0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255,0.25);
  background: rgba(255, 255, 255,0.03);
  transition: transform 0.25s ease;
}

.artifact-charged {
  color: #FFFFFF;
  border-color: rgba(0, 157, 217,0.7);
  background: radial-gradient(circle, rgba(0, 157, 217,0.35), rgba(11, 45, 113,0.16));
  box-shadow: 0 0 14px rgba(0, 157, 217,0.25);
}
.artifact-unstable { color: #BA3093; border-color: #751269; background: rgba(117, 18, 105,0.2); }
.artifact-fractured { color: #E21836; border-color: #E21836; background: repeating-linear-gradient(135deg, rgba(226, 24, 54,0.22) 0 3px, transparent 3px 8px); }
.artifact-current { border-color: var(--gold); animation: artifact-await 1.4s ease-in-out infinite; }

@keyframes artifact-await { 50% { box-shadow: 0 0 18px rgba(250, 171, 24,0.5); transform: translateY(-2px); } }

.next-question-btn { margin-top: 20px; }
.next-question-btn:disabled { opacity: 0.55; cursor: wait; }

.result-effect-layer {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
}
.effect-ring {
  width: 80px;
  height: 80px;
  border: 5px double #00B2BD;
  border-radius: 50%;
  box-shadow: 0 0 40px #00708C, inset 0 0 30px rgba(0, 157, 217,0.6);
}
.effect-crack { display: none; color: #E21836; font-size: min(70vw, 600px); text-shadow: 0 0 30px #E21836; }
.effect-shield .result-effect-layer { animation: effect-fade 650ms ease both; }
.effect-shield .effect-ring { animation: shield-expand 650ms ease-out both; }
.effect-unstable .result-effect-layer { background: rgba(126, 34, 206,0.12); animation: unstable-pulse 600ms ease both; }
.effect-fracture .result-effect-layer { opacity: 1; background: rgba(127, 29, 29,0.18); animation: fracture-shake 550ms ease both; }
.effect-fracture .effect-ring { display: none; }
.effect-fracture .effect-crack { display: block; }

@keyframes effect-fade { 0%,100% { opacity: 0; } 35% { opacity: 1; } }
@keyframes shield-expand { from { transform: scale(0.2) rotate(-30deg); } to { transform: scale(12) rotate(30deg); opacity: 0; } }
@keyframes unstable-pulse { 0%,100% { opacity: 0; } 40% { opacity: 1; } }
@keyframes fracture-shake { 0%,100% { transform: translateX(0); opacity: 0; } 25% { transform: translateX(-7px); opacity: 1; } 55% { transform: translateX(7px); opacity: 1; } }

.boss-intro {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(11, 45, 113,0.82), rgba(0, 0, 0,0.98) 62%);
  text-align: center;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.boss-intro p { margin: 8px 0; color: #E21836; font-size: clamp(1.8rem, 6vw, 4rem); font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.boss-intro strong { color: var(--gold); font-size: 1.1rem; letter-spacing: 0.1em; }
.boss-intro button { position: absolute; right: 24px; bottom: 24px; width: auto; padding: 8px 16px; background: rgba(255, 255, 255,0.08); color: var(--text); border: 1px solid rgba(255, 255, 255,0.2); }
.boss-sigil { font-size: 5rem; animation: boss-pulse 450ms ease-in-out infinite alternate; }
.boss-dismissed { opacity: 0; visibility: hidden; }
@keyframes boss-pulse { to { transform: scale(1.15); filter: drop-shadow(0 0 25px var(--gold)); } }

.final-mission-seal { margin: 18px auto; color: var(--mission-accent); }
.final-mission-seal span { display: inline-grid; place-items: center; width: 76px; height: 76px; border: 2px solid currentColor; border-radius: 50%; font-size: 2rem; box-shadow: 0 0 28px currentColor; }
.final-mission-seal p { margin: 12px 0 0; color: var(--text); font-weight: 800; letter-spacing: 0.08em; }
.judgment-summary { color: var(--gold); font-size: 0.78rem; }

/* ─── SAGE trust calibration personality ─────────────────────────── */
.calibration-card {
  --calibration-color: var(--gold);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--calibration-color) 55%, transparent);
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--calibration-color) 13%, transparent), rgba(255, 255, 255,0.025));
  box-shadow: 0 0 26px color-mix(in srgb, var(--calibration-color) 12%, transparent);
}
.calibration-sharp { --calibration-color: #00B2BD; }
.calibration-balanced { --calibration-color: #B2CC34; }
.calibration-trusting { --calibration-color: #FAAB18; }
.calibration-skeptical { --calibration-color: #BA3093; }
.calibration-practice { --calibration-color: #E21836; }
.calibration-forming { --calibration-color: #8C8F93; }
.calibration-label {
  margin: 0 0 3px;
  color: var(--calibration-color) !important;
  font-size: 0.66rem !important;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.calibration-card h2 { margin: 0 0 5px; color: var(--text); font-size: 1.15rem; }
.calibration-card p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.calibration-orbit {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 2px solid var(--calibration-color);
  border-radius: 50%;
  box-shadow: 0 0 20px color-mix(in srgb, var(--calibration-color) 45%, transparent), inset 0 0 15px color-mix(in srgb, var(--calibration-color) 25%, transparent);
  animation: calibration-orbit 4s linear infinite;
}
.calibration-orbit::before,
.calibration-orbit::after { content: ''; position: absolute; width: 42px; height: 42px; border: 1px dashed var(--calibration-color); transform: rotate(45deg); }
.calibration-orbit::after { width: 22px; height: 22px; transform: rotate(0deg); }
.calibration-orbit span { width: 9px; height: 9px; border-radius: 50%; background: var(--calibration-color); box-shadow: 0 0 14px var(--calibration-color); }
@keyframes calibration-orbit { to { transform: rotate(360deg); } }
.calibration-stats { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; color: var(--muted); font-size: 0.7rem; }
.calibration-stats strong { color: var(--calibration-color); font-size: 0.82rem; }
.final-calibration { margin: 22px 0; }

/* ─── Adaptive threat sequencing ─────────────────────────────────── */
.adaptive-signal {
  margin: 0 0 13px;
  padding: 10px 13px;
  border: 1px solid rgba(140, 143, 147,0.25);
  border-left: 3px solid #8C8F93;
  border-radius: 10px;
  background: rgba(140, 143, 147,0.055);
}
.adaptive-signal span { display: block; color: #DBDCDD; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.adaptive-signal p { margin: 4px 0 0; color: var(--muted); font-size: 0.74rem; line-height: 1.45; }
.adaptive-support { border-left-color: #00B2BD; background: rgba(0, 178, 189,0.06); }
.adaptive-support span { color: #00B2BD; }
.adaptive-advanced { border-left-color: #BA3093; background: rgba(186, 48, 147,0.06); box-shadow: inset 0 0 20px rgba(186, 48, 147,0.035); }
.adaptive-advanced span { color: #BA3093; }
.adaptive-balanced { border-left-color: #B2CC34; }
.adaptive-balanced span { color: #B2CC34; }
.adaptive-elite { border-left-color: var(--gold); background: rgba(250, 171, 24,0.08); }
.adaptive-elite span { color: var(--gold-bright); }

/* ─── Timed tension ─────────────────────────────────────────────── */
.tension-clock {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 9px 12px;
  border: 1px solid rgba(0, 178, 189,0.24);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(0, 178, 189,0.08), rgba(0, 157, 217,0.06));
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.tension-dial { position: relative; width: 54px; height: 54px; display: grid; place-items: center; }
.tension-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tension-dial circle { fill: none; stroke-width: 3; }
.clock-track { stroke: rgba(255, 255, 255,0.1); }
.clock-progress { stroke: #00B2BD; stroke-linecap: round; transition: stroke-dashoffset 0.2s linear, stroke 0.35s ease; filter: drop-shadow(0 0 4px rgba(0, 178, 189,0.7)); }
.tension-dial strong { color: #00B2BD; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tension-copy span, .tension-copy small { display: block; }
.tension-copy span { color: #00B2BD; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.tension-copy small { margin-top: 3px; color: var(--muted); font-size: 0.64rem; }
.focus-mode-btn { padding: 7px 10px; border: 1px solid rgba(255, 255, 255,0.15); border-radius: 999px; color: #DBDCDD; background: rgba(0, 0, 0,0.14); font: inherit; font-size: 0.62rem; cursor: pointer; }
.focus-mode-btn:hover, .focus-mode-btn:focus-visible { color: #fff; border-color: rgba(0, 178, 189,0.6); outline: none; }
.clock-critical { border-color: rgba(226, 24, 54,0.55); background: linear-gradient(90deg, rgba(226, 24, 54,0.14), rgba(0, 157, 217,0.08)); box-shadow: 0 0 22px rgba(226, 24, 54,0.13); animation: tension-pulse 0.8s ease-in-out infinite alternate; }
.clock-critical .clock-progress { stroke: #E21836; filter: drop-shadow(0 0 5px rgba(226, 24, 54,0.85)); }
.clock-critical .tension-dial strong, .clock-critical .tension-copy span { color: #E21836; }
.focus-active { border-color: rgba(178, 204, 52,0.35); background: linear-gradient(90deg, rgba(118, 146, 49,0.08), rgba(0, 178, 189,0.05)); }
.focus-active .clock-progress { stroke: #B2CC34; stroke-dashoffset: 0 !important; }
.focus-active .tension-dial strong, .focus-active .tension-copy span { color: #B2CC34; }
.time-collapsed { border-color: #E21836; box-shadow: 0 0 35px rgba(226, 24, 54,0.28); }
@keyframes tension-pulse { to { transform: scale(1.008); box-shadow: 0 0 30px rgba(226, 24, 54,0.22); } }

@media (max-width: 600px) {
  .tension-clock { grid-template-columns: 52px 1fr; }
  .focus-mode-btn { grid-column: 1 / -1; width: 100%; }
  .tension-dial { width: 48px; height: 48px; }
}

  /* ─── Shared hourly boss event ──────────────────────────────────── */
  .boss-page { max-width: 920px !important; }
  .boss-shell { padding: 20px 0 42px; }
  .boss-hero { text-align: center; margin-bottom: 20px; }
  .boss-hero h1 { margin: 5px 0 9px; color: #FAAB18; font-size: clamp(2.1rem, 6vw, 4.5rem); line-height: 0.95; text-shadow: 0 0 32px rgba(250, 171, 24,0.35); }
  .boss-hero p:last-child { max-width: 600px; margin: auto; color: var(--muted); }
  .breach-progress, .leaderboard-boss { display: grid; align-items: center; gap: 16px; border: 1px solid rgba(186, 48, 147,0.38); border-radius: 18px; background: linear-gradient(115deg, rgba(112, 26, 117,0.3), rgba(30, 27, 75,0.3)); box-shadow: inset 0 0 40px rgba(186, 48, 147,0.06), 0 12px 30px rgba(0, 0, 0,0.18); }
  .breach-progress { grid-template-columns: 72px 1fr auto; padding: 16px 20px; margin-bottom: 20px; }
  .breach-orb { display: grid; place-items: center; width: 62px; height: 62px; border: 2px solid #BA3093; border-radius: 50%; box-shadow: 0 0 20px rgba(186, 48, 147,0.7), inset 0 0 20px rgba(186, 48, 147,0.4); animation: breach-orbit 3s linear infinite; }
  .breach-orb span { width: 18px; height: 18px; border-radius: 50%; background: #BA3093; box-shadow: 0 0 22px #BA3093; }
  @keyframes breach-orbit { to { transform: rotate(360deg); } }
  .breach-copy strong { color: #BA3093; font-size: 1.12rem; }
  .breach-copy p, .boss-clock span { margin: 3px 0 9px; color: var(--muted); font-size: 0.72rem; }
  .breach-meter, .board-breach-meter { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255,0.1); }
  .breach-meter span, .board-breach-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #BA3093, #FAAB18); box-shadow: 0 0 15px rgba(250, 171, 24,0.7); transition: width 0.7s ease; }
  .boss-clock { min-width: 88px; text-align: right; }
  .boss-clock span { display: block; }
  .boss-clock strong { color: #FAAB18; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
  .boss-scenario-card { padding: clamp(22px, 5vw, 42px); text-align: center; }
  .boss-scenario-card h2 { margin: 4px 0 18px; font-size: clamp(1.25rem, 3vw, 1.8rem); }
  .boss-options { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
  .boss-options button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; border: 1px solid rgba(186, 48, 147,0.26); border-radius: 12px; color: var(--text); background: rgba(255, 255, 255,0.035); font: inherit; text-align: left; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
  .boss-options button:hover, .boss-options button:focus-visible { border-color: #BA3093; background: rgba(186, 48, 147,0.12); transform: translateX(4px); outline: none; }
  .boss-options span { display: grid; place-items: center; flex: none; width: 29px; height: 29px; border-radius: 50%; color: #BA3093; background: rgba(186, 48, 147,0.22); font-weight: 900; }
  .boss-note, .boss-result-copy, .boss-answer { color: var(--muted); line-height: 1.6; }
  .boss-answer strong { color: #FAAB18; }
  .boss-actions { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
  .breach-sealed { border-color: rgba(178, 204, 52,0.5); background: linear-gradient(115deg, rgba(21, 128, 61,0.26), rgba(30, 27, 75,0.3)); }
  .breach-sealed .breach-orb { border-color: #B2CC34; box-shadow: 0 0 22px rgba(178, 204, 52,0.7); animation: none; }
  .breach-sealed .breach-orb span { background: #B2CC34; box-shadow: 0 0 22px #B2CC34; }
  .leaderboard-boss { grid-template-columns: 44px minmax(180px, 1fr) minmax(100px, 0.65fr) auto auto; padding: 14px 18px; margin: -4px 0 20px; }
  .leaderboard-boss h2 { margin: 2px 0; font-size: 1.15rem; }
  .leaderboard-boss p { margin: 0; color: var(--muted); font-size: 0.68rem; }
  .boss-board-mark { color: #BA3093; font-size: 2rem; text-shadow: 0 0 16px #BA3093; }
  .leaderboard-boss > strong { color: #FAAB18; font-size: 1.05rem; }
  .leaderboard-boss .link-button { width: auto; margin: 0; padding: 8px 13px; }

  /* ─── Department battle map ─────────────────────────────────────── */
  .battle-page { max-width: 1160px !important; }
  .battle-shell { padding: 20px 0 42px; }
  .battle-hero { text-align: center; }
  .battle-hero h1 { margin: 5px 0 9px; color: var(--gold-bright); font-size: clamp(2.25rem, 6vw, 4.7rem); line-height: 0.95; text-shadow: 0 0 34px rgba(250, 171, 24,0.35); }
  .battle-hero > p:last-of-type { color: var(--muted); }
  .battle-total { display: inline-flex; align-items: baseline; gap: 8px; margin: 16px 0 22px; padding: 8px 14px; border: 1px solid rgba(250, 171, 24,0.32); border-radius: 999px; background: rgba(250, 171, 24,0.06); }
  .battle-total strong { color: var(--gold-bright); font-size: 1.45rem; }
  .battle-total span { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
  .cyber-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; min-height: 300px; padding: 18px; border: 1px solid rgba(0, 178, 189,0.22); border-radius: 22px; background: radial-gradient(circle at 50% 50%, rgba(0, 178, 189,0.13), transparent 46%), linear-gradient(135deg, rgba(15, 23, 42,0.85), rgba(49, 14, 70,0.7)); box-shadow: inset 0 0 46px rgba(0, 178, 189,0.05); }
  .map-region { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 10px; min-height: 106px; overflow: hidden; padding: 15px; border: 1px solid rgba(140, 143, 147,0.2); border-radius: 15px; background: linear-gradient(120deg, rgba(15, 23, 42,0.7), rgba(30, 41, 59,0.3)); transition: transform 0.3s ease, border-color 0.3s ease; }
  .map-region::before { content: ''; position: absolute; inset: auto 0 0; height: var(--energy); background: linear-gradient(0deg, rgba(0, 178, 189,0.3), transparent); pointer-events: none; transition: height 0.7s ease; }
  .map-region:hover { z-index: 1; border-color: rgba(0, 178, 189,0.6); transform: translateY(-3px); }
  .map-region > * { position: relative; z-index: 1; }
  .region-rune { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid rgba(0, 178, 189,0.52); border-radius: 50%; color: #00B2BD; background: rgba(0, 178, 189,0.1); box-shadow: 0 0 16px rgba(0, 178, 189,0.25); }
  .map-region small, .map-region strong, .map-region em { display: block; }
  .map-region small { color: #00B2BD; font-size: 0.58rem; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; }
  .map-region strong { margin: 4px 0; color: var(--text); font-size: 0.86rem; }
  .map-region em { color: var(--muted); font-size: 0.65rem; font-style: normal; }
  .map-region i { position: absolute; right: 11px; bottom: 11px; width: 8px; height: 8px; border-radius: 50%; background: #00B2BD; box-shadow: 0 0 12px #00B2BD; }
  .battle-rankings { max-width: 720px; margin: 22px auto 0; padding: 22px; }
  .battle-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .battle-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(255, 255, 255,0.06); border-radius: 11px; background: rgba(255, 255, 255,0.025); }
  .battle-list b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--gold); background: rgba(250, 171, 24,0.12); }
  .battle-list strong, .battle-list small { display: block; }
  .battle-list strong { font-size: 0.8rem; }
  .battle-list small { margin-top: 2px; color: var(--muted); font-size: 0.62rem; }
  .battle-list span { color: #00B2BD; font-size: 1rem; font-weight: 900; }
  .battle-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
  @media (max-width: 700px) {
    .breach-progress { grid-template-columns: 58px 1fr; padding: 14px; }
    .boss-clock { grid-column: 1 / -1; text-align: left; }
    .leaderboard-boss { grid-template-columns: 34px 1fr auto; padding: 13px; }
    .board-breach-meter { grid-column: 2 / -1; }
    .leaderboard-boss .link-button { grid-column: 2 / -1; width: 100%; text-align: center; }
    .cyber-map { grid-template-columns: 1fr; }
  }

/* ─── Live leaderboard ───────────────────────────────────────────── */
.leaderboard-page { max-width: 1280px !important; }
.leaderboard-shell { width: 100%; padding: 16px 0 40px; }
.leaderboard-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.leaderboard-hero h1 { font-size: clamp(2rem, 5vw, 4.2rem); line-height: 0.95; color: var(--gold-bright); text-shadow: 0 0 35px rgba(250, 171, 24,0.35); }
.leaderboard-hero p:last-child { color: var(--muted); margin: 10px 0 0; }
.live-indicator { flex: none; padding: 9px 14px; border: 1px solid rgba(178, 204, 52,0.4); border-radius: 999px; color: #B2CC34; background: rgba(118, 146, 49,0.08); font-size: 0.75rem; font-weight: 700; }
.live-indicator span { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #B2CC34; box-shadow: 0 0 10px #B2CC34; animation: live-pulse 1.4s ease-in-out infinite; }
.live-indicator.offline { color: #E21836; border-color: rgba(226, 24, 54,0.4); }
.live-indicator.offline span { background: #E21836; box-shadow: none; }
@keyframes live-pulse { 50% { opacity: 0.35; transform: scale(0.75); } }

.leaderboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.leaderboard-stats article { padding: 18px 22px; border: 1px solid var(--field-border); border-radius: 16px; background: linear-gradient(145deg, rgba(0, 157, 217,0.12), rgba(250, 171, 24,0.05)); }
.leaderboard-stats strong { display: block; color: var(--gold); font-size: 2rem; line-height: 1; }
.leaderboard-stats span { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.leaderboard-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; }
.leaderboard-panel { padding: 24px; border: 1px solid var(--card-border); border-radius: 20px; background: rgba(58, 13, 54,0.72); backdrop-filter: blur(20px); box-shadow: 0 20px 55px rgba(0, 0, 0,0.3); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 1.25rem; }
.privacy-chip { color: var(--muted); border: 1px solid var(--field-border); border-radius: 999px; padding: 5px 9px; font-size: 0.62rem; }
.ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ranking-list li { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; min-height: 58px; padding: 10px 13px; border: 1px solid rgba(255, 255, 255,0.06); border-radius: 13px; background: rgba(255, 255, 255,0.025); transition: transform 0.3s ease, border-color 0.3s ease; }
.ranking-list li:nth-child(1) { border-color: rgba(250, 171, 24,0.5); background: linear-gradient(90deg, rgba(250, 171, 24,0.14), transparent); }
.ranking-list li:nth-child(2) { border-color: rgba(203, 213, 225,0.35); }
.ranking-list li:nth-child(3) { border-color: rgba(201, 135, 74,0.4); }
.rank-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--gold); background: rgba(250, 171, 24,0.1); font-weight: 900; }
.rank-identity strong, .rank-identity small { display: block; }
.rank-identity strong { color: var(--text); font-size: 0.88rem; }
.rank-identity small { margin-top: 3px; color: var(--muted); font-size: 0.66rem; }
.rank-score { color: var(--gold-bright); font-size: 1.15rem; font-weight: 900; }
.empty-ranking, .leaderboard-empty { color: var(--muted); text-align: center; padding: 28px !important; }
.department-list { display: grid; gap: 13px; }
.department-list article { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(80px, 0.8fr) 44px; align-items: center; gap: 10px; }
.department-list strong, .department-list small { display: block; }
.department-list strong { color: var(--text); font-size: 0.76rem; }
.department-list small { color: var(--muted); font-size: 0.61rem; margin-top: 2px; }
.department-list b { color: var(--gold); font-size: 0.8rem; text-align: right; }
.department-meter { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255,0.07); }
.department-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--gold)); box-shadow: 0 0 12px rgba(250, 171, 24,0.5); transition: width 0.7s ease; }
.recent-panel { margin-top: 20px; }
.recent-missions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.recent-missions article { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 12px; border: 1px solid rgba(255, 255, 255,0.06); border-radius: 12px; background: rgba(255, 255, 255,0.025); }
.recent-sigil { color: var(--gold); }
.recent-missions strong, .recent-missions small { display: block; }
.recent-missions strong { font-size: 0.73rem; }
.recent-missions small { color: var(--muted); font-size: 0.58rem; margin-top: 2px; }
.recent-missions b { color: var(--gold); font-size: 0.8rem; }
.leaderboard-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.leaderboard-actions .link-button { width: auto; min-width: 180px; margin: 0; }

@media (max-width: 850px) {
  .leaderboard-grid { grid-template-columns: 1fr; }
  .recent-missions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .leaderboard-hero { align-items: flex-start; flex-direction: column; }
  .leaderboard-stats { grid-template-columns: 1fr; }
  .recent-missions { grid-template-columns: 1fr; }
  .leaderboard-panel { padding: 16px; }
  .leaderboard-actions { flex-direction: column; }
  .leaderboard-actions .link-button { width: 100%; }
}

@media (max-width: 560px) {
  .top-bar { padding: 8px 10px; }
  .top-bar-logo { font-size: 0.72rem; }
  .top-bar-rounds { display: none; }
  .sound-toggle, .depart-btn { font-size: 0.64rem; padding: 6px 8px; }
  .artifact-segment { height: 30px; }
  .gameover-card { padding: 34px 20px; }
  .calibration-card { grid-template-columns: 52px 1fr; padding: 14px; }
  .calibration-orbit { width: 48px; height: 48px; }
  .calibration-orbit::before { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .result-effect-layer, .boss-intro { display: none !important; }
}

@media (forced-colors: active) {
  .artifact-segment, .mission-reveal, .final-mission-seal span { forced-color-adjust: auto; border: 2px solid CanvasText; }
}

/* ─── Fantasy investigation redesign ─────────────────────────────── */
.top-bar {
  min-height: 68px;
  padding: 9px clamp(16px, 3vw, 44px);
  background: rgba(0, 0, 0, 0.94);
  border-bottom-color: rgba(250, 171, 24, 0.28);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}
.top-bar-logo { display: flex; align-items: center; gap: 9px; font-size: 1rem; text-transform: uppercase; }
.top-bar-logo b { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--gold); border-radius: 50%; box-shadow: 0 0 16px rgba(250, 171, 24,.35); }
.game-metrics { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; }
.game-metrics > span { min-width: 128px; padding: 0 22px; text-align: center; border-right: 1px solid rgba(255, 255, 255,.1); }
.game-metrics > span:last-child { border: 0; }
.game-metrics small, .game-metrics strong { display: block; white-space: nowrap; }
.game-metrics small { margin-bottom: 2px; color: var(--muted); font-size: .59rem; letter-spacing: .1em; text-transform: uppercase; }
.game-metrics strong { color: var(--gold-bright); font-size: .82rem; font-variant-numeric: tabular-nums; }

.page.game-stage-page { max-width: 1440px; padding-top: 88px; padding-bottom: 20px; }
.investigator-shell { display: grid; grid-template-columns: minmax(235px, 25%) minmax(0, 75%); gap: 20px; width: 100%; align-items: stretch; }
.mentor-panel, .investigation-main { border: 1px solid rgba(250, 171, 24,.22); background: rgba(0, 0, 0,.72); backdrop-filter: blur(20px); box-shadow: 0 22px 65px rgba(0, 0, 0,.36); }
.mentor-panel { display: flex; flex-direction: column; min-height: calc(100vh - 110px); padding: clamp(18px, 2vw, 28px); border-radius: 18px; }
.mentor-heading { display: flex; align-items: center; gap: 11px; }
.mentor-heading h2 { margin: 0; color: var(--gold-bright); font-size: 1.15rem; letter-spacing: .16em; }
.mentor-status { width: 9px; height: 9px; border-radius: 50%; background: #00B2BD; box-shadow: 0 0 13px #00B2BD; animation: mentor-status 2s ease-in-out infinite; }
@keyframes mentor-status { 50% { opacity: .45; } }
.eyebrow { margin: 0 0 4px; color: var(--gold); font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.sage-avatar { position: relative; display: grid; place-items: center; width: min(170px, 80%); aspect-ratio: 1; margin: 28px auto 22px; opacity: 1; }
.avatar-core { z-index: 2; display: grid; place-items: center; width: 58%; height: 58%; border: 1px solid rgba(0, 178, 189,.75); border-radius: 50%; color: #00B2BD; background: radial-gradient(circle at 38% 30%, rgba(0, 178, 189,.34), rgba(11, 45, 113,.62) 55%, rgba(0, 0, 0,.95)); box-shadow: 0 0 28px rgba(0, 178, 189,.35), inset 0 0 25px rgba(0, 157, 217,.5); font: 800 2.3rem Georgia, serif; }
.avatar-orbit { position: absolute; inset: 8%; border: 1px solid rgba(250, 171, 24,.5); border-radius: 50%; animation: sage-orbit 12s linear infinite; }
.avatar-orbit::after { content: '✦'; position: absolute; top: -9px; left: 50%; color: var(--gold); text-shadow: 0 0 9px var(--gold); }
.orbit-two { inset: 0; border-style: dashed; border-color: rgba(0, 157, 217,.5); animation-direction: reverse; animation-duration: 18s; }
@keyframes sage-orbit { to { transform: rotate(360deg); } }
.mentor-dialogue, .oracle-whisper { padding: 15px; border-radius: 13px; }
.mentor-dialogue { background: rgba(0, 178, 189,.05); border: 1px solid rgba(0, 178, 189,.18); }
.mentor-dialogue p:last-child, .oracle-whisper p:last-child { margin: 0; color: #DBDCDD; font-size: .82rem; line-height: 1.55; }
.oracle-whisper { margin-top: auto; border-left: 2px solid var(--gold); background: linear-gradient(90deg, rgba(250, 171, 24,.08), transparent); }
.oracle-whisper p:last-child { color: var(--muted); font-style: italic; }

.investigation-main { min-width: 0; padding: clamp(20px, 2.5vw, 36px); border-radius: 18px; }
.threat-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid rgba(255, 255, 255,.08); }
.threat-kicker { margin: 0 0 4px !important; color: #E21836 !important; font-size: .75rem !important; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.threat-header p { margin: 0; color: var(--muted); font-size: .78rem; }
.threat-level { flex: none; padding: 7px 11px; border: 1px solid rgba(250, 171, 24,.3); border-radius: 999px; color: var(--gold); background: rgba(250, 171, 24,.06); font-size: .67rem; font-weight: 700; }

.event-scroll { position: relative; overflow: hidden; margin: 20px 0; padding: clamp(20px, 2.5vw, 31px); border: 1px solid rgba(250, 171, 24,.4); border-radius: 15px; background: linear-gradient(120deg, rgba(42, 25, 50,.8), rgba(20, 14, 34,.9)); box-shadow: inset 0 0 35px rgba(250, 171, 24,.04); }
.event-scroll::before, .event-scroll::after { content: ''; position: absolute; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--gold), transparent 25%, transparent 75%, var(--gold)); opacity: .55; }
.event-scroll::before { left: 0; }.event-scroll::after { right: 0; }
.scroll-title { display: flex; align-items: center; gap: 13px; }
.scroll-title > span { font-size: 1.45rem; }
.scroll-title h1 { margin: 0; font: 700 clamp(1.2rem, 2vw, 1.65rem) Georgia, serif; color: var(--gold-bright); }
.event-copy { max-width: 880px; margin: 20px 0 0; color: #fff; font: 500 clamp(1rem, 1.4vw, 1.17rem)/1.7 Georgia, serif; }

.choice-chamber, .investigation-chamber { animation: chamber-enter .38s ease both; }
@keyframes chamber-enter { from { opacity: 0; transform: translateY(7px); } }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 15px; }
.section-heading h2, .eye-heading h2, .final-judgment h2 { margin: 0; font-size: 1.12rem; }
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); font-size: .75rem; text-align: right; }
.primary-choice-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 15px; }
.path-button { position: relative; display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 13px; min-height: 112px; padding: 18px; color: var(--text); text-align: left; border: 1px solid; transition: transform .2s, filter .2s, box-shadow .2s; }
.path-button:hover { transform: translateY(-3px); filter: brightness(1.13); }
.path-button span strong, .path-button span small { display: block; }
.path-button span strong { font-size: .92rem; letter-spacing: .06em; text-transform: uppercase; }
.path-button span small { margin-top: 5px; color: rgba(255, 255, 255,.68); font-size: .71rem; font-weight: 500; }
.path-icon { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid currentColor; border-radius: 50%; font-size: 1.2rem; }
.path-button em { position: absolute; right: 13px; bottom: 9px; font-size: .59rem; font-style: normal; opacity: .75; }
.path-trust { color: #009DD9; border-color: rgba(0, 157, 217,.5); background: linear-gradient(135deg, rgba(11, 45, 113,.9), rgba(0, 102, 178,.72)); box-shadow: 0 0 20px rgba(0, 157, 217,.14); }
.path-challenge { color: #FAAB18; border-color: rgba(229, 96, 31,.65); background: linear-gradient(135deg, rgba(113, 27, 0,.94), rgba(229, 96, 31,.72)); box-shadow: 0 0 28px rgba(229, 96, 31,.24); animation: challenge-entice 2.8s ease-in-out infinite; }
@keyframes challenge-entice { 50% { box-shadow: 0 0 36px rgba(229, 96, 31,.38); } }

.point-toast { position: fixed; z-index: 300; right: 28px; bottom: 26px; padding: 11px 15px; border: 1px solid var(--gold); border-radius: 10px; color: var(--gold-bright); background: rgba(0, 0, 0,.96); box-shadow: 0 0 24px rgba(250, 171, 24,.25); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .22s ease; }
.point-toast.is-visible { opacity: 1; transform: translateY(0); }
.floating-sound-toggle { position: fixed; z-index: 240; top: 16px; right: 18px; border: 1px solid rgba(250, 171, 24,.35); background: rgba(0, 0, 0,.88); backdrop-filter: blur(12px); }

@media (max-width: 1050px) {
  .game-metrics { position: static; transform: none; margin-left: auto; }
  .game-metrics > span { min-width: 100px; padding: 0 12px; }
  .investigator-shell { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 780px) {
  .top-bar { min-height: 58px; }.game-metrics > span { min-width: auto; }.game-metrics small { display: none; }
  .game-metrics > span { padding: 0 8px; }.game-metrics strong { font-size: .68rem; }.top-bar-logo { font-size: .73rem; }
  .page.game-stage-page { padding-top: 72px; }.investigator-shell { grid-template-columns: 1fr; }
  .mentor-panel { min-height: 0; }.sage-avatar { width: 92px; margin: 14px auto; }.mentor-dialogue { margin-top: 0; }.oracle-whisper { margin-top: 12px; }
  .primary-choice-grid { grid-template-columns: 1fr; }
}

/* ─── Simplified welcome, tour, and question screens ─────────────── */
.wheel-page { max-width: 980px !important; }
.welcome-overlay { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0,.88); backdrop-filter: blur(5px); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.welcome-overlay.is-visible { opacity: 1; visibility: visible; }
.welcome-modal { width: min(430px, 94vw); padding: 38px 34px; text-align: center; border: 1px solid rgba(250, 171, 24,.5); border-radius: 22px; background: rgba(0, 0, 0,.96); box-shadow: 0 30px 90px rgba(0, 0, 0,.65), 0 0 45px rgba(0, 157, 217,.2); }
.welcome-modal h2 { margin: 6px 0 10px; font: 700 2rem Georgia, serif; color: var(--gold-bright); }
.welcome-modal > p:not(.kicker) { margin: 0 auto 25px; max-width: 340px; color: var(--muted); line-height: 1.55; }
.welcome-sigil { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 16px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 1.65rem; box-shadow: 0 0 25px rgba(250, 171, 24,.3); }
#enter-sanctum { max-width: 280px; margin: auto; color: #000000; }
.simple-tour { max-width: 520px; padding: 30px; }
.simple-tour .tour-slides { min-height: 315px; }
.tour-simple-icon { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 8px; border: 1px solid rgba(250, 171, 24,.4); border-radius: 50%; background: rgba(250, 171, 24,.08); font-size: 2rem; box-shadow: 0 0 24px rgba(250, 171, 24,.14); }
.tour-simple-icon.sage-icon { color: #00B2BD; border-color: rgba(0, 178, 189,.5); background: radial-gradient(circle, rgba(0, 178, 189,.2), rgba(11, 45, 113,.35)); font: 800 2rem Georgia, serif; }
.simple-tour .tour-body { font-size: .93rem; line-height: 1.55; }

.page.simple-question-page { max-width: 1180px; padding-top: 88px; }
.simple-question-shell { display: grid; grid-template-columns: minmax(230px, 28%) minmax(0, 1fr); gap: 18px; align-items: start; }
.prophecy-panel, .question-panel { border: 1px solid rgba(250, 171, 24,.22); border-radius: 18px; background: rgba(0, 0, 0,.78); backdrop-filter: blur(18px); box-shadow: 0 24px 65px rgba(0, 0, 0,.34); }
.prophecy-panel { position: sticky; top: 88px; padding: 27px 23px; text-align: center; }
.ai-guide-avatar { display: grid; place-items: center; width: 108px; height: 108px; margin: 0 auto 16px; border: 1px solid rgba(0, 178, 189,.55); border-radius: 50%; background: radial-gradient(circle, rgba(0, 178, 189,.18), rgba(11, 45, 113,.35) 55%, rgba(0, 0, 0,.9)); box-shadow: 0 0 25px rgba(0, 178, 189,.2); }
.ai-face { position: relative; display: flex; justify-content: space-around; align-items: center; width: 62px; height: 47px; padding: 0 10px; border: 2px solid #00B2BD; border-radius: 14px; }
.ai-face::after { content: ''; position: absolute; left: 17px; right: 17px; bottom: 8px; height: 2px; background: #00B2BD; }
.ai-face i { width: 8px; height: 8px; border-radius: 50%; background: #00B2BD; box-shadow: 0 0 8px #00B2BD; }
.guide-name { margin: 0; color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.prophecy-panel h2 { margin: 8px 0 13px; font-size: 1.15rem; }
.prophecy-panel blockquote { margin: 0; color: #FFFFFF; font: italic .94rem/1.6 Georgia, serif; }
.plain-warning { margin: 19px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255,.09); color: var(--muted); font-size: .67rem; line-height: 1.45; }
.question-panel { padding: clamp(22px, 3vw, 36px); }
.question-card { padding: clamp(22px, 3vw, 34px); border: 1px solid rgba(250, 171, 24,.36); border-radius: 15px; background: linear-gradient(125deg, rgba(39, 23, 48,.72), rgba(18, 13, 31,.82)); }
.question-number { margin: 0 0 9px; color: var(--gold); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.question-card h1 { margin: 0 0 18px; color: var(--gold-bright); font: 700 clamp(1.4rem, 2.5vw, 1.9rem) Georgia, serif; }
.question-copy { margin: 0; color: #fff; font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.7; }
.simple-choice { margin-top: 22px; }
.simple-choice > p { margin: 0 0 10px; color: var(--muted); font-size: .78rem; }
.simple-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.simple-choice-grid button { min-height: 86px; padding: 17px; color: var(--text); border: 1px solid; text-align: left; transition: transform .18s, filter .18s; }
.simple-choice-grid button:hover { transform: translateY(-2px); filter: brightness(1.12); }
.simple-choice-grid strong, .simple-choice-grid small { display: block; }
.simple-choice-grid strong { font-size: .9rem; }.simple-choice-grid small { margin-top: 5px; color: rgba(255, 255, 255,.68); font-size: .7rem; font-weight: 500; }
.simple-trust { border-color: rgba(0, 157, 217,.48) !important; background: rgba(0, 102, 178,.38); }
.simple-challenge { border-color: rgba(229, 96, 31,.58) !important; background: rgba(229, 96, 31,.42); }
@media (min-width: 761px) and (max-height: 900px) {
  .page.simple-question-page { padding-top: 52px; padding-bottom: 0; }
  .simple-question-shell { gap: 14px; }
  .prophecy-panel { top: 76px; padding: 19px 20px; }
  .ai-guide-avatar { width: 82px; height: 82px; margin-bottom: 11px; }
  .ai-face { transform: scale(.8); }
  .prophecy-panel h2 { margin: 6px 0 9px; }
  .prophecy-panel blockquote { font-size: .84rem; line-height: 1.45; }
  .plain-warning { margin-top: 12px; padding-top: 10px; }
  .question-panel { padding: 18px 22px; }
  .question-card { padding: 16px 20px; }
  .question-number { margin-bottom: 5px; }
  .question-card h1 { margin-bottom: 9px; font-size: 1.42rem; }
  .question-copy { font-size: .98rem; line-height: 1.48; }
}

.answer-chamber { margin-top: 18px; animation: chamber-enter .3s ease both; }
.answer-chamber-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.answer-chamber-heading h2 { margin: 0; font-size: 1.08rem; }
.answer-chamber-heading p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; }
.answer-chamber-heading > strong { flex: none; color: #00B2BD; font-size: .7rem; }
.action-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-option-grid button { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 11px; min-height: 70px; padding: 11px 13px; border: 1px solid rgba(0, 178, 189,.24); color: var(--text); background: rgba(0, 178, 189,.045); text-align: left; transition: transform .18s, border-color .18s, background .18s; }
.action-option-grid button:hover { transform: translateY(-2px); border-color: #00B2BD; background: rgba(0, 178, 189,.1); }
.action-option-grid span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #00B2BD; background: rgba(0, 178, 189,.12); font-size: .72rem; font-weight: 900; }
.action-option-grid strong { font-size: .72rem; line-height: 1.35; }
@media (min-width: 761px) and (max-height: 900px) {
  .answer-chamber { margin-top: 12px; }
  .answer-chamber-heading { margin-bottom: 8px; }
  .action-option-grid { gap: 8px; }
  .action-option-grid button { min-height: 60px; padding: 8px 11px; }
  .action-option-grid strong { font-size: .67rem; }
}
@media (max-width: 760px) {
  .action-option-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .simple-question-shell { grid-template-columns: 1fr; }.prophecy-panel { position: static; }.ai-guide-avatar { width: 82px; height: 82px; }
  .simple-choice-grid { grid-template-columns: 1fr; }
}

/* Keep reveal actions visible on a standard laptop screen. */
.reveal-next-form { margin: 14px 0 0; }
.reveal-next-form .next-question-btn { margin: 0; }
@media (min-width: 701px) and (max-height: 820px) {
  .reveal-layout { gap: 24px; }
  .reveal-sidebar { padding: 20px 18px; }
  .reveal-sidebar .sage-solo { gap: 8px; }
  .reveal-sidebar .sage-solo-frame { width: 112px; height: 157px; }
  .reveal-sidebar .reveal-char-quote { margin: 2px 0 6px; }
  .reveal-score-number { font-size: 3.2rem; }
  .reveal-breakdown { padding: 10px 13px; }
  .reveal-sidebar .artifact-meter { margin: 10px 0 0; }
  .reveal-card { padding: 28px 30px; }
  .reveal-card .calibration-card { margin-top: 14px; padding: 14px 16px; }
}

/* ─── Premium Sanctum login ─────────────────────────────────────── */
.page.login-page { max-width: 980px; padding: 30px 0; }
.login-sanctum-card { position: relative; z-index: 2; width: min(900px, 94vw); margin: auto; padding: 34px 42px 26px; overflow: hidden; text-align: left; background: linear-gradient(145deg, rgba(58, 13, 54,.9), rgba(0, 0, 0,.82)); }
.login-sanctum-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(0, 157, 217,.1), transparent 38%, rgba(250, 171, 24,.07)); }
.login-sanctum-header { position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; text-align: left; }
.login-sanctum-header .sigil-mark { flex: none; margin: 0; transform: scale(1.42); filter: drop-shadow(0 0 24px rgba(250, 171, 24,.72)); animation: login-emblem-pulse 3.4s ease-in-out infinite; }
.login-sanctum-header h1 { margin: 2px 0 0; color: var(--gold-bright); font: 700 clamp(2rem,4vw,3rem) Georgia,serif; letter-spacing: .04em; }
@keyframes login-emblem-pulse { 50% { transform: scale(1.52); filter: drop-shadow(0 0 34px rgba(250, 171, 24,.9)); } }
.sanctum-description { position: relative; max-width: 720px; margin: 17px auto 23px; color: #DBDCDD; font-size: .9rem; line-height: 1.55; text-align: center; }
.login-sanctum-card form { position: relative; }
.login-sanctum-card .email-entry { max-width: 580px; margin: 0 auto 17px; }
.login-sanctum-card form > label { max-width: 580px; margin-left: auto; margin-right: auto; }
.order-selector { margin: 0; padding: 0; border: 0; }
.order-selector legend { color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .07em; }
.order-selector > p { margin: 3px 0 10px; color: var(--muted); font-size: .68rem; }
.order-card-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.order-card { min-width: 0; border: 1px solid rgba(250, 171, 24,.18); border-radius: 13px; background: rgba(255, 255, 255,.025); transition: border-color .22s, background .22s, transform .22s; }
.order-card:hover { transform: translateY(-2px); border-color: rgba(250, 171, 24,.5); }
.order-card.is-open { grid-column: span 2; border-color: rgba(0, 178, 189,.58); background: rgba(0, 178, 189,.06); }
.order-card.is-empty { opacity: .38; pointer-events: none; }
.order-card-trigger { display: grid; grid-template-columns: 34px 1fr; width: 100%; min-height: 86px; padding: 12px; color: var(--text); border: 0; border-radius: 12px; background: transparent; text-align: left; }
.order-card-trigger:hover { filter: none; }
.order-emblem { grid-row: 1/3; display: grid; place-items: center; width: 30px; height: 30px; color: var(--gold); border: 1px solid rgba(250, 171, 24,.45); border-radius: 50%; box-shadow: 0 0 13px rgba(250, 171, 24,.15); }
.order-card-trigger strong { align-self: end; font-size: .73rem; line-height: 1.2; }
.order-card-trigger small { margin-top: 4px; color: var(--muted); font-size: .59rem; line-height: 1.3; }
.order-departments { display: none; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 11px 11px; }
.order-card.is-open .order-departments { display: grid; animation: chamber-enter .25s ease both; }
.order-departments label { position: relative; margin: 0; cursor: pointer; }
.order-departments input { position: absolute; opacity: 0; pointer-events: none; }
.order-departments span { display: block; min-height: 35px; padding: 9px; color: #DBDCDD; border: 1px solid rgba(255, 255, 255,.09); border-radius: 8px; background: rgba(0, 0, 0,.18); font-size: .63rem; text-align: center; }
.order-departments input:checked + span { color: #00B2BD; border-color: #00B2BD; background: rgba(0, 112, 140,.14); box-shadow: 0 0 14px rgba(0, 178, 189,.12); }
.sanctum-cta { max-width: 360px; margin: 18px auto 0; letter-spacing: .03em; }
.sanctum-cta span { float: right; }
.sanctum-trust-row { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 9px 24px; margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255,.07); color: var(--muted); font-size: .63rem; }
.sanctum-trust-row b { color: var(--gold); }
.login-portal { position: fixed; z-index: 0; top: 50%; left: 50%; width: min(720px,76vw); aspect-ratio: 1; transform: translate(-50%,-50%); border: 1px solid rgba(0, 157, 217,.16); border-radius: 50%; box-shadow: 0 0 90px rgba(0, 157, 217,.18), inset 0 0 80px rgba(250, 171, 24,.08); animation: login-portal-turn 34s linear infinite; }
.login-portal::before,.login-portal::after,.login-portal i { content: ''; position: absolute; border: 1px solid rgba(250, 171, 24,.18); border-radius: 50%; }
.login-portal::before { inset: 8%; border-style: dashed; }.login-portal::after { inset: 20%; border-color: rgba(0, 178, 189,.15); }
.login-portal i:nth-child(1) { inset: 2% 48%; border-radius: 0; }.login-portal i:nth-child(2) { inset: 48% 2%; border-radius: 0; }.login-portal i:nth-child(3) { inset: 29%; transform: rotate(45deg); border-radius: 12%; }
.login-portal b { position: absolute; inset: 43%; display: grid; place-items: center; color: rgba(250, 171, 24,.4); font-size: 3rem; }
@keyframes login-portal-turn { to { transform: translate(-50%,-50%) rotate(360deg); } }
.login-rune-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.login-rune-field span { position: absolute; color: rgba(250, 171, 24,.16); font-size: 1.15rem; animation: rune-drift 10s ease-in-out infinite alternate; }
@keyframes rune-drift { to { transform: translateY(-28px) rotate(18deg); opacity: .35; } }

/* ─── Premium Wheel of Fate ─────────────────────────────────────── */
.page.wheel-page { max-width: 1220px !important; padding-top: 82px; padding-bottom: 18px; }
.wheel-page .stage-header { align-items: center; max-width: 1120px; margin: 0 auto 6px; }
.wheel-page .stage-header h1 { color: var(--gold-bright); font: 700 clamp(2rem,4vw,3.15rem) Georgia,serif; }
.wheel-intro { max-width: 650px; margin: 7px 0 0; color: #DBDCDD; font-size: .86rem; line-height: 1.5; }
.wheel-tour-button { width: auto; flex: none; padding: 10px 17px; color: var(--gold-bright); border: 1px solid rgba(250, 171, 24,.4); background: rgba(58, 13, 54,.62); font-size: .72rem; }
.premium-wheel-stage { position: relative; display: grid; grid-template-columns: minmax(440px,1.25fr) minmax(300px,.75fr); align-items: center; gap: 40px; width: min(1120px,96vw); min-height: 540px; margin: auto; }
.premium-wheel-stage .wheel-frame { width: min(525px,62vh,53vw); margin: 0 auto; }
.wheel-portal-field { position: absolute; z-index: -1; left: 25%; width: min(650px,68vw); aspect-ratio: 1; transform: translateX(-50%); border: 1px solid rgba(0, 157, 217,.17); border-radius: 50%; box-shadow: 0 0 90px rgba(0, 157, 217,.15), inset 0 0 70px rgba(0, 178, 189,.06); animation: wheel-sigil-turn 38s linear infinite; }
.wheel-portal-field::before,.wheel-portal-field::after,.wheel-portal-field i { content:'';position:absolute;border:1px solid rgba(250, 171, 24,.14); }
.wheel-portal-field::before { inset: 8%; border-radius: 50%; border-style: dashed; }.wheel-portal-field::after { inset: 22%; transform: rotate(45deg); }.wheel-portal-field i:nth-child(1){inset:3% 49%;}.wheel-portal-field i:nth-child(2){inset:49% 3%;}.wheel-portal-field i:nth-child(3){inset:28%;border-radius:50%;}
@keyframes wheel-sigil-turn { to { transform: translateX(-50%) rotate(360deg); } }
.wheel-rune-field { position:absolute;inset:0;z-index:-1;pointer-events:none; }
.wheel-rune-field span { position:absolute;color:rgba(250, 171, 24,.2);animation:rune-drift 9s ease-in-out infinite alternate; }
.wheel-outer-metal { fill:none;stroke:url(#metal-rim);stroke-width:8;filter:drop-shadow(0 0 7px rgba(250, 171, 24,.55)); }
.wheel-rim { stroke-width: 2.5; opacity:.95; }
.wedge { stroke:rgba(248, 225, 161,.5);stroke-width:1.2; }
.wheel-category-icon circle { fill:rgba(0, 0, 0,.7);stroke:rgba(248, 225, 161,.72);stroke-width:1;filter:drop-shadow(0 0 4px rgba(250, 171, 24,.45)); }
.wheel-category-icon path { fill:none;stroke:#FFFFFF;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round;transform:scale(.78);transform-origin:12px 12px; }
.wheel-pointer { top:-16px;width:34px;height:42px;font-size:0; }
.wheel-pointer span { display:block;width:0;height:0;border-left:16px solid transparent;border-right:16px solid transparent;border-top:30px solid #FAAB18;filter:drop-shadow(0 0 10px rgba(250, 171, 24,.85)); }
.premium-wheel-stage .core-glow { width:37%;height:37%;box-shadow:0 0 45px rgba(250, 171, 24,.48); }
.core-ring { position:absolute;width:23%;height:23%;border:2px solid rgba(255, 244, 199,.72);border-radius:50%;box-shadow:0 0 22px rgba(250, 171, 24,.55),inset 0 0 20px rgba(0, 157, 217,.45); }
.premium-wheel-stage .core-mark { font-size:2rem; }
.premium-spin-panel { position:relative;max-width:none;margin:0;padding:28px;border:1px solid rgba(250, 171, 24,.25);border-radius:18px;background:linear-gradient(145deg,rgba(24, 15, 43,.82),rgba(0, 0, 0,.72));backdrop-filter:blur(18px);box-shadow:0 25px 60px rgba(0, 0, 0,.32); }
.reward-label { margin:0 0 7px;color:var(--gold);font-size:.64rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase; }
.premium-spin-panel #spin-btn { box-shadow:0 0 26px rgba(0, 157, 217,.24);transition:transform .2s,filter .2s,box-shadow .2s; }
.premium-spin-panel #spin-btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 0 38px rgba(250, 171, 24,.28);}
.wheel-reward-placeholder { display:grid;place-items:center;min-height:145px;margin-top:18px;padding:18px;border:1px dashed rgba(250, 171, 24,.22);border-radius:13px;background:rgba(255, 255, 255,.02); }
.wheel-reward-placeholder span { color:var(--gold);font-size:1.7rem; }.wheel-reward-placeholder strong{font-size:.76rem;}.wheel-reward-placeholder small{color:var(--muted);font-size:.64rem;}
.premium-mission-reveal { min-height:145px;margin-top:18px;padding:17px;border-color:rgba(250, 171, 24,.5);background:radial-gradient(circle at 50% 0,rgba(250, 171, 24,.16),rgba(0, 157, 217,.08));box-shadow:0 0 28px rgba(250, 171, 24,.12); }
.premium-mission-reveal > p { margin:0;color:var(--gold);font-size:.58rem;font-weight:900;letter-spacing:.14em;text-transform:uppercase; }
.wheel-frame.wheel-celebrate::before,.wheel-frame.wheel-celebrate::after{content:'';position:absolute;z-index:4;inset:8%;pointer-events:none;border:2px solid rgba(251, 238, 219,.8);border-radius:50%;animation:wheel-burst .75s ease-out both}
.wheel-frame.wheel-celebrate::after{inset:18%;border-color:rgba(0, 157, 217,.85);animation-delay:.08s}
@keyframes wheel-burst{from{opacity:1;transform:scale(.55);filter:drop-shadow(0 0 18px #FAAB18)}to{opacity:0;transform:scale(1.3)}}
.mission-clock.is-urgent strong { color:#E21836!important;animation:timer-urgent .72s ease-in-out infinite alternate; }
@keyframes timer-urgent { to{text-shadow:0 0 12px #E21836;transform:scale(1.08);} }

@media (max-width: 900px) {
  .order-card-grid { grid-template-columns:1fr 1fr; }.order-card.is-open{grid-column:span 1;}
  .premium-wheel-stage{grid-template-columns:1fr;gap:16px}.premium-wheel-stage .wheel-frame{width:min(500px,82vw)}.premium-spin-panel{width:min(520px,90vw);margin:auto}.wheel-portal-field{left:50%}.page.wheel-page{padding-top:76px}.wheel-page .stage-header{padding:0 5vw}
}
@media (max-width: 600px) {
  .login-sanctum-card{padding:28px 18px}.login-sanctum-header{flex-direction:column;text-align:center}.order-card-grid{grid-template-columns:1fr}.order-card.is-open{grid-column:auto}.sanctum-trust-row{gap:8px 13px}.wheel-page .stage-header{align-items:flex-start}.wheel-tour-button{margin-top:6px}.premium-wheel-stage{min-height:0}.premium-spin-panel{padding:20px}
}

/* ─── Focused kiosk flow refinements ────────────────────────────── */
.hud-tour-button {
  width: auto;
  padding: 6px 12px;
  color: var(--gold-bright);
  border: 1px solid rgba(250, 171, 24,.3);
  border-radius: 8px;
  background: rgba(250, 171, 24,.07);
  font-size: .72rem;
  font-weight: 600;
}

.wheel-page .stage-header {
  justify-content: center;
  text-align: center;
}
.wheel-page .wheel-intro { margin-inline: auto; }
.wheel-topic-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 13px; max-width: 850px; margin: 10px auto 0; }
.wheel-topic-list span { color: var(--muted); font-size: .65rem; }
.wheel-topic-list span::before { content: '•'; margin-right: 6px; color: var(--gold); }
.premium-wheel-stage {
  grid-template-columns: minmax(440px, 1.35fr) minmax(300px, .65fr);
  gap: clamp(24px, 4vw, 58px);
}
.premium-spin-panel {
  padding: 20px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}
.premium-spin-panel::before {
  content: '';
  display: block;
  width: 74px;
  height: 1px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 14px rgba(250, 171, 24,.7);
}
.premium-spin-panel .spin-status {
  max-width: 310px;
  margin: 0 auto 18px;
  line-height: 1.5;
}
.premium-spin-panel #spin-btn,
.mission-ready-form button {
  min-height: 58px;
  border-radius: 999px;
  box-shadow: 0 0 34px rgba(0, 157, 217,.3), 0 10px 30px rgba(0, 0, 0,.3);
}
.wheel-reward-placeholder {
  min-height: 110px;
  margin-top: 14px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle, rgba(0, 157, 217,.09), transparent 68%);
}
.premium-mission-reveal {
  min-height: auto;
  margin: 12px 0 0;
  padding: 18px 8px;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle, rgba(250, 171, 24,.13), transparent 72%);
  box-shadow: none;
}
.premium-mission-reveal strong { font-size: 1.3rem; }
.premium-mission-reveal span:last-child { display: block; max-width: 330px; margin: 7px auto 0; font-size: .82rem; }
.mission-ready-form { margin-top: 18px; text-align: center; }
.mission-ready-form button { color: #000000; font-size: .92rem; }

.page.compact-reveal-page { max-width: 760px; padding-top: 92px; }
.compact-reveal-card {
  width: min(720px, 94vw);
  margin: auto;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  border: 1px solid rgba(250, 171, 24,.28);
  border-radius: 22px;
  background: rgba(0, 0, 0,.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 28px 80px rgba(0, 0, 0,.42);
}
.compact-verdict { margin: 7px 0 22px; font: 700 clamp(2rem, 6vw, 3.2rem) Georgia, serif; }
.compact-verdict.is-correct { color: #B2CC34; }
.compact-verdict.is-incorrect { color: #E21836; }
.compact-decision { margin: 0 auto 20px; color: #DBDCDD; line-height: 1.55; }
.compact-answer-summary { display: grid; gap: 8px; margin: 0 0 20px; }
.compact-answer-summary p { margin: 0; padding: 12px 15px; text-align: left; border-radius: 11px; background: rgba(255, 255, 255,.045); }
.compact-answer-summary span { display: block; margin-bottom: 3px; color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.compact-answer-summary strong { font-size: .9rem; line-height: 1.45; }
.compact-lesson { padding: 20px; text-align: left; border-left: 3px solid var(--gold); border-radius: 10px; background: rgba(250, 171, 24,.07); }
.compact-lesson h2 { margin: 0 0 8px; font-size: 1.1rem; }
.compact-lesson > p:last-child { margin: 0; color: #DBDCDD; line-height: 1.6; }
.compact-reveal-card .reveal-next-form { max-width: 360px; margin: 22px auto 0; }

.gameover-actions { grid-template-columns: minmax(260px, 420px); justify-content: center; }

@media (max-width: 900px) {
  .premium-wheel-stage { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .top-bar-right { gap: 5px; }
  .hud-tour-button, .sound-toggle, .depart-btn { padding: 6px 8px; font-size: .62rem; }
  .compact-reveal-card { padding: 26px 20px; }
}

/* ─── Clear topic, question, and character presentation ─────────── */
.simple-login-card {
  width: min(620px, 94vw);
  padding: 28px 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.simple-login-card::before { display: none; }
.simple-login-card .sanctum-description { max-width: 560px; }
.simple-login-card form { max-width: 520px; margin: auto; }
.simple-login-card form > label,
.simple-login-card .email-entry,
.simple-login-card select { max-width: 520px; margin-left: auto; margin-right: auto; }
.simple-login-card select {
  display: block;
  min-height: 50px;
  margin-bottom: 18px;
  background-color: rgba(58, 13, 54,.78);
}

.page.simple-question-page { max-width: 1120px; }
.simple-question-shell { display: block; width: min(1060px, 96vw); margin: auto; }
.question-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.question-compare-grid .comparison-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(250, 171, 24,.32);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(29, 18, 45,.9), rgba(12, 9, 24,.88));
  box-shadow: 0 24px 65px rgba(0, 0, 0,.32);
}
.question-compare-grid .prophecy-panel {
  position: static;
  text-align: left;
  border-color: rgba(0, 178, 189,.42);
  background: linear-gradient(135deg, rgba(16, 42, 61,.82), rgba(22, 13, 40,.9));
}
.prophecy-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.prophecy-heading .ai-guide-avatar { flex: none; width: 66px; height: 66px; margin: 0; }
.prophecy-heading .ai-face { transform: scale(.68); }
.prophecy-heading h2 { margin: 4px 0 0; color: #00B2BD; font: 700 clamp(1.35rem, 2.3vw, 1.8rem) Georgia, serif; }
.question-compare-grid .prophecy-panel blockquote { margin: 0; color: #fff; font: 500 clamp(1rem, 1.4vw, 1.14rem)/1.65 Georgia, serif; }
.question-compare-grid .plain-warning { margin-top: auto; padding-top: 18px; font-size: .72rem; }
.question-compare-grid .question-card h1 { font-size: clamp(1.35rem, 2.3vw, 1.8rem); }
.question-compare-grid .question-copy { font-size: clamp(1rem, 1.4vw, 1.14rem); }
.simple-question-shell .simple-choice { max-width: none; margin: 18px auto 0; text-align: center; }
.simple-question-shell .simple-choice > p { text-align: center; }
.simple-question-shell .simple-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.simple-question-shell .simple-choice-grid button { min-height: 76px; text-align: center; }
.simple-question-shell .answer-chamber { margin-top: 22px; padding: 20px; border: 1px solid rgba(250, 171, 24,.22); border-radius: 16px; background: rgba(0, 0, 0,.72); }

.answer-character {
  --answer-glow: #B2CC34;
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 245px;
  margin: -28px auto 22px;
  overflow: hidden;
}
.answer-glow-wrong { --answer-glow: #E21836; }
.character-aura {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 270px;
  height: 210px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--answer-glow) 34%, transparent), color-mix(in srgb, var(--answer-glow) 10%, transparent) 48%, transparent 72%);
  filter: blur(8px);
  animation: answer-aura-breathe 2.8s ease-in-out infinite;
}
@keyframes answer-aura-breathe { 50% { opacity: .65; transform: translateX(-50%) scale(1.08); } }
.character-figure {
  position: relative;
  width: 190px;
  height: 205px;
  z-index: 1;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--answer-glow) 60%, transparent));
}
.character-head {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: 50%;
  width: 52px;
  height: 66px;
  transform: translateX(-50%);
  border-radius: 46% 46% 42% 42%;
  background: linear-gradient(110deg, #7a594f, #c39378 48%, #594038);
  box-shadow: inset -8px -5px 12px rgba(0, 0, 0,.28);
}
.character-neck { position: absolute; z-index: 2; top: 80px; left: 50%; width: 25px; height: 27px; transform: translateX(-50%); background: #8e6858; }
.character-shoulders { position: absolute; z-index: 1; top: 94px; left: 50%; width: 160px; height: 76px; transform: translateX(-50%); border-radius: 52% 52% 12% 12%; background: linear-gradient(110deg, #161827, #34384f 48%, #11131f); }
.character-torso { position: absolute; z-index: 2; top: 108px; left: 50%; width: 100px; height: 105px; transform: translateX(-50%); clip-path: polygon(12% 0,88% 0,100% 100%,0 100%); background: linear-gradient(100deg, #121526, #29365d 52%, #0d1020); }
.character-hair { position: absolute; z-index: 4; top: 15px; left: 50%; width: 59px; height: 33px; transform: translateX(-50%); border-radius: 60% 60% 22% 22%; background: linear-gradient(100deg, #111, #3f3a3a, #090909); }
.character-costume-mark { position: absolute; z-index: 4; top: 125px; left: 50%; width: 31px; height: 31px; transform: translateX(-50%) rotate(45deg); border: 1px solid rgba(250, 171, 24,.8); box-shadow: 0 0 10px rgba(250, 171, 24,.45); }
.character-response { position: relative; z-index: 2; margin-top: -2px; text-align: center; text-shadow: 0 2px 12px #070511; }
.character-response strong { display: block; color: var(--answer-glow); font: 700 1.05rem Georgia, serif; }
.character-response span { display: block; margin-top: 3px; color: #DBDCDD; font-size: .73rem; }

.answer-character-wong .character-hair { height: 24px; border-radius: 48% 48% 18% 18%; }
.answer-character-wong .character-shoulders { background: linear-gradient(110deg, #2a1738, #5b3572, #171020); }
.answer-character-wong .character-torso { background: linear-gradient(100deg, #17182b, #302745, #111321); }
.answer-character-wong .character-costume-mark { width: 38px; height: 22px; transform: translateX(-50%); border-color: #BA3093; }

.answer-character-ancient_one .character-hair { display: none; }
.answer-character-ancient_one .character-head { top: 17px; }
.answer-character-ancient_one .character-shoulders { background: linear-gradient(110deg, #30203d, #76518d, #21172c); }
.answer-character-ancient_one .character-torso { background: linear-gradient(100deg, #39214f, #70508b, #241532); }
.answer-character-ancient_one .character-costume-mark { border-radius: 50%; transform: translateX(-50%); border-color: #FAAB18; }

.answer-character-strange .character-hair { clip-path: polygon(0 25%,18% 0,40% 15%,50% 0,62% 16%,85% 0,100% 27%,92% 100%,8% 100%); }
.answer-character-strange .character-shoulders { background: linear-gradient(110deg, #5a111e, #a72f43 25%, #202b55 52%, #6c1322); }
.answer-character-strange .character-torso { background: linear-gradient(100deg, #121b3b, #29447c, #0d1532); }
.answer-character-strange .character-costume-mark { border-radius: 50%; transform: translateX(-50%); border: 3px double #FAAB18; }

.answer-character-thanos .character-head { width: 69px; height: 72px; border-radius: 44% 44% 53% 53%; background: linear-gradient(110deg, #57456d, #9377aa 48%, #40324f); }
.answer-character-thanos .character-hair { display: none; }
.answer-character-thanos .character-neck { width: 38px; background: #604d78; }
.answer-character-thanos .character-shoulders { width: 184px; background: linear-gradient(110deg, #4a4021, #b28d35 24%, #25293b 52%, #826621); }
.answer-character-thanos .character-torso { width: 118px; background: linear-gradient(100deg, #252735, #4a4c61, #1a1c28); }
.answer-character-thanos .character-costume-mark { border-color: #FAAB18; }

.answer-character-wanda .character-hair { top: 9px; width: 82px; height: 99px; border-radius: 55% 55% 38% 38%; background: linear-gradient(100deg, #260707, #6e191f, #160405); }
.answer-character-wanda .character-head { z-index: 5; width: 49px; background: linear-gradient(110deg, #9b6a62, #d5a093 48%, #704a46); }
.answer-character-wanda .character-neck { z-index: 4; }
.answer-character-wanda .character-shoulders { background: linear-gradient(110deg, #3b0912, #92263b, #270710); }
.answer-character-wanda .character-torso { background: linear-gradient(100deg, #410b17, #8f1f36, #290710); }
.answer-character-wanda .character-costume-mark { border-color: #E21836; }

@media (max-width: 760px) {
  .question-compare-grid { grid-template-columns: 1fr; }
  .question-compare-grid .comparison-card { min-height: 220px; }
  .simple-question-shell .simple-choice-grid { grid-template-columns: 1fr; }
  .answer-character { transform: scale(.88); margin-top: -38px; margin-bottom: 0; }
}

/* ─── Laptop-fit polish: pagoda, judgment, speaking answers ─────── */
.login-sanctum-header { flex-direction: column; gap: 3px; }
.kamar-taj-pagoda { width: 190px; height: 76px; margin: 0 auto -4px; color: var(--gold); filter: drop-shadow(0 0 11px rgba(250, 171, 24,.35)); }
.kamar-taj-pagoda svg { width: 100%; height: 100%; overflow: visible; }
.kamar-taj-pagoda path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.kamar-taj-pagoda circle { fill: var(--gold-bright); }
.pagoda-back { stroke-width: 1.4; opacity: .62; }
.pagoda-roof { stroke-width: 2.1; fill: rgba(250, 171, 24,.055) !important; }
.pagoda-spire { stroke-width: 1.7; }
.login-title-lockup { display: flex; align-items: center; justify-content: center; gap: 18px; }
.field-help { display: block; max-width: 520px; margin: -10px auto 17px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.simple-login-card input:invalid:not(:placeholder-shown) { border-color: #E21836; box-shadow: 0 0 0 2px rgba(226, 24, 54,.12); }
.simple-login-card input:valid { border-color: rgba(178, 204, 52,.42); }

.simple-question-shell .simple-choice > p {
  margin-bottom: 13px;
  color: var(--gold-bright);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: .035em;
}

.page.compact-reveal-page { max-width: 940px; padding-top: 78px; }
.compact-reveal-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  width: min(900px, 96vw);
  padding: 27px 32px;
  text-align: left;
}
.compact-reveal-content { min-width: 0; }
.compact-reveal-content .compact-verdict { margin: 5px 0 14px; font-size: clamp(1.8rem, 4vw, 2.55rem); }
.compact-reveal-content .compact-decision { margin: 0 0 14px; }
.compact-reveal-content .compact-answer-summary { margin-bottom: 14px; }
.compact-reveal-content .compact-lesson { padding: 15px 17px; }
.compact-reveal-content .reveal-next-form { margin: 16px 0 0; }
.compact-reveal-card .answer-character {
  align-self: center;
  min-height: 0;
  margin: 0;
  overflow: visible;
}
.compact-reveal-card .character-aura { bottom: 55px; width: 170px; height: 180px; }
.compact-reveal-card .character-figure {
  flex: none;
  transform: scale(.66);
  transform-origin: center bottom;
  margin: -55px -25px -34px;
}
.compact-reveal-card .character-response {
  width: 160px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--answer-glow) 48%, transparent);
  border-radius: 12px;
  background: rgba(0, 0, 0,.9);
  box-shadow: 0 8px 25px rgba(0, 0, 0,.3), 0 0 18px color-mix(in srgb, var(--answer-glow) 12%, transparent);
  text-align: left;
}
.compact-reveal-card .character-response::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-top: 1px solid color-mix(in srgb, var(--answer-glow) 48%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--answer-glow) 48%, transparent);
  background: rgba(0, 0, 0,.96);
}
.compact-reveal-card .character-response strong { font-size: .92rem; }
.compact-reveal-card .character-response span { font-size: .68rem; line-height: 1.4; }

@media (min-width: 701px) and (max-height: 800px) {
  .page.compact-reveal-page { padding-top: 64px; }
  .compact-reveal-card { padding-block: 20px; }
  .compact-reveal-content .compact-lesson > p:last-child { font-size: .86rem; line-height: 1.45; }
}
@media (max-width: 700px) {
  .login-title-lockup { flex-direction: column; gap: 4px; text-align: center; }
  .compact-reveal-card { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .compact-reveal-card .answer-character { transform: none; }
  .compact-reveal-card .character-figure { display: none; }
  .compact-reveal-card .character-aura { width: 130px; height: 90px; bottom: -8px; }
  .compact-reveal-card .character-response { width: min(320px, 90%); text-align: center; }
  .compact-reveal-content .reveal-next-form { margin-inline: auto; }
}
