:root {
  --pink: #1f8fff;        /* primary (blue) */
  --pink-dark: #1667c4;
  --green: #17b978;       /* accent (green) */
  --ink: #123b33;
  --cream: #e9f7f0;
  --card: #f2fbf7;
  --shadow: #0c2f28;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Baloo 2", "Segoe UI Rounded", "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #bfe9ff 0%, #d9f6ea 45%, #c7f0dd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 100vh;
  overflow-x: hidden;
}

.card {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 70vh;
  background: var(--card);
  border-radius: 28px;
  padding: 28px 24px 20px;
  box-shadow: 0 18px 40px rgba(20, 120, 90, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--pink);
  letter-spacing: -0.5px;
}

/* progress dots */
.dots {
  display: flex;
  gap: 10px;
  margin: 14px 0 8px;
}
.dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #bfe3d4;
  transition: all .3s ease;
}
.dots span.on {
  background: var(--pink);
  width: 34px;
}

/* screens */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  width: 100%;
  animation: pop .35s ease;
}
.screen.active { display: flex; }

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tagline {
  letter-spacing: 3px;
  font-size: .8rem;
  font-weight: 600;
  color: #4d8a78;
  margin: 0 0 6px;
}

h1 {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  line-height: 1.12;
  font-weight: 800;
  margin: 8px 0 4px;
  max-width: 15ch;
}
h1 em { color: var(--pink); font-style: italic; }

.thankgod {
  font-size: clamp(2.6rem, 12vw, 4rem);
  letter-spacing: 1px;
}

.emoji-big { font-size: clamp(2rem, 9vw, 3rem); margin: 4px 0; }

.hint {
  color: #4d8a78;
  font-size: .95rem;
  margin: 6px 0;
}
.fineprint {
  color: #6aa896;
  font-size: .82rem;
  max-width: 32ch;
  margin: 10px auto 0;
}
.reminder {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: 34ch;
  margin: 18px auto 0;
  padding: 14px 18px;
  background: #e4f7ee;
  border: 2px solid #b7e6d3;
  border-radius: 18px;
}

/* the outcome is the whole point — make it the loud, central element */
.reminder-hero {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  max-width: 40ch;
  margin: 16px auto 4px;
  padding: 20px 22px;
  background: #d8f4e7;
  border: 3px solid var(--green);
  border-radius: 22px;
  box-shadow: 4px 5px 0 rgba(12, 47, 40, .12);
}

/* pin the replay button to the bottom of the card */
.buttons-bottom {
  margin-top: auto;
  padding-top: 16px;
}

/* buttons */
.buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 14px 30px;
  border-radius: 40px;
  cursor: pointer;
  border: 3px solid var(--shadow);
  box-shadow: 4px 5px 0 var(--shadow);
  transition: transform .08s ease, box-shadow .08s ease;
  user-select: none;
}
.btn:active {
  transform: translate(2px, 3px);
  box-shadow: 1px 2px 0 var(--shadow);
}
.btn-primary { background: var(--pink); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); }

/* escape buttons move via transform, keeping their box in the layout so the
   sibling "correct" button never shifts */
.btn.escaping {
  position: relative;
  z-index: 50;
  transform-origin: center;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}
.btn.gone {
  pointer-events: none;
}

/* vertical scale */
.scale-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 14px 0 4px;
}
.scale-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2f7a66;
}
.scale-track {
  position: relative;
  width: 56px;
  height: 240px;
  background: #fff;
  border: 3px solid var(--shadow);
  border-radius: 40px;
  box-shadow: inset 0 0 0 2px #fff, 4px 5px 0 var(--shadow);
}
.scale-handle {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--shadow);
  background: var(--green);
  cursor: grab;
  bottom: 6px;
  touch-action: none; /* let us handle vertical drags without page scroll */
}
.scale-handle::after {
  content: "🙄";
  font-size: 1.1rem;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scale-handle:active { cursor: grabbing; }

.footer {
  margin-top: auto;
  padding-top: 12px;
  font-size: .75rem;
  color: #8fc4b3;
}

/* very discreet theme switch, tucked in the corner of the card */
.footer-switch {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: .62rem;
  letter-spacing: .3px;
  color: #bcdccf;
  text-decoration: none;
  opacity: .55;
  transition: opacity .2s ease, color .2s ease;
}
.footer-switch:hover { opacity: 1; color: #4d8a78; }

/* confetti */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  opacity: .9;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 1; }
}
