:root {
  color-scheme: dark;
  --ink: #eef7ff;
  --muted: #a9bdd4;
  --line: rgba(180, 221, 255, 0.34);
  --panel: rgba(8, 19, 31, 0.78);
  --panel-strong: rgba(7, 15, 25, 0.92);
  --blueprint: #0d3b66;
  --cyan: #63d2ff;
  --amber: #f7c948;
  --coral: #ff7a68;
  --mint: #6ee7b7;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #07131f;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.55;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: #07131f;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.screen--active {
  display: block;
  animation: screen-in 420ms ease forwards;
}

@keyframes screen-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.splash-screen {
  display: none;
  place-items: center;
  padding: 40px;
  background:
    linear-gradient(90deg, rgba(7, 19, 31, 0.28), rgba(7, 19, 31, 0.74)),
    url("../assets/images/backgrounds/splash.png") center / cover no-repeat;
}

.splash-screen.screen--active {
  display: grid;
}

.splash-screen__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 210, 255, 0.2), transparent 35%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.splash-screen__content {
  position: relative;
  width: min(720px, 100%);
  margin-right: auto;
}

.splash-screen h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.subtitle {
  max-width: 520px;
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.main-menu {
  display: grid;
  width: min(380px, 100%);
  gap: 14px;
}

.image-button {
  position: relative;
  min-height: 76px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(8, 19, 31, 0.72);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  isolation: isolate;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.image-button--large {
  min-height: 92px;
}

.image-button img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition:
    transform 260ms ease,
    filter 260ms ease;
}

.image-button span {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 28px;
  font-size: 1.05rem;
  font-weight: 850;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.image-button:hover,
.image-button:focus-visible {
  border-color: rgba(99, 210, 255, 0.86);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(99, 210, 255, 0.18);
  transform: translateY(-2px);
}

.image-button:hover img,
.image-button:focus-visible img {
  filter: saturate(1.12) brightness(1.08);
  transform: scale(1.035);
}

.character-screen {
  padding: 24px;
  overflow: auto;
  background:
    linear-gradient(rgba(7, 19, 31, 0.87), rgba(7, 19, 31, 0.92)),
    url("../assets/images/backgrounds/dark-lab.png") center / cover no-repeat;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto 18px;
}

.screen-header h2,
.ending-card h2,
.modal__header h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
}

.character-screen .screen-header h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.character-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.character-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.character-card {
  min-height: 420px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(8, 19, 31, 0.68);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.character-card:hover,
.character-card:focus-visible,
.character-card.is-selected {
  border-color: rgba(247, 201, 72, 0.86);
  background: rgba(13, 38, 58, 0.86);
  transform: translateY(-3px);
}

.character-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.character-card__body {
  padding: 16px;
}

.character-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.character-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.character-preview {
  position: sticky;
  top: 28px;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.character-preview__image-wrap {
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  aspect-ratio: 16 / 9;
}

.character-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.character-preview h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.character-preview p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.stat-list {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.stat-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.stat-list dt,
.stat-list dd {
  margin: 0;
}

.stat-list dt {
  color: var(--muted);
}

.scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07131f;
}

.scene__background,
.scene__wash,
.scene__character {
  position: absolute;
  inset: 0;
}

.scene__background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 360ms ease,
    transform 520ms ease;
}

.scene__wash {
  background:
    linear-gradient(180deg, rgba(7, 19, 31, 0.26), rgba(7, 19, 31, 0.72)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.46), transparent 45%, rgba(0, 0, 0, 0.42));
}

.scene__character {
  top: auto;
  left: 54%;
  width: min(38vw, 440px);
  height: min(76vh, 720px);
  object-fit: contain;
  object-position: bottom center;
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  transition:
    opacity 240ms ease,
    transform 360ms ease;
}

.hud {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.hud__stats,
.hud__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hud__stats span,
.hud-button,
.ghost-button,
.primary-button {
  border-radius: 7px;
}

.hud__stats span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(7, 15, 25, 0.72);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 760;
  backdrop-filter: blur(12px);
}

.hud-button,
.ghost-button {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 19, 31, 0.64);
  color: var(--ink);
  backdrop-filter: blur(12px);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.hud-button:hover,
.ghost-button:hover,
.hud-button:focus-visible,
.ghost-button:focus-visible {
  border-color: rgba(99, 210, 255, 0.72);
  background: rgba(19, 54, 79, 0.84);
  transform: translateY(-1px);
}

.primary-button {
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #f7c948, #ff7a68);
  color: #10131a;
  font-weight: 850;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  box-shadow: 0 14px 30px rgba(255, 122, 104, 0.28);
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.novel-panel {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.novel-panel__topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.novel-panel__topline strong {
  color: var(--cyan);
  font-size: 1rem;
}

.story-text {
  min-height: 78px;
  margin: 0 0 18px;
  color: #f4fbff;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.62;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.choice-button,
.quiz-option,
.note-card {
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  text-align: left;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.choice-button:hover,
.quiz-option:hover,
.note-card:hover,
.choice-button:focus-visible,
.quiz-option:focus-visible,
.note-card:focus-visible {
  border-color: rgba(110, 231, 183, 0.78);
  background: rgba(110, 231, 183, 0.12);
  transform: translateY(-1px);
}

.choice-button span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.interactive-panel {
  display: none;
}

.interactive-panel.is-active {
  display: block;
}

.timer-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  margin: 12px 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.timer-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--amber), var(--coral));
  transform-origin: left center;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.note-card {
  min-height: 72px;
  text-align: center;
}

.note-card.is-target {
  border-color: rgba(247, 201, 72, 0.88);
  background: rgba(247, 201, 72, 0.2);
}

.copy-progress {
  width: 100%;
  height: 18px;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.copy-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 120ms ease;
}

.teacher-state {
  color: var(--mint);
  font-weight: 850;
}

.teacher-state.is-looking {
  color: var(--coral);
}

.mini-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.minigame-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.primary-button--next {
  display: block;
  min-width: 148px;
  margin-left: auto;
}

.ending-screen {
  display: none;
  place-items: center;
  padding: 26px;
}

.ending-screen.screen--active {
  display: grid;
}

.ending-screen__background,
.ending-screen__shade {
  position: absolute;
  inset: 0;
}

.ending-screen__background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ending-screen__shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.2));
}

.ending-card {
  position: relative;
  width: min(620px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.ending-card p {
  color: var(--muted);
  line-height: 1.6;
}

.ending-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(860px, calc(100vw - 30px));
  max-height: min(760px, calc(100vh - 30px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #07131f;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal__header h2 {
  font-size: clamp(1.6rem, 4vw, 3rem);
}

.route-list,
.achievement-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-list li,
.achievement-card {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.route-list strong,
.achievement-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.route-list span,
.achievement-card span {
  color: var(--muted);
  line-height: 1.42;
}

.achievement-card.is-locked {
  opacity: 0.48;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 15, 25, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .app {
    min-height: 100vh;
    overflow: auto;
  }

  .character-layout {
    grid-template-columns: 1fr;
  }

  .character-list {
    grid-template-columns: 1fr;
  }

  .character-card {
    min-height: auto;
  }

  .character-card img {
    height: 300px;
  }

  .character-preview {
    position: static;
  }

  .hud {
    align-items: flex-start;
    flex-direction: column;
  }

  .scene__character {
    left: 70%;
    width: min(56vw, 360px);
    opacity: 0.78;
  }

  .novel-panel {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-height: 58vh;
    overflow: auto;
    padding: 16px;
  }

  .note-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .splash-screen,
  .character-screen {
    padding: 18px;
  }

  .screen-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .splash-screen h1 {
    font-size: 3rem;
  }

  .image-button span {
    padding: 0 18px;
    font-size: 0.95rem;
  }

  .hud__actions,
  .hud__stats {
    width: 100%;
  }

  .hud-button,
  .hud__stats span {
    flex: 1 1 auto;
    text-align: center;
  }

  .choice-list,
  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .story-text {
    min-height: 92px;
  }
}
/* ================================
   EXPERIMENTAL STYLE PATCH
   "Lower Austria Exam Horror"
   Paste at the end of your CSS file
================================ */

/* Stronger mood variables */
:root {
    --ink: #f3fbff;
    --muted: #9fb4c8;
    --line: rgba(119, 221, 255, 0.34);
    --panel: rgba(5, 13, 24, 0.78);
    --panel-strong: rgba(3, 8, 16, 0.92);

    --cyan: #66e7ff;
    --amber: #ffd166;
    --coral: #ff5f56;
    --mint: #7cffc4;

    --danger-glow: 0 0 18px rgba(255, 95, 86, 0.45);
    --cyan-glow: 0 0 22px rgba(102, 231, 255, 0.38);
    --school-green: #113f31;
}

/* Slight CRT / old school monitor feeling */
.app::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    background:
            linear-gradient(
                    rgba(255, 255, 255, 0.025) 50%,
                    rgba(0, 0, 0, 0.08) 50%
            );
    background-size: 100% 4px;
    mix-blend-mode: overlay;
    opacity: 0.42;
}

.app::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 49;
    pointer-events: none;
    background:
            radial-gradient(circle at 50% 45%, transparent 42%, rgba(0, 0, 0, 0.42) 100%);
}

/* Background feels more like a technical blueprint */
.scene {
    background:
            linear-gradient(rgba(7, 19, 31, 0.78), rgba(7, 19, 31, 0.95)),
            repeating-linear-gradient(
                    90deg,
                    rgba(99, 210, 255, 0.05) 0,
                    rgba(99, 210, 255, 0.05) 1px,
                    transparent 1px,
                    transparent 42px
            ),
            repeating-linear-gradient(
                    0deg,
                    rgba(99, 210, 255, 0.04) 0,
                    rgba(99, 210, 255, 0.04) 1px,
                    transparent 1px,
                    transparent 42px
            ),
            #07131f;
}

/* Splash: more dramatic title */
.splash-screen h1 {
    letter-spacing: -0.06em;
    text-shadow:
            0 0 12px rgba(99, 210, 255, 0.45),
            0 0 42px rgba(99, 210, 255, 0.22),
            4px 4px 0 rgba(255, 95, 86, 0.22);
}

.subtitle {
    color: #c2d7e8;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

/* Main buttons: more game-menu energy */
.image-button {
    border: 1px solid rgba(102, 231, 255, 0.24);
    background:
            linear-gradient(90deg, rgba(6, 20, 34, 0.92), rgba(6, 20, 34, 0.42)),
            rgba(8, 19, 31, 0.72);
    box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.34),
            inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.image-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
            linear-gradient(
                    120deg,
                    transparent 0%,
                    rgba(102, 231, 255, 0.18) 45%,
                    transparent 60%
            );
    transform: translateX(-120%);
    transition: transform 420ms ease;
}

.image-button:hover::before,
.image-button:focus-visible::before {
    transform: translateX(120%);
}

.image-button span {
    position: relative;
    z-index: 2;
    letter-spacing: 0.04em;
}

.image-button:hover,
.image-button:focus-visible {
    border-color: rgba(102, 255, 237, 0.92);
    box-shadow:
            0 18px 42px rgba(0, 0, 0, 0.38),
            0 0 0 3px rgba(102, 231, 255, 0.16),
            var(--cyan-glow);
}

/* HUD: like exam stats on a security monitor */
.hud__stats span {
    border-color: rgba(102, 231, 255, 0.28);
    background:
            linear-gradient(180deg, rgba(8, 27, 43, 0.88), rgba(4, 10, 18, 0.82));
    box-shadow:
            inset 0 0 18px rgba(102, 231, 255, 0.06),
            0 8px 22px rgba(0, 0, 0, 0.28);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Novel dialogue panel: more premium visual novel */
.novel-panel {
    border-color: rgba(102, 231, 255, 0.36);
    background:
            linear-gradient(180deg, rgba(6, 16, 28, 0.96), rgba(3, 8, 15, 0.94)),
            radial-gradient(circle at top left, rgba(102, 231, 255, 0.12), transparent 32%);
    box-shadow:
            0 22px 60px rgba(0, 0, 0, 0.58),
            0 0 0 1px rgba(255, 255, 255, 0.04),
            var(--cyan-glow);
}

.novel-panel::before {
    content: "HTL SECURITY TERMINAL // EXAM MODE";
    position: absolute;
    top: -13px;
    left: 18px;
    padding: 4px 9px;
    border: 1px solid rgba(102, 231, 255, 0.34);
    border-radius: 999px;
    background: rgba(3, 8, 15, 0.96);
    color: var(--cyan);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.novel-panel__topline strong {
    color: var(--amber);
    text-shadow: 0 0 14px rgba(255, 209, 102, 0.36);
}

.story-text {
    color: #f8fcff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

/* Choices: suspicious polite buttons */
.choice-button,
.quiz-option,
.note-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.14);
    background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
}

.choice-button::after,
.quiz-option::after,
.note-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.choice-button:hover,
.quiz-option:hover,
.note-card:hover,
.choice-button:focus-visible,
.quiz-option:focus-visible,
.note-card:focus-visible {
    border-color: rgba(124, 255, 196, 0.88);
    background:
            linear-gradient(180deg, rgba(124, 255, 196, 0.17), rgba(124, 255, 196, 0.07));
    box-shadow: 0 0 22px rgba(124, 255, 196, 0.18);
}

/* Primary button: dangerous exam action */
.primary-button {
    background:
            linear-gradient(135deg, #ffd166 0%, #ff8b61 45%, #ff5f56 100%);
    box-shadow:
            0 14px 34px rgba(255, 95, 86, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.34);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.primary-button:hover,
.primary-button:focus-visible {
    box-shadow:
            0 18px 42px rgba(255, 95, 86, 0.34),
            var(--danger-glow);
}

/* Teacher character: stronger presence */
.scene__character {
    filter:
            drop-shadow(0 24px 34px rgba(0, 0, 0, 0.62))
            drop-shadow(0 0 18px rgba(102, 231, 255, 0.16));
}

.scene__character:hover {
    transform: translateX(-50%) scale(1.01);
}

/* Quiz timer: panic energy */
.timer-bar {
    height: 12px;
    border: 1px solid rgba(255, 95, 86, 0.24);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.42);
}

.timer-bar span {
    background:
            linear-gradient(90deg, var(--mint), var(--amber), var(--coral));
    box-shadow: 0 0 18px rgba(255, 95, 86, 0.34);
}

/* Teacher state: make danger obvious */
.teacher-state {
    color: var(--mint);
    text-shadow: 0 0 14px rgba(124, 255, 196, 0.36);
}

.teacher-state.is-looking {
    color: var(--coral);
    text-shadow: 0 0 14px rgba(255, 95, 86, 0.55);
    animation: danger-pulse 780ms ease-in-out infinite alternate;
}

@keyframes danger-pulse {
    from {
        opacity: 0.72;
        transform: scale(1);
    }

    to {
        opacity: 1;
        transform: scale(1.04);
    }
}

/* Character selection: like choosing your exam victim */
.character-card {
    border-color: rgba(102, 231, 255, 0.16);
    background:
            linear-gradient(180deg, rgba(12, 31, 49, 0.74), rgba(4, 11, 20, 0.92));
}

.character-card img {
    filter: saturate(0.9) contrast(1.04);
    transition:
            transform 240ms ease,
            filter 240ms ease;
}

.character-card:hover img,
.character-card:focus-visible img,
.character-card.is-selected img {
    filter: saturate(1.15) contrast(1.08);
    transform: scale(1.035);
}

.character-card:hover,
.character-card:focus-visible,
.character-card.is-selected {
    border-color: rgba(255, 209, 102, 0.92);
    box-shadow:
            0 22px 55px rgba(0, 0, 0, 0.5),
            0 0 24px rgba(255, 209, 102, 0.18);
}

/* Preview card as school ID file */
.character-preview {
    background:
            linear-gradient(180deg, rgba(8, 24, 38, 0.92), rgba(3, 9, 17, 0.94));
    box-shadow:
            0 18px 50px rgba(0, 0, 0, 0.48),
            var(--cyan-glow);
}

.character-preview::before {
    content: "STUDENT FILE";
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 8px;
    border: 1px solid rgba(102, 231, 255, 0.32);
    border-radius: 999px;
    color: var(--cyan);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.09em;
}

/* Modal: more like secret route database */
.modal__panel {
    background:
            linear-gradient(180deg, rgba(5, 15, 26, 0.98), rgba(2, 6, 12, 0.98));
    border-color: rgba(102, 231, 255, 0.32);
    box-shadow:
            0 24px 80px rgba(0, 0, 0, 0.7),
            var(--cyan-glow);
}

/* Toast: achievement popup */
.toast {
    border-color: rgba(255, 209, 102, 0.38);
    background:
            linear-gradient(180deg, rgba(25, 18, 5, 0.96), rgba(7, 15, 25, 0.96));
    box-shadow:
            0 18px 44px rgba(0, 0, 0, 0.5),
            0 0 22px rgba(255, 209, 102, 0.2);
}

/* Ending screen: cinematic */
.ending-card {
    background:
            linear-gradient(180deg, rgba(6, 17, 29, 0.96), rgba(3, 8, 15, 0.96));
    box-shadow:
            0 26px 80px rgba(0, 0, 0, 0.64),
            0 0 34px rgba(102, 231, 255, 0.16);
}

.ending-card h2 {
    text-shadow:
            0 0 18px rgba(102, 231, 255, 0.34),
            3px 3px 0 rgba(255, 95, 86, 0.16);
}

/* Small glitch animation for important headers */
.screen-header h2,
.ending-card h2,
.modal__header h2 {
    position: relative;
}

.screen-header h2::after,
.ending-card h2::after,
.modal__header h2::after {
    content: attr(data-glitch);
    position: absolute;
    left: 2px;
    top: 2px;
    color: rgba(255, 95, 86, 0.34);
    pointer-events: none;
}

/* Mobile: keep it readable */
@media (max-width: 560px) {
    .novel-panel::before {
        display: none;
    }

    .app::before {
        opacity: 0.28;
    }

    .scene__character {
        opacity: 0.42;
    }

    .novel-panel {
        min-height: 240px;
    }
}
/* ================================
   FIX: Better image display
   Photos no longer get brutally cropped
================================ */

/* Character cards: show full person/photo */
.character-card {
    min-height: auto;
}

.character-card img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    object-position: center;
    padding: 10px;
    background:
            radial-gradient(circle at center, rgba(99, 210, 255, 0.12), transparent 55%),
            rgba(3, 8, 15, 0.75);
}

/* Character preview: full image, not cropped */
.character-preview__image-wrap {
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    background:
            radial-gradient(circle at center, rgba(247, 201, 72, 0.12), transparent 58%),
            rgba(0, 0, 0, 0.24);
}

.character-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 10px;
}

/* In-game sprite: show full character */
.scene__character {
    top: auto;
    bottom: 0;
    left: 58%;
    width: min(42vw, 480px);
    height: min(78vh, 720px);
    object-fit: contain;
    object-position: bottom center;
}

/* Backgrounds should still cover the whole screen */
.scene__background,
.ending-screen__background {
    object-fit: cover;
    object-position: center;
}

/* Menu button images can stay cinematic */
.image-button img {
    object-fit: cover;
    object-position: center;
}

/* Mobile improvements */
@media (max-width: 920px) {
    .character-card img {
        height: 360px;
    }

    .scene__character {
        left: 68%;
        width: min(62vw, 380px);
        height: min(70vh, 620px);
    }
}

@media (max-width: 560px) {
    .character-card img {
        height: 300px;
    }

    .character-preview__image-wrap {
        aspect-ratio: 3 / 4;
    }

    .scene__character {
        left: 68%;
        width: min(74vw, 340px);
        height: min(62vh, 520px);
        opacity: 0.5;
    }
}

/* ================================
   FINAL POLISH PASS
   Neon subnet buttons + cleaner cyber-horror chrome
================================ */

:root {
    --deep-space: #030711;
    --button-cyan-rgb: 102 231 255;
    --button-amber-rgb: 255 209 102;
    --button-coral-rgb: 255 95 86;
}

.app {
    background:
            radial-gradient(circle at 18% 12%, rgba(102, 231, 255, 0.12), transparent 28%),
            radial-gradient(circle at 78% 18%, rgba(255, 95, 86, 0.1), transparent 24%),
            var(--deep-space);
}

.splash-screen {
    background:
            linear-gradient(90deg, rgba(3, 7, 17, 0.18), rgba(3, 7, 17, 0.82)),
            url("../assets/images/backgrounds/splash.png") center / cover no-repeat;
}

.splash-screen__shade {
    background:
            radial-gradient(circle at 18% 18%, rgba(102, 231, 255, 0.24), transparent 30%),
            radial-gradient(circle at 44% 62%, rgba(255, 209, 102, 0.08), transparent 34%),
            linear-gradient(rgba(102, 231, 255, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(102, 231, 255, 0.035) 1px, transparent 1px),
            linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64));
    background-size:
            auto,
            auto,
            44px 44px,
            44px 44px,
            auto;
}

.splash-screen__content {
    padding-left: 18px;
}

.splash-screen__content::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 6px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, var(--cyan), var(--amber), transparent);
    box-shadow: 0 0 22px rgba(102, 231, 255, 0.48);
}

.splash-screen h1 {
    letter-spacing: 0;
    text-shadow:
            0 0 14px rgba(102, 231, 255, 0.5),
            0 0 48px rgba(102, 231, 255, 0.24),
            4px 4px 0 rgba(255, 95, 86, 0.18);
}

.subtitle {
    color: #d4e8f7;
}

.main-menu {
    gap: 12px;
    padding: 8px;
    border: 1px solid rgba(102, 231, 255, 0.14);
    border-radius: 10px;
    background:
            linear-gradient(rgba(102, 231, 255, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(102, 231, 255, 0.035) 1px, transparent 1px),
            rgba(3, 8, 15, 0.28);
    background-size: 18px 18px;
    box-shadow:
            inset 0 0 30px rgba(102, 231, 255, 0.045),
            0 22px 55px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(8px);
}

.image-button {
    --button-accent: var(--cyan);
    --button-accent-rgb: var(--button-cyan-rgb);
    min-height: 78px;
    border-color: rgb(var(--button-accent-rgb) / 0.34);
    background:
            linear-gradient(90deg, rgb(var(--button-accent-rgb) / 0.16), transparent 52%),
            rgba(3, 8, 15, 0.8);
    box-shadow:
            0 14px 34px rgba(0, 0, 0, 0.42),
            inset 0 0 0 1px rgba(255, 255, 255, 0.06),
            inset 0 0 28px rgb(var(--button-accent-rgb) / 0.08);
}

.image-button:nth-child(2) {
    --button-accent: var(--amber);
    --button-accent-rgb: var(--button-amber-rgb);
}

.image-button:nth-child(3) {
    --button-accent: var(--coral);
    --button-accent-rgb: var(--button-coral-rgb);
}

.image-button::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 0;
    background:
            linear-gradient(rgb(var(--button-accent-rgb) / 0.24) 1px, transparent 1px),
            linear-gradient(90deg, rgb(var(--button-accent-rgb) / 0.24) 1px, transparent 1px),
            linear-gradient(90deg, rgb(var(--button-accent-rgb) / 0.22), transparent 58%);
    background-size:
            16px 16px,
            16px 16px,
            auto;
    opacity: 0.34;
    mask-image: linear-gradient(90deg, #000 0%, #000 54%, transparent 92%);
    pointer-events: none;
    transition:
            opacity 180ms ease,
            transform 220ms ease;
}

.image-button::before {
    background:
            linear-gradient(
                    120deg,
                    transparent 0%,
                    rgb(var(--button-accent-rgb) / 0.28) 44%,
                    transparent 62%
            );
}

.image-button img {
    opacity: 0.72;
    filter: saturate(1.05) contrast(1.08) brightness(0.88);
}

.image-button span {
    letter-spacing: 0;
    padding-left: 24px;
}

.image-button span::before {
    content: "";
    width: 10px;
    height: 34px;
    margin-right: 14px;
    border-radius: 999px;
    background: var(--button-accent);
    box-shadow: 0 0 18px rgb(var(--button-accent-rgb) / 0.72);
}

.image-button:hover,
.image-button:focus-visible {
    border-color: rgb(var(--button-accent-rgb) / 0.9);
    box-shadow:
            0 20px 48px rgba(0, 0, 0, 0.46),
            0 0 0 3px rgb(var(--button-accent-rgb) / 0.14),
            0 0 32px rgb(var(--button-accent-rgb) / 0.3);
}

.image-button:hover::after,
.image-button:focus-visible::after {
    opacity: 0.64;
    transform: translateX(8px);
}

.image-button:hover img,
.image-button:focus-visible img {
    filter: saturate(1.22) contrast(1.08) brightness(1);
}

.hud {
    padding: 18px;
}

.hud__stats span,
.hud-button,
.ghost-button {
    border-color: rgba(102, 231, 255, 0.26);
    box-shadow:
            inset 0 0 18px rgba(102, 231, 255, 0.045),
            0 10px 28px rgba(0, 0, 0, 0.26);
    letter-spacing: 0;
}

.hud-button,
.ghost-button {
    background:
            linear-gradient(180deg, rgba(12, 31, 49, 0.76), rgba(3, 8, 15, 0.74));
}

.primary-button {
    letter-spacing: 0;
}

.novel-panel::after,
.character-preview::after,
.modal__panel::after,
.ending-card::after {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(102, 231, 255, 0.08);
    border-radius: 6px;
    pointer-events: none;
}

.novel-panel::before,
.character-preview::before {
    letter-spacing: 0;
}

.novel-panel {
    background:
            linear-gradient(rgba(102, 231, 255, 0.04) 1px, transparent 1px),
            linear-gradient(90deg, rgba(102, 231, 255, 0.035) 1px, transparent 1px),
            linear-gradient(180deg, rgba(6, 16, 28, 0.97), rgba(3, 8, 15, 0.94));
    background-size: 26px 26px, 26px 26px, auto;
}

.choice-button,
.quiz-option,
.note-card {
    background:
            linear-gradient(90deg, rgba(102, 231, 255, 0.08), transparent 44%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.032));
    box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.035),
            0 8px 24px rgba(0, 0, 0, 0.18);
}

.choice-button span {
    color: #b8cadb;
}

.quiz-option:hover,
.choice-button:hover,
.note-card:hover,
.quiz-option:focus-visible,
.choice-button:focus-visible,
.note-card:focus-visible {
    background:
            linear-gradient(90deg, rgba(124, 255, 196, 0.18), transparent 58%),
            linear-gradient(180deg, rgba(124, 255, 196, 0.12), rgba(124, 255, 196, 0.045));
}

.timer-bar,
.copy-progress {
    background:
            linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
            rgba(0, 0, 0, 0.3);
    background-size: 14px 14px;
}

.character-screen {
    background:
            linear-gradient(rgba(3, 7, 17, 0.86), rgba(3, 7, 17, 0.94)),
            linear-gradient(rgba(102, 231, 255, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(102, 231, 255, 0.03) 1px, transparent 1px),
            url("../assets/images/backgrounds/dark-lab.png") center / cover no-repeat;
    background-size:
            auto,
            44px 44px,
            44px 44px,
            cover;
}

.character-card {
    position: relative;
    box-shadow:
            0 22px 56px rgba(0, 0, 0, 0.42),
            inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.character-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
            linear-gradient(135deg, rgba(102, 231, 255, 0.12), transparent 36%),
            linear-gradient(315deg, rgba(255, 209, 102, 0.1), transparent 30%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.character-card:hover::after,
.character-card:focus-visible::after,
.character-card.is-selected::after {
    opacity: 1;
}

.route-list li,
.achievement-card {
    background:
            linear-gradient(90deg, rgba(102, 231, 255, 0.08), transparent 46%),
            rgba(255, 255, 255, 0.055);
}

@media (max-width: 560px) {
    .splash-screen__content {
        padding-left: 12px;
    }

    .main-menu {
        padding: 6px;
    }

    .image-button span::before {
        width: 8px;
        height: 28px;
        margin-right: 10px;
    }

    .hud {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .screen--active,
    .teacher-state.is-looking {
        animation: none;
    }

    .image-button,
    .image-button img,
    .image-button::before,
    .image-button::after,
    .character-card,
    .character-card img,
    .choice-button,
    .quiz-option,
    .note-card,
    .primary-button {
        transition: none;
    }
}
