*{box-sizing:border-box}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:4px solid #ffe064;outline-offset:4px}
body.playful-background,body.game-background{min-height:100vh;background-color:#eef4ff;background-image:radial-gradient(circle at 8% 7%,#fff0b2 0 6%,transparent 22%),radial-gradient(circle at 92% 12%,#c9f3df 0 8%,transparent 24%),radial-gradient(circle at 8% 93%,#c9f3df 0 8%,transparent 24%),radial-gradient(circle at 92% 93%,#fff0b2 0 6%,transparent 22%),radial-gradient(circle at 50% 50%,#f3d9e7 0 4%,transparent 18%),linear-gradient(145deg,#eef4ff,#fffaf3);background-repeat:no-repeat;background-size:100% 100%}

/* Общие игровые заголовки и элементы управления. */
main.app, main.page { position: relative; }

.learning-header {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 900px);
  margin: 0 auto 12px;
  padding: 12px 56px 0;
  position: relative;
  z-index: 2;
  text-align: center;
}
.learning-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  line-height: 1;
}
.learning-brand-logo {
  display: block;
  width: min(520px, 100%);
  height: auto;
  filter: drop-shadow(0 5px 4px #344b8030);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.learning-title {
  max-width: 100%;
  margin: 4px 0 0;
  color: #263650;
  font-size: clamp(22px, 3.8vw, 34px);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 0 #fff, 0 3px 9px #34486f25;
}
.learning-tagline {
  margin: 4px 0 0;
  color: #687795;
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 700;
  line-height: 1.25;
}
.learning-step-title {
  margin-top: 3px;
  color: #687795;
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 900;
  letter-spacing: .04em;
}
.game-feedback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-top: 7px;
  padding: 6px 12px;
  border: 1px solid #c7d7ea;
  border-radius: 999px;
  background: #ffffffd9;
  color: #326391;
  box-shadow: 0 3px 10px #28496a12;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
}
.game-feedback-link:hover { background: #fff; border-color: #8fb5da; }
.game-feedback-link:focus-visible { outline: 3px solid #7eafea; outline-offset: 2px; }

.learning-exit {
  box-sizing: border-box;
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 14px;
  display: grid !important;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 15px;
  background: #ffd76b;
  color: #61450d;
  box-shadow: 0 5px 16px #8a681a35;
  text-decoration: none;
  font-size: 23px;
  font-weight: 900;
}
.learning-exit:focus-visible {
  outline: 4px solid #7eafea;
  outline-offset: 3px;
}

.number-road { padding-top: 0; }
.number-road > .learning-header { margin-bottom: 12px; }
.number-road .card { padding-top: 72px; }
.number-road .theme-panel {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  width: auto;
  height: 44px;
  padding: 0 14px;
  border: 2px solid #fff;
  border-radius: 14px;
  background: #fff;
  color: #253457;
  box-shadow: 0 6px 18px #324a7c1c;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}
.number-road .game-tabs { margin: 0 0 12px; }
.number-road .game-tabs .game-tab { display: flex; height: 44px; align-items: center; justify-content: center; }

.prompt .learning-mode-title {
  margin: 0;
  font-size: clamp(29px, 5vw, 50px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
}
.game-head .names-button { margin-left: auto; flex: 0 0 auto; }
.game-card > .round-counter { display: table; margin: 14px 0 0 auto; }

.preposition-app {
  box-sizing: border-box;
  min-height: 100vh;
  padding: 0 18px 18px !important;
}
.preposition-app > #root { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.preposition-app > .learning-header { margin-bottom: 8px; }
.preposition-app .learning-question-header { width: min(100%, 900px); }
.preposition-app .learning-repeat { display: none !important; }
.preposition-app .actions .navigation-button.prev,
.preposition-app .actions .navigation-button.next {
  box-sizing: border-box;
  display: inline-flex;
  width: min(176px, calc((100vw - 56px) / 2));
  min-width: 0;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 3px solid #fff;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #f5f6ff 100%);
  color: #393071;
  box-shadow: 0 6px 0 #c5cbe0, 0 10px 16px #34486f26;
  font: inherit;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}
.preposition-app .choices + .actions { margin-top: 14px; }
.preposition-app .actions .navigation-button.prev:hover:not(:disabled),
.preposition-app .actions .navigation-button.next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #c5cbe0, 0 12px 18px #34486f30;
}
.preposition-app .actions .navigation-button.prev:active:not(:disabled),
.preposition-app .actions .navigation-button.next:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #c5cbe0, 0 5px 9px #34486f24;
}
.preposition-app .actions .navigation-button:focus-visible {
  outline: 4px solid #7eafea;
  outline-offset: 3px;
}
.preposition-app .actions .navigation-button.prev:disabled {
  opacity: .72;
  cursor: default;
  box-shadow: 0 4px 0 #c5cbe0, 0 7px 11px #34486f20;
}
.preposition-app .scene[role="button"],
.preposition-app .story-scene[role="button"] { cursor: pointer; }
.preposition-app .scene-picture {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.preposition-app .story-scene .scene-picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  position: relative;
  z-index: 1;
}
.preposition-app .story-scene {
  width: min(620px, 100%);
  height: auto;
  aspect-ratio: 1774 / 887;
  isolation: isolate;
  background-color: #b9dce7;
}
.preposition-app .scene-picture {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.preposition-app .scene[role="button"]:focus-visible,
.preposition-app .story-scene[role="button"]:focus-visible { outline: 4px solid #7eafea; outline-offset: 3px; }
.preposition-app .transition-cast { width: min(760px, 100%); margin: 18px auto; }
.preposition-app .transition-heroes {
  display: block;
  width: 100%;
  max-height: 300px;
  aspect-ratio: 2066 / 761;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

@media (max-width: 620px) {
  .learning-header {
    width: 100%;
    margin-bottom: 7px;
    padding: 10px 50px 0;
  }
  .learning-brand-logo { width: 100%; }
  .learning-title { margin-top: 3px; font-size: clamp(21px, 5.8vw, 29px); }
  .learning-tagline { font-size: 13px; }
  .learning-exit {
    top: 8px;
    left: 8px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 19px;
  }
  .number-road .card { padding-top: 60px; }
  .number-road .game-tabs { margin: 0 0 8px; }
  .number-road .game-tabs .game-tab { height: 38px; }
  .number-road .theme-panel { top: 10px; right: 10px; height: 36px; padding: 0 9px; font-size: 12px; }
  .game-head .names-button { min-width: 44px; }
  .preposition-app { padding: 0 8px 10px !important; }
  .preposition-app .learning-question-header { padding-top: 10px; }
  .preposition-app .main { place-items: start center; padding: 8px 0; }
  .preposition-app .panel { padding: 12px 8px; }
  .preposition-app .panel > h1 { margin: 2px 0 6px; font-size: clamp(22px, 6vw, 28px); line-height: 1.12; }
  .preposition-app .stepdots { margin-bottom: 8px; }
  .preposition-app .story-scene { margin-bottom: 10px; }
  .preposition-app .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .preposition-app .choice { min-height: 98px; padding: 6px 2px; font-size: .92rem; }
  .preposition-app .picto {
    width: 74px;
    height: 62px;
    margin-bottom: -11px;
    transform: scale(.78);
    transform-origin: top center;
  }
  .preposition-app .picto svg { display: block; width: 100%; height: 100%; }
  .preposition-app .actions { gap: 8px; }
  .preposition-app .choices + .actions { margin-top: 10px; }
  .preposition-app .actions .navigation-button.prev,
  .preposition-app .actions .navigation-button.next { min-height: 48px; padding: 8px 6px; border-radius: 15px; }
  .preposition-app .transition-cast { margin: 12px auto; }
  .preposition-app .transition-heroes { max-height: 190px; }
}
@media (max-width: 360px) {
  .learning-header { padding-inline: 46px; }
  .number-road .theme-panel { right: 7px; padding-inline: 7px; }
}

/* Shared layout for catalog and game-description pages. */
.content-wrap { width: min(1000px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 48px; }
.site-header { display: flex; align-items: center; justify-content: center; min-height: 74px; margin: 0 0 8px; padding: 12px 0 4px; }
.site-brand { display: flex; width: min(460px, 92vw); height: 86px; align-items: center; justify-content: center; overflow: hidden; line-height: 0; text-decoration: none; }
.site-brand-logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 3px #344b8030); pointer-events: none; user-select: none; -webkit-user-drag: none; }
.site-breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 20px; color: #60768a; font-size: .95rem; }
.site-breadcrumbs a { color: #236eb7; font-weight: 750; text-decoration: none; }
.site-breadcrumbs a:hover { text-decoration: underline; }
.site-footer { margin: 22px 0 0; color: #60768a; font-size: .9rem; text-align: center; }

/* Shared fixed sound control rendered by private/game-layout.php. */
.game-sound { box-sizing: border-box; position: fixed; z-index: 50; top: 14px; right: 14px; display: grid; width: 46px; height: 46px; min-width: 46px; padding: 0; place-items: center; border: 2px solid #fff; border-radius: 15px; background: #ffd76b; color: #61450d; box-shadow: 0 5px 16px #8a681a35; cursor: pointer; font-size: 23px; }
.game-sound:focus-visible { outline: 4px solid #7eafea; outline-offset: 3px; }
.shared-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 620px) {
  .content-wrap { width: min(100% - 20px, 1000px); padding-top: 10px; }
  .site-brand { width: min(420px, 92vw); }
  .game-sound { top: 8px; right: 8px; width: 38px; height: 38px; min-width: 38px; border-radius: 12px; font-size: 19px; }
}
