/* Обложка learningwithpleasure.com — те же цвета, что у приложения: солнечный жёлтый, кремовый фон. */
:root {
  --bg: #FFF6E6; --ink: #3A2A22; --muted: #6E5E54; --card: #FFFFFF;
  --sun: #FFCF3F; --sun-dark: #E0A800; --green: #2E9E57; --red: #D64545; --leaf: #E8F6DD; --sky: #DFF3FF;
  --radius: 22px; --shadow: 0 6px 0 rgba(58, 42, 34, .07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif; }
#page { max-width: 1080px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.loading { text-align: center; padding: 40px 0; color: var(--muted); }
h1, h2, h3, .logo span, .g-title { font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", sans-serif; }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.1; margin: 0 0 14px; }
h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 18px; }
h3 { font-size: 20px; margin: 6px 0 6px; }
p { margin: 0 0 10px; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }

.logo-img { display: block; flex: none; }
.logo-img img { display: block; width: 250px; height: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 0 12px; }
.top-r { display: flex; align-items: center; gap: 8px; flex: none; }
select { background: var(--card); border: 2px solid #EADFCB; border-radius: 999px; padding: 8px 12px; min-height: 44px; }

.btn { display: inline-block; background: var(--sun); box-shadow: 0 5px 0 var(--sun-dark); border-radius: 999px; padding: 12px 24px; font-weight: bold; text-decoration: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sun-dark); }
.btn.ghost { background: var(--card); box-shadow: 0 4px 0 #EADFCB; padding: 8px 16px; }
.soon { display: inline-block; background: var(--leaf); color: #1F6B3B; border-radius: 999px; padding: 8px 16px; font-weight: bold; font-size: 16px; }
.badge { display: inline-block; vertical-align: middle; background: var(--sky); color: #1E5A9C; border-radius: 999px; padding: 2px 12px; font-size: 16px; }
.note { color: var(--muted); font-size: 16px; margin-top: 12px; }
.lead { font-size: 20px; color: var(--muted); max-width: 720px; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; padding: 20px 0 36px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.hero-game { position: relative; }
.lucky-big { width: 130px; margin: 0 auto -18px; position: relative; z-index: 1; }
.lucky-big img { width: 100%; height: auto; display: block; }
.game { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 20px 20px; text-align: center; min-height: 250px; }
.g-title { font-size: 24px; font-weight: bold; margin-bottom: 6px; }
.g-sub { color: var(--muted); }
.g-q { font-size: 24px; font-weight: bold; margin: 10px 0 16px; overflow-wrap: anywhere; }
.g-ages, .g-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.g-age, .g-opt, .g-again { border: none; border-radius: 18px; padding: 16px 8px; font-size: 22px; font-weight: bold; background: var(--sky); box-shadow: 0 4px 0 #B9DDF5; cursor: pointer; touch-action: manipulation; }
.g-opt.ok { background: #BFEBCB; box-shadow: 0 4px 0 #8FD3A3; }
.g-opt.no { background: #F8D2D2; box-shadow: none; opacity: .7; }
.g-again { background: var(--sun); box-shadow: 0 4px 0 var(--sun-dark); padding: 12px 28px; margin-top: 10px; }
.g-msg { min-height: 1.6em; margin-top: 12px; font-weight: bold; }

section { padding: 30px 0; }
section.band { background: var(--card); border-radius: 28px; padding: 30px 22px; margin: 10px 0; box-shadow: var(--shadow); }
section.band .card { background: var(--bg); box-shadow: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; }
.card p { color: var(--muted); margin: 0; }
.ic { font-size: 34px; line-height: 1; }
.step .num { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-weight: bold; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { padding-left: 34px; position: relative; font-size: 19px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--leaf); color: var(--green); display: grid; place-items: center; font-weight: bold; font-size: 15px; }
.price-sec { text-align: center; }
.price { max-width: 420px; margin: 0 auto; text-align: left; }
.price .amount { font-size: 56px; font-weight: bold; text-align: center; line-height: 1; }
.price .unit { text-align: center; color: var(--muted); margin-bottom: 16px; }
.price .soon { display: block; text-align: center; margin-top: 18px; }
.faq { background: var(--card); border-radius: 18px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: bold; }
.faq p { margin: 10px 0 0; color: var(--muted); }
.login { text-decoration: none; text-align: center; display: block; }
.login:hover { outline: 3px solid var(--sun); }
footer { text-align: center; color: var(--muted); font-size: 15px; padding: 26px 0 10px; }

.lang { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: bold; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stat { background: var(--card); border-radius: 18px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: clamp(22px, 4vw, 30px); line-height: 1.1; font-family: "Comic Sans MS", "Chalkboard SE", sans-serif; color: #9A5200; }
.stat span { font-size: 14px; color: var(--muted); line-height: 1.25; display: block; margin-top: 4px; }
.confetti { position: fixed; top: -20px; width: 12px; height: 16px; border-radius: 3px; pointer-events: none; z-index: 40; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.lucky-big.jump { animation: jump .7s ease; }
@keyframes jump { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-34px) rotate(-8deg); } 60% { transform: translateY(-10px) rotate(6deg); } }
.trophy { font-size: 64px; line-height: 1; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.stars { font-size: 34px; margin: 4px 0 8px; }
.stars span { display: inline-block; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.stars span:nth-child(2) { animation-delay: .2s; } .stars span:nth-child(3) { animation-delay: .4s; }
@keyframes pop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
section.focus { border: 3px solid var(--sun); }
.areas { background: var(--bg); border-radius: 18px; padding: 16px; margin-top: 16px; }
.areas-title { font-weight: bold; margin-bottom: 10px; }
.track { display: flex; align-items: center; gap: 12px; margin-top: 16px; text-decoration: none; text-align: left; border: 3px solid var(--sun); }
.track-ic { font-size: 34px; flex: none; }
.track b { display: block; font-size: 18px; line-height: 1.25; }
.track em { display: block; font-style: normal; color: #9A5200; font-weight: bold; margin-top: 4px; }
.track:active { transform: translateY(2px); }
.back { color: #9A5200; font-weight: bold; text-decoration: none; }
.center-p { text-align: center; margin: 10px 0 20px; }
.kicker { font-weight: bold; color: #9A5200; font-size: 16px; margin: 0 0 6px; }
.hero-bars { margin-top: 16px; text-align: left; }
.muted-s { font-weight: normal; font-size: 14px; color: #1F7A3F; }
.area em { font-style: normal; font-size: 13px; color: #1F7A3F; font-weight: bold; white-space: nowrap; }
.area { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 34px 44px; align-items: center; gap: 10px; margin: 8px 0; font-size: 16px; }
.area .bar { height: 14px; background: #EFE4D2; border-radius: 999px; overflow: hidden; }
.area .bar i { display: block; height: 100%; background: linear-gradient(90deg, #FFCF3F, #3FB56A); border-radius: 999px; }
.area b { text-align: right; }
.areas-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trophy, .stars span, .lucky-big.jump { animation: none; }
  .confetti { display: none; }
}
/* Видимый фокус для клавиатуры и переключателей. */
:focus-visible { outline: 4px solid #1E5A9C; outline-offset: 3px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero-text { text-align: center; }
  .cta { justify-content: center; }
  .lead { font-size: 18px; }
  .logo-img img { width: 190px; }
  .area { grid-template-columns: minmax(96px, 1fr) minmax(70px, 1fr) 30px 40px; gap: 8px; font-size: 15px; }
  .top .btn.ghost { display: none; }
  .lang { flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; }
}

/* «Пластилиновые» кнопки (решение Валерия 2026-10-11): толстые, круглые, с бликом сверху и тенью снизу.
   Цвет — переменные --c (основной) и --c-dark (нижний край); форма одна для всех. */
.btn, .g-age, .g-opt, .g-again, .soon, .track, .stat, .login {
  --c: #FFCF3F; --c-dark: #D9A300;
  /* Блик — полосой вдоль верхнего края, как у кнопок из Nano Banana (characters/source/ui-clay-buttons.jpg). */
  background: linear-gradient(to bottom, rgba(255, 255, 255, .62) 0, rgba(255, 255, 255, .22) 18%, rgba(255, 255, 255, 0) 42%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, .06) 100%), var(--c);
  border-radius: 24px;
  box-shadow: inset 0 3px 1px rgba(255, 255, 255, .6), inset 0 -6px 0 rgba(0, 0, 0, .10), 0 7px 0 var(--c-dark), 0 12px 18px rgba(90, 60, 20, .22);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active, .g-age:active, .g-opt:active, .g-again:active, .track:active, .login:active {
  transform: translateY(5px);
  box-shadow: inset 0 3px 1px rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(0, 0, 0, .10), 0 2px 0 var(--c-dark), 0 4px 8px rgba(90, 60, 20, .2);
}
.btn, .soon, .g-again { border-radius: 999px; }
.btn { padding: 14px 28px; font-size: 20px; }
.btn.ghost { --c: #FFFFFF; --c-dark: #E3D5BD; }
.soon { --c: #CFF0D6; --c-dark: #8FCF9F; color: #1F6B3B; }
.g-age, .g-opt { --c: #CFE9FF; --c-dark: #8EC3EE; border-radius: 22px; }
.g-opt.ok { --c: #BFEBCB; --c-dark: #7FC996; }
.g-opt.no { --c: #F8D2D2; --c-dark: #E3A3A3; transform: translateY(5px); box-shadow: 0 2px 0 var(--c-dark); }
.g-again { --c: #FFCF3F; --c-dark: #D9A300; }
.track { --c: #FFF7DD; --c-dark: #F0C640; border: none; }
.stat { --c: #FFFFFF; --c-dark: #EADFCB; }
.login { --c: #FFFFFF; --c-dark: #E3D5BD; }

/* Doors at the top (decision 2026-10-14): big, wooden, a knob; they open a little on hover. */
.doors { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 6px auto 18px; max-width: 760px; padding: 0 16px; }
.door { position: relative; flex: 1 1 260px; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 22px 14px 18px;
  border-radius: 28px 28px 14px 14px; text-decoration: none; color: #3b2412; box-shadow: 0 6px 0 rgba(0,0,0,.18), inset 0 0 0 4px rgba(255,255,255,.25);
  transform-origin: left center; transition: transform .25s ease, box-shadow .25s ease; perspective: 600px; }
.door.kid { background: linear-gradient(135deg, #f7b955, #e08a2c); }
.door.parent { background: linear-gradient(135deg, #b98a5e, #8a5a33); color: #fff8ee; }
.door b { display: block; font-size: 24px; line-height: 1.1; }
.door small { display: block; font-size: 15px; opacity: .85; }
.door-ic { font-size: 40px; flex: none; }
.door .knob { position: absolute; inset-inline-end: 16px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #ffe08a; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.door:hover, .door:focus-visible { transform: perspective(600px) rotateY(-12deg); box-shadow: 10px 8px 0 rgba(0,0,0,.18); }
.door:active { transform: perspective(600px) rotateY(-18deg) scale(.98); }
@media (prefers-reduced-motion: reduce) { .door, .door:hover { transition: none; transform: none; } }


/* Homepage illustration: one owner-provided public asset, never the private folder. */
.castle-home { background: #f7f7ed; }
.castle-home #page { max-width: 1320px; }
.castle-top { position: relative; z-index: 3; align-items: flex-start; }
.castle-home .landing-content { position: relative; z-index: 1; width: 53%; padding-right: 22px; }
.castle-home .hero { display: block; padding-top: 30px; padding-bottom: 12px; }
.castle-home h1 { font-size: clamp(34px,4.2vw,54px); }
.castle-home .hero-game { max-width: 550px; padding-top: 12px; }
.castle-home .hero-game .lucky-big { width: 82px; margin-bottom: -12px; }
.castle-home .game { min-height: 230px; }
.castle-scene { position: fixed; z-index: 0; width: min(47vw, calc((100svh - 92px) * 687 / 1024)); aspect-ratio: 687 / 1024; right: max(12px, calc((100vw - 1320px) / 2)); top: 85px; }
.castle-art { display: block; width: 100%; height: auto; }
.castle-entry { position: absolute; display: block; min-width: 44px; min-height: 44px; text-decoration: none; border-radius: 14px; cursor: pointer; transition: filter .2s ease, box-shadow .2s ease; }
.castle-cta { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 8px 15px; border: 2px solid #fff; border-radius: 99px; background: #ffce3f; color: #382411; font-size: 16px; font-weight: bold; box-shadow: 0 4px 0 #ad7722,0 7px 14px #38241140; }
.castle-entry-parent .castle-cta { background: #dff3ff; box-shadow: 0 4px 0 #45788d,0 7px 14px #38241140; }
.castle-entry:hover .castle-cta { background: #fff3ae; }
.castle-entry:focus-visible { outline: 4px solid #1762a4; outline-offset: 5px; }
.castle-entry-kid { left: 24.8%; top: 71.4%; width: 20.6%; height: 21.8%; }
.castle-entry-parent { left: 62%; top: 53.3%; width: 17.5%; height: 16.2%; }
.castle-sign { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: center; top: 0; left: 0; width: 100%; height: 20%; text-align: center; line-height: 1.05; }
.castle-sign b { font-size: clamp(10px,1.02vw,14px); }
.castle-sign small { font-size: clamp(9px,.8vw,11px); margin-top: 2px; }
.castle-entry-kid .castle-sign { color: #fffaf0; text-shadow: 0 1px 2px #582e12; }
.castle-entry-parent .castle-sign { color: #163a50; height: 17%; }
.castle-entry-parent .castle-sign b { font-size: clamp(9px,.78vw,11px); white-space: nowrap; }
.castle-entry-parent .castle-sign small { display: none; }
.castle-entry:hover, .castle-entry:focus-visible { box-shadow: 0 0 22px 5px #ffcc5899; filter: brightness(1.07); }
.castle-light { position: absolute; width: 2.5%; height: 4%; border-radius: 50%; background: radial-gradient(ellipse,#fff7bddd,#ffc44f66 55%,transparent 75%); mix-blend-mode: screen; pointer-events: none; animation: castle-glow 7s ease-in-out infinite alternate; }
.light-one { left: 52.5%; top: 25.4%; }
.light-two { left: 68.6%; top: 33%; animation-delay: -3s; animation-duration: 9s; }
.light-three { left: 17.1%; top: 56.9%; animation-delay: -5s; }
@keyframes castle-glow { from { opacity: .12; } to { opacity: .8; } }
@media (max-width: 980px) {
  .castle-home .landing-content { width: 100%; padding-right: 0; }
  /* On a phone the castle takes at most half the screen height, so the headline and the first button are visible without scrolling (audit 208, UX A5). */
  .castle-scene { position: relative; right: auto; top: auto; width: min(86vw, 460px, calc(50svh * 687 / 1024)); margin: 0 auto 12px; z-index: 1; }
  .castle-home .hero { padding-top: 12px; }
  .castle-home .hero-game { margin-inline: auto; }
  .castle-sign b { font-size: clamp(11px,2.6vw,14px); }
  .castle-sign small { font-size: clamp(9px,2.1vw,11px); }
}
@media (prefers-reduced-motion: reduce) { .castle-light { animation: none; opacity: .35; } .castle-entry { transition: none; } }
