:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #221b40;
  background: #f8f9fd;
  --ink: #221b40;
  --text: #494363;
  --muted: #605a78;
  --accent: #5030bf;
  --accent-hover: #3e239e;
  --stroke: #e0ddef;
  --white: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; min-height: 100vh; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 3px solid #7d67ed; outline-offset: 4px; }
.shell { width: min(1240px, calc(100% - 100px)); margin-inline: auto; }

.site-header { background: #fff; border-bottom: 1px solid #e9e6f3; }
.header-inner { min-height: 81px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 760; font-size: 21px; letter-spacing: -.045em; }
.brand b { color: var(--accent); font-weight: inherit; }
.brand-mark { width: 35px; height: 35px; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; background: #5331c6; border-radius: 10px; padding: 7px; transform: rotate(-7deg); }
.brand-mark i { background: #fff; border-radius: 4px; }
.brand-mark i:nth-child(2) { opacity: .57; }
.brand-mark i:nth-child(3) { opacity: .73; }

.button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; line-height: 1.2; font-weight: 670; font-size: 16px; cursor: pointer; text-align: center; }
.button-primary { background: var(--accent); color: var(--white); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { background: var(--white); border-color: #dcd6ed; color: var(--ink); }
.button-outline:hover { background: #f0edfd; }
.button-large { min-width: 130px; min-height: 53px; padding-inline: 23px; }
button:disabled { cursor: default; }

.hero { display: grid; grid-template-columns: .91fr 1.09fr; gap: clamp(24px, 4.5vw, 72px); align-items: center; padding-block: clamp(48px, 6.7vw, 101px); }
.hero-copy { min-width: 0; }
.hero-audience { color: var(--accent); font-weight: 700; font-size: 15px; margin-bottom: 13px; }
.hero h1 { font-size: clamp(3.15rem, 6.05vw, 6.45rem); font-weight: 780; line-height: .96; letter-spacing: -.086em; }
.hero h1 span { color: var(--accent); }
.hero-subtitle { margin-top: 25px; max-width: 460px; font-size: clamp(1.28rem, 2.2vw, 2rem); line-height: 1.24; font-weight: 680; letter-spacing: -.036em; }
.hero-description { margin-top: 17px; max-width: 440px; color: var(--text); font-size: 16px; line-height: 1.65; }
.hero-action { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 27px; }
.hero-action span { font-size: 14px; color: var(--muted); }

.tablet-scene { min-width: 0; position: relative; display: grid; place-items: center; overflow: hidden; isolation: isolate; aspect-ratio: 1.26; border-radius: 25px; background:
  radial-gradient(ellipse at 17% 20%, #b7a0fd 0, transparent 52%),
  radial-gradient(ellipse at 90% 83%, #8aa8ff 0, transparent 52%),
  linear-gradient(127deg, #7250d6, #5c3caf 61%, #7679d8);
}
.tablet-scene::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, #fff8 1px, transparent 1.5px); background-size: 24px 24px; opacity: .37; mask-image: linear-gradient(130deg, #000, transparent 56%); pointer-events: none; }
.tablet-scene::after { content: ""; position: absolute; z-index: -1; width: 83%; height: 92%; top: 27%; right: -16%; border: 1px solid #ffffff54; border-radius: 50%; box-shadow: 0 0 0 25px #ffffff22, 0 0 0 51px #ffffff12; transform: rotate(-25deg); pointer-events: none; }
.tablet { position: relative; width: 85%; aspect-ratio: 1.53; border: 2px solid #b1a1cc; border-radius: clamp(15px, 2.35vw, 33px); padding: 2.55%; background: linear-gradient(148deg, #333040, #181624 64%, #433a53); box-shadow: 4px 9px 0 #2b234a, 10px 25px 34px #2a1a6465, 2px 0 0 3px #4a3e6c; transform: translateY(-2%) rotate(-8deg); }
.tablet-camera { position: absolute; inset: 50% 0 auto 1%; width: 4px; height: 4px; border-radius: 50%; background: #807589; box-shadow: inset 0 0 0 1px #20172c; transform: translateY(-50%); }
.tablet-screen { position: relative; display: flex; flex-direction: column; background: #f8f7ff; height: 100%; padding: 4.7% 5%; border-radius: 7% / 10%; box-shadow: inset 0 1px 3px #21183642; }
.tablet-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 5px; font-size: clamp(7px, 1vw, 15px); font-weight: 750; letter-spacing: -.015em; }
.tablet-score { color: #4e3493; font-size: .7em; padding: 4px 8px; border-radius: 6px; background: #ece6fb; white-space: nowrap; }
.tablet-score b { margin-left: 3px; }
.tablet-game { flex: 1; align-items: center; display: grid; grid-template-columns: 1fr .7fr 1fr; justify-items: center; gap: 6%; padding-inline: 4%; margin-block: 5% 2.5%; background: linear-gradient(155deg, #e8f9ff, #d7f2ff 64%, #def5ed); border: 1px solid #c6e8f1; border-radius: 6% / 12%; }
.target-art { display: block; width: 85%; max-width: 102px; aspect-ratio: 1; border: 3px solid var(--deep); border-radius: 50%; background: var(--color); box-shadow: inset 0 3px 8px #20395838, 0 0 0 2px #fffd; }
.ball-art { display: block; width: 76%; max-width: 66px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 33% 26%, var(--shine), var(--color) 43%, var(--deep) 100%); box-shadow: 0 8px 14px #421a2435; }
.tablet-home-indicator { position: absolute; bottom: 2%; left: 41%; right: 41%; height: 2px; border-radius: 8px; background: #443b5c; }

.method { background: #eeebfa; border-block: 1px solid #e4dff3; }
.method-inner { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(32px, 7vw, 96px); padding-block: 44px 48px; }
.method-copy h2 { font-size: clamp(1.65rem, 3.1vw, 2.5rem); letter-spacing: -.052em; line-height: 1.12; }
.method-copy p { margin-top: 13px; max-width: 390px; color: var(--text); line-height: 1.6; }
.method-steps { display: grid; gap: 13px; padding: 0; margin: 0; list-style: none; counter-reset: methods; }
.method-steps li { display: grid; grid-template-columns: 35px 1fr; align-items: start; gap: 3px 13px; counter-increment: methods; }
.method-steps li::before { content: counter(methods); grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; margin-top: 2px; background: #e1d8fb; border-radius: 9px; color: #4b2ba5; font-weight: 720; }
.method-steps h3 { font-size: 17px; line-height: 1.35; }
.method-steps p { color: var(--text); line-height: 1.45; }
.site-footer { background: #fff; color: var(--muted); border-top: 1px solid #ebe7f4; font-size: 14px; }
.site-footer .shell { padding-block: 22px; }

.page { padding-block: 32px 56px; min-height: calc(100svh - 147px); }
.back-link { display: inline-flex; min-height: 43px; align-items: center; font-size: 15px; font-weight: 650; color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.page h1 { margin-block: 12px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.03; letter-spacing: -.065em; }
.page-intro { max-width: 600px; line-height: 1.6; color: var(--text); }
.catalog { max-width: 1000px; }
.catalog-grid { margin-top: 25px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.catalog-card, .lesson-panel { border: 1px solid var(--stroke); background: #fff; border-radius: 17px; }
.catalog-card { padding: clamp(16px, 3vw, 25px); }
.catalog-card h2 { margin-top: 18px; font-size: 23px; line-height: 1.15; letter-spacing: -.045em; }
.catalog-card p { color: var(--text); line-height: 1.55; margin-block: 8px 15px; }
.catalog-art { display: grid; place-items: center; height: clamp(80px, 12vw, 115px); border-radius: 11px; background: #eeebfa; }
.catalog-swatches { display: flex; gap: 9px; }
.catalog-swatches i { display: block; width: 25px; height: 25px; border-radius: 50%; background: var(--color); box-shadow: inset 0 1px 1px #fff7; }

.lesson { max-width: 870px; }
.lesson-panel { margin-top: 23px; padding: clamp(17px, 4vw, 30px); }
.lesson-panel h2 { font-size: 23px; line-height: 1.22; letter-spacing: -.04em; }
.lesson-panel ol { margin-block: 12px 22px; padding-inline-start: 23px; color: var(--text); line-height: 1.62; }
.lesson-panel li + li { margin-top: 4px; }
.variant-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 13px 15px; }
.variant-tab { background: #f6f4fd; color: #482e91; border: 1px solid #e2dbf4; }
.variant-tab:hover { background: #eae4fa; }
.variant-tab[aria-pressed="true"] { background: var(--accent); color: white; border-color: var(--accent); }
.sequence { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 22px; min-height: 21px; }
.sequence i { width: 16px; height: 16px; display: block; border-radius: 50%; background: var(--color); }
.sequence span { margin-left: 3px; color: var(--muted); font-size: 14px; }

.exercise { max-width: 1050px; padding-top: 16px; }
.game-stage { margin-top: 6px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--stroke); border-radius: 17px; padding: clamp(11px, 2.4vw, 24px); }
.game-header { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.game-header h1 { font-size: clamp(1.5rem, 4.2vw, 2.65rem); margin: 0; }
.game-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-controls .button { min-height: 44px; padding: 8px 12px; font-size: 14px; }
.score { display: inline-flex; justify-content: center; align-items: center; gap: 6px; color: #4d3690; background: #f0eafa; border-radius: 8px; font-size: 15px; font-weight: 650; padding: 8px 11px; }
.score b { font-variant-numeric: tabular-nums; }
.game-instruction { color: var(--text); line-height: 1.4; margin-top: 10px; }
.game-stage .color-board { margin-top: 1px; }
.game-stage .color-patterns { margin-block: 2px; }
.game-stage .color-pattern {
  background: #f6f4fd;
  color: #482e91;
  border-color: #e2dbf4;
  cursor: pointer;
}
.game-stage .color-pattern:hover { background: #eae4fa; }
.game-stage .color-pattern[aria-pressed="true"] {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.game-stage .color-message { color: var(--text); font-weight: 600; line-height: 1.42; }
.game-stage .color-feedback { padding-inline: 1px; }
.game-stage:is(:fullscreen, .color-expanded) .game-instruction { margin-top: 0; }

[data-color="red"] { --color: #dc414e; --soft: #ffccd2; --deep: #a61d30; --shine: #ff9ca7; }
[data-color="green"] { --color: #119761; --soft: #b4ebd1; --deep: #066546; --shine: #7be9ac; }
[data-color="yellow"] { --color: #e3ac0c; --soft: #ffeaa4; --deep: #b17b02; --shine: #fff39d; }
[data-color="blue"] { --color: #3272de; --soft: #c8dbfd; --deep: #2244a7; --shine: #8fbcff; }

dialog { max-width: min(380px, calc(100% - 28px)); border: 1px solid var(--stroke); border-radius: 16px; padding: 22px; color: var(--ink); background: #fff; }
dialog::backdrop { background: #21143b85; }
dialog h2 { font-size: 23px; }
dialog p { margin-block: 8px 17px; color: var(--text); line-height: 1.5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1020px) {
  .shell { width: calc(100% - 56px); }
  .hero h1 { font-size: clamp(2.85rem, 7vw, 5rem); }
}
@media (max-width: 740px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 65px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-block: 33px 38px; }
  .hero h1 { font-size: clamp(3rem, 10vw, 5rem); }
  .hero-subtitle { margin-top: 16px; }
  .hero-description { margin-top: 13px; }
  .hero-action { margin-top: 19px; }
  .tablet-scene { max-width: 540px; width: 100%; aspect-ratio: 1.45; border-radius: 17px; }
  .tablet { width: 76%; }
  .tablet-toolbar { font-size: clamp(9px, 2.1vw, 14px); }
  .method-inner { grid-template-columns: 1fr; gap: 20px; padding-block: 30px; }
  .page { padding-block: 18px 34px; }
  .exercise { padding-top: 8px; }
}
@media (max-width: 480px) {
  .brand { font-size: 18px; gap: 8px; }
  .brand-mark { width: 31px; height: 31px; padding: 6px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .game-header { gap: 8px; }
  .game-instruction { font-size: 14px; }
  .game-controls .button { min-height: 41px; }
}
@media (max-height: 490px) and (orientation: landscape) {
  .game-stage:is(:fullscreen, .color-expanded) .game-header h1 { font-size: 1.25rem; }
  .card.game-stage:is(:fullscreen, .color-expanded) .color-board { min-height: 150px; }
}

.hand-status {
  padding: 8px 11px;
  border-left: 3px solid #684ad5;
  background: #f4f0ff;
  color: #453177;
  font-size: 15px;
  line-height: 1.42;
}
.hand-cursor {
  --hold: 0%;
  position: absolute;
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: conic-gradient(#5331c6 var(--hold), #ffffffb8 0);
  box-shadow: 0 0 0 2px #34215a, 0 2px 9px #36215b55;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hand-cursor::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #fff;
}
.hand-cursor::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: #5331c6;
}
.hand-cursor.is-carrying { width: 30px; height: 30px; }
.hand-cursor.is-carrying::after { inset: 10px; }
