:root {
  --bg-a: #ffedf6;
  --bg-b: #d7f8ff;
  --ink: #2a2533;
  --muted: #756d82;
  --card: rgba(255, 255, 255, 0.92);
  --pink: #ff5fa2;
  --peach: #ffb067;
  --blue: #47b8ff;
  --mint: #55d6a7;
  --shadow: 0 24px 70px rgba(61, 35, 87, 0.2);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: ui-rounded, "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 176, 103, 0.45), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(71, 184, 255, 0.42), transparent 22rem),
    linear-gradient(135deg, var(--bg-a), var(--bg-b));
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.phone-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.app-card {
  width: min(100%, 430px);
  min-height: min(760px, calc(100vh - 36px));
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 252, 0.92)),
    var(--card);
  box-shadow: var(--shadow);
  transition: opacity 900ms ease, transform 900ms ease;
}

.app-card.closing {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
}

.top-bar {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background:
    linear-gradient(135deg, rgba(255, 95, 162, 0.12), rgba(85, 214, 167, 0.12)),
    rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(42, 37, 51, 0.08);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red {
  background: #ff6b86;
}

.dot-yellow {
  background: #ffd166;
}

.dot-green {
  background: #62d394;
}

.tiny-status {
  margin-left: auto;
  display: grid;
  justify-items: end;
  gap: 2px;
  max-width: 245px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
  box-shadow: 0 8px 18px rgba(42, 37, 51, 0.08);
}

.tiny-status strong,
.tiny-status small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tiny-status small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.mascot {
  width: 116px;
  height: 116px;
  margin: 22px auto 6px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  background: linear-gradient(145deg, #fff, #ffe4f1);
  box-shadow: 0 16px 32px rgba(255, 95, 162, 0.18);
  transform-origin: 50% 100%;
  animation: bob 2.8s ease-in-out infinite;
}

.face {
  width: 72px;
  height: 62px;
  position: relative;
}

.eye {
  width: 13px;
  height: 17px;
  position: absolute;
  top: 12px;
  border-radius: 50%;
  background: var(--ink);
  animation: blink 5s infinite;
}

.left-eye {
  left: 12px;
}

.right-eye {
  right: 12px;
}

.mouth {
  width: 34px;
  height: 18px;
  position: absolute;
  left: 19px;
  bottom: 8px;
  border: 4px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 30px 30px;
}

.mascot.sad .mouth {
  bottom: 2px;
  border-top: 4px solid var(--ink);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
}

.mascot.party {
  animation: party 650ms ease-in-out infinite;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 12px 22px 28px;
}

.screen {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 18px;
  animation: rise 360ms ease both;
}

.eyebrow {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(85, 214, 167, 0.18);
  color: #177a59;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.shiny-label {
  background: linear-gradient(135deg, rgba(255, 95, 162, 0.2), rgba(255, 209, 102, 0.28), rgba(85, 214, 167, 0.18));
  color: #a34b00;
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.35);
}

.shiny-button {
  animation: shimmer 1.8s ease-in-out infinite;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.1rem, 10vw, 3.15rem);
}

h2 {
  font-size: clamp(1.7rem, 8vw, 2.35rem);
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.name-row,
.time-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.text-input,
.time-input {
  width: 100%;
  min-height: 54px;
  border: 2px solid rgba(42, 37, 51, 0.1);
  border-radius: 18px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px transparent;
}

.text-input:focus,
.time-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 5px rgba(255, 95, 162, 0.16);
}

.icon-button,
.choice,
.primary {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(42, 37, 51, 0.1);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.icon-button {
  width: 56px;
  background: var(--peach);
  font-size: 1.2rem;
}

.choice,
.primary {
  padding: 0 16px;
}

.choice:hover,
.primary:hover,
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(42, 37, 51, 0.14);
}

.choice:active,
.primary:active,
.icon-button:active {
  transform: translateY(1px);
}

.choices {
  display: grid;
  gap: 12px;
}

.choice {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 13px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 251, 0.92)),
    #fff;
  border: 2px solid rgba(42, 37, 51, 0.08);
  position: relative;
  overflow: hidden;
}

.choice:nth-child(3n + 1) {
  border-color: rgba(255, 95, 162, 0.3);
  box-shadow: 0 10px 24px rgba(255, 95, 162, 0.1);
}

.choice:nth-child(3n + 2) {
  border-color: rgba(71, 184, 255, 0.3);
  box-shadow: 0 10px 24px rgba(71, 184, 255, 0.1);
}

.choice:nth-child(3n) {
  border-color: rgba(85, 214, 167, 0.34);
  box-shadow: 0 10px 24px rgba(85, 214, 167, 0.1);
}

.choice::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--pink), var(--peach));
  opacity: 0.78;
}

.choice:nth-child(3n + 2)::before {
  background: linear-gradient(180deg, var(--blue), var(--mint));
}

.choice:nth-child(3n)::before {
  background: linear-gradient(180deg, var(--mint), #ffd166);
}

.choice-emoji {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(42, 37, 51, 0.06), 0 8px 16px rgba(42, 37, 51, 0.08);
  font-size: 1.3rem;
}

.choice-label {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.choice-arrow {
  justify-self: end;
  color: rgba(42, 37, 51, 0.36);
  font-size: 1.75rem;
  line-height: 1;
  transition: transform 150ms ease, color 150ms ease;
}

.choice:hover .choice-arrow {
  color: var(--pink);
  transform: translateX(3px);
}

.slider-form {
  display: grid;
  gap: 14px;
}

.slider-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 2px solid rgba(42, 37, 51, 0.08);
  box-shadow: 0 12px 25px rgba(42, 37, 51, 0.08);
}

.slider-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slider-readout span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.slider-readout strong {
  color: var(--ink);
  font-size: 1.15rem;
}

.range-input {
  width: 100%;
  height: 34px;
  margin: 0;
  accent-color: var(--pink);
  cursor: pointer;
}

.slider-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.slider-scale span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.slider-face {
  width: 78px;
  height: 58px;
  position: relative;
  justify-self: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff7fb, #ffe1ef);
  box-shadow: inset 0 -5px 0 rgba(255, 95, 162, 0.12);
  transition: transform 180ms ease, background 180ms ease;
}

.mini-eye {
  width: 9px;
  height: 13px;
  position: absolute;
  top: 15px;
  border-radius: 50%;
  background: var(--ink);
}

.mini-eye:first-child {
  left: 21px;
}

.mini-eye:nth-child(2) {
  right: 21px;
}

.mini-mouth {
  width: 28px;
  height: 15px;
  position: absolute;
  left: 25px;
  bottom: 11px;
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 30px 30px;
}

.slider-face.unsure .mini-mouth {
  height: 3px;
  bottom: 15px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
}

.slider-face.sad {
  background: linear-gradient(145deg, #f6f6ff, #e5ebff);
  transform: rotate(-2deg);
}

.slider-face.sad .mini-mouth {
  bottom: 8px;
  border-top: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
}

.slider-face.super-happy {
  background: linear-gradient(145deg, #eefff7, #c7f8e4);
  transform: rotate(2deg) scale(1.06);
}

.slider-face.super-happy .mini-mouth {
  width: 34px;
  height: 18px;
  left: 22px;
}

.primary {
  width: 100%;
  background: linear-gradient(135deg, var(--pink), var(--peach));
  color: #fff;
}

.bubble {
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(42, 37, 51, 0.08);
  box-shadow: 0 12px 25px rgba(42, 37, 51, 0.08);
}

.selected {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(71, 184, 255, 0.16);
  color: #126c9b;
  font-size: 0.82rem;
  font-weight: 900;
}

.summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(85, 214, 167, 0.12);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.9rem;
}

.summary-row strong {
  text-align: right;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 20;
  max-width: min(92vw, 380px);
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(42, 37, 51, 0.92);
  color: #fff;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti {
  position: fixed;
  top: -14px;
  width: 10px;
  height: 16px;
  z-index: 10;
  border-radius: 3px;
  animation: fall var(--fall-speed) linear forwards;
}

.stacee-sparkle {
  position: fixed;
  z-index: 12;
  color: #ff5fa2;
  font-size: 1.1rem;
  font-weight: 900;
  pointer-events: none;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.95),
    0 0 16px rgba(255, 95, 162, 0.65),
    0 0 28px rgba(255, 208, 102, 0.48);
  animation: sparkle-up var(--sparkle-speed) ease-out forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.12);
  }
}

@keyframes party {
  0%,
  100% {
    transform: rotate(-5deg) scale(1);
  }
  50% {
    transform: rotate(5deg) scale(1.04);
  }
}

@keyframes fall {
  to {
    transform: translate3d(var(--drift), 110vh, 0) rotate(720deg);
    opacity: 0.95;
  }
}

@keyframes sparkle-up {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6) rotate(0deg);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--sparkle-drift), calc(-1 * var(--sparkle-rise)), 0) scale(1.45) rotate(260deg);
  }
}

@keyframes shimmer {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.35) brightness(1.08);
  }
}

@media (max-width: 390px) {
  .phone-shell {
    padding: 10px;
  }

  .app-card {
    min-height: calc(100vh - 20px);
    border-radius: 24px;
  }

  .content {
    padding-inline: 16px;
  }

  .name-row,
  .time-row {
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 100%;
  }
}
