/* Czcionka Jost z własnego serwera (licencja OFL) – strona nie łączy się z Google przed zgodą na cookies */
@font-face {
  font-family: Jost;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/jost-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Jost;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/jost-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --red: #D62330;
  --red-dark: #B01B27;
  --red-soft: #FDECEE;
  --ink: #222;
  --muted: #666;
  --line: #E6E1DA;
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --fur: #B8733A;
  --fur-dark: #8A5226;
  --cream: #F6EAD7;
  --yellow: #FFD166;
  --radius: 18px;
  --shadow: 0 2px 14px rgba(60, 40, 20, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Jost, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
}
a { color: var(--red); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Nagłówek ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 40px; height: 43px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-main { font-weight: 800; font-size: 22px; color: var(--red); }
.brand-sub { font-weight: 600; font-size: 13px; color: var(--fur-dark); letter-spacing: .5px; margin-top: 2px; }

.btn-link {
  background: none; border: 0; padding: 6px 4px; cursor: pointer;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 15px;
}
.btn-link:hover { color: var(--red); }

/* ---------- Scena: miś + panel ---------- */
.stage {
  flex: 1;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 16px 16px 32px;
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
  align-items: start;
}
.bear-col {
  display: flex; align-items: flex-end; gap: 10px;
  flex-direction: row-reverse; justify-content: flex-end;
}
.bear {
  width: 96px; height: auto; flex: none;
  filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .12));
  transition: transform .35s ease;
}
.bear.bounce { animation: bounce .5s ease; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-10px) rotate(-2deg); } }

.bubble {
  position: relative; flex: 1;
  background: #fff; border: 2px solid var(--cream);
  border-radius: 18px; padding: 12px 14px;
  font-size: 16px; font-weight: 500;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.bubble::after {
  content: ""; position: absolute; left: -10px; bottom: 16px;
  border: 8px solid transparent; border-right-color: #fff; border-left: 0;
}

.panel {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 16px 22px;
  min-height: 320px;
}
.panel.enter { animation: enter .3s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (min-width: 820px) {
  .stage { grid-template-columns: 300px 1fr; gap: 28px; padding-top: 32px; }
  .bear-col { position: sticky; top: 24px; flex-direction: column; align-items: center; justify-content: flex-start; }
  .bear { width: 260px; }
  .bubble { margin: 0 0 14px; font-size: 18px; width: 100%; }
  .bubble::after { left: 50%; bottom: -10px; transform: translateX(-50%); border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
  .panel { padding: 30px 32px 32px; min-height: 460px; }
}

/* ---------- Ekran startowy ---------- */
.hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { margin: 0 0 18px; color: var(--muted); }
.hero ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.hero li { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.hero li span { font-size: 22px; }
@media (min-width: 820px) { .hero h1 { font-size: 40px; } }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 14px 26px; font-weight: 700; font-size: 18px; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary[disabled] { background: #d9b6b9; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-big { width: 100%; padding: 18px 24px; font-size: 19px; }
@media (min-width: 560px) { .btn-big { width: auto; } }

/* ---------- Pytania ---------- */
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.progress-label { font-size: 14px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.progress-bar { flex: 1; height: 8px; background: #F0EBE4; border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--red); border-radius: 99px; transition: width .35s ease; }

.q-title { font-size: 25px; line-height: 1.2; margin: 0 0 4px; font-weight: 800; }
.q-sub { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
@media (min-width: 820px) { .q-title { font-size: 30px; } }

.tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.tiles.wide { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 92px; padding: 12px 8px; text-align: center;
  background: #fff; border: 2px solid var(--line); border-radius: 16px; cursor: pointer;
  font-weight: 600; font-size: 16px; line-height: 1.2;
  transition: border-color .15s, background .15s, transform .1s;
}
.tile:hover { border-color: var(--fur); }
.tile:active { transform: scale(.97); }
.tile .ico { font-size: 30px; line-height: 1; }
.tile .desc { font-size: 13px; font-weight: 400; color: var(--muted); }
.tile[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); }
.tile[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 6px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 13px; line-height: 22px; font-weight: 800;
}
.tile { position: relative; }
.tile.compact { min-height: 78px; font-size: 15px; }
.tile.compact .ico { font-size: 26px; }

.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.q-nav .btn { padding: 12px 22px; font-size: 17px; }
.q-nav.sticky {
  position: sticky; bottom: 0; z-index: 5;
  margin: 12px -16px -22px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}
@media (min-width: 820px) { .q-nav.sticky { margin: 16px -32px -32px; padding: 14px 32px; } }
.multi-hint { font-size: 14px; color: var(--muted); }

/* ---------- Myślenie ---------- */
.thinking { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; text-align: center; gap: 16px; }
.thinking p { font-size: 20px; font-weight: 600; margin: 0; }
.dots { display: flex; gap: 8px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: dot 1s infinite ease-in-out; }
.dots span:nth-child(2) { animation-delay: .15s; background: var(--fur); }
.dots span:nth-child(3) { animation-delay: .3s; background: var(--yellow); }
@keyframes dot { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-10px); opacity: 1; } }

/* ---------- Wynik ---------- */
.result-kicker { font-size: 15px; font-weight: 600; color: var(--fur-dark); margin: 0 0 4px; text-transform: uppercase; letter-spacing: .6px; }
.result-title { font-size: 30px; line-height: 1.15; margin: 0 0 10px; font-weight: 800; }
.result-title em { font-style: normal; color: var(--red); }
.result-reason { font-size: 18px; margin: 0 0 20px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.result-meta li { background: #F4EFE8; border-radius: 99px; padding: 4px 12px; font-size: 14px; font-weight: 500; }
.shared-note { background: #FFF6DB; border-radius: 12px; padding: 10px 14px; font-size: 15px; margin: 0 0 16px; }
@media (min-width: 820px) { .result-title { font-size: 36px; } }

.result-count { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.result-count a { font-weight: 600; white-space: normal; }

.section-title { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.alts { display: grid; gap: 10px; }
@media (min-width: 560px) { .alts { grid-template-columns: 1fr 1fr; } }
.alt {
  display: block; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px;
  text-decoration: none; color: var(--ink); transition: border-color .15s;
}
.alt:hover { border-color: var(--red); }
.alt strong { display: block; font-size: 17px; margin-bottom: 2px; }
.alt span { font-size: 14px; color: var(--muted); }
.alt .go { color: var(--red); font-weight: 700; font-size: 14px; margin-top: 6px; display: inline-block; }

.promo {
  margin-top: 26px; padding: 18px; border-radius: 16px;
  background: linear-gradient(135deg, #FFF3D1, #FDE3E5);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.promo-ico { font-size: 38px; line-height: 1; }
.promo-text { flex: 1 1 220px; }
.promo-text strong { display: block; font-size: 19px; }
.promo-text span { font-size: 15px; color: #555; }
.promo .btn { padding: 12px 20px; font-size: 16px; }

.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share .btn { padding: 10px 16px; font-size: 15px; font-weight: 600; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1DA851; }
.btn-ms { background: #0866FF; color: #fff; }
.btn-ms:hover { background: #0652CC; }
.copied { color: #1b8a3a; font-weight: 600; font-size: 15px; align-self: center; }

.again { margin-top: 26px; text-align: center; }

/* ---------- Stopka ---------- */
.footer { text-align: center; padding: 20px 16px 28px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.footer p { margin: 4px 0; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a, .footer-links .btn-link { color: var(--muted); font-size: 14px; }

/* ---------- Baner cookies ---------- */
.cookie { position: fixed; inset: auto 0 0 0; z-index: 50; padding: 12px; display: flex; justify-content: center; }
.cookie-box {
  max-width: 640px; width: 100%; background: #fff; border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .22); padding: 18px 18px 16px; font-size: 15px;
}
.cookie-title { font-weight: 700; font-size: 17px; margin: 0 0 6px; }
.cookie-box p { margin: 0 0 12px; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 22px; font-size: 16px; flex: 1 1 140px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
