:root {
  --ink: #0e2a5c;
  --pink: #7cc4ff;
  --off-white: #f2f8ff;
  --dim: #a9c8ee;
  --line: #3c6fb8;
  --baby: #cfe8ff;
  --deep: #1b4fa0;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --round: "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--off-white); overflow-x: hidden; }
body {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kicker { color: var(--dim); margin: 0; font-size: 13px; }
h1 {
  margin: 0;
  font-family: var(--round);
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.15;
  text-transform: lowercase;
  color: var(--baby);
  overflow-wrap: anywhere;
}
.prompt { color: var(--pink); }
.idea { margin: 0; color: var(--dim); overflow-wrap: anywhere; }
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; min-width: 0; }

.bubble {
  margin: 0;
  font-family: var(--round);
  font-weight: 900;
  font-size: clamp(40px, 13vw, 84px);
  line-height: 1;
  text-align: center;
  letter-spacing: 1px;
  color: var(--baby);
  -webkit-text-stroke: 3px var(--deep);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--deep), 0 7px 0 #0a1f47;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.deco { margin: 0; font-size: 18px; text-align: center; color: var(--baby); max-width: 100%; }

.pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  min-height: 64px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  border: 3px solid var(--baby);
  font-family: var(--round);
  font-weight: 900;
  font-size: 20px;
  cursor: pointer;
}
.pick:focus-within { outline: 3px solid var(--baby); outline-offset: 3px; }
.file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.note { margin: 0; color: var(--dim); font-size: 13px; text-align: center; }

.rate-card {
  width: 100%;
  max-width: 420px;
  background: #16397a;
  border: 3px solid var(--pink);
  border-radius: 28px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.hidden { display: none; }
.preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 20px;
  background: #0a1f47;
}
.status { margin: 0; color: var(--dim); font-size: 14px; min-height: 21px; }
.thinking .preview { animation: wobble 0.9s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .thinking .preview { animation: none; } }
.score { margin: 0; font-size: clamp(28px, 9vw, 44px); line-height: 1.2; min-height: 1px; letter-spacing: 2px; }
.line {
  margin: 0;
  font-family: var(--round);
  font-weight: 900;
  font-size: 20px;
  color: var(--baby);
  overflow-wrap: anywhere;
}
button {
  font: inherit;
  background: var(--pink);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
}
button.again { font-family: var(--round); font-weight: 900; }
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible { outline: 2px solid var(--baby); outline-offset: 2px; }
.foot { color: var(--dim); font-size: 13px; text-align: center; }
