:root {
  --navy-950: #031326;
  --navy-900: #051b33;
  --navy-850: #082540;
  --navy-800: #0b3152;
  --navy-700: #10476f;
  --coral: #ff4d43;
  --orange: #ff7a1a;
  --orange-2: #ffad2f;
  --yellow: #ffd15a;
  --cyan: #12a7c9;
  --cyan-2: #42c4e6;
  --blue: #2f80ed;
  --green: #67c95f;
  --green-2: #2ca86f;
  --purple: #7b5bd6;
  --red: #ff5365;
  --white: #f8fbff;
  --white-soft: #e8f1fb;
  --muted: #a9bdd3;
  --ink: #07192e;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
  --card-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  --font-sans: Poppins, "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: calc(24px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));

  display: flex;
  justify-content: center;
  align-items: center;

  background:
    linear-gradient(180deg, rgba(3, 19, 38, 0.58), rgba(3, 19, 38, 0.98)),
    linear-gradient(120deg, rgba(18, 167, 201, 0.12), transparent 38%),
    linear-gradient(235deg, rgba(255, 122, 26, 0.12), transparent 36%),
    var(--navy-950);
  color: var(--white);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  pointer-events: none;

  background:
    linear-gradient(90deg, transparent, rgba(66, 196, 230, 0.28), transparent) 50% 122px / min(760px, 90vw) 1px no-repeat,
    linear-gradient(var(--navy-800), var(--navy-800)) 11% 96px / 18px 44px no-repeat,
    linear-gradient(var(--navy-800), var(--navy-800)) 17% 72px / 30px 68px no-repeat,
    linear-gradient(var(--navy-700), var(--navy-700)) 25% 58px / 22px 82px no-repeat,
    linear-gradient(var(--navy-800), var(--navy-800)) 34% 38px / 34px 102px no-repeat,
    linear-gradient(var(--navy-700), var(--navy-700)) 48% 18px / 26px 122px no-repeat,
    linear-gradient(var(--navy-800), var(--navy-800)) 61% 56px / 31px 84px no-repeat,
    linear-gradient(var(--navy-700), var(--navy-700)) 72% 80px / 22px 60px no-repeat,
    linear-gradient(var(--navy-800), var(--navy-800)) 84% 66px / 34px 74px no-repeat,
    linear-gradient(180deg, transparent, rgba(3, 19, 38, 0.92));
  opacity: 0.62;
}

.game-container {
  position: relative;
  z-index: 1;

  width: min(100%, 560px);
  padding: clamp(24px, 4vw, 34px);
  overflow: hidden;

  background:
    linear-gradient(180deg, rgba(5, 27, 51, 0.96), rgba(3, 19, 38, 0.98)),
    var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);

  text-align: center;
}

.brand-heading,
.screen-brand {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-heading {
  line-height: 1;
}

.brand-heading-compact {
  line-height: 1;
}

.screen-brand {
  margin-bottom: 10px;
  line-height: 1;
}

.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.34));
}

.brand-logo-main {
  width: min(340px, 78vw);
  margin: 0 auto;
}

.brand-logo-screen {
  width: min(190px, 54vw);
  margin: 0 auto;
}

.brand-logo-compact {
  width: min(210px, 50vw);
  margin: 0 auto;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.36);
}

.brand-accent {
  color: var(--coral);
}

.brand-rest {
  color: var(--white);
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: clamp(32px, 7vw, 48px);
  font-weight: 800;
  line-height: 1.03;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.32);
}

h2 {
  margin: 0;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: clamp(21px, 5vw, 28px);
  font-weight: 700;
  line-height: 1.18;
}

.start-text {
  max-width: 390px;
  margin: 18px auto 28px;
  color: var(--white-soft);
  font-size: 17px;
  line-height: 1.45;
}

.menu-screen {
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;

  background:
    linear-gradient(180deg, rgba(3, 19, 38, 0.62), rgba(3, 19, 38, 0.96)),
    linear-gradient(90deg, rgba(3, 19, 38, 0.8), rgba(8, 37, 64, 0.46), rgba(3, 19, 38, 0.86)),
    url("assets/backgrounds/skyline-background.png"),
    var(--navy-900);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.menu-screen::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 28px;
  height: 38px;
  pointer-events: none;

  background:
    linear-gradient(90deg, transparent, rgba(66, 196, 230, 0.45), transparent) 0 31px / 100% 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 7% 19px / 9px 13px no-repeat,
    linear-gradient(var(--cyan-2), var(--cyan-2)) 17% 9px / 12px 23px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 31% 14px / 8px 18px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 46% 0 / 13px 32px no-repeat,
    linear-gradient(var(--cyan-2), var(--cyan-2)) 61% 16px / 14px 16px no-repeat,
    linear-gradient(var(--orange-2), var(--orange-2)) 78% 11px / 9px 21px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 91% 20px / 12px 12px no-repeat;
  opacity: 0.42;
}

#game-screen,
#challenge-screen,
#herb-game-screen,
#district-game-screen,
#bridge-game-screen {
  background:
    linear-gradient(180deg, rgba(5, 27, 51, 0.94), rgba(3, 19, 38, 0.98)),
    linear-gradient(90deg, rgba(18, 167, 201, 0.08), transparent 40%, rgba(255, 122, 26, 0.08)),
    url("assets/backgrounds/skyline-background.png"),
    var(--navy-900);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

#herb-game-screen {
  background:
    linear-gradient(180deg, rgba(5, 27, 51, 0.94), rgba(3, 19, 38, 0.98)),
    linear-gradient(90deg, rgba(103, 201, 95, 0.12), transparent 45%, rgba(18, 167, 201, 0.08)),
    url("assets/backgrounds/skyline-background.png"),
    var(--navy-900);
}

#district-game-screen {
  background:
    linear-gradient(180deg, rgba(5, 27, 51, 0.94), rgba(3, 19, 38, 0.98)),
    linear-gradient(90deg, rgba(255, 122, 26, 0.15), transparent 46%, rgba(255, 209, 90, 0.08)),
    url("assets/backgrounds/skyline-background.png"),
    var(--navy-900);
}

#bridge-game-screen {
  background:
    linear-gradient(180deg, rgba(5, 27, 51, 0.94), rgba(3, 19, 38, 0.98)),
    linear-gradient(90deg, rgba(18, 167, 201, 0.16), transparent 46%, rgba(255, 122, 26, 0.08)),
    url("assets/backgrounds/skyline-background.png"),
    var(--navy-900);
}

.status-bar {
  width: 100%;
  margin: 18px auto 22px;
  color: var(--white);
}

#progress,
#bridge-progress {
  display: grid;
  grid-template-columns: 1fr 76px;
  align-items: start;
  gap: 16px;
}

.status-progress {
  min-width: 0;
  display: grid;
  gap: 10px;
}

#progress-count,
#herb-progress-count,
#district-recall-progress-count,
#bridge-progress-count {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.progress-track {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(232, 241, 251, 0.2);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.12);
}

#progress-fill,
#herb-progress-fill,
#district-recall-progress-fill,
#bridge-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--orange), var(--yellow));
  transition: width 0.25s ease;
}

#herb-progress-fill {
  background: linear-gradient(90deg, var(--green-2), var(--green), var(--cyan-2));
}

#district-recall-progress-fill {
  background: linear-gradient(90deg, var(--coral), var(--orange), var(--yellow));
}

#bridge-progress-fill {
  background: linear-gradient(90deg, var(--cyan), var(--cyan-2), var(--orange-2));
}

.score-status {
  min-width: 66px;
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 19, 38, 0.48);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.score-status strong {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

#progress.is-learn,
#bridge-progress.is-learn {
  grid-template-columns: minmax(180px, 340px);
  justify-content: center;
}

.image-container {
  width: 100%;
  height: clamp(320px, 52vh, 470px);
  margin-bottom: 18px;

  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(217, 232, 245, 0.95));
  box-shadow: var(--card-shadow);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.image-container.correct-answer {
  border-color: rgba(103, 201, 95, 0.96);
  box-shadow:
    var(--card-shadow),
    0 0 0 5px rgba(103, 201, 95, 0.32);
}

.image-container.wrong-answer {
  border-color: rgba(255, 83, 101, 0.96);
  box-shadow:
    var(--card-shadow),
    0 0 0 5px rgba(255, 83, 101, 0.28);
}

#building-image,
#herb-image,
#bridge-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#learning-name,
#herb-learning-name,
#bridge-learning-name {
  margin: 4px 0 8px;
  color: var(--white);
  font-size: clamp(27px, 7vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.36);
}

.bridge-learn-map-toggle {
  margin-top: 10px;
  border: 1px solid rgba(66, 196, 230, 0.42);
  background: linear-gradient(180deg, var(--cyan-2), var(--blue));
  box-shadow: 0 14px 28px rgba(18, 167, 201, 0.24);
}

.bridge-learn-map-toggle[aria-expanded="true"] {
  border-color: rgba(255, 173, 47, 0.44);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-850));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.bridge-learn-map-region {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    grid-template-rows 0.25s cubic-bezier(0.22, 0.72, 0.22, 1),
    margin-top 0.25s cubic-bezier(0.22, 0.72, 0.22, 1),
    opacity 0.2s ease,
    transform 0.25s cubic-bezier(0.22, 0.72, 0.22, 1),
    visibility 0s linear 0.25s;
}

.bridge-learn-map-region.is-open {
  grid-template-rows: 1fr;
  margin-top: 12px;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

.bridge-learn-map-region-inner {
  min-height: 0;
  overflow: hidden;
}

.bridge-map-container.bridge-learn-map-container {
  margin-bottom: 0;
  border-color: rgba(255, 173, 47, 0.34);
}

.bridge-learn-map-object {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1026 / 528;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  border: 0;
  border-radius: 18px;
  background: var(--navy-950);
  opacity: 1;
  transition: opacity 0.15s ease;
}

.bridge-learn-map-object.is-loading {
  opacity: 0;
  transition: none;
}

#building-height {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 22px;
  padding: 9px 15px;

  border: 1px solid rgba(66, 196, 230, 0.36);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.58);
  color: var(--white-soft);

  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.active-height-filter {
  width: fit-content;
  max-width: 100%;
  margin: -10px auto 20px;
  padding: 7px 12px;

  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.42);
  color: var(--muted);

  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

#quiz-controls,
#bridge-quiz-view,
#bridge-map-view {
  margin-top: 2px;
}

#quiz-controls h2,
#image-choice-controls h2,
#herb-recall-view h2,
#district-overview-view h2,
#district-recall-view h2,
#bridge-quiz-view h2,
#bridge-map-view h2 {
  margin-bottom: 15px;
  color: var(--white);
  font-size: clamp(20px, 4.8vw, 25px);
  font-weight: 750;
  line-height: 1.18;
}

#answer-input,
#herb-answer-input,
#district-answer-input,
#bridge-answer-input,
#bridge-map-answer-input {
  width: 100%;
  min-height: 52px;
  margin: 0 0 12px;
  padding: 15px 16px;

  border: 1px solid rgba(232, 241, 251, 0.24);
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.96);
  color: var(--ink);

  font: inherit;
  font-size: 16px;
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(7, 25, 46, 0.08);
}

#answer-input::placeholder,
#herb-answer-input::placeholder,
#district-answer-input::placeholder,
#bridge-answer-input::placeholder,
#bridge-map-answer-input::placeholder {
  color: #6f8195;
}

#answer-input:focus,
#herb-answer-input:focus,
#district-answer-input:focus,
#bridge-answer-input:focus,
#bridge-map-answer-input:focus {
  border-color: var(--orange);
  box-shadow:
    0 0 0 4px rgba(255, 122, 26, 0.2),
    inset 0 1px 2px rgba(7, 25, 46, 0.08);
  outline: none;
}

#herb-answer-input:focus {
  border-color: var(--green);
  box-shadow:
    0 0 0 4px rgba(103, 201, 95, 0.2),
    inset 0 1px 2px rgba(7, 25, 46, 0.08);
}

#district-answer-input:focus {
  border-color: var(--orange-2);
  box-shadow:
    0 0 0 4px rgba(255, 122, 26, 0.22),
    inset 0 1px 2px rgba(7, 25, 46, 0.08);
}

#bridge-answer-input:focus,
#bridge-map-answer-input:focus {
  border-color: var(--cyan-2);
  box-shadow:
    0 0 0 4px rgba(66, 196, 230, 0.2),
    inset 0 1px 2px rgba(7, 25, 46, 0.08);
}

button {
  width: 100%;
  min-height: 52px;
  padding: 15px 18px;

  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--coral), var(--orange));
  color: var(--white);

  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;

  cursor: pointer;
  box-shadow: 0 14px 28px rgba(255, 77, 67, 0.22);

  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

button:focus-visible {
  outline: 3px solid rgba(255, 209, 90, 0.78);
  outline-offset: 3px;
}

button:disabled {
  cursor: default;
}

button:disabled:active {
  transform: none;
}

#herb-check-button,
#herb-restart-button {
  background: linear-gradient(180deg, var(--green), var(--green-2));
  box-shadow: 0 14px 28px rgba(44, 168, 111, 0.24);
}

#district-check-button,
#district-restart-button {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  box-shadow: 0 14px 28px rgba(255, 122, 26, 0.24);
}

#bridge-check-button {
  background: linear-gradient(180deg, var(--cyan-2), var(--blue));
  box-shadow: 0 14px 28px rgba(18, 167, 201, 0.24);
}

#bridge-map-check-button {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  box-shadow: 0 14px 28px rgba(255, 122, 26, 0.24);
}

#next-button,
#previous-button,
#herb-next-button,
#herb-previous-button,
#bridge-next-button,
#bridge-previous-button,
#bridge-quiz-next-button,
#bridge-map-next-button {
  background: linear-gradient(180deg, var(--navy-700), var(--navy-850));
  border: 1px solid rgba(66, 196, 230, 0.24);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

#bridge-quiz-next-button,
#bridge-map-next-button {
  margin-top: 14px;
}

.learn-navigation {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.learn-navigation button {
  margin-top: 0;
}

#previous-button.hidden + #next-button {
  grid-column: 1 / -1;
}

#learn-hint,
#herb-learn-hint,
#bridge-learn-hint {
  width: fit-content;
  max-width: 100%;
  margin: 10px auto 0;
  padding: 8px 13px;

  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.52);
  color: var(--muted);

  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.menu-button {
  margin-top: 26px;
  background: rgba(3, 19, 38, 0.32);
  color: var(--white-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}

#image-choice-controls {
  margin-top: 4px;
}

#image-choice-building-name {
  display: inline-block;
  margin-top: 5px;
  color: var(--orange-2);
  font-size: clamp(28px, 6.6vw, 39px);
  font-weight: 800;
  line-height: 1.04;
}

.image-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.image-choice-option {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 0;
  aspect-ratio: 1 / 1.06;
  overflow: hidden;

  border: 2px solid rgba(232, 241, 251, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(217, 232, 245, 0.96));
  box-shadow: var(--card-shadow);
}

.image-choice-option img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
}

.image-choice-option.is-correct {
  border-color: rgba(103, 201, 95, 0.98);
  outline: 4px solid rgba(103, 201, 95, 0.42);
  box-shadow:
    var(--card-shadow),
    0 0 0 8px rgba(103, 201, 95, 0.14);
}

.image-choice-option.is-wrong {
  border-color: rgba(255, 83, 101, 0.98);
  outline: 4px solid rgba(255, 83, 101, 0.36);
  box-shadow:
    var(--card-shadow),
    0 0 0 8px rgba(255, 83, 101, 0.13);
}

#result,
#image-choice-feedback,
#herb-recall-feedback,
#district-recall-feedback,
#bridge-quiz-feedback,
#bridge-map-feedback {
  min-height: 0;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

#result:not(:empty),
#image-choice-feedback:not(:empty),
#herb-recall-feedback:not(:empty),
#district-recall-feedback:not(:empty),
#bridge-quiz-feedback:not(:empty),
#bridge-map-feedback:not(:empty) {
  padding: 12px 14px;
  border-radius: 16px;
}

.correct {
  border: 1px solid rgba(103, 201, 95, 0.36);
  background: rgba(103, 201, 95, 0.13);
  color: #b7ffb0;
}

.wrong {
  border: 1px solid rgba(255, 83, 101, 0.36);
  background: rgba(255, 83, 101, 0.13);
  color: #ffbdc5;
}

.notice {
  border: 1px solid rgba(66, 196, 230, 0.3);
  background: rgba(66, 196, 230, 0.12);
  color: #c9f4ff;
}

.bridge-map-container {
  width: 100%;
  margin: 0 0 16px;
  padding: 10px;
  overflow: hidden;

  border: 1px solid rgba(66, 196, 230, 0.28);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(3, 19, 38, 0.76), rgba(8, 37, 64, 0.62));
  box-shadow: var(--card-shadow);
}

.bridge-map-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(360px, 48vh);
  border-radius: 18px;
}

.bridge-map-svg .map-background {
  fill: url(#bridgeMapBackgroundGradient);
}

.bridge-map-svg .city-glow {
  fill: url(#bridgeMapCityGlow);
}

.bridge-map-svg .road-line {
  fill: none;
  stroke: #c7e2f6;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.28;
}

.bridge-map-svg .road-line.fine {
  stroke-width: 1.15;
  opacity: 0.16;
}

.bridge-map-svg .district-label {
  fill: #d7e7f4;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  opacity: 0.66;
}

.bridge-map-svg .river-shadow,
.bridge-map-svg .river-band,
.bridge-map-svg .river-highlight,
.bridge-map-svg .water-line,
.bridge-map-svg .highway-shadow,
.bridge-map-svg .highway-roadbed,
.bridge-map-svg .highway-centerline {
  fill: none;
  stroke-linejoin: round;
}

.bridge-map-svg .river-shadow {
  stroke: #010a16;
  stroke-width: 52;
  stroke-linecap: square;
  opacity: 0.38;
}

.bridge-map-svg .river-band {
  stroke: url(#bridgeMapRiverGradient);
  stroke-width: 36;
  stroke-linecap: square;
  filter: url(#bridgeMapRiverGlow);
}

.bridge-map-svg .river-highlight {
  stroke: url(#bridgeMapRiverHighlight);
  stroke-width: 10;
  stroke-linecap: square;
  opacity: 0.82;
}

.bridge-map-svg .water-line {
  stroke: #d9fbff;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 14 17;
  opacity: 0.22;
}

.bridge-map-svg .highway-shadow {
  stroke: #010a16;
  stroke-width: 31;
  stroke-linecap: round;
  opacity: 0.22;
}

.bridge-map-svg .highway-roadbed {
  stroke: #53677a;
  stroke-width: 19;
  stroke-linecap: round;
  opacity: 0.58;
}

.bridge-map-svg .highway-centerline {
  stroke: #c9d5de;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 15 17;
  opacity: 0.36;
}

.bridge-map-svg .bridge,
.bridge-map-svg .bridge-marker {
  color: #f8fbff;
  opacity: 0.9;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}

.bridge-map-svg .bridge-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 8.5;
  stroke-linecap: butt;
  stroke-linejoin: round;
  transition:
    stroke-width 0.2s ease,
    filter 0.2s ease;
}

.bridge-map-svg .bridge.active-bridge,
.bridge-map-svg .bridge-marker.active-bridge {
  color: var(--orange-2);
  opacity: 1;
}

.bridge-map-svg .bridge.active-bridge .bridge-line,
.bridge-map-svg .bridge-marker.active-bridge .bridge-line {
  stroke-width: 11;
  filter: url(#bridgeMapActiveBridgeGlow);
}

#herb-progress {
  width: min(100%, 340px);
  margin: 18px auto 22px;
}

#herb-recall-view {
  margin-top: 22px;
}

#herb-recall-progress,
#herb-missing-count {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 8px 13px;

  border: 1px solid rgba(103, 201, 95, 0.34);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.54);
  color: var(--white-soft);

  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

#herb-missing-count {
  margin-top: 14px;
  margin-bottom: 0;
}

.herb-found-list {
  margin: 16px 0 0;
  padding: 0;

  display: grid;
  gap: 8px;

  list-style: none;
}

.herb-found-list li {
  padding: 10px 12px;

  border: 1px solid rgba(103, 201, 95, 0.32);
  border-radius: 14px;
  background: rgba(7, 25, 46, 0.62);
  color: #d9ffd6;

  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

.herb-success {
  box-shadow: 0 0 0 4px rgba(103, 201, 95, 0.16);
}

#herb-restart-button {
  margin-top: 18px;
}

#district-overview-view,
#district-recall-view,
#district-map-game-view,
#park-overview-view,
#park-map-game-view {
  margin-top: 22px;
}

.district-intro,
#district-missing-count {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 8px 13px;

  border: 1px solid rgba(255, 173, 47, 0.34);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.54);
  color: var(--white-soft);

  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.district-pill-grid {
  width: 100%;
  max-height: min(430px, 48vh);
  margin-top: 16px;
  padding: 2px 2px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 9px;
}

.district-pill {
  width: 100%;
  min-height: 44px;
  margin: 0;
  min-width: 0;
  padding: 10px 12px;

  border: 1px solid rgba(255, 173, 47, 0.3);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.13), rgba(255, 77, 67, 0.08)),
    rgba(7, 25, 46, 0.62);
  color: var(--white);

  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: none;
}

.district-pill.is-selected {
  border-color: var(--cyan-2);
  background:
    linear-gradient(180deg, rgba(66, 196, 230, 0.2), rgba(18, 167, 201, 0.1)),
    rgba(7, 25, 46, 0.76);
  color: var(--white);
  box-shadow: 0 0 0 3px rgba(66, 196, 230, 0.12);
}

.district-learn-map-toolbar {
  margin-top: 16px;
}

.district-learn-selection {
  width: fit-content;
  max-width: 100%;
  margin: 11px auto 0;
  padding: 9px 14px;

  border: 1px solid rgba(66, 196, 230, 0.42);
  border-radius: 14px;
  background: rgba(3, 19, 38, 0.78);
  color: var(--white);

  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.district-list-accordion {
  margin-top: 16px;
}

.district-list-toggle {
  min-height: 48px;
  margin: 0;
  padding: 12px 15px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  border: 1px solid rgba(255, 173, 47, 0.34);
  background: rgba(3, 19, 38, 0.56);
  color: var(--white-soft);
  box-shadow: none;

  font-size: 14px;
  text-align: left;
}

.district-list-toggle-icon {
  flex: 0 0 auto;
  color: var(--orange-2);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.22s ease;
}

.district-list-toggle[aria-expanded="true"] .district-list-toggle-icon {
  transform: rotate(180deg);
}

.district-list-region {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s ease;
}

.district-list-region.is-open {
  grid-template-rows: 1fr;
}

.district-list-region-inner {
  min-height: 0;
  overflow: hidden;
}

.district-learn-tooltip {
  position: fixed;
  z-index: 50;
  max-width: min(240px, calc(100vw - 16px));
  padding: 7px 10px;

  border: 1px solid rgba(66, 196, 230, 0.58);
  border-radius: 10px;
  background: rgba(3, 19, 38, 0.96);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);

  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.district-recall-status {
  width: min(100%, 360px);
  margin: 18px auto 22px;
}

.district-found-list {
  max-height: min(260px, 28vh);
  margin: 16px 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;

  list-style: none;
}

.district-found-list li {
  min-width: 0;
  padding: 10px 12px;

  border: 1px solid rgba(255, 173, 47, 0.34);
  border-radius: 14px;
  background: rgba(7, 25, 46, 0.64);
  color: #ffe3a0;

  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
}

#district-missing-count {
  margin-top: 14px;
  margin-bottom: 0;
}

.district-success {
  box-shadow: 0 0 0 4px rgba(255, 173, 47, 0.18);
}

#district-restart-button {
  margin-top: 18px;
}

.district-map-prompt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.district-map-target-name {
  min-height: 1.18em;
  margin-bottom: 16px;
  color: var(--orange-2);
  font-size: clamp(29px, 7vw, 42px);
  font-weight: 850;
  line-height: 1.08;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.34);
}

.district-map-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.district-map-status > div,
.district-map-result-stats > div {
  min-width: 0;
  padding: 10px 8px;

  border: 1px solid rgba(255, 173, 47, 0.28);
  border-radius: 16px;
  background: rgba(3, 19, 38, 0.58);
}

.district-map-status span,
.district-map-result-stats span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
}

.district-map-status strong,
.district-map-result-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--white);
  font-size: clamp(17px, 4.5vw, 22px);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.district-map-progress-track {
  display: block;
  width: 100%;
  height: 9px;
  margin: 11px 0 14px;
  overflow: hidden;

  border-radius: 999px;
  background: rgba(232, 241, 251, 0.17);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

#district-map-progress-fill,
.district-map-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-2), var(--green), var(--cyan-2));
  box-shadow: 0 0 14px rgba(103, 201, 95, 0.32);
  transition: width 0.24s ease;
}

.district-map-toolbar {
  min-height: 42px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.district-map-toolbar > span {
  color: var(--white-soft);
  font-size: 13px;
  font-weight: 800;
}

.district-map-zoom-controls {
  display: inline-grid;
  grid-template-columns: 46px 48px 46px;
  align-items: center;
  overflow: hidden;

  border: 1px solid rgba(66, 196, 230, 0.28);
  border-radius: 14px;
  background: rgba(3, 19, 38, 0.56);
}

.district-map-zoom-controls button {
  width: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0;

  border-radius: 0;
  background: transparent;
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  box-shadow: none;
}

.district-map-zoom-controls button:disabled {
  color: rgba(169, 189, 211, 0.38);
}

.district-map-zoom-controls output {
  color: var(--white-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
}

.district-map-viewport {
  position: relative;
  width: 100%;
  max-height: min(640px, 68vh);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  border: 1px solid rgba(66, 196, 230, 0.31);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(66, 196, 230, 0.11), transparent 52%),
    rgba(3, 19, 38, 0.74);
  box-shadow: var(--card-shadow);
}

.district-map-object {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 1100;
  border: 0;
  background: transparent;
  transition: opacity 0.18s ease;
}

.district-map-viewport.is-loading .district-map-object {
  opacity: 0.18;
  pointer-events: none;
}

.district-map-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(82%, 310px);
  margin: 0;
  padding: 12px 14px;
  transform: translate(-50%, -50%);

  border: 1px solid rgba(66, 196, 230, 0.28);
  border-radius: 15px;
  background: rgba(3, 19, 38, 0.9);
  color: var(--white-soft);

  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  pointer-events: none;
}

.district-map-loading:empty {
  display: none;
}

.district-map-feedback {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.district-map-feedback.correct {
  color: #8ee787;
}

.district-map-feedback.wrong {
  color: #ff8794;
}

#district-map-exit-button,
#park-map-exit-button {
  margin-top: 12px;
}

.district-map-result-view {
  min-height: 510px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.district-map-result-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;

  border: 1px solid rgba(103, 201, 95, 0.52);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(103, 201, 95, 0.27), rgba(18, 167, 201, 0.14));
  color: #a8f2a2;
  box-shadow: 0 0 0 8px rgba(103, 201, 95, 0.07);

  font-size: 42px;
  font-weight: 850;
  line-height: 1;
}

.district-map-result-view h2 {
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.16;
}

.district-map-result-stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.district-map-result-stats strong {
  margin-top: 8px;
  color: var(--orange-2);
  font-size: clamp(28px, 7vw, 38px);
}

.district-map-result-actions {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.district-map-result-actions .menu-button {
  margin-top: 0;
}

.height-filter-panel {
  margin-top: 14px;
  padding: 18px;

  border: 1px solid rgba(66, 196, 230, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(3, 19, 38, 0.78), rgba(8, 37, 64, 0.66));
  box-shadow: var(--card-shadow);
  text-align: left;
}

.height-filter-panel h2 {
  margin-bottom: 14px;
  text-align: center;
  font-size: clamp(20px, 4.6vw, 25px);
}

.height-filter-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.height-filter-values span {
  min-width: 0;
  padding: 11px 12px;

  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(3, 19, 38, 0.42);
}

.height-filter-values small,
.height-filter-values strong {
  display: block;
}

.height-filter-values small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.height-filter-values strong {
  margin-top: 6px;
  color: var(--white);
  font-size: clamp(21px, 5.6vw, 29px);
  font-weight: 850;
  line-height: 1;
}

.height-range-control {
  position: relative;
  height: 58px;
  margin: 14px 0 8px;
}

.height-range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 24px;
  height: 10px;
  overflow: hidden;

  border-radius: 999px;
  background: rgba(232, 241, 251, 0.18);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.1);
}

#height-range-selected {
  position: absolute;
  top: 0;
  bottom: 0;

  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--orange), var(--orange-2), var(--cyan-2));
}

.height-range-input {
  position: absolute;
  inset: 0;
  z-index: 2;

  width: 100%;
  height: 58px;
  margin: 0;
  padding: 0;

  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  pointer-events: none;
}

.height-range-input.is-active {
  z-index: 3;
}

.height-range-input:focus {
  outline: none;
}

.height-range-input::-webkit-slider-runnable-track {
  height: 58px;
  background: transparent;
}

.height-range-input::-webkit-slider-thumb {
  width: 34px;
  height: 34px;
  margin-top: 12px;

  border: 4px solid var(--navy-950);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--white), var(--cyan-2));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    0 0 0 5px rgba(66, 196, 230, 0.2);
  cursor: grab;
  pointer-events: auto;

  -webkit-appearance: none;
}

.height-range-input:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    0 0 0 6px rgba(255, 209, 90, 0.42);
}

.height-range-input::-moz-range-track {
  height: 58px;
  background: transparent;
  border: 0;
}

.height-range-input::-moz-range-thumb {
  width: 34px;
  height: 34px;

  border: 4px solid var(--navy-950);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--white), var(--cyan-2));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    0 0 0 5px rgba(66, 196, 230, 0.2);
  cursor: grab;
  pointer-events: auto;
}

.height-range-input:focus-visible::-moz-range-thumb {
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    0 0 0 6px rgba(255, 209, 90, 0.42);
}

.height-filter-count {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 7px 12px;

  border: 1px solid rgba(66, 196, 230, 0.28);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.42);
  color: var(--white-soft);

  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

#height-filter-feedback {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

#height-filter-feedback:not(:empty) {
  padding: 12px 14px;
  border-radius: 16px;
}

.height-filter-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.42fr);
  gap: 10px;
}

.height-filter-actions button {
  margin: 0;
}

#reset-height-filter-button {
  background: rgba(3, 19, 38, 0.4);
  color: var(--white-soft);
  border: 1px solid rgba(66, 196, 230, 0.28);
  box-shadow: none;
}

.mode-section {
  width: 100%;
  text-align: left;
}

.mode-section + .mode-section {
  margin-top: 24px;
}

.mode-section-heading {
  width: 100%;
  margin: 0 0 10px;

  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--white-soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.mode-section-heading svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-section--learn .mode-section-heading {
  color: #80cde4;
}

.mode-section--play .mode-section-heading {
  color: var(--orange-2);
}

.mode-section-line {
  height: 1px;
  flex: 1 1 auto;
  background: currentColor;
  opacity: 0.3;
}

.mode-section-cards {
  width: 100%;
}

.mode-section-cards .mode-card:first-child {
  margin-top: 0;
}

.menu-screen > .menu-button {
  background: rgba(3, 19, 38, 0.58);
  border-color: rgba(169, 189, 211, 0.24);
  color: var(--white-soft);
  box-shadow: none;
}

.mode-card {
  position: relative;
  min-height: 116px;
  margin-top: 14px;
  padding: 22px 58px 22px 94px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  text-align: left;
  box-shadow: var(--card-shadow);
}

.mode-card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 24px;
  width: 12px;
  height: 12px;
  border-top: 2px solid rgba(255, 255, 255, 0.82);
  border-right: 2px solid rgba(255, 255, 255, 0.82);
  transform: translateY(-50%) rotate(45deg);
}

.mode-title {
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.08;
}

.mode-description {
  margin-top: 6px;
  color: rgba(248, 251, 255, 0.78);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.mode-status {
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.26);
  color: rgba(248, 251, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

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

.topic-grid .mode-card {
  min-height: 164px;
  margin-top: 0;
  padding: 19px 14px 18px;

  align-items: center;
  text-align: center;
}

.topic-grid .mode-card::after {
  display: none;
}

.topic-grid .mode-card-icon {
  position: relative;
  left: auto;
  top: auto;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  transform: none;
}

.topic-grid .mode-title {
  font-size: 22px;
}

.topic-grid .mode-description {
  font-size: 13px;
}

.mode-card.is-upcoming {
  cursor: not-allowed;
}

.mode-card.is-upcoming::after {
  display: none;
}

.mode-card.is-upcoming .mode-card-icon {
  opacity: 0.82;
}

.mode-card.is-upcoming .mode-description {
  color: rgba(248, 251, 255, 0.66);
}

#highrise-topic-button {
  background: linear-gradient(135deg, #116d95, #0b3e66);
}

#herbs-topic-button {
  background: linear-gradient(135deg, #64bf5d, #208760);
}

#districts-topic-button {
  background: linear-gradient(135deg, #ff8a1f, #ef463e);
}

#bridges-topic-button {
  background: linear-gradient(135deg, #42c4e6, #116d95);
}

#parks-topic-button {
  background: linear-gradient(135deg, #7bc96f, #0b7a62);
}

#multiplayer-topic-button {
  background: linear-gradient(135deg, #7b5bd6, #ef463e 56%, #ff8a1f);
}

.multiplayer-mode-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: rgba(3, 19, 38, 0.28);
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -1px;
}

#more-topic-button {
  background: linear-gradient(135deg, #7b5bd6, #10476f);
}


/* ------------------------------
   ONLINE-DUELL
------------------------------ */

.multiplayer-screen {
  min-height: 650px;
  background:
    linear-gradient(180deg, rgba(5, 27, 51, 0.94), rgba(3, 19, 38, 0.98)),
    linear-gradient(135deg, rgba(123, 91, 214, 0.16), transparent 46%, rgba(255, 122, 26, 0.12)),
    url("assets/backgrounds/skyline-background.png"),
    var(--navy-900);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.multiplayer-view {
  width: 100%;
}

.multiplayer-title {
  font-size: clamp(30px, 7vw, 42px);
}

.multiplayer-lead {
  max-width: 390px;
  margin: 12px auto 22px;
  color: var(--white-soft);
  font-size: 15px;
  line-height: 1.5;
}

.multiplayer-form {
  text-align: left;
}

.multiplayer-form label {
  display: block;
  margin: 0 0 7px 3px;
  color: var(--white-soft);
  font-size: 13px;
  font-weight: 750;
}

#multiplayer-player-name,
#multiplayer-invite-code {
  width: 100%;
  min-height: 52px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(232, 241, 251, 0.24);
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.97);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  outline: none;
}

#multiplayer-invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.08em;
}

#multiplayer-player-name:focus,
#multiplayer-invite-code:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(123, 91, 214, 0.22);
}

#multiplayer-create-button,
#multiplayer-join-button,
#multiplayer-ready-button,
#multiplayer-start-button,
#multiplayer-copy-link-button {
  background: linear-gradient(180deg, #8d6ee8, #6a45c1);
  box-shadow: 0 14px 28px rgba(123, 91, 214, 0.24);
}

#multiplayer-join-button,
#multiplayer-ready-button {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  box-shadow: 0 14px 28px rgba(255, 122, 26, 0.24);
}

#multiplayer-start-button {
  margin-top: 12px;
  background: linear-gradient(180deg, var(--green), var(--green-2));
  box-shadow: 0 14px 28px rgba(44, 168, 111, 0.24);
}

.multiplayer-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.multiplayer-divider::before,
.multiplayer-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.multiplayer-feedback {
  min-height: 22px;
  margin: 13px 0 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.multiplayer-loader {
  width: 52px;
  height: 52px;
  margin: 42px auto 20px;
  border: 5px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--orange-2);
  border-radius: 50%;
  animation: multiplayer-spin 0.8s linear infinite;
}

@keyframes multiplayer-spin {
  to {
    transform: rotate(360deg);
  }
}

#multiplayer-loading-view p {
  color: var(--muted);
}

.multiplayer-lobby-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  text-align: left;
}

.multiplayer-lobby-heading h1 {
  font-size: clamp(28px, 7vw, 38px);
}

.multiplayer-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--orange-2);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.multiplayer-connection-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 209, 90, 0.3);
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.12);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
}

.multiplayer-connection-status.is-online {
  border-color: rgba(103, 201, 95, 0.38);
  background: rgba(44, 168, 111, 0.14);
  color: #9ee496;
}

.multiplayer-connection-status.is-offline {
  border-color: rgba(255, 83, 101, 0.4);
  background: rgba(255, 83, 101, 0.12);
  color: #ff9eaa;
}

.multiplayer-code-panel {
  margin-bottom: 15px;
  padding: 16px;
  border: 1px solid rgba(123, 91, 214, 0.34);
  border-radius: 22px;
  background: rgba(16, 71, 111, 0.3);
}

.multiplayer-code-panel > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.multiplayer-code-panel > strong {
  display: block;
  margin: 5px 0 12px;
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(23px, 7vw, 31px);
  letter-spacing: 0.1em;
}

#multiplayer-copy-link-button {
  min-height: 45px;
  padding: 11px 14px;
  font-size: 14px;
}

#multiplayer-copy-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  color: #9ee496;
  font-size: 12px;
  font-weight: 700;
}

.multiplayer-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 15px;
}

.multiplayer-player-card {
  min-width: 0;
  padding: 15px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(3, 19, 38, 0.5);
  text-align: left;
}

.multiplayer-player-role {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multiplayer-player-card strong {
  display: block;
  margin: 7px 0 9px;
  overflow: hidden;
  color: var(--white);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-ready-state {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 83, 101, 0.12);
  color: #ff9eaa;
  font-size: 11px;
  font-weight: 750;
}

.multiplayer-player-connection {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.multiplayer-player-connection::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6f8195;
}

.multiplayer-player-connection.is-online {
  color: #9ee496;
}

.multiplayer-player-connection.is-online::before {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(103, 201, 95, 0.14);
}

.multiplayer-ready-state.is-ready {
  background: rgba(44, 168, 111, 0.16);
  color: #9ee496;
}

.multiplayer-lobby-notice {
  min-height: 43px;
  margin: 0 0 13px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(3, 19, 38, 0.4);
  color: var(--white-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

#multiplayer-ready-button.is-ready {
  background: linear-gradient(180deg, var(--green), var(--green-2));
  box-shadow: 0 14px 28px rgba(44, 168, 111, 0.24);
}

#multiplayer-leave-button {
  margin-top: 12px;
}

.multiplayer-duel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.multiplayer-duel-heading h1 {
  font-size: clamp(25px, 6vw, 34px);
}

.multiplayer-duel-score {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(66, 196, 230, 0.34);
  border-radius: 999px;
  background: rgba(66, 196, 230, 0.12);
  color: #c9f4ff;
  font-size: 12px;
  font-weight: 800;
}

.multiplayer-duel-progress {
  margin-bottom: 15px;
  text-align: left;
}

.multiplayer-duel-progress > span {
  display: block;
  margin-bottom: 7px;
  color: var(--white-soft);
  font-size: 12px;
  font-weight: 750;
}

.multiplayer-duel-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.multiplayer-duel-progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--orange-2));
  transition: width 180ms ease;
}

.multiplayer-duel-question {
  margin-bottom: 14px;
  font-size: clamp(19px, 4.8vw, 25px);
  line-height: 1.2;
}

#multiplayer-duel-building-name {
  display: inline-block;
  margin-top: 4px;
  color: var(--orange-2);
  font-size: clamp(27px, 6.5vw, 37px);
  line-height: 1.04;
}

.multiplayer-duel-image-grid {
  max-width: 520px;
  margin: 0 auto;
}

.image-choice-option.is-pending {
  border-color: rgba(255, 173, 47, 0.92);
  outline: 4px solid rgba(255, 173, 47, 0.3);
}

.multiplayer-duel-feedback {
  min-height: 0;
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.multiplayer-duel-feedback:not(:empty) {
  padding: 11px 13px;
  border-radius: 15px;
}

#multiplayer-duel-next-button {
  margin-top: 12px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
}

#multiplayer-waiting-view {
  padding-top: 34px;
}

.multiplayer-waiting-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  place-items: center;
  border: 2px solid rgba(103, 201, 95, 0.62);
  border-radius: 50%;
  background: rgba(44, 168, 111, 0.16);
  color: #b7ffb0;
  font-size: 34px;
  font-weight: 900;
}

#multiplayer-waiting-view h1 {
  margin-bottom: 12px;
  font-size: clamp(29px, 7vw, 40px);
}

#multiplayer-waiting-view > p {
  max-width: 400px;
  margin: 0 auto;
  color: var(--white-soft);
  line-height: 1.5;
}

.multiplayer-own-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
  margin: 20px auto 0;
  padding: 15px;
  border: 1px solid rgba(123, 91, 214, 0.38);
  border-radius: 18px;
  background: rgba(123, 91, 214, 0.12);
}

.multiplayer-own-result strong {
  color: var(--white);
  font-size: 23px;
}

.multiplayer-own-result span {
  color: var(--muted);
  font-size: 13px;
}

.multiplayer-loader--small {
  width: 38px;
  height: 38px;
  margin-top: 24px;
  border-width: 4px;
}

#multiplayer-results-view > h1 {
  font-size: clamp(30px, 7vw, 42px);
}

.multiplayer-result-lead {
  margin: 8px 0 18px;
  color: var(--white-soft);
  line-height: 1.45;
}

.multiplayer-result-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.multiplayer-result-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(123, 91, 214, 0.32);
  border-radius: 20px;
  background: rgba(3, 19, 38, 0.52);
  text-align: left;
}

.multiplayer-result-card h2 {
  margin: 6px 0 8px;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-result-total {
  display: block;
  margin-bottom: 12px;
  color: var(--orange-2);
  font-size: 22px;
}

.multiplayer-result-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  margin: 0;
  font-size: 12px;
}

.multiplayer-result-card dt {
  color: var(--muted);
}

.multiplayer-result-card dd {
  margin: 0;
  color: var(--white);
  font-weight: 800;
}

.multiplayer-review-heading {
  margin: 24px 0 12px;
  text-align: left;
  font-size: 22px;
}

.multiplayer-answer-review {
  display: grid;
  gap: 10px;
}

.multiplayer-answer-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(3, 19, 38, 0.45);
  text-align: left;
}

.multiplayer-answer-item > img {
  display: block;
  width: 88px;
  height: 88px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(232, 241, 251, 0.94);
  object-fit: contain;
}

.multiplayer-answer-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.multiplayer-answer-item p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.multiplayer-answer-item ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  font-weight: 750;
}

.multiplayer-answer-item li.is-correct {
  color: #b7ffb0;
}

.multiplayer-answer-item li.is-wrong {
  color: #ffbdc5;
}

#multiplayer-result-exit-button {
  margin-top: 18px;
}

.mode-card--learn {
  border-color: rgba(128, 205, 228, 0.36);
  background: linear-gradient(135deg, #163d5c, #0d2e4b);
  box-shadow: 0 16px 32px rgba(3, 19, 38, 0.3);
}

.mode-card--learn::after {
  border-color: rgba(128, 205, 228, 0.88);
}

.mode-card--learn .mode-description {
  color: rgba(216, 238, 247, 0.78);
}

#quiz-mode-button {
  background: linear-gradient(135deg, #ff7a1a, #ef463e);
}

#image-choice-mode-button {
  background: linear-gradient(135deg, #12a7c9, #7b5bd6);
}

#challenge-mode-button {
  background: linear-gradient(135deg, #ffad2f, #ef463e 58%, #8d3fc2);
}

.challenge-mode-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--white);
}

#herb-recall-mode-button {
  background: linear-gradient(135deg, #2ca86f, #0b6f79);
}

#district-recall-mode-button {
  background: linear-gradient(135deg, #ff7a1a, #ef463e);
}

#district-map-mode-button {
  background: linear-gradient(135deg, #12a7c9, #ff8a1f);
}

#park-map-mode-button {
  background: linear-gradient(135deg, #2ca86f, #12a7c9 58%, #ffad2f);
}

#bridge-quiz-mode-button {
  background: linear-gradient(135deg, #12a7c9, #ff7a1a);
}

#bridge-map-mode-button {
  background: linear-gradient(135deg, #0f789a, #ffad2f);
}

.mode-card-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  width: 50px;
  height: 50px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
  transform: translateY(-50%);
  filter: drop-shadow(0 7px 12px rgba(3, 19, 38, 0.28));
}

.learning-transition .image-container,
.learning-transition #learning-name,
.learning-transition #building-height {
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 0.72, 0.22, 1);
  will-change: opacity, transform;
}

.learning-slide-out-left .image-container,
.learning-slide-out-left #learning-name,
.learning-slide-out-left #building-height {
  opacity: 0;
  transform: translateX(-32px);
}

.learning-slide-out-right .image-container,
.learning-slide-out-right #learning-name,
.learning-slide-out-right #building-height {
  opacity: 0;
  transform: translateX(32px);
}

.learning-slide-enter-left .image-container,
.learning-slide-enter-left #learning-name,
.learning-slide-enter-left #building-height {
  opacity: 0;
  transform: translateX(-32px);
  transition: none;
}

.learning-slide-enter-right .image-container,
.learning-slide-enter-right #learning-name,
.learning-slide-enter-right #building-height {
  opacity: 0;
  transform: translateX(32px);
  transition: none;
}

.learning-swipe-hint .image-container {
  animation: swipeHint 0.9s cubic-bezier(0.22, 0.72, 0.22, 1);
}


/* 60-SEKUNDEN-CHALLENGE */

#challenge-screen {
  min-height: 650px;
  background:
    linear-gradient(180deg, rgba(5, 27, 51, 0.94), rgba(3, 19, 38, 0.99)),
    radial-gradient(circle at 50% 12%, rgba(255, 122, 26, 0.2), transparent 34%),
    linear-gradient(90deg, rgba(18, 167, 201, 0.08), transparent 42%, rgba(255, 77, 67, 0.09)),
    url("assets/backgrounds/skyline-background.png"),
    var(--navy-900);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.challenge-view {
  width: 100%;
}

#challenge-start-view {
  display: flex;
  min-height: 580px;
  flex-direction: column;
  justify-content: center;
}

.challenge-start-icon,
.challenge-result-icon {
  width: 76px;
  height: 76px;
  margin: 8px auto 18px;
  padding: 13px;

  border: 1px solid rgba(255, 173, 47, 0.42);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 173, 47, 0.24), rgba(255, 77, 67, 0.14));
  color: var(--orange-2);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.24),
    0 0 0 7px rgba(255, 122, 26, 0.07);
}

.challenge-start-icon svg,
.challenge-result-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.challenge-lead {
  max-width: 420px;
  margin: 18px auto 12px;
  color: var(--white);
  font-size: clamp(18px, 4.4vw, 22px);
  font-weight: 750;
  line-height: 1.35;
}

.challenge-explanation {
  max-width: 440px;
  margin: 0 auto 24px;
  padding: 16px 18px;

  border: 1px solid rgba(66, 196, 230, 0.23);
  border-radius: 20px;
  background: rgba(3, 19, 38, 0.5);
  color: var(--white-soft);

  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

#challenge-start-view .menu-button {
  margin-top: 12px;
}

.challenge-countdown-view {
  min-height: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.challenge-countdown-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.challenge-countdown-value {
  min-height: 190px;
  display: grid;
  place-items: center;

  color: var(--white);
  font-size: clamp(104px, 31vw, 170px);
  font-weight: 850;
  line-height: 1;
  text-shadow:
    0 0 24px rgba(255, 173, 47, 0.34),
    0 12px 42px rgba(0, 0, 0, 0.36);
}

.challenge-countdown-value.is-go {
  color: var(--orange-2);
  font-size: clamp(72px, 22vw, 118px);
}

.challenge-countdown-value.is-animating {
  animation: challengeCountdownPulse 0.72s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.challenge-countdown-view .challenge-exit-button {
  width: min(100%, 310px);
  margin-top: 70px;
}

.challenge-game-title {
  margin-bottom: 14px;
  font-size: clamp(24px, 5.5vw, 34px);
}

.challenge-timer-panel {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 4;

  margin-bottom: 16px;
  padding: 14px 16px 12px;
  overflow: hidden;

  border: 1px solid rgba(66, 196, 230, 0.3);
  border-radius: 22px;
  background: rgba(3, 19, 38, 0.94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.challenge-timer-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.challenge-timer {
  display: block;
  margin-top: 5px;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  font-size: clamp(42px, 11vw, 62px);
  font-weight: 850;
  letter-spacing: 0.02em;
  line-height: 0.98;
  text-shadow: 0 0 24px rgba(66, 196, 230, 0.22);
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.challenge-time-track {
  display: block;
  width: 100%;
  height: 11px;
  margin-top: 12px;
  overflow: hidden;

  border-radius: 999px;
  background: rgba(232, 241, 251, 0.16);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.36);
}

.challenge-time-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-2), var(--orange-2));
  box-shadow: 0 0 18px rgba(66, 196, 230, 0.36);
  transform: scaleX(1);
  transform-origin: left center;
  will-change: transform;
}

.challenge-score {
  margin: 10px 0 0;
  color: var(--white-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.challenge-score strong {
  color: var(--orange-2);
  font-size: 20px;
  font-weight: 850;
}

.challenge-timer-panel.is-urgent {
  border-color: rgba(255, 83, 101, 0.58);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.28),
    0 0 0 4px rgba(255, 83, 101, 0.1);
}

.challenge-timer-panel.is-urgent .challenge-timer {
  color: var(--red);
  text-shadow: 0 0 25px rgba(255, 83, 101, 0.46);
  animation: challengeTimerPulse 1s ease-in-out infinite;
}

.challenge-timer-panel.is-urgent .challenge-time-fill {
  background: linear-gradient(90deg, #ff8b55, var(--red), var(--coral));
  box-shadow: 0 0 18px rgba(255, 83, 101, 0.5);
}

.challenge-question-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(5, 27, 51, 0.72);
  box-shadow: var(--card-shadow);
}

.challenge-image-container {
  width: 100%;
  height: clamp(220px, 37vh, 330px);
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(217, 232, 245, 0.95));
}

#challenge-building-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.challenge-building-height {
  width: fit-content;
  max-width: 100%;
  margin: 10px auto 13px;
  padding: 6px 11px;

  border: 1px solid rgba(66, 196, 230, 0.27);
  border-radius: 999px;
  background: rgba(3, 19, 38, 0.48);
  color: var(--muted);

  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

#challenge-answer-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--white);
  font-size: clamp(18px, 4.4vw, 22px);
  font-weight: 750;
  line-height: 1.2;
}

#challenge-answer-input {
  width: 100%;
  min-height: 52px;
  margin: 0 0 10px;
  padding: 15px 16px;

  border: 1px solid rgba(232, 241, 251, 0.24);
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.98);
  color: var(--ink);

  font: inherit;
  font-size: 16px;
  font-weight: 650;
  box-shadow: inset 0 1px 2px rgba(7, 25, 46, 0.08);
}

#challenge-answer-input::placeholder {
  color: #6f8195;
}

#challenge-answer-input:focus {
  border-color: var(--orange);
  outline: none;
  box-shadow:
    0 0 0 4px rgba(255, 122, 26, 0.2),
    inset 0 1px 2px rgba(7, 25, 46, 0.08);
}

.challenge-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(128px, 0.7fr);
  gap: 10px;
}

.challenge-actions button {
  margin: 0;
}

#challenge-skip-button {
  border: 1px solid rgba(66, 196, 230, 0.28);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-850));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.challenge-feedback {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.challenge-feedback.correct {
  color: #8ee787;
}

.challenge-feedback.wrong {
  color: #ff8794;
}

.challenge-question-card.feedback-correct {
  animation: challengeCorrectFlash 0.38s ease-out;
}

.challenge-question-card.feedback-wrong {
  animation: challengeWrongFlash 0.34s ease-out;
}

.challenge-play-view > .challenge-exit-button {
  margin-top: 14px;
}

.challenge-result-view {
  min-height: 580px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.challenge-result-icon {
  width: 92px;
  height: 92px;
  margin-bottom: 24px;
  color: var(--yellow);
}

.challenge-result-view.is-complete .challenge-result-icon {
  color: #8ee787;
  border-color: rgba(103, 201, 95, 0.48);
  background: linear-gradient(145deg, rgba(103, 201, 95, 0.23), rgba(18, 167, 201, 0.14));
}

.challenge-result-score {
  margin: 22px 0 8px;
  color: var(--white);
  font-size: clamp(22px, 5.6vw, 30px);
  font-weight: 800;
  line-height: 1.3;
}

.challenge-result-total {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.challenge-result-actions {
  margin-top: 28px;
  display: grid;
  gap: 11px;
}

.challenge-result-actions .menu-button {
  margin-top: 0;
}

@keyframes challengeCountdownPulse {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }

  48% {
    opacity: 1;
    transform: scale(1.08);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes challengeTimerPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}

@keyframes challengeCorrectFlash {
  0% {
    border-color: var(--line);
    box-shadow: var(--card-shadow);
  }

  38% {
    border-color: rgba(103, 201, 95, 0.95);
    box-shadow: var(--card-shadow), 0 0 0 6px rgba(103, 201, 95, 0.2);
  }

  100% {
    border-color: var(--line);
    box-shadow: var(--card-shadow);
  }
}

@keyframes challengeWrongFlash {
  0% {
    border-color: var(--line);
    transform: translateX(0);
  }

  28% {
    border-color: rgba(255, 83, 101, 0.95);
    transform: translateX(-4px);
  }

  56% {
    transform: translateX(4px);
  }

  100% {
    border-color: var(--line);
    transform: translateX(0);
  }
}

@keyframes swipeHint {
  0% {
    transform: translateX(0);
  }

  24% {
    transform: translateX(-14px);
  }

  48% {
    transform: translateX(10px);
  }

  72% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

.hidden {
  display: none !important;
}

@media (hover: hover) {
  button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(255, 77, 67, 0.26);
  }

  #herb-check-button:hover,
  #herb-restart-button:hover {
    box-shadow: 0 18px 34px rgba(44, 168, 111, 0.28);
  }

  #district-check-button:hover,
  #district-restart-button:hover {
    box-shadow: 0 18px 34px rgba(255, 122, 26, 0.28);
  }

  #bridge-check-button:hover {
    box-shadow: 0 18px 34px rgba(18, 167, 201, 0.28);
  }

  .bridge-learn-map-toggle:hover {
    box-shadow: 0 18px 34px rgba(18, 167, 201, 0.3);
  }

  .bridge-learn-map-toggle[aria-expanded="true"]:hover {
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  }

  #bridge-map-check-button:hover {
    box-shadow: 0 18px 34px rgba(255, 122, 26, 0.28);
  }

  #next-button:hover,
  #previous-button:hover,
  #herb-next-button:hover,
  #herb-previous-button:hover,
  #bridge-next-button:hover,
  #bridge-previous-button:hover,
  #bridge-quiz-next-button:hover,
  #bridge-map-next-button:hover,
  #reset-height-filter-button:hover,
  .menu-button:hover {
    background: linear-gradient(180deg, var(--navy-700), var(--navy-900));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  }

  .mode-card:hover,
  .image-choice-option:hover {
    transform: translateY(-2px);
  }

  .mode-card:hover {
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.28);
  }

  .mode-card--learn:hover {
    border-color: rgba(128, 205, 228, 0.54);
    box-shadow: 0 20px 38px rgba(18, 167, 201, 0.18);
  }

  .image-choice-option:hover {
    box-shadow:
      var(--card-shadow),
      0 0 0 4px rgba(66, 196, 230, 0.18);
  }

  .image-choice-option.is-correct:hover {
    box-shadow:
      var(--card-shadow),
      0 0 0 8px rgba(103, 201, 95, 0.14);
  }

  .image-choice-option.is-wrong:hover {
    box-shadow:
      var(--card-shadow),
      0 0 0 8px rgba(255, 83, 101, 0.13);
  }

  .mode-card.is-upcoming:hover {
    box-shadow: var(--card-shadow);
  }

  .district-map-zoom-controls button:hover {
    transform: none;
    background: rgba(66, 196, 230, 0.13);
    box-shadow: none;
  }

  .district-list-toggle:hover {
    transform: none;
    border-color: rgba(255, 173, 47, 0.56);
    background: rgba(8, 37, 64, 0.76);
    box-shadow: none;
  }

  .district-pill:hover {
    transform: none;
    border-color: rgba(66, 196, 230, 0.48);
    box-shadow: none;
  }

  button:disabled:hover,
  .image-choice-option:disabled:hover {
    transform: none;
  }
}

@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;
  }
}

@media (max-width: 600px) {
  body {
    align-items: flex-start;
    padding: 0;
  }

  body::before {
    height: 128px;
    opacity: 0.42;
  }

  .game-container {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(20px + env(safe-area-inset-top)) calc(17px + env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom)) calc(17px + env(safe-area-inset-left));
    border-radius: 0;
  }

  .menu-screen {
    min-height: 100vh;
    min-height: 100svh;
    background-position: center top;
  }

  .multiplayer-screen {
    min-height: 100vh;
    min-height: 100svh;
    overflow: visible;
    background-position: center top;
  }

  .multiplayer-screen .screen-brand {
    margin-bottom: 7px;
  }

  .multiplayer-lead {
    margin-bottom: 18px;
  }

  .multiplayer-lobby-heading {
    margin-bottom: 14px;
  }

  .multiplayer-code-panel {
    padding: 14px;
  }

  .multiplayer-duel-heading {
    margin-bottom: 12px;
  }

  .multiplayer-duel-score {
    padding: 7px 9px;
    font-size: 11px;
  }

  .multiplayer-duel-question {
    margin-bottom: 12px;
  }

  .multiplayer-result-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .multiplayer-answer-item {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 11px;
  }

  .multiplayer-answer-item > img {
    width: 76px;
    height: 76px;
  }

  #game-screen,
  #challenge-screen,
  #herb-game-screen,
  #district-game-screen,
  #bridge-game-screen {
    background-position: center top;
  }

  #challenge-screen {
    min-height: 100vh;
    min-height: 100svh;
    overflow: visible;
  }

  #challenge-start-view,
  .challenge-countdown-view,
  .challenge-result-view {
    min-height: calc(100svh - 46px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .challenge-start-icon {
    width: 66px;
    height: 66px;
    margin-bottom: 15px;
  }

  .challenge-lead {
    margin-top: 15px;
  }

  .challenge-explanation {
    margin-bottom: 20px;
    padding: 14px 15px;
    font-size: 14px;
  }

  .challenge-countdown-view .challenge-exit-button {
    margin-top: 48px;
  }

  .challenge-game-title {
    margin-bottom: 11px;
  }

  .challenge-timer-panel {
    top: max(4px, env(safe-area-inset-top));
    margin-bottom: 12px;
    padding: 11px 13px 10px;
    border-radius: 19px;
  }

  .challenge-timer {
    font-size: clamp(39px, 12vw, 52px);
  }

  .challenge-time-track {
    height: 9px;
    margin-top: 9px;
  }

  .challenge-score {
    margin-top: 8px;
  }

  .challenge-question-card {
    padding: 11px;
    border-radius: 21px;
  }

  .challenge-image-container {
    height: clamp(190px, 31vh, 290px);
    border-radius: 17px;
  }

  .challenge-building-height {
    margin-top: 8px;
    margin-bottom: 10px;
  }

  #challenge-answer-form label {
    margin-bottom: 8px;
  }

  .challenge-actions {
    grid-template-columns: minmax(0, 1fr) minmax(116px, 0.72fr);
    gap: 8px;
  }

  .challenge-actions button {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px;
  }

  .challenge-feedback {
    margin-top: 8px;
    font-size: 13px;
  }

  .menu-screen::after {
    left: 18px;
    right: 18px;
    bottom: 20px;
  }

  .brand-logo-main {
    width: min(290px, 82vw);
  }

  .brand-logo-screen {
    width: min(164px, 52vw);
  }

  .brand-logo-compact {
    width: min(176px, 48vw);
  }

  .start-text {
    margin-bottom: 24px;
    font-size: 16px;
  }

  .mode-section + .mode-section {
    margin-top: 20px;
  }

  .mode-section-heading {
    margin-bottom: 9px;
    font-size: 11px;
  }

  .mode-card {
    min-height: 102px;
    margin-top: 12px;
    padding: 18px 48px 18px 78px;
    border-radius: 22px;
  }

  .mode-card-icon {
    left: 19px;
    width: 42px;
    height: 42px;
  }

  .mode-title {
    font-size: 21px;
  }

  .mode-description {
    font-size: 14px;
  }

  .height-filter-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .height-filter-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-grid {
    gap: 11px;
  }

  .topic-grid .mode-card {
    min-height: 148px;
    padding: 17px 10px 15px;
  }

  .topic-grid .mode-card-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 11px;
  }

  .topic-grid .mode-title {
    font-size: 19px;
  }

  .topic-grid .mode-description {
    font-size: 12px;
  }

  #progress,
  #district-recall-status,
  #bridge-progress {
    grid-template-columns: 1fr 60px;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 16px;
  }

  #progress-count,
  #herb-progress-count,
  #district-recall-progress-count,
  #bridge-progress-count,
  .score-status strong {
    font-size: 20px;
  }

  .score-status {
    min-width: 58px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .image-container {
    height: clamp(250px, 42vh, 360px);
    margin-bottom: 16px;
    border-radius: 20px;
  }

  #building-height {
    margin-bottom: 18px;
    white-space: normal;
  }

  #quiz-controls h2,
  #image-choice-controls h2,
  #herb-recall-view h2,
  #district-overview-view h2,
  #district-recall-view h2,
  #park-overview-view h2,
  #bridge-quiz-view h2,
  #bridge-map-view h2 {
    margin-bottom: 14px;
  }

  #district-map-game-view,
  #park-map-game-view {
    margin-top: 16px;
  }

  .district-map-target-name {
    margin-bottom: 13px;
    font-size: clamp(27px, 8vw, 36px);
  }

  .district-map-status {
    gap: 6px;
  }

  .district-map-status > div {
    padding: 9px 5px;
    border-radius: 14px;
  }

  .district-map-status span {
    font-size: 9px;
    letter-spacing: 0.025em;
  }

  .district-map-status strong {
    font-size: clamp(15px, 4.7vw, 19px);
  }

  .district-map-toolbar {
    min-height: 38px;
  }

  .district-map-viewport {
    max-height: min(620px, 62svh);
    border-radius: 18px;
  }

  .district-map-feedback {
    margin-top: 8px;
    font-size: 13px;
  }

  .district-map-result-view {
    min-height: calc(100svh - 210px);
  }

  .district-map-result-stats > div {
    padding: 12px 7px;
  }

  .bridge-map-container {
    margin-bottom: 14px;
    padding: 7px;
    border-radius: 18px;
  }

  .bridge-map-svg {
    max-height: 300px;
    border-radius: 15px;
  }

  .bridge-learn-map-object {
    border-radius: 15px;
  }

  .image-choice-grid {
    gap: 10px;
  }

  .image-choice-option {
    aspect-ratio: 1 / 1.02;
    border-radius: 16px;
  }

  .image-choice-option img {
    padding: 6px;
  }

  .learn-navigation {
    gap: 10px;
  }

  .learn-navigation button {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 15px;
  }

  .menu-button {
    margin-top: 22px;
  }
}

@media (max-width: 600px) and (max-height: 760px) {
  .challenge-game-title {
    font-size: 22px;
  }

  .challenge-image-container {
    height: clamp(170px, 27vh, 235px);
  }

  .challenge-timer-panel {
    padding-top: 9px;
    padding-bottom: 8px;
  }

  .challenge-timer-label {
    font-size: 10px;
  }

  .challenge-timer {
    font-size: 38px;
  }

  .challenge-score {
    font-size: 13px;
  }

  .challenge-play-view > .challenge-exit-button {
    margin-top: 10px;
  }
}

@media (max-width: 380px) {
  .game-container {
    padding-left: calc(14px + env(safe-area-inset-left));
    padding-right: calc(14px + env(safe-area-inset-right));
  }

  .mode-card {
    padding-left: 70px;
    padding-right: 40px;
  }

  .mode-card::after {
    right: 17px;
  }

  .mode-card-icon {
    left: 16px;
  }

  .topic-grid {
    gap: 9px;
  }

  .topic-grid .mode-card {
    min-height: 140px;
    padding: 15px 8px 13px;
  }

  .topic-grid .mode-title {
    font-size: 17px;
  }

  .topic-grid .mode-description {
    font-size: 11px;
  }

  .topic-grid .mode-card-icon {
    width: 36px;
    height: 36px;
  }

  .multiplayer-players {
    grid-template-columns: minmax(0, 1fr);
  }

  .multiplayer-lobby-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .mode-title {
    font-size: 20px;
  }

  .mode-description {
    font-size: 13px;
  }

  .challenge-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .challenge-actions button {
    min-height: 48px;
  }

  .challenge-result-icon {
    width: 80px;
    height: 80px;
  }

  .image-container {
    height: clamp(230px, 39vh, 320px);
  }

  .image-choice-grid {
    gap: 8px;
  }

  #image-choice-building-name {
    font-size: clamp(25px, 8vw, 32px);
  }
}
