:root {
  --bg-panel: rgba(255, 251, 245, 0.94);
  --bg-card: rgba(255, 255, 255, 0.92);
  --text-main: #253146;
  --text-soft: #607184;
  --accent: #ffc857;
  --accent-strong: #f28f3b;
  --good: #4dbb7d;
  --bad: #e57a7a;
  --border: rgba(37, 49, 70, 0.12);
  --shadow: 0 16px 42px rgba(114, 102, 78, 0.16);
  --top-links-space: 68px;
  --bottom-links-space: 56px;
  --quiz-panel-bottom-space: 12px;
  --game-panel-shift: 20px;
  --quiz-panel-lift: 4vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 200, 87, 0.35), transparent 34%),
    radial-gradient(circle at left, rgba(157, 214, 203, 0.24), transparent 28%),
    linear-gradient(145deg, #fff8ee 0%, #eef7f6 100%);
  color: var(--text-main);
  overflow: hidden;
  overscroll-behavior: none;
}

button,
select {
  font: inherit;
}

.top-links,
.top-links *,
.app-shell,
.app-shell * {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.website-link {
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(37, 49, 70, 0.12);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1d1200;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(114, 102, 78, 0.16);
  touch-action: manipulation;
}

.top-links {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 50;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.home-button {
  white-space: nowrap;
}

.fullscreen-icon-button {
  min-width: 42px;
  padding: 0;
}

.fullscreen-icon-img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(12%) sepia(11%) saturate(2281%) hue-rotate(351deg) brightness(90%) contrast(94%);
}

.website-link:hover,
.website-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(114, 102, 78, 0.22);
}

.secret-hotspot {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 248, 238, 0.96), rgba(238, 247, 246, 0.96));
  opacity: 0.06;
  z-index: 55;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 88vw;
  max-width: 1040px;
  margin: 0 auto;
  height: calc(100dvh - var(--top-links-space) - var(--bottom-links-space));
  min-height: 0;
  display: grid;
  place-items: start center;
  padding:
    calc(var(--top-links-space) + var(--game-panel-shift) + 8px)
    0
    calc(var(--bottom-links-space) + 8px);
}

.panel {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 18px 22px;
  position: relative;
}

.quiz-panel,
.result-panel {
  max-height: calc(100vh - var(--top-links-space) - var(--bottom-links-space) - 16px);
  overflow: hidden;
  transform: translateY(calc(-1 * var(--quiz-panel-lift)));
}

.quiz-panel {
  max-height: calc(100vh - var(--top-links-space) - var(--quiz-panel-bottom-space) - 16px);
}

.quiz-panel .explanation-panel {
  max-height: 22vh;
  overflow-y: auto;
}

.secret-panel {
  display: grid;
  gap: 12px;
  text-align: left;
  align-content: start;
  max-width: 680px;
  background:
    radial-gradient(circle at top right, rgba(255, 200, 87, 0.28), transparent 28%),
    radial-gradient(circle at bottom left, rgba(157, 214, 203, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(255, 250, 245, 0.98), rgba(242, 248, 247, 0.96));
  border-color: rgba(242, 143, 59, 0.2);
  box-shadow: 0 20px 54px rgba(114, 102, 78, 0.18);
  overflow: hidden;
}

.secret-panel .lead {
  max-width: 100%;
}

.secret-panel::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95) 0 26%, transparent 27%),
    radial-gradient(circle at center, rgba(255, 200, 87, 0.32), rgba(242, 143, 59, 0.06) 60%, transparent 70%);
  pointer-events: none;
}

.secret-ribbon {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.45), rgba(242, 143, 59, 0.22));
  color: #6e3d00;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.secret-credit {
  justify-self: end;
  text-align: right;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(37, 49, 70, 0.08);
}

.secret-credit p {
  margin-bottom: 0;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.secret-credit strong {
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  color: var(--accent-strong);
}

.secret-actions {
  display: flex;
  justify-content: flex-start;
}

.hidden {
  display: none !important;
}

.language-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-button {
  min-width: 48px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.lang-button.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1d1200;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  font-size: 0.72rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.85rem, 2.7vw, 3rem);
  line-height: 0.95;
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(1.22rem, 1.8vw, 1.8rem);
  margin-bottom: 8px;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.95rem);
  line-height: 1.14;
  margin-bottom: 18px;
}

.lead {
  color: var(--text-soft);
  font-size: clamp(0.94rem, 1.05vw, 1.02rem);
  max-width: 32ch;
}

.intro-content {
  display: grid;
  grid-template-columns: minmax(0, 70%) minmax(0, 30%);
  gap: 1.4vw;
  align-items: start;
  min-height: min(72vh, 620px);
}

.intro-copy {
  display: grid;
  gap: 14px;
  align-content: center;
  max-width: 100%;
}

.intro-panel .scene-card {
  margin-top: 60px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.difficulty-card {
  width: 100%;
  min-height: 82px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.difficulty-card strong,
.difficulty-card span {
  display: block;
}

.difficulty-card strong {
  margin-bottom: 6px;
  font-size: 0.97rem;
}

.difficulty-card span {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.difficulty-card[aria-checked="true"] {
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.38), rgba(242, 143, 59, 0.2));
  border-color: rgba(242, 143, 59, 0.5);
  box-shadow: inset 0 0 0 1px rgba(242, 143, 59, 0.2);
}

.primary-button,
.secondary-button,
.answer-button {
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease;
  touch-action: manipulation;
}

.primary-button,
.secondary-button {
  min-height: 62px;
  padding: 0 24px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1d1200;
}

.secondary-button {
  min-height: 54px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.secondary-button#next-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1d1200;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(242, 143, 59, 0.18);
}

.primary-button:hover,
.secondary-button:hover,
.answer-button:hover {
  transform: translateY(-1px);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
}

.status-card,
.question-card,
.explanation-panel,
.scene-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.status-card {
  padding: 12px 14px;
  text-align: center;
}

.status-card span {
  display: block;
  color: var(--text-soft);
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(37, 49, 70, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.2s ease;
}

.question-card {
  padding: 16px;
}

.question-card h3 {
  font-size: clamp(1.18rem, 1.75vw, 1.68rem);
  line-height: 1.2;
  max-width: none;
  width: 100%;
}

.question-card h3.long-question {
  font-size: clamp(1.05rem, 1.45vw, 1.34rem);
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answers[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.answers[data-count="3"] .answer-button:last-child {
  grid-column: 1 / span 2;
  justify-self: center;
  width: min(48%, 100%);
}

.answer-button {
  min-height: 80px;
  width: 100%;
  padding: 13px 15px;
  text-align: left;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-main);
  border: 1px solid var(--border);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.28;
}

.answer-button.is-correct {
  background: rgba(77, 187, 125, 0.34);
  border-color: rgba(48, 149, 95, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.answer-button.is-wrong {
  background: rgba(229, 93, 93, 0.34);
  border-color: rgba(206, 63, 63, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.answer-button.is-wrong-picked {
  background: rgba(216, 66, 66, 0.46);
  border-color: rgba(118, 28, 28, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.answer-button.is-picked {
  position: relative;
}

.answer-button.is-picked::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 3px solid rgba(248, 205, 84, 0.92);
  border-radius: 18px;
  opacity: 0.9;
  pointer-events: none;
  animation: pickedPulse 1.4s ease-in-out infinite;
}

.answer-button.is-picked.is-correct::after {
  border-color: rgba(94, 196, 130, 0.92);
}

.answer-button.is-picked.is-wrong-picked::after {
  border-color: rgba(255, 157, 87, 0.95);
}

@keyframes pickedPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

.answer-button:disabled {
  cursor: default;
  opacity: 0.95;
}

.bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
  align-items: start;
  margin-top: 12px;
}

.explanation-panel {
  padding: 16px 18px;
  min-height: 148px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.explanation-panel.is-empty .explanation-text {
  opacity: 0;
}

.explanation-panel.is-empty {
  opacity: 0;
  transform: translateY(8px);
}

.bottom-row .explanation-panel {
  min-width: 0;
}

.bottom-row .scene-card {
  width: 100%;
  justify-self: end;
}

.explanation-text {
  margin-bottom: 0;
  color: var(--text-main);
  font-size: 1.13rem;
  line-height: 1.64;
  white-space: pre-line;
  max-width: none;
  width: 100%;
}

.quiz-footer,
.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.quiz-footer {
  justify-content: stretch;
}

.quiz-footer .secondary-button {
  width: 100%;
}

#feedback-message {
  margin-bottom: 0;
  color: var(--text-main);
  font-size: 0.96rem;
}

.scene-card {
  position: relative;
  --scene-height: 280px;
  height: var(--scene-height);
  overflow: hidden;
  --rig-x: 0px;
  --rig-y: 0px;
  --boat-x: 0px;
  --boat-y: 0px;
  --thief-x: 0px;
  --thief-y: 10px;
  --rod-x: 0px;
  --rod-y: 0px;
  --line-x: 0px;
  --line-y: 25px;
  --hook-x: -5px;
  --hook-y: 45px;
  background:
    linear-gradient(180deg, #fffaf1 0%, #fff4dd 52%, #d8f0ee 52%, #c2e6e4 100%);
}

.scene-small {
  --scene-height: 280px;
}

@media (min-width: 721px) {
  .quiz-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    column-gap: 16px;
    align-items: start;
  }

  .quiz-header {
    grid-column: 1 / -1;
  }

  .quiz-panel .progress-track,
  .quiz-panel .question-card {
    grid-column: 1;
  }

  .quiz-panel .quiz-footer {
    grid-column: 1 / -1;
  }

  .quiz-panel .explanation-panel {
    grid-column: 1 / -1;
    margin-top: 0;
    max-height: 18vh;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .quiz-panel #quiz-scene {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    justify-self: end;
    width: 100%;
  }

  .quiz-panel .quiz-footer {
    grid-column: 1 / -1;
    margin-top: 8px;
  }

  .quiz-panel .bottom-row {
    display: contents;
  }

  .quiz-panel .explanation-panel::-webkit-scrollbar {
    width: 8px;
  }

  .quiz-panel .explanation-panel::-webkit-scrollbar-thumb {
    background: rgba(37, 49, 70, 0.2);
    border-radius: 999px;
  }
}

.scene-water {
  position: absolute;
  inset: auto 0 0 0;
  height: 86px;
  background: linear-gradient(180deg, rgba(111, 199, 194, 0.25), rgba(111, 199, 194, 0.9));
  z-index: 0;
}

.scene-water::before,
.scene-water::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.scene-water::before {
  top: 12px;
  height: 8px;
  background:
    radial-gradient(circle at 16% 50%, rgba(255, 255, 255, 0.22) 0 5px, transparent 6px),
    radial-gradient(circle at 38% 50%, rgba(255, 255, 255, 0.18) 0 7px, transparent 8px),
    radial-gradient(circle at 68% 50%, rgba(255, 255, 255, 0.2) 0 6px, transparent 7px),
    radial-gradient(circle at 88% 50%, rgba(255, 255, 255, 0.16) 0 5px, transparent 6px);
  opacity: 0.85;
}

.scene-water::after {
  bottom: 16px;
  height: 10px;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(255, 255, 255, 0.16) 14% 16%, transparent 16% 39%, rgba(255, 255, 255, 0.14) 39% 41%, transparent 41% 66%, rgba(255, 255, 255, 0.14) 66% 68%, transparent 68% 100%);
  opacity: 0.75;
}

.scene-sun {
  position: absolute;
  right: 38px;
  top: 26px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7bf 0 20%, #ffd96b 35%, #ffbe45 100%);
  box-shadow: 0 0 0 10px rgba(255, 223, 130, 0.15);
  animation: sunGlow 5.6s ease-in-out infinite;
  z-index: 1;
}

.scene-sun::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 216, 102, 0.22);
}

.scene-cloud-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.scene-cloud {
  position: absolute;
  left: var(--cloud-start, -140px);
  width: var(--cloud-width, 64px);
  height: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 249, 255, 0.96));
  border-radius: 999px;
  border: 1px solid rgba(114, 102, 78, 0.24);
  box-shadow:
    0 8px 14px rgba(114, 102, 78, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.68);
  opacity: 0.95;
}

.scene-cloud.is-drifting {
  animation: cloudTraverse var(--cloud-duration, 28s) linear forwards;
  will-change: left, opacity;
}

.scene-cloud::before,
.scene-cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.scene-cloud::before {
  width: 28px;
  height: 28px;
  left: 6px;
  top: -12px;
}

.scene-cloud::after {
  width: 24px;
  height: 24px;
  right: 8px;
  top: -8px;
}

.scene-cloud-small {
  --cloud-width: 52px;
  height: 18px;
  opacity: 1;
  z-index: 2;
}

.scene-cloud-medium {
  --cloud-width: 64px;
  height: 22px;
  z-index: 2;
}

.scene-cloud-large {
  --cloud-width: 80px;
  height: 24px;
  opacity: 1;
  z-index: 2;
}

.scene-boat {
  position: absolute;
  bottom: calc(70px + var(--rig-y) + var(--boat-y));
  right: calc(18px - var(--rig-x) - var(--boat-x));
  width: 104px;
  height: 18px;
  background: #8d6038;
  border-radius: 0 0 18px 18px;
  z-index: 3;
}

.scene-boat::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 10px;
  width: 84px;
  height: 12px;
  background: #9d734a;
  border-radius: 10px;
}

.thief {
  position: absolute;
  bottom: calc(71px + var(--rig-y) + var(--thief-y));
  right: calc(36px - var(--rig-x) - var(--thief-x));
  width: 86px;
  height: 118px;
  animation: thiefBob 3.6s ease-in-out infinite;
  z-index: 3;
}

.thief-head {
  position: absolute;
  top: 0;
  right: 18px;
  width: 34px;
  height: 34px;
  background:
    radial-gradient(circle at 35% 42%, #f8e8d1 0 1.8px, transparent 2px),
    radial-gradient(circle at 65% 42%, #f8e8d1 0 1.8px, transparent 2px),
    linear-gradient(180deg, transparent 0 34%, #18212f 34% 60%, transparent 60% 100%),
    #253146;
  border-radius: 50%;
}

.thief-head::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 16px;
  height: 7px;
  border-radius: 999px;
  border-bottom: 2px solid #f8e8d1;
  transform: translateX(-50%);
  opacity: 1;
}

.thief-head::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 1px;
  width: 32px;
  height: 14px;
  background: #18212f;
  border-radius: 999px 999px 3px 3px;
}

.thief-body {
  position: absolute;
  top: 30px;
  right: 14px;
  width: 42px;
  height: 54px;
  background:
    repeating-linear-gradient(180deg, #f7f2e8 0 7px, #253146 7px 14px);
  border: 2px solid #18212f;
  border-radius: 18px 18px 10px 10px;
}

.thief-body::before,
.thief-body::after {
  content: "";
  position: absolute;
  bottom: -26px;
  width: 7px;
  height: 30px;
  background: #253146;
  border-radius: 999px;
}

.thief-body::before {
  left: 8px;
  transform: rotate(10deg);
}

.thief-body::after {
  right: 8px;
  transform: rotate(-10deg);
}

.thief-rod {
  position: absolute;
  top: calc(54px + var(--rod-y));
  left: calc(-70px + var(--rod-x));
  width: 110px;
  height: 4px;
  background: #7e5a33;
  border-radius: 999px;
  transform: rotate(45deg);
  transform-origin: right center;
}

.scene-line {
  position: absolute;
  top: calc(31px + var(--rig-y) + var(--line-y));
  left: calc(100% - 160px - var(--rig-x) + var(--line-x));
  width: 2px;
  height: 170px;
  background: rgba(37, 49, 70, 0.38);
  transform-origin: top center;
  animation: lineSway 3.4s ease-in-out infinite;
  z-index: 3;
}

.scene-line::after {
  content: "";
  position: absolute;
  top: calc(100% - 20px);
  left: -4px;
  width: 18px;
  height: 18px;
  border: 3px solid #253146;
  border-top: 0;
  border-left-color: transparent;
  border-radius: 0 0 18px 18px;
}

.scene-boat::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 4px;
  width: 16px;
  height: 3px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  box-shadow:
    18px -4px 0 rgba(255, 255, 255, 0.45),
    34px 1px 0 rgba(255, 255, 255, 0.5);
}

.scene-line::before {
  content: "";
  position: absolute;
  top: calc(100% - 20px);
  left: 0;
  width: 4px;
  height: 20px;
  background: #253146;
  border-radius: 999px;
}

.fish {
  position: absolute;
  left: var(--fish-left, auto);
  bottom: var(--fish-bottom, auto);
  width: var(--fish-width, 40px);
  height: var(--fish-height, 20px);
  border-radius: var(--fish-radius, 999px);
  background: var(--fish-body, linear-gradient(135deg, #ffab74, #ff7f59));
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.1);
  transform-origin: center;
  animation: var(--fish-motion, orbitMain) var(--fish-duration, 4.6s) var(--fish-ease, linear) infinite var(--fish-direction, normal);
  opacity: var(--fish-opacity, 1);
  z-index: 3;
}

.fish::before,
.fish::after {
  content: "";
  position: absolute;
}

.fish::before {
  inset: var(--fish-eye-top, 8px) auto auto var(--fish-eye-left, 10px);
  width: var(--fish-eye-size, 6px);
  height: var(--fish-eye-size, 6px);
  background: var(--fish-eye, #253146);
  border-radius: 50%;
}

.fish::after {
  top: var(--fish-tail-top, 7px);
  right: var(--fish-tail-right, -12px);
  width: 0;
  height: 0;
  border-left: var(--fish-tail-width, 14px) solid var(--fish-tail-color, #ff9a62);
  border-top: var(--fish-tail-thickness, 9px) solid transparent;
  border-bottom: var(--fish-tail-thickness, 9px) solid transparent;
}

.fish-main {
  --fish-left: calc(100% - 154px);
  --fish-bottom: 16px;
  --fish-width: 46px;
  --fish-height: 24px;
  --fish-body: linear-gradient(135deg, #ffab74, #ff7f59);
  --fish-tail-color: #ff9a62;
  --fish-motion: orbitMain;
  --fish-duration: 4.6s;
  --fish-ease: linear;
}

.fish-small {
  --fish-left: calc(100% - 188px);
  --fish-bottom: -2px;
  --fish-width: 34px;
  --fish-height: 18px;
  --fish-body: linear-gradient(135deg, #ffe39c, #ffbe78);
  --fish-tail-color: #ffbe78;
  --fish-tail-width: 12px;
  --fish-tail-thickness: 8px;
  --fish-radius: 999px 999px 55% 55%;
  --fish-motion: orbitSmall;
  --fish-duration: 3.8s;
  --fish-ease: linear;
  --fish-direction: reverse;
}

.fish-small::after {
  border-left-color: #ffbe78;
}

.fish-speckled {
  --fish-left: calc(100% - 110px);
  --fish-bottom: 34px;
  --fish-width: 40px;
  --fish-height: 20px;
  --fish-body:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.42) 0 8%, transparent 9%),
    radial-gradient(circle at 58% 62%, rgba(255, 255, 255, 0.22) 0 7%, transparent 8%),
    linear-gradient(135deg, #8de0d1, #56b9aa);
  --fish-tail-color: #56b9aa;
  --fish-tail-width: 12px;
  --fish-tail-thickness: 8px;
  --fish-radius: 58% 42% 62% 38% / 60% 58% 42% 40%;
  --fish-eye-left: 11px;
  --fish-motion: orbitSpeckled;
  --fish-duration: 5.1s;
  --fish-ease: ease-in-out;
}

.fish-slim {
  --fish-left: calc(100% - 238px);
  --fish-bottom: 26px;
  --fish-width: 50px;
  --fish-height: 16px;
  --fish-body: linear-gradient(135deg, #ffd2b8, #ef7c68);
  --fish-tail-color: #ef7c68;
  --fish-tail-width: 10px;
  --fish-tail-thickness: 7px;
  --fish-radius: 999px;
  --fish-eye-left: 9px;
  --fish-eye-size: 5px;
  --fish-motion: orbitSlender;
  --fish-duration: 4.9s;
  --fish-ease: ease-in-out;
  --fish-direction: reverse;
}

.fish-round {
  --fish-left: 42px;
  --fish-bottom: 24px;
  --fish-width: 28px;
  --fish-height: 28px;
  --fish-body: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.34) 0 7%, transparent 8%), linear-gradient(135deg, #f4c16d, #e78f49);
  --fish-tail-color: #e78f49;
  --fish-tail-width: 10px;
  --fish-tail-thickness: 7px;
  --fish-radius: 50%;
  --fish-eye-left: 7px;
  --fish-eye-top: 9px;
  --fish-motion: orbitRound;
  --fish-duration: 5.8s;
  --fish-ease: ease-in-out;
}

.fish-long {
  --fish-left: 198px;
  --fish-bottom: 50px;
  --fish-width: 52px;
  --fish-height: 15px;
  --fish-body: linear-gradient(135deg, #b4e6ef, #74cbd5);
  --fish-tail-color: #74cbd5;
  --fish-tail-width: 12px;
  --fish-tail-thickness: 7px;
  --fish-radius: 999px;
  --fish-eye-left: 10px;
  --fish-eye-size: 5px;
  --fish-motion: orbitLong;
  --fish-duration: 6.1s;
  --fish-ease: ease-in-out;
  --fish-direction: reverse;
}

.fish-dot {
  --fish-left: 132px;
  --fish-bottom: 8px;
  --fish-width: 24px;
  --fish-height: 14px;
  --fish-body: linear-gradient(135deg, #d8c0ff, #9f7be8);
  --fish-tail-color: #9f7be8;
  --fish-tail-width: 8px;
  --fish-tail-thickness: 6px;
  --fish-radius: 999px;
  --fish-eye-left: 6px;
  --fish-eye-size: 4px;
  --fish-motion: orbitDot;
  --fish-duration: 4.4s;
  --fish-ease: linear;
  --fish-direction: reverse;
}

.scene-reaction {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 78px;
  height: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.88);
  transform-origin: center;
  pointer-events: none;
  z-index: 6;
  filter: drop-shadow(0 6px 12px rgba(37, 49, 70, 0.14));
}

.scene-correct .scene-reaction {
  animation: reactionBadgePop 0.78s ease-out forwards;
}

.scene-wrong .scene-reaction {
  opacity: 0;
  animation: none;
}

.scene-caption {
  position: absolute;
  left: 14px;
  top: 12px;
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-soft);
  z-index: 3;
}

.scene-bubble {
  position: absolute;
  top: 18px;
  right: 72px;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(37, 49, 70, 0.12);
  box-shadow: 0 10px 20px rgba(37, 49, 70, 0.08);
  text-align: center;
  opacity: 0;
  transform: translateY(6px) scale(0.92);
  z-index: 3;
}

.scene-bubble::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-right: 1px solid rgba(37, 49, 70, 0.12);
  border-bottom: 1px solid rgba(37, 49, 70, 0.12);
  transform: rotate(45deg);
}

.scene-bubble span {
  display: none;
  font-weight: 700;
  color: #253146;
}

.scene-correct .fish {
  animation: var(--fish-correct-animation, escape) var(--fish-correct-duration, 0.95s) ease forwards;
}

.scene-correct .fish-main {
  --fish-correct-animation: escape;
  --fish-correct-duration: 0.9s;
}

.scene-correct .fish-small {
  --fish-correct-animation: fleeSmall;
  --fish-correct-duration: 0.8s;
}

.scene-correct .fish-speckled {
  --fish-correct-animation: escapeSpeckled;
  --fish-correct-duration: 1s;
}

.scene-correct .fish-slim {
  --fish-correct-animation: escapeSlender;
  --fish-correct-duration: 0.95s;
}

.scene-correct .fish-round {
  --fish-correct-animation: escapeRound;
  --fish-correct-duration: 1.05s;
}

.scene-correct .fish-long {
  --fish-correct-animation: escapeLong;
  --fish-correct-duration: 1.05s;
}

.scene-correct .fish-dot {
  --fish-correct-animation: escapeDot;
  --fish-correct-duration: 0.95s;
}

.scene-correct .fish.is-caught {
  --fish-correct-animation: escape;
  --fish-correct-duration: 0.9s;
}

.scene-correct .thief-head {
  animation: thiefAngry 0.9s ease forwards;
}

.scene-correct .thief-head {
  background:
    linear-gradient(160deg, transparent 0 46%, #f8e8d1 46% 50%, transparent 50% 100%) 5px 9px / 9px 6px no-repeat,
    linear-gradient(20deg, transparent 0 46%, #f8e8d1 46% 50%, transparent 50% 100%) 20px 9px / 9px 6px no-repeat,
    radial-gradient(circle at 35% 42%, #f8e8d1 0 1.3px, transparent 1.5px),
    radial-gradient(circle at 65% 42%, #f8e8d1 0 1.3px, transparent 1.5px),
    linear-gradient(180deg, transparent 0 34%, #18212f 34% 60%, transparent 60% 100%),
    #253146;
}

.scene-correct .scene-line {
  transform: none;
}

.scene-correct .thief-head::after {
  bottom: 4px;
  width: 18px;
  height: 9px;
  border-bottom: 0;
  border-top: 3px solid #f8e8d1;
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%) rotate(180deg);
  opacity: 1;
}

.scene-correct .scene-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
  background: rgba(255, 236, 236, 0.96);
  border-color: rgba(229, 122, 122, 0.28);
}

.scene-correct .bubble-angry {
  display: inline;
  color: #c65151;
}

.scene-wrong .fish.is-caught {
  transform-origin: 22px 3px;
  animation: hookCatchAndReel 1.15s ease forwards;
}

.scene-wrong .fish-main {
  animation: escape 0.9s ease forwards;
}

.scene-wrong.scene-caught-idle .fish.is-caught {
  transform: translate(calc(var(--catch-shift-x, 0px) - 3px), calc(var(--catch-shift-y, 0px) - 91px)) rotate(90deg);
  animation: caughtFishIdle 2.1s ease-in-out infinite;
}

.scene-wrong .fish-small {
  animation: fleeSmall 0.8s ease forwards;
}

.scene-wrong .fish-speckled {
  animation: fleeSpeckled 0.95s ease forwards;
}

.scene-wrong .fish-slim {
  animation: fleeSlender 0.9s ease forwards;
}

.scene-wrong .fish-round {
  animation: fleeRound 0.95s ease forwards;
}

.scene-wrong .fish-long {
  animation: fleeLong 0.95s ease forwards;
}

.scene-wrong .fish-dot {
  animation: fleeDot 0.9s ease forwards;
}

.scene-wrong .thief-head::after {
  left: 50%;
  bottom: 7px;
  width: 16px;
  height: 8px;
  background: transparent;
  border-bottom: 3px solid #f8e8d1;
  border-radius: 0 0 12px 12px;
  transform: translateX(-50%) rotate(0deg);
  opacity: 1;
}

.scene-wrong .thief-head {
  background:
    radial-gradient(circle at 35% 42%, #f8e8d1 0 1.4px, transparent 1.7px),
    radial-gradient(circle at 65% 42%, #f8e8d1 0 1.4px, transparent 1.7px),
    linear-gradient(180deg, transparent 0 34%, #18212f 34% 60%, transparent 60% 100%),
    #253146;
}

.scene-wrong .scene-line {
  animation: reelLine 0.95s ease 0.2s forwards;
  opacity: 1;
}

.scene-wrong .scene-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
  background: rgba(255, 250, 226, 0.96);
  border-color: rgba(255, 200, 87, 0.35);
}

.scene-wrong .bubble-caught {
  display: inline;
  color: #d0842b;
}

.result-panel {
  text-align: center;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(18%, 22%) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto auto auto auto;
  gap: 8px 1.2vw;
  align-items: start;
  max-height: min(80vh, 700px);
}

.result-score {
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0;
}

.result-hero {
  position: relative;
  width: min(100%, 170px);
  aspect-ratio: 1;
  height: auto;
  margin: 0;
  grid-column: 1;
  grid-row: 2 / span 4;
  justify-self: center;
  align-self: start;
}

.result-badge {
  position: absolute;
  right: 12px;
  top: 24px;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  line-height: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 235, 0.94));
  border: 1px solid rgba(37, 49, 70, 0.12);
  box-shadow: 0 10px 24px rgba(114, 102, 78, 0.12);
}

.result-badge::before,
.result-badge::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.7);
}

.result-badge[data-rank="perfect"]::before,
.result-badge[data-rank="good"]::before {
  opacity: 1;
  width: 10px;
  height: 10px;
  left: -12px;
  top: 12px;
  background: #ffca66;
  box-shadow:
    18px -8px 0 #9dd6cb,
    28px 8px 0 #f28f3b,
    6px 26px 0 #8bb6ff,
    26px 26px 0 #ed6a5e;
}

.result-badge[data-rank="perfect"]::after,
.result-badge[data-rank="good"]::after {
  opacity: 1;
  width: 8px;
  height: 8px;
  right: -10px;
  top: 18px;
  background: #f28f3b;
  box-shadow:
    -18px 12px 0 #ffc857,
    -10px 34px 0 #9dd6cb,
    -28px 28px 0 #ed6a5e;
}

.hero-ring,
.hero-fish,
.hero-shield {
  position: absolute;
}

.hero-ring {
  inset: 12px;
  border-radius: 50%;
  border: 10px solid rgba(255, 200, 87, 0.35);
  animation: heroPulse 3s ease-in-out infinite;
}

.hero-fish {
  left: 34px;
  top: 76px;
  width: 72px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffab74, #ff7f59);
}

.hero-fish::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 7px;
  height: 7px;
  background: #253146;
  border-radius: 50%;
}

.hero-fish::after {
  content: "";
  position: absolute;
  top: 10px;
  right: -16px;
  width: 0;
  height: 0;
  border-left: 18px solid #ff7f59;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.hero-shield {
  right: 24px;
  top: 34px;
  width: 62px;
  height: 74px;
  border-radius: 22px 22px 28px 28px;
  background: linear-gradient(180deg, #ffd66e, #f2a93b);
  clip-path: polygon(50% 0%, 100% 18%, 100% 60%, 50% 100%, 0% 60%, 0% 18%);
  box-shadow: 0 10px 24px rgba(242, 143, 59, 0.26);
}

.result-note {
  margin: 0;
  max-width: none;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(37, 49, 70, 0.1);
  color: var(--text-main);
  font-weight: 600;
  text-align: left;
  white-space: normal;
  line-height: 1.55;
}

.result-note p {
  margin: 0 0 10px;
}

.result-note p:last-child {
  margin-bottom: 0;
}

.result-tip {
  font-weight: 500;
}

.result-review {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.result-review.hidden {
  display: none !important;
}

.result-review-intro {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
}

.result-review-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  cursor: grab;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  overscroll-behavior-x: contain;
  width: 100%;
}

.result-review-list.is-dragging {
  cursor: grabbing;
}

.result-review-list::-webkit-scrollbar {
  display: none;
}

.result-review-card {
  flex: 0 0 28vw;
  width: 28vw;
  max-width: 340px;
  height: 220px;
  padding: 9px 10px 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 49, 70, 0.08);
  text-align: left;
  overflow: hidden;
  scroll-snap-align: start;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  will-change: box-shadow;
  transition: box-shadow 0.18s ease;
}

.result-review-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding-right: 0;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: none;
  cursor: grab;
}

.result-review-body.is-dragging-y {
  cursor: grabbing;
}

.result-review-body::-webkit-scrollbar {
  display: none;
}

.result-review-anchor {
  display: none;
}

.result-review-anchor span {
  display: none;
}

.result-review-title {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.79rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-review-question {
  margin: 0 0 6px;
  font-size: 0.86rem;
  line-height: 1.22;
  white-space: normal;
}

.result-review-answer,
.result-review-explanation {
  margin: 0 0 4px;
  font-weight: 500;
  line-height: 1.22;
  font-size: 0.8rem;
}

.result-review-explanation {
  margin-bottom: 0;
}

.result-review-footer {
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px solid rgba(37, 49, 70, 0.08);
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.22;
}

.result-panel > .eyebrow {
  grid-column: 1 / -1;
  grid-row: 1;
  margin-bottom: 0;
}

#result-title,
.result-score,
#result-summary,
#result-note,
.result-review,
.result-actions {
  grid-column: 2;
  margin-top: 0;
}

.result-actions-inline {
  position: static;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  margin-top: 4px;
  justify-self: stretch;
  z-index: 2;
}

.result-actions-inline .primary-button,
.result-actions-inline .secondary-button {
  width: 100%;
}

@media (max-width: 720px) {
  .result-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto auto auto;
    max-height: none;
  }

  .result-panel > .eyebrow,
  #result-title,
  .result-score,
  #result-summary,
  #result-note,
  .result-review,
  .result-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .result-actions-inline {
    width: 100%;
    justify-self: stretch;
  }

  .result-hero {
    justify-self: center;
    grid-column: 1;
    grid-row: auto;
  }

  .result-review-card {
    flex-basis: 84vw;
    width: 84vw;
    height: 250px;
  }
}

.result-panel[data-result="perfect"] {
  background:
    radial-gradient(circle at top, rgba(255, 212, 105, 0.34), transparent 34%),
    rgba(255, 251, 245, 0.94);
}

.result-panel[data-result="good"] {
  background:
    radial-gradient(circle at top, rgba(157, 214, 203, 0.28), transparent 34%),
    rgba(255, 251, 245, 0.94);
}

.result-panel[data-result="retry"] {
  background:
    radial-gradient(circle at top, rgba(229, 122, 122, 0.18), transparent 34%),
    rgba(255, 251, 245, 0.94);
}

.result-panel[data-result="perfect"] .hero-shield {
  transform: scale(1.06);
}

.result-panel[data-result="good"] .hero-fish {
  animation: heroSwim 3.2s ease-in-out infinite;
}

.result-panel[data-result="retry"] .hero-ring {
  border-color: rgba(229, 122, 122, 0.28);
}

.result-panel[data-result="perfect"] .result-badge,
.result-panel[data-result="good"] .result-badge {
  color: #f28f3b;
  box-shadow: 0 10px 24px rgba(242, 143, 59, 0.18);
}

.result-panel[data-result="retry"] .result-badge {
  color: #ca6b55;
  box-shadow: 0 10px 24px rgba(229, 122, 122, 0.16);
}

@keyframes thiefBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes lineSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}

@keyframes orbitMain {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(18px, -8px) rotate(-8deg); }
  50% { transform: translate(8px, -18px) rotate(0deg); }
  75% { transform: translate(-16px, -8px) rotate(8deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes orbitSmall {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-18px, -8px) rotate(8deg); }
  50% { transform: translate(-6px, -18px) rotate(0deg); }
  75% { transform: translate(14px, -10px) rotate(-8deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes orbitSpeckled {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(10px, -6px) rotate(-5deg); }
  45% { transform: translate(18px, 4px) rotate(4deg); }
  70% { transform: translate(4px, -16px) rotate(0deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes orbitSlender {
  0% { transform: translate(0, 0) scaleX(1) rotate(0deg); }
  25% { transform: translate(-10px, -4px) scaleX(0.98) rotate(-5deg); }
  50% { transform: translate(-18px, -14px) scaleX(1.02) rotate(2deg); }
  75% { transform: translate(-4px, -6px) scaleX(0.99) rotate(6deg); }
  100% { transform: translate(0, 0) scaleX(1) rotate(0deg); }
}

@keyframes orbitRound {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  20% { transform: translate(10px, -5px) rotate(6deg) scale(1.02); }
  50% { transform: translate(18px, 4px) rotate(-4deg) scale(0.98); }
  75% { transform: translate(4px, -12px) rotate(8deg) scale(1.01); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes orbitLong {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-14px, -6px) rotate(-6deg); }
  50% { transform: translate(-20px, -16px) rotate(0deg); }
  75% { transform: translate(-8px, -10px) rotate(6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes orbitDot {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(8px, -4px) rotate(-10deg); }
  50% { transform: translate(16px, 3px) rotate(8deg); }
  75% { transform: translate(4px, -8px) rotate(-6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes escapeRound {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(104px, -26px) rotate(16deg) scale(0.95); opacity: 0; }
}

@keyframes escapeLong {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(128px, 18px) rotate(18deg); opacity: 0; }
}

@keyframes escapeDot {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(-98px, 12px) rotate(-16deg); opacity: 0; }
}

@keyframes fleeRound {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(-96px, 10px) rotate(-18deg) scale(0.96); opacity: 0; }
}

@keyframes fleeLong {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(118px, -8px) rotate(18deg); opacity: 0; }
}

@keyframes fleeDot {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(-104px, 18px) rotate(-18deg); opacity: 0; }
}

@keyframes buoyBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes sunGlow {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.08); }
}

@keyframes cloudTraverse {
  0% {
    left: var(--cloud-start, -140px);
    opacity: 1;
  }
  100% {
    left: var(--cloud-end, calc(100% + 140px));
    opacity: 1;
  }
}

@keyframes thiefAngry {
  0% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(1px) rotate(-6deg); }
  50% { transform: translateY(0) rotate(6deg); }
  75% { transform: translateY(1px) rotate(-4deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes reactionBadgePop {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.82) rotate(-8deg);
  }
  35% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04) rotate(4deg);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes escape {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-108px, -44px) rotate(-18deg); opacity: 0; }
}

@keyframes fleeSmall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(-92px, 18px) rotate(-18deg); opacity: 0; }
}

@keyframes escapeSpeckled {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  40% { transform: translate(12px, 6px) rotate(8deg); opacity: 1; }
  100% { transform: translate(120px, 24px) rotate(18deg); opacity: 0; }
}

@keyframes escapeSlender {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  35% { transform: translate(-8px, 6px) rotate(-8deg); opacity: 1; }
  100% { transform: translate(-126px, 22px) rotate(-20deg); opacity: 0; }
}

@keyframes fleeSpeckled {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  40% { transform: translate(14px, 4px) rotate(10deg); opacity: 1; }
  100% { transform: translate(118px, 18px) rotate(20deg); opacity: 0; }
}

@keyframes fleeSlender {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  35% { transform: translate(-10px, 4px) rotate(-10deg); opacity: 1; }
  100% { transform: translate(-120px, 16px) rotate(-18deg); opacity: 0; }
}

@keyframes hookCatchAndReel {
  0% { transform: translate(calc(var(--catch-shift-x, 0px) + 13px), calc(var(--catch-shift-y, 0px) + 25px)) rotate(0deg); }
  17.4% { transform: translate(calc(var(--catch-shift-x, 0px) + 3px), calc(var(--catch-shift-y, 0px) + 1px)) rotate(90deg); }
  52% { transform: translate(calc(var(--catch-shift-x, 0px) + 1px), calc(var(--catch-shift-y, 0px) - 25px)) rotate(90deg); }
  78% { transform: translate(calc(var(--catch-shift-x, 0px) - 1px), calc(var(--catch-shift-y, 0px) - 67px)) rotate(90deg); }
  100% { transform: translate(calc(var(--catch-shift-x, 0px) - 3px), calc(var(--catch-shift-y, 0px) - 91px)) rotate(90deg); }
}

@keyframes caughtFishIdle {
  0%, 100% { transform: translate(calc(var(--catch-shift-x, 0px) - 3px), calc(var(--catch-shift-y, 0px) - 91px)) rotate(90deg); }
  25% { transform: translate(calc(var(--catch-shift-x, 0px) - 3px), calc(var(--catch-shift-y, 0px) - 91px)) rotate(95deg); }
  50% { transform: translate(calc(var(--catch-shift-x, 0px) - 3px), calc(var(--catch-shift-y, 0px) - 91px)) rotate(87deg); }
  75% { transform: translate(calc(var(--catch-shift-x, 0px) - 3px), calc(var(--catch-shift-y, 0px) - 91px)) rotate(93deg); }
}

@keyframes reelLine {
  0% { height: 170px; opacity: 1; }
  65% { height: 110px; opacity: 1; }
  100% { height: 60px; opacity: 1; }
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes heroSwim {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px) translateY(-3px); }
}

@media (max-width: 720px) {
  .top-links {
    top: 10px;
    left: 10px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .website-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .app-shell {
    width: 96vw;
  }

  .panel {
    padding: 14px;
  }

  .intro-content,
  .bottom-row {
    grid-template-columns: 1fr;
  }

  .intro-content {
    min-height: auto;
  }

  .scene-card {
    --scene-height: 180px;
  }

  .scene-small {
    --scene-height: 180px;
  }

  .scene-card {
    display: none;
  }

  .intro-content {
    gap: 10px;
    min-height: auto;
  }

  .difficulty-grid {
    gap: 8px;
  }

  .difficulty-card {
    min-height: 72px;
    padding: 10px 11px;
  }

  .answers,
  .status-strip,
  .difficulty-grid {
    grid-template-columns: 1fr;
  }

  .answers[data-count="3"] .answer-button:last-child {
    grid-column: auto;
    width: 100%;
  }

  .quiz-header,
  .quiz-footer,
  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .language-toggle {
    position: static;
    margin-bottom: 12px;
  }
}

@media (hover: hover) and (pointer: fine) {
  body {
    overflow-y: auto;
    overscroll-behavior: auto;
  }

  .app-shell {
    height: auto;
    min-height: calc(100dvh - var(--top-links-space) - var(--bottom-links-space));
  }

  .quiz-panel,
  .result-panel {
    max-height: none;
    overflow: visible;
    transform: none;
  }

  .quiz-panel .explanation-panel {
    max-height: none;
    overflow: visible;
  }
}
