/* ===== Pszczoła Henrieta — style ===== */

@import url("https://fonts.googleapis.com/css2?family=Playball&family=Cause:wght@400;500;600;700&family=Spectral:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  /* paleta domyślna: Miodowa Noc */
  --bg-deep: #0E0820;
  --bg-vault: #1A0E32;
  --bg-card: #1F1138;
  --bg-card-edge: #2D1B4E;
  --honey: #F4B41A;
  --honey-glow: #FFCB47;
  --honey-deep: #B07A07;
  --amber: #E89222;
  --cream: #F5E9C9;
  --cream-soft: #EBD9A5;
  --ink: #2A1846;
  --plum: #4A1A5E;
  --plum-soft: #6B2C82;
  --text: #F8ECCC;
  --text-dim: #C2A878;
  --text-muted: #8F7AA8;
  --hex-line: rgba(244, 180, 26, 0.07);
  --stripe: #1A0F08;
}

/* paleta: Cytrynowy Sad */
.theme-sad {
  --bg-deep: #FAEFD0;
  --bg-vault: #F1DEA3;
  --bg-card: #FFF7E0;
  --bg-card-edge: #E8C76B;
  --honey: #C8800B;
  --honey-glow: #E8A317;
  --honey-deep: #7A4F00;
  --amber: #A86600;
  --cream: #6B4A14;
  --cream-soft: #8A6420;
  --ink: #3A2206;
  --plum: #7B3F00;
  --plum-soft: #A05F18;
  --text: #3A2206;
  --text-dim: #6B4A14;
  --text-muted: #8A6F3E;
  --hex-line: rgba(122, 79, 0, 0.12);
  --stripe: #2A1A06;
}

/* paleta: Czarna Wróżba */
.theme-czarna {
  --bg-deep: #060403;
  --bg-vault: #110A05;
  --bg-card: #160D07;
  --bg-card-edge: #2A1A0B;
  --honey: #E8A317;
  --honey-glow: #FFC34A;
  --honey-deep: #8C6207;
  --amber: #C6850F;
  --cream: #F0DDA8;
  --cream-soft: #D6BD7C;
  --ink: #060403;
  --plum: #5C1818;
  --plum-soft: #8C2A2A;
  --text: #F0DDA8;
  --text-dim: #B89968;
  --text-muted: #7A6644;
  --hex-line: rgba(232, 163, 23, 0.08);
  --stripe: #000000;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text);
  font-family: "Spectral", Georgia, serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

/* miodowy plaster jako tło */
.honeycomb-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in oklab, var(--plum) 25%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, color-mix(in oklab, var(--amber) 18%, transparent), transparent 65%),
    radial-gradient(ellipse 50% 40% at 10% 80%, color-mix(in oklab, var(--plum-soft) 18%, transparent), transparent 65%);
  opacity: 0.85;
}

.honeycomb-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* migocące gwiazdki */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 6px var(--honey-glow);
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.95; transform: scale(1.2); }
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 80px;
}

/* nagłówek pasieki */
.crest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
}
.crest-label {
  font-family: "Playball", serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}
.crest-label::before, .crest-label::after {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-dim), transparent);
}

.title-wordmark {
  font-family: "Playball", serif;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.95;
  text-align: center;
  margin: 0;
  background: linear-gradient(180deg, var(--honey-glow) 0%, var(--honey) 50%, var(--honey-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 4px 24px color-mix(in oklab, var(--honey) 30%, transparent));
}

.title-pszczola {
  font-family: "Playball", cursive;
  font-weight: 500;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* sekcja wejściowa */
.stage {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.orb-wrap {
  margin: 24px 0 8px;
  position: relative;
  width: min(640px, 100%);
  /* aspect-ratio: 750 / 417.5; */
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align:center;
}
.orb-wrap.small {
  width: min(380px, 84%);
  margin: 12px 0;
}
.orb-aura {
  position: absolute;
  inset: -10% -8%;
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in oklab, var(--honey) 32%, transparent) 0%, transparent 65%);
  filter: blur(20px);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.henrieta-svg {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.4));
}
/* Na ekranie startowym/casting (orb-wrap bez .small) — bee zmniejszona o 30%.
   Container zostaje duży, pszczoła siedzi mniejsza pośrodku. Wersja `.small`
   (w HenrietaBubble na wyniku) bez zmian. */
.orb-wrap:not(.small) .henrieta-svg {
  width: 70%;
  height: 70%;
}
.henrieta-svg.is-buzzing,
.henrieta-svg.is-buzz-idle {
  animation: bee-buzz 1.4s ease-in-out infinite;
}
@keyframes bee-buzz {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1px, -1.5px); }
  75% { transform: translate(1px, 1px); }
}

/* ===== Henrieta SVG — animacje subtelne ===== */

/* Czułki — łagodne kołysanie */
.henrieta-svg #czulek_prawy {
  transform-box: fill-box;
  transform-origin: 0% 100%;
  animation: hen-antenna-r 7.5s ease-in-out infinite;
}
.henrieta-svg #czulek_lewy {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: hen-antenna-l 8s ease-in-out -3.5s infinite;
}
@keyframes hen-antenna-r {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(4deg); }
}
@keyframes hen-antenna-l {
  0%, 100% { transform: rotate(2deg); }
  50%      { transform: rotate(-4deg); }
}

/* Skrzydła — idle: subtelne; buzzing: trzepoczą */
.henrieta-svg #wing_top_right {
  transform-box: fill-box;
  transform-origin: 0% 100%;
  animation: hen-wing-r 5.5s ease-in-out infinite;
}
.henrieta-svg #wing_top_left {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: hen-wing-l 5.5s ease-in-out -1s infinite;
}
.henrieta-svg #wing_bottom_right {
  transform-box: fill-box;
  transform-origin: 0% 0%;
  animation: hen-wing-r 6s ease-in-out -2s infinite;
}
.henrieta-svg #wing_bottom_left {
  transform-box: fill-box;
  transform-origin: 100% 0%;
  animation: hen-wing-l 6s ease-in-out -3s infinite;
}
@keyframes hen-wing-r {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-2.5deg); }
}
@keyframes hen-wing-l {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(2.5deg); }
}
.henrieta-svg.is-buzzing #wing_top_right,
.henrieta-svg.is-buzzing #wing_bottom_right {
  animation: hen-wing-r-fast 1s ease-in-out infinite;
}
.henrieta-svg.is-buzzing #wing_top_left,
.henrieta-svg.is-buzzing #wing_bottom_left {
  animation: hen-wing-l-fast 1s ease-in-out infinite;
}
@keyframes hen-wing-r-fast {
  0%, 100% { transform: rotate(0.5deg); }
  50%      { transform: rotate(-4.5deg); }
}
@keyframes hen-wing-l-fast {
  0%, 100% { transform: rotate(-0.5deg); }
  50%      { transform: rotate(4.5deg); }
}

/* Gwiazdki w SVG — delikatne mruganie */
.henrieta-svg .bee-stars > * {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: hen-twinkle 6s ease-in-out infinite;
}
.henrieta-svg .bee-stars > *:nth-child(1)  { animation-delay: -0.4s; animation-duration: 5.4s; }
.henrieta-svg .bee-stars > *:nth-child(2)  { animation-delay: -2.5s; animation-duration: 6.8s; }
.henrieta-svg .bee-stars > *:nth-child(3)  { animation-delay: -4.5s; animation-duration: 6.2s; }
.henrieta-svg .bee-stars > *:nth-child(4)  { animation-delay: -1.6s; animation-duration: 7.2s; }
.henrieta-svg .bee-stars > *:nth-child(5)  { animation-delay: -3.6s; animation-duration: 5.7s; }
.henrieta-svg .bee-stars > *:nth-child(6)  { animation-delay: -2.9s; animation-duration: 6.4s; }
.henrieta-svg .bee-stars > *:nth-child(7)  { animation-delay: -0.9s; animation-duration: 6.6s; }
.henrieta-svg .bee-stars > *:nth-child(8)  { animation-delay: -5.1s; animation-duration: 5.8s; }
.henrieta-svg .bee-stars > *:nth-child(9)  { animation-delay: -1.8s; animation-duration: 7.0s; }
.henrieta-svg .bee-stars > *:nth-child(10) { animation-delay: -3.9s; animation-duration: 6.5s; }
.henrieta-svg .bee-stars > *:nth-child(11) { animation-delay: -1.2s; animation-duration: 6.1s; }
.henrieta-svg .bee-stars > *:nth-child(12) { animation-delay: -4.7s; animation-duration: 7.3s; }
@keyframes hen-twinkle {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.12); }
}

/* Oczy „zamknięte" podczas wieszczenia */
.henrieta-svg #oko_prawe,
.henrieta-svg #oko_lewe {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: transform .35s ease;
}
.henrieta-svg.is-closed #oko_prawe,
.henrieta-svg.is-closed #oko_lewe {
  transform: scaleY(0.12);
}

/* Subtelne mruganie — każde oko ma własny rytm i amplitudę.
   Działa TYLKO gdy bee jest „open" (poza casting state). */
.henrieta-svg:not(.is-closed) #oko_prawe {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: hen-eye-wink-r 9s ease-in-out infinite;
}
.henrieta-svg:not(.is-closed) #oko_lewe {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: hen-eye-wink-l 11s ease-in-out -3.6s infinite;
}
@keyframes hen-eye-wink-r {
  0%, 90%, 100% { transform: scaleY(1); }
  91%           { transform: scaleY(0.1); }
  92%           { transform: scaleY(1); }
}
@keyframes hen-eye-wink-l {
  0%, 90%, 100% { transform: scaleY(1); }
  91%           { transform: scaleY(0.1); }
  92%           { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .henrieta-svg:not(.is-closed) #oko_prawe,
  .henrieta-svg:not(.is-closed) #oko_lewe {
    animation: none !important;
  }
}

/* Szklana kula — widoczna tylko podczas buzzing, delikatne wejście + puls */
.henrieta-svg #szklanakula {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 95%;
  transform: scale(0.4) translateY(8px);
  transition: opacity .45s ease, transform .65s cubic-bezier(.34,1.4,.6,1);
  pointer-events: none;
}
.henrieta-svg.is-buzzing #szklanakula {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.henrieta-svg #szklanakula .orb-pulse {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.henrieta-svg.is-buzzing #szklanakula .orb-pulse {
  animation: hen-orb-pulse 5.5s ease-in-out infinite 0.7s;
}
@keyframes hen-orb-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
  .henrieta-svg #czulek_prawy,
  .henrieta-svg #czulek_lewy,
  .henrieta-svg #wing_top_right,
  .henrieta-svg #wing_top_left,
  .henrieta-svg #wing_bottom_right,
  .henrieta-svg #wing_bottom_left,
  .henrieta-svg .bee-stars > *,
  .henrieta-svg #szklanakula .orb-pulse,
  .orb-aura {
    animation: none !important;
  }
}

/* ===== Audio mute button (inline pod „Spytaj Henriety") ===== */
.mute-btn {
  margin-top: 14px;
  padding: 9px 18px 9px 14px;
  border: 1px solid color-mix(in oklab, var(--honey) 40%, transparent);
  background: color-mix(in oklab, var(--bg-card) 70%, transparent);
  color: var(--cream);
  font-family: "Playball", serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  align-self: center;
}
.mute-btn:hover {
  border-color: var(--honey);
  transform: translateY(-1px);
  background: color-mix(in oklab, var(--bg-card) 90%, transparent);
}
.mute-btn .mute-ico {
  font-size: 14px;
  line-height: 1;
}

/* karta wejściowa */
.invocation {
  text-align: center;
  margin: 16px 0 28px;
  max-width: 520px;
}
.invocation-quote {
  font-family: "Playball", serif;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.3;
  color: var(--cream);
  margin: 0;
  text-wrap: balance;
}
.invocation-sub {
  font-family: "Spectral", serif;
  font-style: italic;
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 15px;
}

.date-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-card) 92%, transparent), color-mix(in oklab, var(--bg-vault) 92%, transparent));
  border: 1px solid var(--bg-card-edge);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--honey) 25%, transparent) inset,
    0 24px 60px -20px rgba(0,0,0,0.5);
  position: relative;
}
.date-form::before, .date-form::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--honey);
  opacity: 0.5;
}
.date-form::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.date-form::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.date-field.name { flex: 1 1 100%; }
.date-field.day { flex: 0 0 80px; }
.date-field.month { flex: 1 1 180px; }
.date-field.year { flex: 0 0 100px; }

.date-field label {
  font-family: "Playball", serif;
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 4px;
}

.date-field input,
.date-field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid color-mix(in oklab, var(--honey) 40%, transparent);
  color: var(--cream);
  font-family: "Cause", sans-serif;
  font-size: 22px;
  padding: 6px 4px;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.date-field input::placeholder { color: var(--text-muted); }
.date-field input:focus,
.date-field select:focus {
  border-bottom-color: var(--honey);
}
.date-field select option {
  background: var(--bg-card);
  color: var(--cream);
  font-family: "Cause", sans-serif;
  font-size: 15px;
}
.date-field.month::after {
  content: "▾";
  position: absolute;
  right: 8px;
  bottom: 10px;
  color: var(--honey);
  pointer-events: none;
  font-size: 14px;
}

.btn-ask {
  border: none;
  background: linear-gradient(180deg, var(--honey-glow), var(--honey) 60%, var(--honey-deep));
  color: var(--ink);
  font-family: "Cause", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 18px 36px;
  cursor: pointer;
  position: relative;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -1px 0 rgba(0,0,0,0.2) inset,
    0 12px 40px -8px color-mix(in oklab, var(--honey) 60%, transparent),
    0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-ask:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -1px 0 rgba(0,0,0,0.2) inset,
    0 18px 48px -8px color-mix(in oklab, var(--honey) 80%, transparent),
    0 4px 16px rgba(0,0,0,0.3);
}
.btn-ask:active { transform: translateY(0); }
.btn-ask:disabled {
  background: linear-gradient(180deg, var(--text-muted), var(--text-dim));
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}
.btn-ask::before, .btn-ask::after {
  content: "❋";
  margin: 0 14px;
  color: color-mix(in oklab, var(--ink) 50%, var(--honey-deep));
  font-size: 11px;
}

/* Variant: download CTA used inside .share-preview (must work as <a>) */
.btn-ask-download {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Preview karty + CTA na samym dole wyniku */
.share-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: 56px auto 8px;
  gap: 22px;
}
.share-preview-eyebrow {
  font-family: "Playball", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 14px;
}
.share-preview-eyebrow::before,
.share-preview-eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-dim), transparent);
}
.share-preview-img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 8px;
  background: color-mix(in oklab, var(--bg-card) 60%, transparent);
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--honey) 22%, transparent) inset,
    0 24px 60px -18px rgba(0,0,0,0.6);
}

.btn-ghost {
  border: 1px solid color-mix(in oklab, var(--honey) 40%, transparent);
  background: transparent;
  color: var(--cream);
  font-family: "Cause", sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 14px 28px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.btn-ghost:hover {
  background: color-mix(in oklab, var(--honey) 12%, transparent);
  border-color: var(--honey);
}

.disclaimer {
  font-family: "Spectral", serif;
  font-style: italic;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 18px;
  text-align: center;
  max-width: 480px;
  line-height: 1.5;
}

/* etap obliczania */
.casting {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 32px 0;
}
.casting-line {
  font-family: "Playball", serif;
  font-size: clamp(24px, 3.5vw, 36px);
  color: var(--cream);
  letter-spacing: 0.01em;
  margin: 0;
  min-height: 1.4em;
}
.casting-dots {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  justify-content: center;
}
.casting-dot {
  width: 8px; height: 8px;
  background: var(--honey);
  border-radius: 50%;
  animation: dot-bounce 1.2s ease-in-out infinite;
  box-shadow: 0 0 12px var(--honey-glow);
}
.casting-dot:nth-child(2) { animation-delay: 0.15s; }
.casting-dot:nth-child(3) { animation-delay: 0.3s; }
.casting-dot:nth-child(4) { animation-delay: 0.45s; }
@keyframes dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-8px); opacity: 1; }
}

/* etap wyniku */
.reveal {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: reveal-in 0.7s cubic-bezier(.2,.7,.2,1);
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-greeting {
  font-family: "Playball", cursive;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1;
  color: var(--cream);
  text-align: center;
  margin: 12px 0 4px;
}

.hero-number {
  position: relative;
  width: clamp(220px, 36vw, 320px);
  height: clamp(220px, 36vw, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 8px;
}
.hex-frame {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 10px 30px color-mix(in oklab, var(--honey) 30%, transparent));
}
.hero-digit {
  font-family: "Playball", serif;
  font-weight: 900;
  font-size: clamp(110px, 18vw, 180px);
  line-height: 1;
  background: linear-gradient(180deg, var(--honey-glow), var(--honey) 50%, var(--honey-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 2;
  letter-spacing: -0.04em;
}
.hero-digit.tiny {
  font-size: clamp(60px, 10vw, 96px);
  letter-spacing: -0.01em;
}
.hero-glyph {
  font-family: "Playball", serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--honey);
  position: absolute;
  bottom: 16%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.profile-title {
  font-family: "Playball", serif;
  font-size: clamp(34px, 5.5vw, 54px);
  margin: 12px 0 4px;
  color: var(--cream);
  text-align: center;
  text-wrap: balance;
  line-height: 1.05;
}
.profile-sub {
  font-family: "Playball", serif;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--honey);
  text-align: center;
}
.profile-motto {
  font-family: "Playball", cursive;
  font-size: clamp(22px, 2.8vw, 28px);
  color: var(--cream-soft);
  text-align: center;
  margin: 24px 0 8px;
  max-width: 580px;
  text-wrap: balance;
  line-height: 1.3;
}
.profile-motto::before, .profile-motto::after { content: "  ❀  "; color: var(--honey); opacity: 0.6; }

/* karty wieszczb */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
  margin-top: 36px;
}
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:first-child { grid-column: 1 / -1; }
}

.card {
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-card) 92%, transparent), color-mix(in oklab, var(--bg-vault) 92%, transparent));
  border: 1px solid var(--bg-card-edge);
  border-radius: 6px;
  padding: 26px 26px 28px;
  position: relative;
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--honey) 20%, transparent) inset,
    0 16px 40px -16px rgba(0,0,0,0.6);
}
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--honey);
  opacity: 0.45;
}
.card::before {
  top: 6px; left: 6px;
  border-right: none; border-bottom: none;
}
.card::after {
  bottom: 6px; right: 6px;
  border-left: none; border-top: none;
}
.card-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Playball", serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 14px;
}
.card-eyebrow svg { flex: 0 0 16px; }
.card-body {
  font-family: "Spectral", serif;
  font-size: 16px;
  line-height: 1.62;
  color: var(--text);
  text-wrap: pretty;
}
.card-body p { margin: 0; }

/* przyciski u dołu wyniku */
.actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

/* podgląd obliczeń */
.math-strip {
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px dashed color-mix(in oklab, var(--honey) 45%, transparent);
  border-radius: 4px;
  font-family: "Playball", serif;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-align: center;
  max-width: 720px;
}
.math-strip strong { color: var(--honey); font-weight: 700; }

/* error */
.error-line {
  color: #FFA07A;
  font-family: "Spectral", serif;
  font-style: italic;
  font-size: 14px;
  margin: -8px 0 18px;
  text-align: center;
}

/* stopka */
.bee-footer {
  margin-top: 56px;
  font-family: "Cause", sans-serif;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* mobilne */
@media (max-width: 640px) {
  .date-form { flex-direction: column; padding: 16px; gap: 8px; }
  .date-field { flex: 1 1 auto !important; }
  .btn-ask { padding: 16px 24px; font-size: 12px; }
}

/* ===== Henrieta pod (bee + speech bubble) na wyniku ===== */
.henrieta-pod {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 4px auto 28px;
  width: 100%;
  max-width: 780px;
  flex-wrap: wrap;
}
.henrieta-pod .orb-wrap {
  flex: 0 0 320px;
  max-width: 100%;
  margin: 0;
}
.henrieta-bubble {
  position: relative;
  flex: 1 1 280px;
  max-width: 380px;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--bg-card) 94%, transparent),
    color-mix(in oklab, var(--bg-vault) 94%, transparent));
  border: 1px solid var(--bg-card-edge);
  border-radius: 20px;
  padding: 22px 26px;
  font-family: "Cause", sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
  color: var(--cream);
  text-wrap: pretty;
  white-space: pre-line;
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--honey) 22%, transparent) inset,
    0 16px 40px -16px rgba(0,0,0,0.55);
  animation: hen-bubble-in 0.55s cubic-bezier(.34,1.3,.6,1) 0.25s both;
}
.henrieta-bubble p { margin: 0; }
.henrieta-bubble-sig {
  display: block;
  margin-top: 12px;
  font-family: "Cause", sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--honey);
  opacity: 0.85;
}
.henrieta-bubble::before,
.henrieta-bubble::after {
  content: "";
  position: absolute;
  top: 38px;
  width: 0;
  height: 0;
  border-style: solid;
}
.henrieta-bubble::before {
  left: -12px;
  border-width: 11px 12px 11px 0;
  border-color: transparent var(--bg-card-edge) transparent transparent;
}
.henrieta-bubble::after {
  left: -10px;
  border-width: 10px 11px 10px 0;
  border-color: transparent color-mix(in oklab, var(--bg-card) 94%, transparent) transparent transparent;
}
@keyframes hen-bubble-in {
  from { opacity: 0; transform: scale(0.92) translateX(-6px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}

@media (max-width: 760px) {
  .henrieta-pod { flex-direction: column; gap: 10px; }
  .henrieta-pod .orb-wrap { flex: 0 0 auto; width: min(320px, 80%); }
  .henrieta-bubble { max-width: 92%; }
  .henrieta-bubble::before {
    left: 50%;
    top: -12px;
    transform: translateX(-50%);
    border-width: 0 11px 12px 11px;
    border-color: transparent transparent var(--bg-card-edge) transparent;
  }
  .henrieta-bubble::after {
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    border-width: 0 10px 11px 10px;
    border-color: transparent transparent color-mix(in oklab, var(--bg-card) 94%, transparent) transparent;
  }
}

/* ===== Pszczoła Henrieta — wersja „results" (henka-results.svg) ===== */

.henrieta-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  margin: 40px auto 8px;
  animation: hen-result-in 0.7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes hen-result-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.henrieta-results-caption {
  font-family: "Playball", cursive;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
}

.henrieta-results-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 14px 36px rgba(0,0,0,0.45));
}

/* Czułki — wyraźne machanie */
.henrieta-results-svg #r-czulek-prawy {
  transform-box: fill-box;
  transform-origin: 0% 100%;
  animation: hen-res-antenna-r 3.4s ease-in-out infinite;
}
.henrieta-results-svg #r-czulek-lewy {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: hen-res-antenna-l 3.6s ease-in-out -1.6s infinite;
}
@keyframes hen-res-antenna-r {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(9deg); }
}
@keyframes hen-res-antenna-l {
  0%, 100% { transform: rotate(6deg); }
  50%      { transform: rotate(-9deg); }
}

/* Skrzydła — porządne trzepotanie (ale wciąż czytelne, nie psychotyczne) */
.henrieta-results-svg #r-wing-top-right {
  transform-box: fill-box;
  transform-origin: 0% 100%;
  animation: hen-res-wing-r 1.8s ease-in-out infinite;
}
.henrieta-results-svg #r-wing-top-left {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: hen-res-wing-l 1.8s ease-in-out -0.4s infinite;
}
.henrieta-results-svg #r-wing-bottom-right {
  transform-box: fill-box;
  transform-origin: 0% 0%;
  animation: hen-res-wing-r 2.2s ease-in-out -1s infinite;
}
.henrieta-results-svg #r-wing-bottom-left {
  transform-box: fill-box;
  transform-origin: 100% 0%;
  animation: hen-res-wing-l 2.2s ease-in-out -1.6s infinite;
}
@keyframes hen-res-wing-r {
  0%, 100% { transform: rotate(2deg); }
  50%      { transform: rotate(-7deg); }
}
@keyframes hen-res-wing-l {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(7deg); }
}

/* Mrugnięcie prawym okiem — co ~6.5s krótkie zaciśnięcie i otwarcie */
.henrieta-results-svg #r-oko-prawe {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: hen-res-wink 6.5s ease-in-out infinite;
}
@keyframes hen-res-wink {
  0%, 90%, 100%  { transform: scaleY(1); }
  93%            { transform: scaleY(0.55); }
  95%            { transform: scaleY(0.08); }
  97%            { transform: scaleY(0.55); }
}

/* Gwiazda w łapce — wyraźny puls + ładny obrót */
.henrieta-results-svg #r-star {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: hen-res-star 3.6s ease-in-out infinite;
}
@keyframes hen-res-star {
  0%, 100% { transform: scale(1) rotate(-4deg); opacity: 0.92; }
  50%      { transform: scale(1.14) rotate(12deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .henrieta-results,
  .henrieta-results-svg #r-czulek-prawy,
  .henrieta-results-svg #r-czulek-lewy,
  .henrieta-results-svg #r-wing-top-right,
  .henrieta-results-svg #r-wing-top-left,
  .henrieta-results-svg #r-wing-bottom-right,
  .henrieta-results-svg #r-wing-bottom-left,
  .henrieta-results-svg #r-oko-prawe,
  .henrieta-results-svg #r-star {
    animation: none !important;
  }
}

/* ===== Wynik: 2 kolumny (hex | tytuł+sub+motto+math) ===== */

.result-hero-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 820px;
  margin: 8px 0 16px;
}
.result-hero-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-hero-right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Override centering existujących elementów wewnątrz prawej kolumny */
.result-hero-right .profile-title,
.result-hero-right .profile-sub,
.result-hero-right .profile-motto,
.result-hero-right .math-strip {
  text-align: left;
}
.result-hero-right .profile-motto {
  max-width: 100%;
  margin: 18px 0 8px;
}
.result-hero-right .profile-motto::before { content: "❀  "; }
.result-hero-right .profile-motto::after  { content: ""; }
.result-hero-right .math-strip {
  margin-top: 18px;
  text-align: left;
}
.result-hero-right .profile-title {
  margin-top: 0;
}

/* Mobile: jedna kolumna, wszystko z powrotem centered */
@media (max-width: 760px) {
  .result-hero-grid {
    flex-direction: column;
    gap: 12px;
  }
  .result-hero-right {
    align-items: center;
    text-align: center;
  }
  .result-hero-right .profile-title,
  .result-hero-right .profile-sub,
  .result-hero-right .profile-motto,
  .result-hero-right .math-strip {
    text-align: center;
  }
  .result-hero-right .profile-motto::before { content: "  ❀  "; }
  .result-hero-right .profile-motto::after  { content: "  ❀  "; }
}

/* ===== Idle bubble — zachęta przy Henriecie na ekranie startowym ===== */
/* Pozycjonowany absolute wewnątrz .orb-wrap żeby nie przesuwał pszczoły. */

.idle-bubble {
  position: absolute;
  top: 4%;
  right: 0;
  z-index: 5;
  max-width: min(260px, 46%);
  padding: 14px 18px;
  white-space: pre-line;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--bg-card) 96%, transparent),
    color-mix(in oklab, var(--bg-vault) 96%, transparent));
  border: 1px solid color-mix(in oklab, var(--honey) 30%, var(--bg-card-edge));
  border-radius: 18px;
  font-family: "Cause", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: var(--cream);
  text-wrap: pretty;
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--honey) 20%, transparent) inset,
    0 14px 30px -12px rgba(0,0,0,0.6);
  transition: opacity .55s cubic-bezier(.34,1.3,.6,1), transform .55s cubic-bezier(.34,1.3,.6,1);
  pointer-events: none;
}
.idle-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.idle-bubble.is-hidden {
  opacity: 0;
  transform: translateY(-10px) scale(0.94);
}
/* Ogonek dymka wskazujący na pszczołę (w lewo-dół) */
.idle-bubble::before,
.idle-bubble::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 11px 0 0;
}
.idle-bubble::before {
  border-color: color-mix(in oklab, var(--honey) 30%, var(--bg-card-edge)) transparent transparent transparent;
}
.idle-bubble::after {
  border-width: 10px 10px 0 0;
  left: 23px;
  bottom: -8px;
  border-color: color-mix(in oklab, var(--bg-card) 96%, transparent) transparent transparent transparent;
}

@media (max-width: 560px) {
  .idle-bubble {
    font-size: 13px;
    padding: 12px 14px;
    max-width: min(220px, 54%);
    top: 2%;
  }
}
