:root {
  --asphalt: #202124;
  --asphalt-deep: #151617;
  --light: #f5f5f5;
  --gold: #d7b46a;
  --gold-bright: #f2d58a;
  --gold-soft: rgba(215, 180, 106, 0.18);
  --green: #22c55e;
  --purple: #9f7aea;
  --ice: #7dd3fc;
  --steel: #a9b0b8;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--asphalt);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page-bg);
  overflow-x: hidden;
  transition: background 260ms ease, color 260ms ease;
}

body.dark-mode {
  --page-bg: radial-gradient(circle at 25% 15%, rgba(215, 180, 106, 0.12), transparent 28rem),
    linear-gradient(145deg, #141516, var(--asphalt) 48%, #101112);
  --card-bg: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.095);
  --border: rgba(255, 255, 255, 0.13);
  --text: #f7f2e6;
  --muted: rgba(247, 242, 230, 0.66);
  --soft: rgba(255, 255, 255, 0.07);
  --input-bg: rgba(255, 255, 255, 0.08);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

body.light-mode {
  --page-bg: radial-gradient(circle at 25% 15%, rgba(215, 180, 106, 0.22), transparent 28rem),
    linear-gradient(145deg, var(--light), #ffffff 52%, #ececec);
  --card-bg: rgba(255, 255, 255, 0.78);
  --card-strong: rgba(255, 255, 255, 0.96);
  --border: rgba(32, 33, 36, 0.12);
  --text: #202124;
  --muted: rgba(32, 33, 36, 0.64);
  --soft: rgba(32, 33, 36, 0.055);
  --input-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 30px 90px rgba(32, 33, 36, 0.13);
  color-scheme: light;
}

button,
input,
select {
  font: inherit;
}

.theme-toggle {
  position: fixed;
  top: clamp(14px, 3vw, 26px);
  right: clamp(14px, 3vw, 26px);
  z-index: 10;
  width: 48px;
  height: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-strong);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-2px) rotate(6deg);
  border-color: rgba(215, 180, 106, 0.7);
}

.theme-toggle span {
  font-size: 1.15rem;
  line-height: 1;
}

.app-shell {
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 56px);
  display: grid;
  place-items: center;
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: 860px;
  padding: clamp(22px, 5vw, 54px);
  border: 1px solid var(--border);
  border-radius: clamp(24px, 4vw, 38px);
  background: linear-gradient(145deg, var(--card-strong), var(--card-bg));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
  isolation: isolate;
  animation: cardEnter 700ms cubic-bezier(.2, .9, .2, 1) both;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(215,180,106,.65), transparent 28%, rgba(255,255,255,.18), transparent 68%, rgba(215,180,106,.32));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.48;
  pointer-events: none;
  z-index: -2;
}

.ambient-one {
  width: 330px;
  height: 330px;
  top: -170px;
  right: -120px;
  background: rgba(215, 180, 106, 0.35);
  animation: floatOne 10s ease-in-out infinite;
}

.ambient-two {
  width: 250px;
  height: 250px;
  bottom: -140px;
  left: -110px;
  background: rgba(255, 255, 255, 0.08);
  animation: floatTwo 11s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image:
    radial-gradient(circle, currentColor 0 1px, transparent 1px),
    radial-gradient(circle, currentColor 0 1px, transparent 1px);
  background-size: 72px 72px, 128px 128px;
  background-position: 18px 24px, 64px 88px;
  color: var(--gold);
  animation: driftGrain 24s linear infinite;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Fraunces", Georgia, "DejaVu Serif", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 4.9rem);
  line-height: 1.0;
  letter-spacing: -0.018em;
}

.title-accent {
  background: linear-gradient(120deg, var(--gold-bright) 8%, var(--gold) 52%, #b48f44 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 600;
  padding-right: 0.04em;
}

.intro {
  max-width: 650px;
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.08rem);
  line-height: 1.65;
}

.calculator {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.calculator label {
  color: var(--text);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

input[type="date"] {
  width: 100%;
  min-height: 58px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  outline: none;
  background: var(--input-bg);
  padding: 0 18px;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

input[type="date"]:focus {
  border-color: rgba(215, 180, 106, .8);
  box-shadow: 0 0 0 5px rgba(215, 180, 106, 0.15);
}

.jump-control {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

select {
  width: 100%;
  min-height: 58px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  outline: none;
  background: var(--input-bg);
  padding: 0 46px 0 18px;
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 26px) 50%,
    calc(100% - 18px) 50%;
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

select:focus {
  border-color: rgba(215, 180, 106, .8);
  box-shadow: 0 0 0 5px rgba(215, 180, 106, 0.15);
}

#goButton {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  color: #171717;
  background: linear-gradient(135deg, #f6e2a6, var(--gold) 55%, #a9853a);
  padding: 0 30px;
  font-weight: 950;
  letter-spacing: -0.03em;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(215, 180, 106, .24);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

#goButton:hover,
#goButton:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.12) brightness(1.03);
  box-shadow: 0 22px 44px rgba(215, 180, 106, .28);
}

#goButton:active {
  transform: translateY(0) scale(.99);
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.result-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--soft);
  padding: clamp(18px, 4vw, 30px);
  overflow: hidden;
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.result-card:not(.empty) {
  transform: translateY(-2px);
  background: var(--card-bg);
}

.result-card.result-11 {
  border-color: rgba(159, 122, 234, .7);
  box-shadow: 0 0 0 1px rgba(159, 122, 234, .16), 0 28px 70px rgba(159, 122, 234, .14);
}

.result-card.result-22 {
  border-color: rgba(169, 176, 184, .74);
  box-shadow: 0 0 0 1px rgba(169, 176, 184, .18), 0 28px 70px rgba(0, 0, 0, .2);
}

.result-card.result-33 {
  border-color: rgba(125, 211, 252, .75);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, .16), 0 28px 70px rgba(14, 165, 233, .13);
}

.result-card.result-28 {
  border-color: rgba(34, 197, 94, .78);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .16), 0 28px 70px rgba(34, 197, 94, .18);
}

.result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.result-label {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
  padding: 7px 11px;
  font-size: .76rem;
  font-weight: 850;
}

.number-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: -4px 0 10px;
  overflow: visible;
}

.special-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.life-number {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.18em;
  padding: 0.08em 0.12em 0.12em;
  font-size: clamp(4.1rem, 16vw, 9.2rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, var(--text), var(--gold-bright) 48%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 20px 50px rgba(0,0,0,.12);
  transform-origin: center;
}

.result-card.empty .life-number {
  opacity: .4;
}

.result-card.result-11 .life-number {
  background: linear-gradient(135deg, #ffffff, #e9d5ff 36%, #a78bfa 72%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  animation: cloudFloat 3.3s ease-in-out infinite;
  text-shadow: 0 18px 40px rgba(124, 58, 237, .23);
}

.result-card.result-22 .life-number {
  background: linear-gradient(115deg, #5b6168 0%, #f1f5f9 17%, #8a929b 34%, #d6dbe0 49%, #4f555c 66%, #f8fafc 84%, #737b84 100%);
  background-size: 230% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: steelBuild 2.8s ease-out both, steelShine 2.5s ease-in-out 2.2s infinite;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.24));
}

.result-card.result-33 .life-number {
  background: linear-gradient(180deg, #f0f9ff 0%, #7dd3fc 38%, #0284c7 72%, #dbeafe 100%);
  background-size: 100% 210%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: waterMeltFreeze 3.4s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, .26));
}

.result-card.result-28 .life-number {
  background: linear-gradient(135deg, #dcfce7, #22c55e 42%, #15803d 72%, #bbf7d0);
  -webkit-background-clip: text;
  background-clip: text;
  animation: cashPulse 1.7s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(34, 197, 94, .28));
}

.cloud {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 230px;
  height: 82px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  opacity: 0;
  transform: translate(-50%, -50%);
  filter: blur(.2px);
  z-index: 1;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: inherit;
}

.cloud::before {
  width: 96px;
  height: 96px;
  left: 38px;
  top: -44px;
}

.cloud::after {
  width: 118px;
  height: 118px;
  right: 32px;
  top: -62px;
}

.cloud-two {
  width: 310px;
  height: 92px;
  opacity: 0;
  background: rgba(196, 181, 253, 0.28);
  transform: translate(-50%, -50%) scale(1.08);
}

.result-card.result-11 .cloud {
  opacity: .78;
  animation: cloudFloat 3.3s ease-in-out infinite;
}

.result-card.result-11 .cloud-two {
  opacity: .55;
  animation: cloudFloat 4.2s ease-in-out infinite reverse;
}

.beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(80%, 520px);
  height: 13px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, #52575d, #e5e7eb 24%, #737b84 55%, #cbd5e1 78%, #44484e);
  box-shadow: 0 12px 22px rgba(0,0,0,.22);
  z-index: 1;
}

.beam-one { transform: translate(-50%, -50%) rotate(-13deg); }
.beam-two { transform: translate(-50%, -50%) rotate(13deg); }

.result-card.result-22 .beam-one {
  opacity: .75;
  animation: beamBuildLeft 1.25s cubic-bezier(.2,.8,.2,1) both;
}

.result-card.result-22 .beam-two {
  opacity: .62;
  animation: beamBuildRight 1.25s cubic-bezier(.2,.8,.2,1) 240ms both;
}

/* v1.2: keep the steel build number effect, but remove the two steel beams behind 22/4. */
.result-card.result-22 .beam {
  display: none;
}

.water-drop {
  position: absolute;
  width: 22px;
  height: 32px;
  border-radius: 60% 60% 70% 70%;
  background: linear-gradient(180deg, #e0f2fe, #38bdf8);
  opacity: 0;
  z-index: 1;
}

.drop-one { left: 30%; top: 36%; }
.drop-two { right: 30%; top: 58%; }

.result-card.result-33 .water-drop {
  opacity: .76;
  animation: dripFreeze 2.4s ease-in-out infinite;
}

.result-card.result-33 .drop-two {
  animation-delay: 700ms;
}

.cash-note {
  position: absolute;
  z-index: 1;
  opacity: 0;
  color: #14532d;
  background: linear-gradient(135deg, #bbf7d0, #22c55e);
  border: 1px solid rgba(20, 83, 45, .24);
  border-radius: 10px;
  padding: 7px 14px;
  font-weight: 950;
  box-shadow: 0 10px 25px rgba(34,197,94,.18);
}

.note-one { left: 18%; top: 28%; }
.note-two { right: 14%; top: 36%; }
.note-three { left: 50%; bottom: 16%; }

.result-card.result-28 .cash-note {
  opacity: .95;
  animation: cashFloat 1.9s ease-in-out infinite;
}

.result-card.result-28 .note-two { animation-delay: 280ms; }
.result-card.result-28 .note-three { animation-delay: 520ms; }

#sparkCanvas {
  position: absolute;
  width: min(100%, 460px);
  height: 210px;
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 3;
}

.result-card.result-11 #sparkCanvas,
.result-card.result-22 #sparkCanvas,
.result-card.result-33 #sparkCanvas,
.result-card.result-28 #sparkCanvas {
  opacity: .96;
}

.result-message {
  max-width: 640px;
  margin: 0 auto 16px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.equation {
  min-height: 42px;
  border-radius: 16px;
  background: var(--soft);
  color: var(--muted);
  padding: 12px 14px;
  font-size: .9rem;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
}

.shake {
  animation: shake 360ms ease-in-out;
}

.pop {
  animation: popNumber 550ms cubic-bezier(.2, .9, .2, 1) both;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floatOne {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-20px, 18px, 0) scale(1.08); }
}

@keyframes floatTwo {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -18px, 0) scale(1.06); }
}

@keyframes driftGrain {
  from { background-position: 18px 24px, 64px 88px; }
  to { background-position: 90px 96px, 192px 216px; }
}

@keyframes cloudFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) scale(1); }
  50% { transform: translate(-50%, -50%) translateY(-10px) scale(1.015); }
}

@keyframes steelBuild {
  0% { opacity: .25; clip-path: inset(0 100% 0 0); transform: translateY(18px) scale(.96); }
  55% { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(-3px) scale(1.015); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0) scale(1); }
}

@keyframes steelShine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes beamBuildLeft {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); }
  100% { opacity: .75; clip-path: inset(0 0 0 0); }
}

@keyframes beamBuildRight {
  0% { opacity: 0; clip-path: inset(0 0 0 100%); }
  100% { opacity: .62; clip-path: inset(0 0 0 0); }
}

@keyframes waterMeltFreeze {
  0%, 100% { transform: translateY(0) scaleY(1); filter: drop-shadow(0 0 13px rgba(125, 211, 252, .22)) blur(0); background-position: 50% 0%; }
  38% { transform: translateY(8px) scaleY(1.1); filter: drop-shadow(0 0 22px rgba(14, 165, 233, .34)) blur(.5px); background-position: 50% 85%; }
  62% { transform: translateY(-3px) scaleY(.96); filter: drop-shadow(0 0 26px rgba(219, 234, 254, .52)) blur(0); background-position: 50% 25%; }
}

@keyframes dripFreeze {
  0% { transform: translateY(-14px) scale(.72); opacity: 0; filter: blur(0); }
  40% { transform: translateY(14px) scale(1); opacity: .8; filter: blur(.5px); }
  72% { transform: translateY(2px) scale(.86); opacity: .7; filter: blur(0); }
  100% { transform: translateY(-14px) scale(.72); opacity: 0; filter: blur(0); }
}

@keyframes cashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes cashFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-14px) rotate(7deg); }
}

@keyframes popNumber {
  0% { opacity: .35; transform: translateY(12px) scale(.92); }
  70% { opacity: 1; transform: translateY(-4px) scale(1.035); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 720px) {
  .theme-toggle {
    top: 14px;
    right: 14px;
  }

  .app-shell {
    align-items: start;
    padding: 74px 14px 14px;
  }

  .hero-card {
    min-height: calc(100vh - 88px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  #goButton,
  input[type="date"] {
    width: 100%;
  }

  .number-wrap {
    min-height: 180px;
  }

  .life-number {
    font-size: clamp(4rem, 20vw, 7.2rem);
  }

  .cloud {
    width: 190px;
    height: 68px;
  }

  .cloud-two {
    width: 240px;
  }

  .beam {
    width: 95%;
  }

  .cash-note {
    padding: 5px 10px;
  }

  .equation {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* v1.3 SEO/footer polish + 11/2 cloud centering refinements */
.site-credit {
  width: min(100%, 1080px);
  margin: -30px auto 0;
  padding: 0 clamp(18px, 4vw, 56px) clamp(22px, 4vw, 42px);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.site-credit a {
  color: inherit;
  text-decoration: none;
  transition: opacity 180ms ease, transform 180ms ease;
  display: inline-flex;
  justify-content: center;
  gap: 0.38em;
  align-items: center;
  flex-wrap: wrap;
}

.site-credit a:hover,
.site-credit a:focus-visible {
  opacity: 0.88;
  transform: translateY(-1px);
  outline: none;
}

.site-credit strong {
  color: #F56D13;
  font-weight: 850;
}

/* Give tall/curved numerals breathing room so digits like 6 never clip. */
.life-number {
  line-height: 1.12;
  min-height: 1.3em;
  padding: 0.12em 0.16em 0.18em;
  overflow: visible;
}

/* Center 11/2 visually inside the cloud graphic without changing the cloud animation concept. */
.result-card.result-11 .number-wrap {
  place-items: center;
}

.result-card.result-11 .life-number {
  width: min(78vw, 380px);
  text-align: center;
  justify-content: center;
  letter-spacing: -0.045em;
  padding-left: 0.06em;
  padding-right: 0.06em;
}

.result-card.result-11 .cloud {
  left: 50%;
  top: 50%;
  width: min(72vw, 360px);
  height: 96px;
  transform: translate(-50%, -50%);
}

.result-card.result-11 .cloud-two {
  width: min(82vw, 430px);
  height: 108px;
  transform: translate(-50%, -50%) scale(1.04);
}

@media (max-width: 720px) {
  .site-credit {
    margin-top: -4px;
    padding-bottom: 26px;
  }

  .result-card.result-11 .life-number {
    width: min(82vw, 315px);
    font-size: clamp(3.6rem, 18vw, 6.5rem);
  }

  .result-card.result-11 .cloud {
    width: min(76vw, 292px);
    height: 82px;
  }

  .result-card.result-11 .cloud-two {
    width: min(86vw, 340px);
    height: 92px;
  }
}

/* v1.3.1: 11/2 cloud alignment fix
   The previous 11/2 number reused the cloudFloat keyframes, which include
   translate(-50%, -50%) for absolutely positioned cloud shapes. Because the
   number itself is grid-positioned, that transform pulled it left/up on mobile.
   This dedicated animation keeps the number centered while preserving the float. */
.result-card.result-11 .number-wrap {
  display: grid;
  place-items: center;
  min-height: 252px;
  overflow: visible;
  isolation: isolate;
}

.result-card.result-11 .special-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.result-card.result-11 .life-number {
  position: relative;
  left: auto;
  top: auto;
  width: auto;
  max-width: calc(100% - 18px);
  margin: 0 auto;
  padding: 0.1em 0.08em 0.16em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.08;
  letter-spacing: -0.055em;
  transform: translateY(0);
  animation: lifeNumberCloudFloat 3.3s ease-in-out infinite;
  z-index: 5;
}

@keyframes lifeNumberCloudFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.015);
  }
}

@media (max-width: 720px) {
  .result-card.result-11 .number-wrap {
    min-height: 236px;
  }

  .result-card.result-11 .life-number {
    width: auto;
    max-width: calc(100% - 10px);
    font-size: clamp(4.4rem, 20vw, 6.9rem);
    letter-spacing: -0.06em;
  }
}

/* =========================================================
   v1.4.0 — Special-result polish
   A themed glow "aura" breathes behind each master number,
   plus a cosmic twinkle for 11/2. Concepts and the 11/2
   cloud centering from earlier versions are preserved.
   ========================================================= */

/* Breathing aura sits behind the clouds/beams/drops/notes (z-index 0)
   and behind the number itself (z-index 2+), so it reads as depth. */
.special-stage::after {
  content: "";
  position: absolute;
  inset: 6% 4%;
  z-index: 0;
  opacity: 0;
  border-radius: 50%;
  filter: blur(30px);
  transform: scale(.9);
  transition: opacity 360ms ease;
  pointer-events: none;
}

.result-card.result-11 .special-stage::after {
  opacity: 1;
  background: radial-gradient(closest-side, rgba(167, 139, 250, .5), rgba(124, 58, 237, .12) 62%, transparent 78%);
  animation: auraBreath 3.6s ease-in-out infinite;
}

.result-card.result-22 .special-stage::after {
  opacity: 1;
  background: radial-gradient(closest-side, rgba(226, 232, 240, .42), rgba(148, 163, 184, .12) 60%, transparent 78%);
  animation: auraBreath 3.2s ease-in-out infinite;
}

.result-card.result-33 .special-stage::after {
  opacity: 1;
  background: radial-gradient(closest-side, rgba(56, 189, 248, .5), rgba(2, 132, 199, .14) 60%, transparent 78%);
  animation: auraBreath 3.8s ease-in-out infinite;
}

.result-card.result-28 .special-stage::after {
  opacity: 1;
  background: radial-gradient(closest-side, rgba(34, 197, 94, .46), rgba(215, 180, 106, .16) 58%, transparent 78%);
  animation: auraBreath 2.9s ease-in-out infinite;
}

@keyframes auraBreath {
  0%, 100% { transform: scale(.9); opacity: .5; }
  50% { transform: scale(1.08); opacity: .92; }
}

/* 11/2 — a faint starfield twinkles among the clouds (intuition / cosmic). */
.result-card.result-11 .special-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 18% 30%, #ffffff, transparent 60%),
    radial-gradient(1.6px 1.6px at 72% 24%, #e9d5ff, transparent 60%),
    radial-gradient(1.2px 1.2px at 40% 64%, #ffffff, transparent 60%),
    radial-gradient(1.8px 1.8px at 84% 60%, #c4b5fd, transparent 60%),
    radial-gradient(1.2px 1.2px at 56% 40%, #ffffff, transparent 60%),
    radial-gradient(1.4px 1.4px at 28% 78%, #ddd6fe, transparent 60%);
  animation: starTwinkle 2.9s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: .25; }
  50% { opacity: .95; }
}

/* 33/6 — a slow frost shimmer ring layered with the existing drip melt. */
.result-card.result-33 .number-wrap {
  isolation: isolate;
}

@media (prefers-reduced-motion: reduce) {
  .special-stage::after,
  .result-card.result-11 .special-stage::before {
    animation: none !important;
  }
  .special-stage::after { transform: scale(1); }
}


/* v1.4.2 mobile expandable intro */
.intro-mobile {
  display: none;
}

.intro-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-weight: 800;
  padding: 0;
  margin-left: 0.4rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

#introEllipsis {
  margin: 0;
}

.intro-toggle:hover {
  color: var(--gold-bright);
}

.intro-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .intro-desktop {
    display: none;
  }

  .intro-mobile {
    display: block;
  }
}


.foxbros-mark {
  display: inline-block;
  height: 1.18rem;
  width: auto;
  vertical-align: middle;
  transform: translateY(1px);
  filter: drop-shadow(0 0 2px rgba(245, 109, 19, 0.22)) drop-shadow(0 0 5px rgba(245, 109, 19, 0.15));
  animation: foxbrosFlicker 4.2s infinite ease-in-out;
}

@keyframes foxbrosFlicker {
  0%, 18%, 22%, 53%, 57%, 100% {
    opacity: 0.98;
    filter: drop-shadow(0 0 2px rgba(245, 109, 19, 0.2)) drop-shadow(0 0 5px rgba(245, 109, 19, 0.14)) drop-shadow(0 0 9px rgba(245, 109, 19, 0.08));
  }
  19% {
    opacity: 0.93;
    filter: drop-shadow(0 0 2px rgba(245, 109, 19, 0.26)) drop-shadow(0 0 7px rgba(245, 109, 19, 0.22)) drop-shadow(0 0 12px rgba(245, 109, 19, 0.14));
  }
  20% {
    opacity: 0.84;
    filter: drop-shadow(0 0 1px rgba(245, 109, 19, 0.16)) drop-shadow(0 0 3px rgba(245, 109, 19, 0.10));
  }
  21% {
    opacity: 1;
    filter: drop-shadow(0 0 2px rgba(245, 109, 19, 0.28)) drop-shadow(0 0 8px rgba(245, 109, 19, 0.24)) drop-shadow(0 0 14px rgba(245, 109, 19, 0.16));
  }
  54% {
    opacity: 0.9;
    filter: drop-shadow(0 0 2px rgba(245, 109, 19, 0.24)) drop-shadow(0 0 6px rgba(245, 109, 19, 0.18));
  }
  55% {
    opacity: 0.82;
    filter: drop-shadow(0 0 1px rgba(245, 109, 19, 0.14)) drop-shadow(0 0 3px rgba(245, 109, 19, 0.08));
  }
  56% {
    opacity: 0.98;
    filter: drop-shadow(0 0 2px rgba(245, 109, 19, 0.28)) drop-shadow(0 0 7px rgba(245, 109, 19, 0.22)) drop-shadow(0 0 12px rgba(245, 109, 19, 0.14));
  }
}

@media (max-width: 640px) {
  .foxbros-mark {
    height: 1.08rem;
  }
}
