/* Thinkle – paleta „pastelowa przytulna magia” 1:1 z lib/theme.dart */
@font-face { font-family: "Baloo2"; src: url("assets/fonts/Baloo2.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("assets/fonts/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --ink: #3D405B; --ink-deep: #2A2C40; --muted: #5B5E78;
  --cream: #FFF6EC; --white: #FFFFFF; --track: #F1E4D6; --border: #E3D6C7;
  --coral: #FFB5A7; --coral-d: #E8907F;
  --mint: #A8DADC; --mint-d: #86BFC1;
  --lavender: #B8A1E3; --lavender-d: #9A82C9;
  --leaf: #C9E4B4; --leaf-d: #A9C993;
  --butter: #FFE9C7; --butter-d: #E9CC9C;
  --peach: #FFE3D3; --peach-d: #EDC3AB;
  --pink: #F6C6D8; --pink-d: #DCA4BA;
  --sky: #D7E9F7; --sky-d: #B3CDE3;
  --gold: #F2C14E; --good: #3B7A43;
  --hero-bg: #FDE9CC;
  --radius: 28px;
  --shadow: 0 10px 30px rgba(61, 64, 91, .08);
  --display: "Baloo2", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 600 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(40px, 6vw, 68px); }
h2 { font-size: clamp(32px, 4.4vw, 48px); }
h3 { font-size: 24px; }
p { margin: 0; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }

/* Przyciski – jak ChunkyButton: pełny kolor + ciemniejszy „spód” */
.btn {
  --c: var(--coral); --s: var(--coral-d); --t: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 28px; border-radius: 20px;
  background: var(--c); color: var(--t); border-bottom: 6px solid var(--s);
  font: 800 18px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, border-bottom-width .12s ease, filter .12s;
}
.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(4px); border-bottom-width: 2px; }
.btn:focus-visible, .mascot:focus-visible, .tab:focus-visible { outline: 3px solid var(--lavender-d); outline-offset: 3px; }
.btn--ink { --c: var(--ink); --s: var(--ink-deep); --t: var(--cream); }
.btn--white { --c: var(--white); --s: var(--border); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 16px; border-bottom-width: 4px; border-radius: 16px; }
.btn.is-soon { cursor: default; }
.btn.is-soon:active { transform: none; border-bottom-width: 6px; }

.chip {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font: 800 14px/1.4 var(--body); background: var(--white);
}
.chip--butter { background: var(--white); color: var(--muted); box-shadow: var(--shadow); }
.chip--mint { background: var(--mint); }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 246, 236, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(227, 214, 199, .6);
}
.nav__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 26px/1 var(--display); }
.brand img { border-radius: 11px; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { text-decoration: none; font-weight: 800; color: var(--muted); }
.nav__links a:hover { color: var(--ink); }

/* HERO */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); padding: 64px 0 96px; }
.blob { position: absolute; border-radius: 50%; background: rgba(255, 246, 236, .55); pointer-events: none; }
.blob--a { width: 680px; height: 680px; top: -340px; left: 34%; }
.blob--b { width: 520px; height: 520px; bottom: -300px; left: -160px; }
.hero__in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero__copy h1 { margin: 18px 0 18px; }
.lead { font-size: 20px; color: var(--muted); max-width: 30em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 26px 0 0; font-weight: 800; color: var(--muted); }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%233B7A43' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Telefon */
.hero__phone { position: relative; justify-self: center; padding: 96px 40px 56px; }
.phone {
  position: relative; width: 330px; border-radius: 54px; padding: 12px;
  text-align: left; background: var(--ink); box-shadow: 0 22px 0 -4px #D9C9B4, 0 40px 60px rgba(61, 64, 91, .18);
}
.phone__screen { border-radius: 43px; background: var(--cream); padding: 14px 16px 22px; overflow: hidden; }
.phone__status { display: flex; align-items: center; justify-content: space-between; padding: 2px 10px 12px; font-size: 14px; }
.island { width: 92px; height: 26px; border-radius: 20px; background: #111; }
.bars { width: 40px; height: 12px; border-radius: 4px; border: 2px solid var(--muted); opacity: .5; }
.app-top { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lavender); border: 3px solid var(--lavender-d); font: 800 14px var(--display);
}
.who { display: grid; line-height: 1.25; font-size: 15px; }
.who small, .app-hello small, .app-card small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.streak-pill {
  margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--white); border-radius: 999px; font: 800 20px/1 var(--display);
}
.app-hello { display: grid; margin: 16px 2px 12px; }
.app-hello b { font: 800 25px/1.1 var(--display); }
.app-card { background: var(--white); border-radius: 24px; padding: 14px 12px 14px; }
.app-card__head { padding: 0 4px 8px; }
.app-card__head b { font: 800 19px/1.2 var(--display); display: block; }
.row { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; padding: 6px; border-radius: 16px; }
.row img { width: 58px; height: 40px; object-fit: cover; border-radius: 10px; }
.row b { display: block; font-size: 14px; line-height: 1.2; }
.row em { font-style: normal; font-size: 12px; font-weight: 800; }
.row--active { background: #FFF3E6; }
.mini-btn {
  margin: 10px 2px 12px; height: 44px; border-radius: 16px; display: grid; place-items: center;
  background: var(--butter); border-bottom: 5px solid var(--butter-d); font: 800 16px var(--body);
}
.week { display: flex; justify-content: space-between; padding: 0 2px; }
.d {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--track); font-size: 11px; font-weight: 800; color: var(--muted);
}
.d.done { background: var(--leaf); color: var(--good); }
.d.today { background: var(--track); box-shadow: inset 0 0 0 3px var(--ink); color: var(--ink); }

.peek { position: absolute; z-index: 2; pointer-events: none; }
.peek--spark { top: 0; right: 0; width: 130px; transform: rotate(8deg); }
.peek--cloud { bottom: 0; left: 0; width: 110px; }
.spark { position: absolute; width: 22px; height: 22px; background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.s1 { top: 50px; left: 10px; background: var(--coral-d); }
.s2 { top: 44%; right: -6px; width: 30px; height: 30px; background: var(--white); }
.s3 { bottom: 70px; right: 6px; background: var(--mint-d); }

/* SEKCJE */
.section { padding: 96px 0; }
.section--peach { background: var(--butter); }
.section--lavender { background: #EFE8FA; }
.head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.head p { margin-top: 14px; font-size: 19px; color: var(--muted); }
.hint { display: block; margin-top: 6px; font-size: 15px; color: var(--lavender-d); font-weight: 800; }

/* Postacie */
.mascots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mascot {
  all: unset; box-sizing: border-box; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; justify-content: flex-start;
  background: var(--white); border-radius: var(--radius); padding: 28px 24px 30px;
  border-bottom: 6px solid var(--border); box-shadow: var(--shadow); transition: transform .2s ease;
}
.mascot:hover { transform: translateY(-4px); }
.mascot__stage { display: grid; place-items: center; height: 230px; border-radius: 22px; margin-bottom: 18px; }
.mascot--cloud .mascot__stage { background: #F3EEFB; }
.mascot--spark .mascot__stage { background: #FFF0EC; }
.mascot--sprout .mascot__stage { background: #EAF6F6; }
.mascot__stage :is(img, canvas) { height: 200px; width: auto; transform-origin: 50% 90%; animation: bob 3.2s ease-in-out infinite; }
.mascot--spark .mascot__stage :is(img, canvas) { animation-delay: -1s; }
.mascot--sprout .mascot__stage :is(img, canvas) { animation-delay: -2s; }
.mascot__stage img.pop { animation: pop .45s ease; }
.mascot b { display: block; font: 800 28px/1.1 var(--display); }
.mascot small { display: block; margin-top: 8px; font-size: 16px; color: var(--muted); font-weight: 600; }
/* Postacie z Rive (mascots.js): animują się same, bez CSS-owego bujania */
canvas.rv { display: block; max-width: 100%; aspect-ratio: 400 / 420; animation: none !important; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.mascot__stage canvas.rv, .duel canvas.rv { width: auto; }
.peek.rv { pointer-events: auto; cursor: pointer; }
.mascot.is-rive .mascot__stage { cursor: pointer; }
.moods { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.moods[hidden] { display: none; }
.moods button {
  all: unset; cursor: pointer; padding: 9px 16px; border-radius: 999px; background: var(--white);
  border-bottom: 4px solid var(--border); font: 800 15px var(--body); transition: transform .12s;
}
.moods button[aria-pressed="true"] { background: var(--lavender); border-bottom-color: var(--lavender-d); }
.moods button:active { transform: translateY(2px); }
.moods button:focus-visible { outline: 3px solid var(--lavender-d); outline-offset: 3px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

.wardrobe {
  display: flex; align-items: center; gap: 18px; margin: 28px auto 0; max-width: 720px;
  background: var(--peach); border-radius: 24px; padding: 14px 24px 14px 14px;
}
.wardrobe :is(img, canvas) { width: 84px; flex: none; }

/* Plan dnia */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { background: var(--white); border-radius: 24px; padding: 22px; display: grid; align-content: start; gap: 6px; border-bottom: 6px solid var(--s); }
.step small { color: var(--muted); font-size: 15px; font-weight: 600; }
.step b { font: 800 22px/1.15 var(--display); }
.num { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--c); font: 800 20px var(--display); margin-bottom: 6px; }
.step--sky { --c: var(--sky); --s: var(--sky-d); }
.step--coral { --c: var(--coral); --s: var(--coral-d); }
.step--lavender { --c: var(--lavender); --s: var(--lavender-d); }
.step--pink { --c: var(--pink); --s: var(--pink-d); }

.levels { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; margin-top: 40px; background: var(--white); border-radius: var(--radius); padding: 32px; }
.levels__copy p { margin-top: 10px; color: var(--muted); }
.ladder { display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; align-items: end; }
.ladder span {
  display: grid; place-items: end center; padding-bottom: 6px; border-radius: 10px;
  background: var(--track); font: 800 13px var(--body); color: var(--muted);
}
.ladder span:nth-child(n) { height: calc(36px + var(--i, 0) * 7px); }
.ladder span:nth-child(-n+8) { background: var(--leaf); color: var(--good); }
.ladder span.on { box-shadow: inset 0 0 0 3px var(--ink); color: var(--ink); }
.ladder span.m { background: #FCE7AE; color: #8A6A12; }

/* Gry */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.tab {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; background: var(--white); font: 800 16px var(--body);
  border-bottom: 4px solid var(--border); transition: transform .12s;
}
.tab small { font-size: 13px; opacity: .6; }
.tab i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.tab[aria-selected="true"] { background: var(--c); border-bottom-color: var(--s); }
.tab[aria-selected="true"] i { background: var(--white); }
.tab:active { transform: translateY(2px); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.game { background: var(--white); border-radius: 22px; padding: 10px 10px 14px; box-shadow: var(--shadow); animation: rise .35s ease both; }
.game img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; }
.game b { display: block; margin: 10px 6px 0; font-size: 17px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Razem */
.cards3 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 22px; }
.card { background: var(--white); border-radius: var(--radius); padding: 26px; border-bottom: 6px solid var(--border); }
.card h3 { margin: 18px 0 8px; }
.card p { color: var(--muted); font-size: 16px; }
.card__art { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; }
.card__art--butter { background: var(--butter); }
.card__art--mint { background: #EAF6F6; }
.duel { display: flex; align-items: center; justify-content: center; gap: 4px; height: 96px; }
.duel :is(img, canvas) { height: 108px; width: auto; }
.duel img:last-child { transform: scaleX(-1); }
.vs { font: 800 26px var(--display); color: var(--coral-d); }

/* Relaks */
.relax { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.relax__copy h2 { margin: 16px 0 14px; }
.relax__copy p { color: var(--muted); font-size: 19px; }
.relax__sleep { width: 130px; margin-top: 24px; }
.relax__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.relax__grid figure { margin: 0; background: var(--white); border-radius: 22px; padding: 10px 10px 14px; box-shadow: var(--shadow); }
.relax__grid img { border-radius: 14px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.relax__grid figcaption { margin: 10px 6px 0; font-weight: 800; }

/* Plus */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 920px; margin: 0 auto; }
.plan { position: relative; background: var(--white); border-radius: var(--radius); padding: 30px; border-bottom: 6px solid var(--border); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; flex: none;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%233B7A43' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.plan--plus { background: #F3EEFB; border-bottom-color: var(--lavender-d); }
.plan--plus li::before { background-color: var(--lavender); filter: none; }
.plan small { display: block; margin-top: 18px; color: var(--muted); font-size: 14px; }
.badge { position: absolute; top: 22px; right: 22px; padding: 4px 12px; border-radius: 999px; background: var(--gold); font: 800 14px var(--body); }

/* Prywatność */
.privacy { display: flex; align-items: center; gap: 36px; max-width: 900px; background: var(--white); border-radius: var(--radius); padding: 32px 40px; box-shadow: var(--shadow); }
.privacy :is(img, canvas) { width: 140px; flex: none; }
.privacy p { margin: 12px 0 14px; color: var(--muted); }
.link { font-weight: 800; color: var(--lavender-d); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Final CTA */
.final { background: var(--hero-bg); padding: 80px 0 90px; text-align: center; }
.final__mascots { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin-bottom: 18px; }
.final__mascots :is(img, canvas) { width: 120px; }
.final__mascots .big { width: 140px; }
.final h2 { margin-bottom: 26px; }
.final__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* Stopka */
.foot { background: var(--ink); color: var(--cream); padding: 40px 0 48px; }
.foot__in { display: grid; gap: 18px; }
.brand--foot { font-size: 22px; }
.brand--foot img { border-radius: 9px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 26px; font-weight: 800; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot p { font-size: 14px; opacity: .75; max-width: 760px; }

/* Polityka prywatności (/privacy) */
.legal-hero { background: var(--hero-bg); padding: 56px 0 96px; }
.legal-hero__in { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.legal-hero h1 { margin: 16px 0 14px; }
.legal-hero .lead { max-width: 34em; }
.legal-hero :is(img, canvas) { width: 190px; flex: none; }
.legal-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -56px; position: relative; }
.fact { background: var(--white); border-radius: 22px; padding: 18px 20px; border-bottom: 6px solid var(--s); box-shadow: var(--shadow); display: grid; gap: 4px; align-content: start; }
.fact b { font: 800 19px/1.2 var(--display); }
.fact small { color: var(--muted); font-size: 14.5px; }
.fact--leaf { --s: var(--leaf-d); }
.fact--coral { --s: var(--coral-d); }
.fact--sky { --s: var(--sky-d); }
.fact--lavender { --s: var(--lavender-d); }
.legal { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; padding: 48px 0 96px; }
.toc { position: sticky; top: 96px; display: grid; gap: 2px; background: var(--white); border-radius: 22px; padding: 18px; }
.toc b { font: 800 18px var(--display); margin: 0 8px 6px; }
.toc a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 700; padding: 6px 8px; border-radius: 10px; }
.toc a:hover { background: var(--cream); color: var(--ink); }
.legal__body { background: var(--white); border-radius: var(--radius); padding: 40px 48px; box-shadow: var(--shadow); }
.legal__body h2 { font-size: 26px; margin: 36px 0 10px; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p { margin: 0 0 12px; color: #4A4D68; max-width: 46em; }
.legal__body a { color: var(--lavender-d); font-weight: 800; }
.legal__contact { display: flex; align-items: center; gap: 18px; margin-top: 40px; background: #F3EEFB; border-radius: 22px; padding: 14px 22px 14px 14px; }
.legal__contact :is(img, canvas) { width: 80px; flex: none; }
.legal__contact p { margin: 0; color: var(--ink); }

/* Towarzysz (companion.js) */
.buddy { position: fixed; right: 14px; bottom: 10px; z-index: 25; width: 170px; pointer-events: none; }
.buddy[hidden] { display: none; }
.buddy__rider {
  position: relative; pointer-events: auto;
  transform: translateX(calc(100vw + 40px));
  transition: transform 1.6s cubic-bezier(.25, .8, .25, 1);
}
.buddy.is-here .buddy__rider { transform: none; }
.buddy.is-riding .buddy__rider { transition-timing-function: cubic-bezier(.45, 0, .2, 1); }
.buddy__body { all: unset; display: block; cursor: pointer; width: 100%; -webkit-tap-highlight-color: transparent; }
.buddy__body:focus-visible { outline: 3px solid var(--lavender-d); outline-offset: 2px; border-radius: 24px; }
.buddy__fig { width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgba(61, 64, 91, .16)); }
.buddy.is-riding .buddy__fig { animation: ride .32s ease-in-out infinite alternate; }
@keyframes ride { from { translate: 0 0; } to { translate: 0 -3px; } }
.buddy__x {
  all: unset; position: absolute; top: 4px; left: -2px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; background: var(--white); color: var(--muted);
  font: 800 18px/1 var(--body); box-shadow: var(--shadow); opacity: 0; transition: opacity .2s;
}
.buddy__rider:hover .buddy__x, .buddy__x:focus-visible { opacity: 1; }
@media (hover: none) { .buddy__x { opacity: .85; } }
.buddy.is-riding .buddy__x { visibility: hidden; }
.buddy__bubble {
  position: absolute; right: 18px; bottom: calc(100% - 10px); width: max-content; max-width: min(270px, calc(100vw - 40px));
  background: var(--white); color: var(--ink); border-radius: 20px; padding: 12px 16px;
  font: 700 15px/1.4 var(--body); pointer-events: auto; cursor: pointer;
  box-shadow: 0 6px 18px rgba(61, 64, 91, .14); transform-origin: 85% 100%;
}
.buddy__bubble::after {
  content: ""; position: absolute; right: 26px; bottom: -9px; width: 18px; height: 18px;
  background: var(--white); transform: rotate(45deg); border-radius: 0 0 5px 0;
}
.buddy__bubble p { margin: 0; min-height: 1.4em; position: relative; }
.buddy__bubble.is-in { animation: bubble-in .32s cubic-bezier(.3, 1.5, .5, 1) both, bubble-bob 2.6s ease-in-out .4s infinite; }
.buddy__bubble.is-out { animation: bubble-out .2s ease-in both; }
.buddy__bubble.is-next { animation: bubble-next .25s ease-out both, bubble-bob 2.6s ease-in-out .3s infinite; }
@keyframes bubble-next { from { transform: scale(.94); } to { transform: none; } }
@keyframes bubble-in { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes bubble-out { to { opacity: 0; transform: scale(.4); } }
@keyframes bubble-bob { 50% { translate: 0 -3px; } }
/* Reflektor towarzysza: przyciemnienie z „dziurą”, snop światła i lampa zjeżdżająca z góry */
.stage { position: fixed; inset: 0; z-index: 23; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.stage.is-on { opacity: 1; }
.stage__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stage__dim { fill: rgba(30, 31, 48, .62); }
.stage__rim { stroke: #FFF1C9; stroke-opacity: .45; stroke-width: 4; }
.stage__lamp { position: absolute; top: 0; left: 0; width: 80px; will-change: transform; }
.stage__drop { position: relative; transform: translateY(-170px); transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.stage.is-on .stage__drop { transform: none; }
.stage__rod { position: absolute; left: 37px; top: -40px; width: 6px; height: 86px; border-radius: 3px; background: #2A2C40; }
.stage__head { position: absolute; top: 0; left: 0; transform-origin: 40px 46px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }

/* Oprowadzanie: przewija towarzysz, nie użytkownik – przycisk „Zakończ” w dymku */
.buddy__stop {
  all: unset; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; cursor: pointer;
  font: 700 13px var(--body); color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.buddy__stop[hidden] { display: none; }
.buddy__stop:hover { color: var(--ink); }
.buddy__stop:focus-visible { outline: 3px solid var(--lavender-d); outline-offset: 2px; border-radius: 6px; }
.buddy__stop kbd { font: 700 11px var(--body); padding: 1px 5px; border-radius: 5px; background: var(--cream); border: 1px solid var(--border); text-decoration: none; }

.buddy__choices { display: flex; gap: 8px; margin-top: 10px; }
.buddy__choices[hidden] { display: none; }
.buddy__choices button {
  all: unset; cursor: pointer; padding: 7px 18px; border-radius: 14px; font: 800 15px var(--body);
  background: var(--cream); border-bottom: 4px solid var(--border); transition: transform .12s;
}
.buddy__choices button[data-answer="yes"] { background: var(--leaf); border-bottom-color: var(--leaf-d); color: var(--good); }
.buddy__choices button:active { transform: translateY(2px); }
.buddy__choices button:focus-visible { outline: 3px solid var(--lavender-d); outline-offset: 2px; }

/* Puste miejsce w karcie postaci, która towarzyszy w rogu ekranu */
.mascot__stage { position: relative; }
.mascot__stage > :not(.mascot__away) { transition: opacity .35s ease, transform .35s ease; }
.mascot.is-away .mascot__stage > :not(.mascot__away) { opacity: 0; transform: translateY(24px) scale(.7); }
.mascot__away {
  position: absolute; inset: 16px; display: none; place-content: center; text-align: center; gap: 4px;
  border: 3px dashed rgba(61, 64, 91, .22); border-radius: 18px; color: var(--muted); font: 700 15px/1.3 var(--body);
}
.mascot__away b { font: 800 20px var(--display); color: var(--ink); }
.mascot__away small { font-size: 14px; }
.mascot.is-away .mascot__away { display: grid; }

.buddy-recall {
  all: unset; position: fixed; right: 14px; bottom: 14px; z-index: 25; cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 999px;
  background: var(--white); border-bottom: 4px solid var(--border); box-shadow: var(--shadow);
  font: 800 15px var(--body); color: var(--ink);
}
.buddy-recall[hidden] { display: none; }
.buddy-recall img { width: 40px; height: auto; }
.buddy-recall:focus-visible { outline: 3px solid var(--lavender-d); outline-offset: 3px; }

/* Wybór języka (i18n.js) */
html.i18n-pending body { visibility: hidden; }
.lang { position: relative; }
.lang__btn {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border-radius: 14px; font: 800 15px var(--body); color: var(--muted); background: var(--white); border-bottom: 3px solid var(--border);
}
.lang__btn:hover { color: var(--ink); }
.lang__btn:focus-visible, .lang__menu button:focus-visible { outline: 3px solid var(--lavender-d); outline-offset: 2px; }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 170px; margin: 0; padding: 6px; list-style: none;
  background: var(--white); border-radius: 16px; box-shadow: 0 12px 30px rgba(61, 64, 91, .16);
}
.lang__menu[hidden] { display: none; }
.lang__menu button {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; font: 700 15px var(--body); color: var(--ink);
}
.lang__menu button b { width: 26px; font-size: 13px; color: var(--muted); }
.lang__menu button:hover { background: var(--cream); }
.lang__menu button[aria-checked="true"] { background: #F3EEFB; }
.lang__menu button[aria-checked="true"] b { color: var(--lavender-d); }

/* Zmiana języka: towarzysz skacze po napisach, a każda postać zmienia je po swojemu (companion.js):
   Chmurka – napis znika za chmurą, Iskierka – napis płonie, Kiełek – napis zarasta. */
.fx { position: absolute; z-index: 22; pointer-events: none; overflow: visible; }
.fx > * { position: absolute; }
.fx-out { transition: opacity .2s ease, filter .2s ease; opacity: 0 !important; }
.fx-in { animation: fx-in .4s ease both; }
@keyframes fx-in { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }

/* Chmurka: kłęby rosną, zasłaniają, rozwiewają się */
.fx-puff {
  border-radius: 50%; transform: scale(0); opacity: .95;
  background: radial-gradient(circle at 35% 30%, #fff 0 28%, #F3EEFB 55%, #D9CCF2 100%);
  box-shadow: 0 6px 14px rgba(154, 130, 201, .22);
  animation: fx-puff 1.1s cubic-bezier(.3, 1.2, .5, 1) var(--d, 0ms) both;
}
@keyframes fx-puff {
  0% { transform: scale(0); opacity: .9; }
  32% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), -16px) scale(1.3); opacity: 0; }
}

/* Iskierka: ogień rysowany na jednym płótnie nad stroną (companion.js – fire), tekst się zwęgla. */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 22; pointer-events: none; }
.fx-burn { animation: fx-burn .56s ease forwards; }
@keyframes fx-burn {
  0% { opacity: 1; }
  45% { color: #C8562B; opacity: 1; }
  100% { color: #4A2416; opacity: 0; }
}
.fx-glow { animation: fx-glow .6s ease both; }
@keyframes fx-glow { from { opacity: 0; color: #E8907F; } }

/* Kiełek: pnącza się rysują, liście rosną, na koniec kwiatki i opadanie */
.fx-vines { inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-vines path {
  fill: none; stroke: #86A86F; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: fx-vine 1.25s ease var(--d, 0ms) both;
}
@keyframes fx-vine {
  0% { stroke-dashoffset: var(--len); opacity: 1; }
  40%, 70% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.fx-leaf {
  border-radius: 0 72% 0 72%; transform-origin: 0 100%; transform: scale(0) rotate(var(--r, 0deg)); opacity: 1;
  background: linear-gradient(135deg, #D6EDC2, #A9C993 55%, #7FA067);
  box-shadow: inset -2px -2px 0 rgba(59, 122, 67, .18);
  animation: fx-leaf 1.25s cubic-bezier(.3, 1.3, .5, 1) var(--d, 0ms) both;
}
@keyframes fx-leaf {
  0% { transform: scale(0) rotate(calc(var(--r, 0deg) - 40deg)); opacity: 1; }
  30% { transform: scale(1) rotate(var(--r, 0deg)); opacity: 1; }
  66% { transform: scale(1.04) rotate(var(--r, 0deg)); opacity: 1; }
  100% { transform: translateY(18px) scale(.3) rotate(calc(var(--r, 0deg) + 50deg)); opacity: 0; }
}
.fx-flower {
  width: 12px; height: 12px; border-radius: 50%; transform: scale(0); opacity: 0;
  background: radial-gradient(circle, #F2C14E 0 30%, var(--c, #F6C6D8) 32%);
  box-shadow: 0 0 0 3px var(--c, #F6C6D8);
  animation: fx-flower .9s ease var(--d, 0ms) both;
}
@keyframes fx-flower {
  0% { transform: scale(0); opacity: 0; }
  35% { transform: scale(1.15); opacity: 1; }
  70% { transform: scale(1); opacity: 1; }
  100% { transform: scale(.6) translateY(-6px); opacity: 0; }
}
.buddy__rider.is-hopping .buddy__x { visibility: hidden; }

/* Responsywność */
@media (max-width: 980px) {
  .hero__in { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { display: grid; justify-items: center; }
  .hero__cta, .ticks { justify-content: center; }
  .steps { grid-template-columns: 1fr 1fr; }
  .levels, .relax { grid-template-columns: 1fr; }
  .cards3 { grid-template-columns: 1fr 1fr; }
  .card--duel { grid-column: 1 / -1; }
  .relax__copy { text-align: center; display: grid; justify-items: center; }
  .legal { grid-template-columns: 1fr; }
  .toc { position: static; }
  .legal-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__in { justify-content: space-between; }
  .lang { margin-left: auto; margin-right: 8px; }
  .hero { padding: 40px 0 64px; }
  .mascots, .cards3, .plans { grid-template-columns: 1fr; }
  .mascot__stage { height: 190px; }
  .mascot__stage :is(img, canvas) { height: 165px; }
  .section { padding: 64px 0; }
  .privacy { flex-direction: column; text-align: center; padding: 28px 22px; }
  .levels { padding: 24px 18px; }
  .ladder { gap: 3px; }
  .ladder span { font-size: 10px; border-radius: 7px; }
  .games { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .buddy { width: 112px; right: 8px; bottom: 6px; }
  .buddy__bubble { font-size: 14px; padding: 10px 14px; right: 8px; }
  .legal-hero__in { flex-direction: column-reverse; text-align: center; }
  .legal-hero :is(img, canvas) { width: 130px; }
  .legal-facts { gap: 10px; }
  .fact { padding: 14px; }
  .legal__body { padding: 26px 20px; }
  .legal { padding-top: 32px; }
  .game b { font-size: 15px; }
}
@media (max-width: 400px) {
  .hero__phone { padding: 84px 8px 50px; }
  .phone { width: 290px; }
  .peek--spark { width: 110px; right: -8px; }
  .peek--cloud { width: 96px; left: -8px; }
  .steps { grid-template-columns: 1fr; }
  .relax__grid { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .buddy__rider { transform: none; opacity: 0; transition: opacity .3s !important; }
  .buddy.is-here .buddy__rider { opacity: 1; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
