/* Runner — Fork of Fate (vertical runner) game styles */

/* Layout */
.runner-section {
  padding: 2rem 0 1rem;
}

.runner-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1rem;
}

/* Settings */
.runner-settings {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin: 1rem 0 0;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.settings-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ============================================================
   DIRECTION SWITCH (EN→RU / RU→EN)
   ============================================================ */

.direction-switch {
  display: inline-flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px;
  position: relative;
  gap: 2px;
  user-select: none;
}

.direction-switch__option {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, transform 0.15s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  font-family: inherit;
}

.direction-switch__option:hover:not(.is-active) {
  color: var(--text-primary);
}

.direction-switch__option:active {
  transform: scale(0.96);
}

.direction-switch__option.is-active {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.direction-switch__option:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

[data-theme="dark"] .direction-switch {
  background: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .direction-switch__option.is-active {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5);
}

/* Scene */
.runner-visual {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
}

.runner-scene {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 600px;
  background: linear-gradient(180deg, #87CEEB 0%, #B0E0FF 40%, #90EE90 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: background 0.6s ease;
  perspective: 600px;
}

[data-theme="dark"] .runner-scene {
  background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 40%, #1a3a2a 100%);
}

/* Danger states */
.runner-scene.danger-critical {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.9), var(--shadow-md);
  animation: dangerPulse 0.4s ease-in-out infinite;
}

@keyframes dangerPulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4), var(--shadow-md);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.7), var(--shadow-md);
  }
}

/* Sky */
.runner-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.runner-sun {
  position: absolute;
  top: 20px;
  right: 25px;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #FFD700, #FFA500);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
  animation: sunGlow 3s ease-in-out infinite;
}

[data-theme="dark"] .runner-sun {
  background: radial-gradient(circle, #ddd, #aaa);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes sunGlow {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.85;
  }
}

.runner-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  filter: blur(1px);
  animation: cloudDrift 14s linear infinite;
}

[data-theme="dark"] .runner-cloud {
  background: rgba(255, 255, 255, 0.12);
}

.runner-cloud--1 {
  width: 60px;
  height: 26px;
  top: 40px;
  left: -80px;
  animation-delay: 0s;
}

.runner-cloud--2 {
  width: 80px;
  height: 32px;
  top: 90px;
  left: -100px;
  animation-delay: -5s;
}

.runner-cloud--3 {
  width: 50px;
  height: 22px;
  top: 130px;
  left: -60px;
  animation-delay: -10s;
}

@keyframes cloudDrift {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(500px);
  }
}

/* ============================================================
   VERTICAL ROAD WITH PERSPECTIVE
   ============================================================ */

.runner-road-vertical {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.road-surface {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #6b7280 0%, #4b5563 50%, #374151 100%);
  clip-path: polygon(42% 0%, 58% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
}

[data-theme="dark"] .road-surface {
  background: linear-gradient(180deg, #374151 0%, #1f2937 50%, #111827 100%);
}

.road-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg,
      transparent 0px,
      transparent 30px,
      rgba(255, 255, 255, 0.55) 30px,
      rgba(255, 255, 255, 0.55) 34px,
      transparent 34px,
      transparent 64px);
  animation: roadStripesMove var(--road-speed, 0.8s) linear infinite;
}

.road-surface::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: repeating-linear-gradient(180deg,
      #fbbf24 0px,
      #fbbf24 22px,
      transparent 22px,
      transparent 44px);
  animation: roadStripesMove var(--road-speed, 0.8s) linear infinite;
  mask-image: linear-gradient(180deg, transparent 0%, black 15%, black 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 15%, black 100%);
}

@keyframes roadStripesMove {
  from {
    background-position-y: 0;
  }

  to {
    background-position-y: 64px;
  }
}

/* ============================================================
   FORK (развилка)
   ============================================================ */

.road-fork {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  transform-origin: top center;
  z-index: 3;
  pointer-events: none;
  transition: transform 0.15s linear, top 0.15s linear, height 0.15s linear, opacity 0.15s linear;
  will-change: transform, top, height, opacity;
}

.fork-branch {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
  transition: filter 0.2s ease;
}

.fork-branch--left {
  left: 0;
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.fork-branch--right {
  right: 0;
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.fork-branch-surface {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%);
  opacity: 0.9;
}

[data-theme="dark"] .fork-branch-surface {
  background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
}

.fork-branch--left .fork-branch-surface {
  background: linear-gradient(180deg, #5b21b6 0%, #4c1d95 100%);
}

.fork-branch--right .fork-branch-surface {
  background: linear-gradient(180deg, #0e7490 0%, #155e75 100%);
}

[data-theme="dark"] .fork-branch--left .fork-branch-surface {
  background: linear-gradient(180deg, #4c1d95 0%, #2e1065 100%);
}

[data-theme="dark"] .fork-branch--right .fork-branch-surface {
  background: linear-gradient(180deg, #155e75 0%, #083344 100%);
}

/* Подсветка дороги, на которой стоит бегун */
.fork-branch--left.active-lane .fork-branch-surface {
  box-shadow: inset 0 0 30px rgba(250, 204, 21, 0.7);
  filter: brightness(1.2);
}

.fork-branch--right.active-lane .fork-branch-surface {
  box-shadow: inset 0 0 30px rgba(250, 204, 21, 0.7);
  filter: brightness(1.2);
}

/* Sign with letter */
.fork-sign {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1f2937;
  font-size: 2.2rem;
  font-weight: 900;
  border-radius: var(--radius-lg);
  border: 4px solid #92400e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  transition: all 0.2s ease;
  pointer-events: none;
  animation: signBob 1.2s ease-in-out infinite;
}

@keyframes signBob {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.fork-sign.correct {
  background: linear-gradient(135deg, #34d399, #10b981);
  border-color: #047857;
  color: #fff;
  animation: signCorrect 0.5s ease;
}

.fork-sign.wrong {
  background: linear-gradient(135deg, #f87171, #ef4444);
  border-color: #b91c1c;
  color: #fff;
  animation: signWrong 0.5s ease;
}

@keyframes signCorrect {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
  }

  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0);
  }
}

@keyframes signWrong {

  0%,
  100% {
    transform: translate(-50%, -50%) translateX(0);
  }

  20% {
    transform: translate(-50%, -50%) translateX(-8px) rotate(-5deg);
  }

  60% {
    transform: translate(-50%, -50%) translateX(8px) rotate(5deg);
  }
}

/* Warning stripes */
.road-warning {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(90deg,
      #fbbf24 0px,
      #fbbf24 20px,
      #1f2937 20px,
      #1f2937 40px);
  opacity: 0;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.road-warning.active {
  opacity: 0.85;
  height: 12px;
  animation: warningFlash 0.6s ease-in-out infinite;
}

@keyframes warningFlash {

  0%,
  100% {
    opacity: 0.85;
  }

  50% {
    opacity: 0.5;
  }
}

/* ============================================================
   CLICK ZONES — always-active left/right halves of the scene
   ============================================================ */

.runner-click-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 4;
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.runner-click-zone--left {
  left: 0;
}

.runner-click-zone--right {
  right: 0;
}

.runner-click-zone:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .runner-click-zone:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================================
   RUNNER CHARACTER
   ============================================================ */

.runner-character {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s ease;
  pointer-events: none;
}

.runner-character.stumble {
  animation: stumble 0.5s ease;
}

.runner-character.celebrate {
  animation: celebrate 0.6s ease-in-out 2;
}

.runner-character.spurt {
  animation: spurt 0.4s ease;
}

@keyframes stumble {

  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }

  25% {
    transform: translateX(-50%) rotate(-15deg);
  }

  75% {
    transform: translateX(-50%) rotate(15deg);
  }
}

@keyframes celebrate {

  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(-50%) translateY(-20px) scale(1.1);
  }
}

@keyframes spurt {

  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }

  50% {
    transform: translateX(-50%) scale(1.15) translateY(-5px);
  }
}

.runner-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: runBob 0.4s ease-in-out infinite;
}

@keyframes runBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.runner-head {
  width: 22px;
  height: 22px;
  background: #FFDAB9;
  border-radius: 50%;
  border: 2px solid #333;
  position: relative;
  z-index: 2;
}

[data-theme="dark"] .runner-head {
  background: #d4a574;
  border-color: #888;
}

.runner-head::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #333;
  border-radius: 50%;
  opacity: 0.4;
}

[data-theme="dark"] .runner-head::after {
  background: #555;
}

.runner-torso {
  width: 18px;
  height: 26px;
  background: #2563eb;
  border-radius: 4px;
  margin-top: -2px;
  border: 2px solid #1e40af;
}

[data-theme="dark"] .runner-torso {
  background: #3b82f6;
  border-color: #1d4ed8;
}

.runner-legs {
  display: flex;
  gap: 4px;
  margin-top: -2px;
}

.runner-leg {
  width: 6px;
  height: 16px;
  background: #333;
  border-radius: 2px;
  transform-origin: top center;
}

[data-theme="dark"] .runner-leg {
  background: #888;
}

.runner-leg--left {
  animation: legRunUp 0.4s ease-in-out infinite;
}

.runner-leg--right {
  animation: legRunUp 0.4s ease-in-out infinite reverse;
}

@keyframes legRunUp {

  0%,
  100% {
    transform: rotate(-25deg);
  }

  50% {
    transform: rotate(25deg);
  }
}

.runner-shadow {
  width: 30px;
  height: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  margin: 2px auto 0;
  animation: shadowPulse 0.4s ease-in-out infinite;
}

@keyframes shadowPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.25;
  }

  50% {
    transform: scale(0.85);
    opacity: 0.15;
  }
}

/* Badges */
.runner-distance,
.runner-speed {
  position: absolute;
  top: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  z-index: 6;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.runner-distance {
  left: 12px;
}

.runner-speed {
  right: 12px;
}

/* ============================================================
   CONTROLS (right side)
   ============================================================ */

.runner-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.runner-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  min-width: 80px;
}

.runner-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.runner-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
}

.runner-question {
  text-align: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.runner-question.urgent {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error-color);
  animation: urgentPulse 0.6s ease-in-out infinite;
}

@keyframes urgentPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.runner-question-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.runner-question-word {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.runner-question-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  font-style: italic;
  min-height: 1.2em;
}

.runner-word-build {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  min-height: 3rem;
}

.build-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.8rem;
  border-bottom: 3px solid var(--border-color);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.build-letter.filled {
  border-bottom-color: var(--success-color);
  animation: letterReveal 0.4s ease;
}

.build-letter.current {
  border-bottom-color: var(--primary-color);
  animation: letterPulse 1s ease-in-out infinite;
}

@keyframes letterReveal {
  0% {
    transform: scale(0.5) translateY(-10px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes letterPulse {

  0%,
  100% {
    border-bottom-color: var(--primary-color);
  }

  50% {
    border-bottom-color: var(--secondary-color);
  }
}

.runner-feedback {
  text-align: center;
  min-height: 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.runner-feedback.success {
  color: var(--success-color);
}

.runner-feedback.error {
  color: var(--error-color);
}

.runner-feedback.info {
  color: var(--primary-color);
}

.runner-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.runner-actions .btn {
  flex: 1;
  min-width: 120px;
  justify-content: center;
}

.runner-hints {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.runner-hints p {
  margin: 0;
}

.runner-info {
  padding: 3rem 0;
}

.runner-life {
  display: flex;
  gap: 0.4rem;
  font-size: 1.4rem;
  justify-content: center;
  align-self: center;
}

.life-heart {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.life-heart.lost {
  opacity: 0.2;
  transform: scale(0.8);
  filter: grayscale(1);
}

/* Paused overlay */
.runner-scene.paused::after {
  content: 'ПАУЗА';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.45);
  z-index: 10;
  backdrop-filter: blur(3px);
}

/* Game over overlay */
.runner-scene.game-over::after {
  content: '🏁 ИГРА ОКОНЧЕНА';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10;
  backdrop-filter: blur(4px);
  text-align: center;
  padding: 1rem;
}

.runner-scene.speeding .road-surface::before {
  animation-duration: 0.4s;
}

.runner-scene.speeding .road-surface::after {
  animation-duration: 0.4s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .runner-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* "Растворяем" .runner-controls, чтобы его дети стали прямыми детьми .runner-layout */
  .runner-controls {
    display: contents;
  }

  /* Порядок на мобильном: вопрос → буквы → сцена → статы → фидбек → кнопки → подсказки */
  .runner-question {
    order: 1;
  }

  .runner-word-build {
    order: 2;
    margin-bottom: 0.5rem;
  }

  .runner-visual {
    order: 3;
  }

  .runner-stats {
    order: 4;
    margin-bottom: 0.5rem;
  }

  .runner-feedback {
    order: 5;
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
  }

  .runner-actions {
    order: 6;
  }

  .runner-hints {
    order: 7;
    margin-top: 0.5rem;
  }

  /* Уменьшим визуальные отступы, чтобы всё влезло */
  .runner-question {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .runner-stat {
    padding: 0.4rem 0.8rem;
    min-width: 60px;
  }

  .runner-stat-label {
    font-size: 0.7rem;
  }

  .runner-stat-value {
    font-size: 1.1rem;
  }

  .runner-scene {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .runner-head {
    width: 18px;
    height: 18px;
  }

  .runner-torso {
    width: 15px;
    height: 22px;
  }

  .runner-leg {
    width: 5px;
    height: 13px;
  }

  .fork-sign {
    width: 56px;
    height: 56px;
    font-size: 1.8rem;
  }
}

@media (max-width: 600px) {
  .runner-settings {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .direction-switch {
    width: 100%;
  }

  .direction-switch__option {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Задание и буквы ещё компактнее */
  .runner-question {
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.4rem;
  }

  .runner-question-label {
    font-size: 0.7rem;
  }

  .runner-question-word {
    font-size: 1.2rem;
  }

  .runner-word-build {
    gap: 0.3rem;
    margin-bottom: 0.4rem;
    min-height: 2.4rem;
  }

  .build-letter {
    width: 1.6rem;
    height: 2.2rem;
    font-size: 1rem;
    border-bottom-width: 2px;
  }

  /* Сцена ниже, т.к. надо уместить всё */
  .runner-scene {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .fork-sign {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    border-width: 3px;
  }

  /* Кнопки в столбик */
  .runner-actions {
    flex-direction: column;
  }

  .runner-actions .btn {
    width: 100%;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
  }

  /* Статы компактнее */
  .runner-stat {
    min-width: 60px;
    padding: 0.4rem 0.7rem;
  }

  .runner-stat-value {
    font-size: 1.05rem;
  }

  .runner-distance,
  .runner-speed {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
  }

  /* Фидбек короткий, чтобы не толкать контент */
  .runner-feedback {
    min-height: 1.2rem;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }

  .runner-hints {
    padding: 0.5rem;
    font-size: 0.78rem;
    margin-top: 0.4rem;
  }
}

@media (max-width: 380px) {
  .runner-scene {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 1 / 1.2;
  }

  .fork-sign {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    border-width: 2px;
  }

  .build-letter {
    width: 1.4rem;
    height: 2rem;
    font-size: 0.9rem;
  }

  .runner-question-word {
    font-size: 1.05rem;
  }

  .runner-question-label {
    font-size: 0.65rem;
  }

  .runner-stat-value {
    font-size: 0.95rem;
  }

  .runner-stat-label {
    font-size: 0.62rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  .runner-cloud,
  .runner-sun,
  .runner-body,
  .runner-leg,
  .runner-character,
  .fork-sign,
  .build-letter,
  .road-surface::before,
  .road-surface::after,
  .runner-shadow {
    animation: none !important;
    transition: none !important;
  }
}