
@font-face { font-family: "Noto Sans"; src: url(./noto-regular.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url(./noto-bold.woff) format('woff'); font-weight: 700; font-display: swap; }
:root { --paper: #faf9f6; --ink: #251e35; --muted: #555062; --accent: #5935b0; --line: #ded9e8; --wash: #eee8fb; font: 16px/1.5 "Noto Sans", Arial, sans-serif; background: var(--paper); color: var(--ink); }
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1152px, calc(100% - 72px)); margin-inline: auto; }
.bar, .brand, nav, .languages, .actions, .meta, footer { display: flex; align-items: center; }
.bar { min-height: 75px; justify-content: space-between; gap: 12px; }
.brand { gap: 9px; font-weight: 700; letter-spacing: -.055em; font-size: 1.25rem; white-space: nowrap; }
.brand-mark { width: 27px; height: 27px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.brand-mark::after, .spark { content: ""; display: block; background: currentColor; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.brand-mark::after { width: 16px; height: 16px; color: #e2d5fa; }
nav { gap: 22px; font-weight: 700; }
nav > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.languages { padding: 3px; border: 1px solid var(--line); border-radius: 12px; }
.languages a { display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; border-radius: 8px; min-height: 36px; min-width: 38px; font-size: .83rem; font-weight: 700; }
.languages a[aria-current="page"] { background: #e9e0f7; color: #46278b; }
.hero { overflow: hidden; position: relative; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; min-height: 470px; isolation: isolate; border: 1px solid #e2d9f5; border-radius: 30px; background: var(--wash); }
.hero-copy { padding: clamp(28px, 5vw, 64px); padding-right: 0; z-index: 2; min-width: 0; }
.hero h1 { font-size: clamp(2.55rem, 6.13vw, 5.65rem); line-height: 1.00; letter-spacing: -.087em; font-weight: 700; color: var(--ink); }
.hero h1 span { display: block; color: var(--accent); }
[lang="ru"] .hero h1 { font-size: clamp(2.25rem, 4.65vw, 4.35rem); letter-spacing: -.083em; }
.lede { max-width: 35ch; margin-top: 23px; font-size: 1.07rem; line-height: 1.55; color: #504665; }
.actions { gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 11px 16px; min-height: 46px; font-weight: 700; font-size: .92rem; cursor: pointer; text-align: center; }
.primary { background: var(--ink); color: white; }
.primary:hover { background: #3d2c5c; }
.secondary { border-color: #bfb0dd; background: none; }
.secondary:hover { background: #e6dcfa; }
.note { color: #514568; font-size: .85rem; margin-top: 15px; }
.illustration { position: relative; min-width: 0; align-self: stretch; }
.illustration canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.motion { position: absolute; right: 13px; bottom: 13px; border: 1px solid #c7b8e4; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #f5efff; cursor: pointer; }
.motion::after { content: ''; width: 10px; height: 12px; border-inline: 2px solid currentColor; }
.motion[data-paused]::after { width: 0; height: 0; border: 6px solid transparent; border-left: 9px solid currentColor; translate: 3px 0; }
#games { scroll-margin-top: 15px; margin: 39px auto 45px; }
h2 { font-size: clamp(1.85rem, 4vw, 3.35rem); line-height: 1.1; letter-spacing: -.072em; margin-bottom: 18px; }
.game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.game { padding: 18px; min-width: 0; background: #fff; border: 1px solid #e4dfeb; border-radius: 19px; display: flex; flex-direction: column; align-items: flex-start; }
.game-picture { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #d7c9ef; background: #f1eafb; border-radius: 13px; color: var(--accent); }
.game-picture .spark { width: 22px; height: 22px; }
.talk { width: 24px; height: 18px; border: 1.5px solid currentColor; border-radius: 7px; position: relative; }
.talk::before { content: ''; position: absolute; inset: 6px 0 0 5px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 5px 0 currentColor, 10px 0 currentColor; }
.talk::after { content: ''; width: 5px; height: 5px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; background: #f1eafb; position: absolute; bottom: -3px; left: 5px; rotate: -26deg; }
.pair { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; position: relative; translate: -4px 0; }
.pair::after { content: ''; position: absolute; inset: -1.5px; border: 1.5px solid currentColor; border-radius: 50%; translate: 8px 0; }
.tag { font-size: .79rem; font-weight: 700; color: #533b89; margin-top: 15px; }
h3 { font-size: 1.36rem; line-height: 1.15; letter-spacing: -.045em; margin-top: 4px; }
.game p { margin: 8px 0 14px; color: var(--muted); font-size: .94rem; }
.meta { margin-top: auto; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.game .btn { margin-top: 15px; width: 100%; border-color: var(--line); }
.game .btn:hover { background: var(--wash); }
footer { justify-content: space-between; padding-block: 16px 25px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
footer .footer-brand { color: var(--ink); }
@media (max-width: 820px) {
  .wrap { width: calc(100% - 44px); }
  .hero { min-height: 400px; }
  .hero-copy { padding-left: 34px; }
  .game { padding: 15px; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 28px); }
  .bar { min-height: 64px; }
  nav { gap: 10px; }
  nav > a { display: none; }
  .hero { grid-template-columns: 1fr; border-radius: 22px; }
  .hero-copy { padding: 25px 18px 0; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 4rem); }
  [lang="ru"] .hero h1 { font-size: clamp(1.97rem, 9.1vw, 3.8rem); }
  .illustration { min-height: clamp(210px, 62vw, 330px); }
  .game-grid { grid-template-columns: 1fr; }
  #games { margin-top: 29px; }
}
.quiz-page { width: min(730px, 100%); margin: 7px auto 56px; }
.quiz-back { display: inline-block; font-weight: 700; color: var(--accent); margin: 4px 0 17px; text-decoration: underline; text-underline-offset: 4px; }
.quiz-panel { background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.quiz-top { padding: 16px clamp(18px, 5vw, 36px); background: var(--wash); display: flex; align-items: center; gap: 12px; font-weight: 700; }
.quiz-top .game-picture { width: 39px; height: 39px; background: #fffaff; }
.quiz-top .game-picture .spark { width: 19px; height: 19px; }
.quiz-content { padding: clamp(19px, 5vw, 36px); }
.quiz-content h2 { font-size: clamp(1.7rem, 5vw, 2.7rem); letter-spacing: -.048em; margin: 0 0 15px; line-height: 1.16; }
.quiz-content h2:focus { outline: none; }
.quiz-content p { color: var(--muted); margin: 0 0 17px; max-width: 56ch; }
.quiz-score { font-weight: 700; font-size: clamp(2.7rem, 9vw, 4.6rem); line-height: 1.1; letter-spacing: -.075em; color: var(--accent); margin-bottom: 18px; }
.quiz-meter { display: flex; gap: 12px; align-items: center; margin-bottom: 21px; color: var(--muted); font-size: .87rem; white-space: nowrap; }
.quiz-meter progress { width: 100%; height: 8px; accent-color: var(--accent); }
.quiz-answers { display: grid; gap: 8px; margin-bottom: 14px; }
.quiz-answers .btn { text-align: left; background: #faf8fe; border-color: var(--line); }
.quiz-answers .btn:hover:not(:disabled) { border-color: var(--accent); }
.quiz-answers .btn:disabled { cursor: default; opacity: 1; }
.quiz-answers .correct { background: #edf5ea; border-color: #487757; }
.quiz-answers .incorrect { background: #fff0ec; border-color: #b45c46; }
.quiz-content .feedback:empty { margin: 0; }

.skip { position: absolute; top: 5px; left: 10px; transform: translateY(-180%); padding: 9px 12px; background: white; z-index: 3; }
.skip:focus { transform: none; }
main:focus, #games:focus { outline: none; }
.quiz-top h1 { font: inherit; }
.quiz-top .game-picture { flex: 0 0 auto; }
.quiz-top .game-meta { margin-left: auto; color: var(--muted); font-size: .84rem; font-weight: 400; }
.quiz-content .round-rules { margin-bottom: 15px; }
.prompt-instructions { padding: 16px 20px; border: 1px solid #dfd2f1; background: #f6f0fd; border-radius: 12px; margin: 0 0 20px; }
.prompt-instructions summary { cursor: pointer; font-weight: 700; }
.prompt-instructions p { margin: 10px 0 0; }
@media (max-width: 480px) {
  .quiz-top { flex-wrap: wrap; }
  .quiz-top .game-meta { flex-basis: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
