/* ===================================================================
   Energifysikk – Cybersikkerhetsscenario
   Palette: bg #272F1B · text #E7E9DC · sage #8FA85E · electric #A8C44A · gold #C4923A
   =================================================================== */

/* ── Fonts ──────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Playfair Display';
  src: url('../../fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../../fonts/Lato-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../../fonts/Lato-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../../fonts/Lato-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('../../fonts/DMMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('../../fonts/DMMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Reset + tokens ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #272F1B;
  --deep:     #1a2012;
  --text:     #E7E9DC;
  --sage:     #8FA85E;
  --electric: #A8C44A;
  --gold:     #C4923A;
  --muted:    rgba(231, 233, 220, 0.45);
  --soft:     rgba(231, 233, 220, 0.72);

  --display: 'Playfair Display', Georgia, serif;
  --body:    'Lato', system-ui, sans-serif;
  --mono:    'DM Mono', 'Courier New', monospace;

  --ease:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur:   0.2s;
}

html, body {
  height: 100%;
  overflow: hidden; /* game is always fullscreen */
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

/* ── Loading screen ─────────────────────────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  gap: 1.5rem;
}

.loading-screen[hidden] { display: none; }

.loading-phi {
  font-family: var(--display);
  font-size: 4rem;
  color: var(--gold);
  animation: pulsePhi 1.5s ease-in-out infinite;
}

@keyframes pulsePhi {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

.loading-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Error screen ───────────────────────────────────────────────── */
.error-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 100;
  padding: 2rem;
}

.error-screen[hidden] { display: none; }

.error-box {
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.error-phi {
  font-family: var(--display);
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.error-h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
}

.error-body {
  font-family: var(--body);
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--soft);
  line-height: 1.6;
}

.error-cmd {
  display: block;
  font-family: var(--mono);
  font-size: 0.85rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 0.9rem 1.5rem;
  color: var(--electric);
  letter-spacing: 0.04em;
}

.error-link { color: var(--sage); }

/* ── Atmosphere background (shared: intro / mood / briefing) ─────
   Full-bleed photo behind the pre-game screens, with a dark
   vignette so overlaid text stays legible. ───────────────────── */
.atmo-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.atmo-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.atmo-bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom,
      rgba(10,14,6,0.75) 0%,
      rgba(10,14,6,0.25) 30%,
      rgba(10,14,6,0.35) 60%,
      rgba(10,14,6,0.88) 100%
    );
}

.atmo-bg-vignette--dense { background-color: rgba(10,14,6,0.35); }

/* ── Intro screen ───────────────────────────────────────────────── */
.intro-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 90;
}

.intro-screen[hidden] { display: none; }

.intro-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.intro-inner {
  max-width: 540px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 2.75rem clamp(1.5rem, 5vw, 3rem) 3rem;
  background: rgba(10, 14, 6, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
}

.intro-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  --logo-size: 1.3rem;
  margin-bottom: 0.25rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-decoration: none;
  transition: opacity var(--dur);
}

.intro-logo:hover { opacity: 0.75; }

.intro-kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}

.intro-tittel {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.2;
  color: var(--text);
}

.intro-undertittel {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.intro-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-block: 0.9rem;
}

.start-btn {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--electric);
  color: var(--deep);
  border: none;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.start-btn:hover { background: #c5e04e; transform: translateY(-1px); }
.start-btn:active { transform: translateY(0); }

.intro-sound-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  opacity: 0.6;
}

/* ── Mood / tone-setting screen ────────────────────────────────────
   Newspaper-style scroll reveal: a fixed background photo with a
   scrollable transparent layer of short lines on top. Each line
   fades in as it crosses the centre band, then dims again. ────── */
.mood-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 89;
  overflow: hidden;
}

.mood-screen[hidden] { display: none; }

.mood-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mood-lines {
  display: flex;
  flex-direction: column;
}

.mood-line-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(1.25rem, 6vw, 3rem);
  text-align: center;
}

.mood-line-text {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.4rem, 4.4vw, 2.5rem);
  line-height: 1.35;
  color: rgba(255,255,255,0.94);
  text-shadow: 0 2px 20px rgba(0,0,0,0.75);
  max-width: min(90vw, 720px);
  opacity: 0.12;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.mood-line-wrap.is-active .mood-line-text {
  opacity: 1;
  transform: translateY(0);
}

.mood-final {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding-inline: clamp(1.25rem, 6vw, 3rem);
}

.mood-scrollhint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 5;
}

.mood-scrollhint svg {
  width: 14px;
  height: 14px;
  animation: moodScrollBounce 1.6s ease-in-out infinite;
}

.mood-scrollhint.hide { opacity: 0; }

@keyframes moodScrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .mood-line-text { transition: opacity 0.3s linear; transform: none; }
  .mood-scrollhint svg { animation: none; }
}

/* ── Briefing screen ────────────────────────────────────────────── */
.briefing-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 30;
}

.briefing-screen[hidden] { display: none; }

.briefing-scroll {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding-block: 1rem;
}

.briefing-inner {
  max-width: 640px;
  width: 100%;
  padding: 1.6rem clamp(1.25rem, 4vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: rgba(10, 14, 6, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
}

.briefing-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.briefing-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 580px) {
  .briefing-body { grid-template-columns: 1fr; gap: 1rem; }
}

.briefing-selskap-navn {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.briefing-selskap-tekst {
  font-family: var(--body);
  font-weight: 300;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--soft);
}

.briefing-begreper-h {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.5rem;
}

.briefing-dl {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.briefing-dl-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.briefing-dl-item:first-child { border-top: 1px solid rgba(255, 255, 255, 0.07); }

.briefing-dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--electric);
  letter-spacing: 0.05em;
  margin-bottom: 0.1rem;
}

.briefing-dd {
  font-family: var(--body);
  font-weight: 300;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(231, 233, 220, 0.6);
  margin: 0;
}

.briefing-btn {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  background: var(--electric);
  color: var(--deep);
  border: none;
  cursor: pointer;
  transition: background var(--dur), transform var(--dur);
}

.briefing-btn:hover { background: #c5e04e; transform: translateY(-1px); }
.briefing-btn:active { transform: translateY(0); }

/* ── Game screen ────────────────────────────────────────────────── */
.game-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  opacity: 1;
  transition: opacity 0.22s var(--ease);
}

.game-screen[hidden] { display: none; }
.game-screen.fading  { opacity: 0; }

/* ── Home link (game screen, top-left) ─────────────────────────── */
.home-link {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top, 1rem));
  left: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  --logo-size: 0.68rem;
  transition: background var(--dur), border-color var(--dur);
}

.home-link:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Lockup logo (shared: game top-left, intro, results) ─────────── */
.logo-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
}

.logo-wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: var(--logo-size, 1rem);
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
}

.logo-energi { color: rgba(255, 255, 255, 0.85); }
.logo-fysikk { color: var(--sage); }

.logo-as {
  font-weight: 700;
  font-size: 0.34em;
  letter-spacing: 0.08em;
  vertical-align: 0.5em;
  margin-left: 0.35em;
  color: var(--gold);
}

.logo-rule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.logo-line {
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.8;
}

.logo-phi {
  font-family: var(--display);
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
  font-size: calc(var(--logo-size, 1rem) * 0.62);
  line-height: 1;
}

/* ── Sound button ───────────────────────────────────────────────── */
.sound-btn {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 1rem));
  right: 1rem;
  z-index: 200;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  transition: background var(--dur), color var(--dur), border-color var(--dur);
  padding: 0;
}

.sound-btn:hover { background: rgba(0,0,0,0.55); color: #fff; border-color: rgba(255,255,255,0.3); }
.sound-btn.sound-on { color: var(--electric); border-color: rgba(168,196,74,0.4); }

.sound-ico { width: 18px; height: 18px; display: none; }
.sound-ico.sound-ico-active { display: block; }

/* ── Scene stage (image) ────────────────────────────────────────── */
.scene-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  will-change: transform;
}

/* Ken Burns variants */
@keyframes kb-a {
  from { transform: scale(1.0) translate(0%, 0%); }
  to   { transform: scale(1.08) translate(-1.5%, -1%); }
}
@keyframes kb-b {
  from { transform: scale(1.0) translate(-0.5%, 0%); }
  to   { transform: scale(1.08) translate(1%, -1.5%); }
}
@keyframes kb-c {
  from { transform: scale(1.02) translate(0%, 0%); }
  to   { transform: scale(1.08) translate(-1%, 1%); }
}

.scene-img.kb-a { animation: kb-a 22s ease-in-out forwards; }
.scene-img.kb-b { animation: kb-b 22s ease-in-out forwards; }
.scene-img.kb-c { animation: kb-c 22s ease-in-out forwards; }

@media (prefers-reduced-motion: reduce) {
  .scene-img.kb-a,
  .scene-img.kb-b,
  .scene-img.kb-c { animation: none; }
}

/* Vignette overlay */
.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.45) 100%),
    linear-gradient(to bottom,
      rgba(0,0,0,0.55) 0%,
      rgba(0,0,0,0.1) 25%,
      rgba(0,0,0,0.1) 40%,
      rgba(0,0,0,0.6) 65%,
      rgba(0,0,0,0.9) 100%
    );
}

/* ── Scene overlay (content layer) ─────────────────────────────── */
.scene-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  padding-inline: clamp(1rem, 4vw, 3rem);
  text-align: center;
}

/* ── Header: clock + progress ───────────────────────────────────── */
.scene-header {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top, 1rem));
  left: max(8rem, calc(1rem + 140px)); /* leave room for home link */
  right: 56px; /* leave room for sound button */
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scene-clock {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--electric);
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(168,196,74,0.25);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
}

.scene-progress-dots {
  display: flex;
  gap: 5px;
  flex: 1;
}

.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s;
  flex-shrink: 0;
}

.progress-dot.done    { background: var(--sage); }
.progress-dot.current { background: var(--electric); }

.scene-step {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

/* ── Scene title ────────────────────────────────────────────────── */
.scene-title {
  font-family: var(--display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.6rem, 4.4vw, 2.5rem);
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 4px 24px rgba(0,0,0,0.75);
  margin-bottom: 0.6rem;
  max-width: min(94vw, 900px);
}

/* ── Scene text ─────────────────────────────────────────────────── */
.scene-text {
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(0.92rem, 1.9vw, 1.15rem);
  line-height: 1.7;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.95), 0 2px 14px rgba(0,0,0,0.8);
  max-width: min(94vw, 900px);
  margin-bottom: 1rem;
}

.scene-text p { margin-bottom: 0.4em; }
.scene-text p:last-child { margin-bottom: 0; }

/* ── Timer ──────────────────────────────────────────────────────── */
.timer-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  width: 100%;
  max-width: min(94vw, 780px);
}

.timer-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: var(--sage);
  border-radius: 2px;
  transform-origin: left;
  transition: width 0.9s linear, background 0.4s;
}

.timer-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-width: 2.2ch;
  text-align: right;
  transition: color 0.4s;
}

.timer-wrap[hidden] { display: none; }

/* Urgency states */
.timer-wrap.timer-warn  .timer-fill { background: var(--gold); }
.timer-wrap.timer-warn  .timer-num  { color: var(--gold); }

.timer-wrap.timer-crit  .timer-fill { background: #e04848; }
.timer-wrap.timer-crit  .timer-num  { color: #e04848; }

.timer-wrap.timer-urgent .timer-fill { background: #e04848; }
.timer-wrap.timer-urgent .timer-num  {
  color: #e04848;
  animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .timer-wrap.timer-urgent .timer-num { animation: none; }
}

/* ── Choices ────────────────────────────────────────────────────── */
.choices-list[hidden] { display: none; }

.choices-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  max-width: min(94vw, 780px);
}

.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(0.85rem, 1.6vw, 0.98rem);
  line-height: 1.45;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  min-height: 48px;
  position: relative;
}

.choice-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--sage);
  opacity: 0;
  transition: opacity var(--dur);
}

.choice-btn:hover,
.choice-btn:focus-visible {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.28);
  transform: translateX(2px);
  outline: none;
}

.choice-btn:hover::before,
.choice-btn:focus-visible::before { opacity: 1; }

.choice-btn.selected {
  background: rgba(168,196,74,0.1);
  border-color: rgba(168,196,74,0.4);
  color: #fff;
}

.choice-btn.selected::before {
  background: var(--electric);
  opacity: 1;
}

.choice-btn:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.choice-btn.selected:disabled { opacity: 1; }

/* ── Consequence (response card) ──────────────────────────────────
   Deliberately distinct from the choice buttons above: a raised,
   opaque card (not plain text over the image) so it reads clearly
   as "here is what happened", not a continuation of the question. */
.consequence {
  width: 100%;
  max-width: min(94vw, 780px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  background: rgba(15, 18, 9, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  animation: conFadeIn 0.3s var(--ease) both;
}

.consequence[hidden] { display: none; }

@keyframes conFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.con-kicker {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}

.con-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 0.35rem 0.9rem;
  width: fit-content;
}

.con-badge.badge-good    { background: rgba(143,168,94,0.2);  color: var(--sage);     border: 1px solid rgba(143,168,94,0.4); }
.con-badge.badge-neutral { background: rgba(196,146,58,0.15); color: var(--gold);     border: 1px solid rgba(196,146,58,0.3); }
.con-badge.badge-weak    { background: rgba(224,72,72,0.12);  color: #e07070;          border: 1px solid rgba(224,72,72,0.25); }
.con-badge.badge-bad     { background: rgba(224,72,72,0.18);  color: #ff7070;          border: 1px solid rgba(224,72,72,0.35); }

.con-text {
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(0.88rem, 1.7vw, 1.02rem);
  line-height: 1.65;
  color: rgba(255,255,255,0.9);
  max-width: 62ch;
}

.continue-btn {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: var(--electric);
  border: 1px solid rgba(168,196,74,0.4);
  border-radius: 4px;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur);
  margin-top: 0.25rem;
}

.continue-btn:hover,
.continue-btn:focus-visible {
  background: rgba(168,196,74,0.1);
  border-color: var(--electric);
  outline: none;
}

/* ── Results screen ─────────────────────────────────────────────── */
.results-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  z-index: 80;
}

.results-screen[hidden] { display: none; }

.results-inner {
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 2.5rem);
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Header */
.results-header { display: flex; flex-direction: column; gap: 0.5rem; }

.results-home-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 0.5rem;
  width: fit-content;
  --logo-size: 0.78rem;
  transition: opacity var(--dur);
}

.results-home-link:hover { opacity: 0.7; }

.results-kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}

.results-h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--text);
  line-height: 1.15;
}

.results-undertittel {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Score block */
.results-score-block {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.75rem 2rem;
}

.score-ring {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  flex-shrink: 0;
}

.score-num {
  font-family: var(--display);
  font-weight: 900;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--electric);
  letter-spacing: -0.03em;
}

.score-av {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.score-info { display: flex; flex-direction: column; gap: 0.5rem; }

.score-level {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.score-desc {
  font-family: var(--body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--soft);
}

/* Choice review */
.review-h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.review-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
  align-items: start;
}

.review-scene {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  grid-column: 1 / -1;
}

.review-valg {
  font-family: var(--body);
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--soft);
  line-height: 1.5;
}

.review-poeng {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  align-self: center;
}

.review-poeng.pos { color: var(--sage); }
.review-poeng.neg { color: #e07070; }
.review-poeng.nil { color: var(--muted); }

/* CTA + actions */
.results-cta-block {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--electric);
  color: var(--deep);
  border-radius: 50px;
  padding: 1rem 2.2rem;
  transition: background var(--dur), transform var(--dur);
}

.cta-btn:hover { background: #c5e04e; transform: translateY(-1px); }
.cta-btn:active { transform: translateY(0); }

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.restart-btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--electric);
  color: var(--deep);
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2rem;
  cursor: pointer;
  transition: background var(--dur), transform var(--dur);
}

.restart-btn:hover { background: #c5e04e; transform: translateY(-1px); }

.kurs-link, .back-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--sage);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color var(--dur), color var(--dur);
}

.kurs-link:hover { border-bottom-color: var(--sage); }
.back-link { color: var(--muted); }
.back-link:hover { color: var(--text); border-bottom-color: var(--muted); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .scene-text {
    font-size: 0.82rem;
  }

  .results-score-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }

  .score-num { font-size: 2.8rem; }

  .cta-btn { width: 100%; }
}

/* Ensure no body scroll bleeds through on any screen */
.loading-screen,
.error-screen,
.intro-scroll,
.mood-scroll,
.briefing-scroll,
.results-screen { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
