:root { font-family: system-ui, sans-serif; color: #172033; }
* { box-sizing: border-box; }
html {
  background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%);
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%);
}
.app-shell { width: min(100%, 520px); margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 32px; height: 100vh; overflow: hidden; background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%); }
header { text-align: center; }
header h1 { margin: 12px 0 20px; color: #5b21b6; }
.card { background: white; border-radius: 18px; padding: 20px; box-shadow: 0 8px 24px rgba(30, 41, 59, .12); }
label { display: grid; gap: 7px; margin-bottom: 16px; font-weight: 700; }
.check { display: flex; align-items: center; gap: 9px; }
input, select, button { font: inherit; }
input, select { width: 100%; min-height: 48px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; }
button { min-height: 48px; border: 0; border-radius: 10px; padding: 10px 16px; background: #6d28d9; color: white; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; gap: 10px; }
.actions button { flex: 1; }
#progress { color: #6d28d9; font-weight: 800; margin-bottom: 12px; }
#suggestions { display: grid; gap: 6px; margin-bottom: 12px; }
#suggestions button { background: #ede9fe; color: #4c1d95; text-align: left; }
.error { min-height: 24px; color: #b91c1c; }
code { display: block; overflow-wrap: anywhere; border-radius: 10px; background: #f1f5f9; padding: 12px; margin-bottom: 16px; }
[hidden] { display: none !important; }
@media (min-width: 700px) { .app-shell { padding-top: 48px; } }
.result-item, .mention-summary { border-top: 1px solid #e2e8f0; padding-top: 12px; margin-top: 12px; }
.result-item h3, .mention-summary h3 { font-size: 1rem; }

/* -- Landing page -- */
#landing-view[hidden] { display: none !important; }

.school-readiness-panel { margin-top: 20px; text-align: center; }
.school-readiness-panel h2 { margin: 0 0 8px; color: #32116c; font-size: 1.12rem; }
.school-readiness-panel p { color: #6b7280; line-height: 1.45; }
.readiness-count { margin: 14px 0 8px !important; color: #32116c !important; font-size: 1.05rem; font-weight: 850; }
.readiness-track { height: 10px; overflow: hidden; border-radius: 99px; background: #eee8f5; }
.readiness-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#a855f7,#a3e635); transition: width .25s ease; }
.readiness-members { margin: 12px 0 !important; color: #6b7280; font-size: .85rem; }
.readiness-actions { display: grid; gap: 9px; margin-top: 16px; }
.readiness-share { min-height: 54px; border: 0; border-radius: 14px; background: #a3e635; color: #1b2b10; font: inherit; font-weight: 850; }
.readiness-share:disabled { opacity: .65; }
.readiness-refresh { justify-self: center; border: 0; background: transparent; color: #9ca3af; font: inherit; font-size: .8rem; }
.readiness-tease { margin-top: 14px !important; color: #6b7280; font-size: .85rem; }
.readiness-members:empty { display: none; }

/* Game-flow surfaces */
body.game-flow {
  background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%) !important;
  background-image: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%) !important;
  overflow-x: hidden;
}
body.game-flow::before,
body.game-flow::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
}
body.game-flow::before {
  width: 260px;
  height: 260px;
  top: -70px;
  left: -80px;
  background: rgba(139, 92, 246, 0.20);
  filter: blur(80px);
}
body.game-flow::after {
  width: 300px;
  height: 300px;
  right: -100px;
  bottom: -110px;
  background: rgba(200, 255, 0, 0.15);
  filter: blur(100px);
}
body.game-flow .app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px 0;
}
body.game-flow .card {
  width: 90vw;
  max-width: 468px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: 18px;
  border: 0;
  padding: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}
#game-view form { width: 100%; }
.question-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
#progress {
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0;
}
.progress-track {
  height: 8px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e1f2;
}
.progress-fill {
  width: 8.333%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d28d9, #c026d3);
  transition: width 300ms ease;
}
#game-view #question-text {
  margin: 0 0 16px;
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}
#game-view label {
  display: block;
  margin: 0 0 7px;
  font-size: 0.8rem;
  color: #374151;
}
.classmate-heading {
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 900;
}
#suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}
.suggestion-profile-card { min-width: 0; display: grid; gap: 4px; }
#suggestions a.suggestion-profile-link { justify-self: center; color: #9CA3AF; font-size: 11px; font-weight: 400; text-decoration: none; padding: 2px 6px; }
#suggestions a.suggestion-profile-link:focus-visible { outline: 2px solid #6d28d9; outline-offset: 2px; border-radius: 5px; }
#suggestions button.suggestion-chip {
  min-height: 76px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #E2DDF0;
  background: #F4F0FF;
  color: #3D245F;
  text-align: center;
  box-shadow: none;
}
#suggestions button.suggestion-chip[aria-selected="true"] {
  border-color: #6d28d9;
  background: #6d28d9;
  color: #fff;
}
.suggestion-chip.picked {
  transform: scale(1.05);
  transition: transform 100ms ease, opacity 100ms ease, background 100ms ease;
  z-index: 1;
}
.suggestion-chip.not-picked {
  opacity: .3;
  transition: transform 100ms ease, opacity 100ms ease;
}
.suggestion-chip {
  position: relative;
  overflow: hidden;
}
.suggestion-avatar {
  font-size: 1.6rem;
  line-height: 1;
}
.suggestion-nickname {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.1;
}
.suggestion-class {
  font-size: 0.68rem;
  line-height: 1.1;
  color: #715B8D;
}
#game-view { position: relative; }
.question-enter {
  animation: question-enter 300ms ease-out both;
}
.question-exit {
  pointer-events: none;
  animation: question-exit 300ms ease-out both;
}
@keyframes question-enter {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes question-exit {
  from { transform: translateX(0) rotate(0); opacity: 1; }
  to { transform: translateX(-400px) rotate(-8deg); opacity: 0; }
}
.pick-feedback {
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.floating-coin, .floating-reaction {
  position: absolute;
  white-space: nowrap;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(255,255,255,.9);
  transform: translate(-50%, 0);
  animation: float-up 600ms ease-out forwards;
}
.floating-coin { color: #b77900; font-size: 1rem; }
.floating-reaction { color: #6d28d9; font-size: .85rem; animation-delay: 40ms; }
@keyframes float-up {
  to { opacity: 0; transform: translate(-50%, -60px) scale(1.06); }
}
.question-toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 16px;
  bottom: auto;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: #32116c;
  color: white;
  font-size: .9rem;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.question-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.round-loading { text-align: center; }
.round-loading-flame { display: block; width: fit-content; margin: 4px auto 12px; font-size: 2.6rem; animation: round-flame-pulse .7s ease-in-out infinite alternate; }
.round-loading h1 { margin: 0 0 22px; color: #3D245F; font-size: 1.15rem; min-height: 1.5em; }
.round-loading-track { width: min(100%, 250px); height: 7px; margin: 0 auto; overflow: hidden; border-radius: 999px; background: #e8e1f2; }
.round-loading-track span { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6d28d9, #c026d3, #f97316); animation: round-loading-progress 1.1s ease-in-out infinite; }
@keyframes round-flame-pulse { to { transform: scale(1.16); filter: drop-shadow(0 0 10px #fb923c); } }
@keyframes round-loading-progress { from { transform: translateX(-110%); } to { transform: translateX(370%); } }
@media (prefers-reduced-motion: reduce) {
  .question-enter, .question-exit, .floating-coin, .floating-reaction, .round-loading-flame, .round-loading-track span { animation-duration: 1ms; }
  .progress-fill, .question-toast, .suggestion-chip { transition-duration: 1ms !important; }
}
.voting-count {
  font-size: 0.78rem;
  font-weight: 800;
  color: #3D245F;
  margin-bottom: 10px;
  padding: 6px 12px;
  background: rgba(163, 230, 53, 0.15);
  border: 1px solid rgba(163, 230, 53, 0.3);
  border-radius: 20px;
  display: inline-block;
}
.completion-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 11, 46, 0.75);
  backdrop-filter: blur(8px);
}
.completion-modal[hidden] { display: none; }
.completion-box {
  width: min(90vw, 420px);
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.completion-celebration {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: bounce 0.6s ease-in-out infinite;
}
.completion-coin-reward {
  font-size: 1.8rem;
  font-weight: 900;
  color: #D4AF37;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  animation: bounce 0.8s ease-in-out infinite alternate;
}
.completion-message {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 10px;
}
.completion-balance {
  font-size: 0.9rem;
  font-weight: 700;
  color: #3D245F;
  margin-bottom: 10px;
}
.completion-picked {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 16px;
}
.completion-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #CBD5E1;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
  cursor: pointer;
  text-decoration: none;
}
.game-status { text-align: center; }
.game-status h1 { margin: 0 0 10px; color: #3D245F; font-size: 1.25rem; }
.game-status p { color: #6B7280; }
.game-status a, .game-profile-link { display: inline-block; margin-top: 10px; color: #6d28d9; font-weight: 800; }
.cooldown-message { margin: 0; line-height: 1.5; }
.cooldown-message strong { display: inline-block; color: #3D245F; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cooldown-actions { display: grid; gap: 10px; width: 100%; margin-top: 20px; }
.cooldown-primary, .cooldown-secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; margin: 0 !important; padding: 12px 14px; border-radius: 13px; font: inherit; font-size: .92rem; font-weight: 850 !important; text-align: center; text-decoration: none; }
.cooldown-primary { background: #a3e635; color: #1c2c12; box-shadow: 0 8px 22px rgba(163, 230, 53, .22); }
.cooldown-primary:disabled { opacity: .7; }
.cooldown-secondary { border: 1px solid #e5e7eb; background: #fff; color: #32116c !important; }
.cooldown-profile { justify-self: center; margin: 0 !important; padding: 3px 8px; color: #9ca3af !important; font-size: .72rem; font-weight: 400 !important; text-decoration: none; }
#cooldown-share-status { margin: 0; color: #6b7280; font-size: .78rem; line-height: 1.4; }
.game-recovery-form{margin-top:16px;text-align:left}
.game-recovery-form label{display:grid;gap:5px;margin-top:10px;color:#38284a;font-size:.78rem;font-weight:800}
.game-recovery-form input,.game-recovery-form select{width:100%;min-height:42px;padding:9px 11px;border:1px solid #d7cde3;border-radius:10px;background:#fff;color:#241834;font:inherit}
.game-recovery-form label small{color:#9ca3af;font-size:.72rem;font-weight:400}
#game-recovery-help-link{justify-self:start;margin:2px 0 0;color:#9ca3af;font-size:.74rem;font-weight:400;text-decoration:underline}
#game-recovery-help{line-height:1.4}
.game-recovery-form #game-recovery-submit{display:block;width:100%;min-height:58px;margin-top:18px;padding:12px 14px;border:0;border-radius:14px;background:#b9f553;color:#263312;font:inherit;font-size:.96rem;font-weight:950;cursor:pointer;box-shadow:0 8px 22px rgba(163,230,53,.24)}
.game-recovery-form #game-recovery-error{color:#b4233a}
.existing-account-link{margin:14px 0 0;text-align:center;color:#756582;font-size:.78rem}.existing-account-link a{color:#6840a3;font-weight:850}
.game-profile-link { font-size: .85rem; }
.completion-button.notify-button {
  border-style: dashed;
  border-color: #B7F34B;
  color: #3D245F;
  background: rgba(163, 230, 53, 0.1);
}
.completion-cooldown {
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-bottom: 12px;
}
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.shuffle-button {
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d7d3e2;
  color: #3d245f;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.question-actions { display: flex; align-items: center; gap: 8px; }
.question-actions .shuffle-button { flex: 1 1 auto; width: auto; }
.skip-question-button {
  flex: 0 0 auto;
  min-height: 38px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid #d7d3e2;
  border-radius: 12px;
  background: #fff;
  color: #3d245f;
  font: inherit;
  font-size: .76rem;
  font-weight: 650;
  cursor: pointer;
}
.skip-question-button:disabled { opacity: .55; cursor: not-allowed; }
#landing-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  box-sizing: border-box;
  background: #050508;
  overflow: hidden;
}

#landing-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("/assets/images/background.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.82;
  pointer-events: none;
  transform: scale(1.04);
  animation: backgroundDrift 18s ease-in-out infinite alternate;
}

#landing-view::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    linear-gradient(135deg, rgba(3, 3, 10, 0.72) 0%, rgba(21, 8, 48, 0.22) 48%, rgba(2, 10, 18, 0.58) 100%),
    radial-gradient(ellipse at 24% 18%, rgba(126, 87, 194, 0.48) 0%, transparent 42%),
    radial-gradient(ellipse at 78% 74%, rgba(163, 230, 53, 0.22) 0%, transparent 36%);
  pointer-events: none;
  animation: glowShift 12s ease-in-out infinite alternate;
}

@keyframes glowShift {
  0% { transform: scale(1) translate3d(-0.5%, 0, 0); opacity: 0.78; }
  100% { transform: scale(1.08) translate3d(1%, -1%, 0); opacity: 1; }
}

@keyframes backgroundDrift {
  0% { transform: scale(1.04) translate3d(-0.8%, 0, 0); filter: saturate(0.88) brightness(0.82); }
  100% { transform: scale(1.09) translate3d(1%, -1%, 0); filter: saturate(1.12) brightness(0.98); }
}

.mobile-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 430px;
  max-height: 100vh;
  max-height: 100dvh;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));

  box-sizing: border-box;
  text-align: center;
  overflow: hidden;

  box-sizing: border-box;
  text-align: center;
  overflow: hidden;

  box-sizing: border-box;
  text-align: center;
  overflow: hidden;

  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));

  padding: 0;

  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.landing-logo {
  display: block;
  width: 131px;
  height: 131px;
  object-fit: contain;
  margin: 0 0 2px;
  flex: 0 0 131px;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.52), 0 0 24px rgba(163, 230, 53, 0.12);
  filter: saturate(1.08) contrast(1.03);
}

.landing-headline {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 0.98;
  margin: 0 0 14px;
  color: #fff;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9), 0 0 12px rgba(126, 87, 194, 0.28);
  letter-spacing: -0.045em;
}

.human-eyes {
  display: inline-flex;
  gap: 0.05em;
  align-items: center;
  vertical-align: -0.06em;
  margin-left: 0.08em;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.38));
}
.human-eye {
  position: relative;
  width: 0.58em;
  height: 0.78em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  border: 0.055em solid rgba(17, 24, 39, 0.82);
  transform-origin: center;
}
.human-eye:last-child {
  animation: human-wink 4s infinite;
}
.human-pupil {
  position: absolute;
  width: 0.28em;
  height: 0.38em;
  border-radius: 50%;
  background: #111827;
  box-shadow: inset 0 0 0 0.02em rgba(255, 255, 255, 0.8);
  animation: pupil-look 4.5s ease-in-out infinite;
}
.human-eyes-small {
  font-size: 0.75em;
  vertical-align: 0;
}
@keyframes pupil-look {
  0%, 22%, 100% { transform: translate(-0.08em, 0); }
  32%, 48% { transform: translate(0.1em, -0.02em); }
  58%, 74% { transform: translate(0, 0.04em); }
  84% { transform: translate(-0.06em, 0); }
}
@keyframes human-wink {
  0%, 88%, 92%, 100% { transform: scaleY(1); }
  89%, 91% { transform: scaleY(0.08); }
}

.notification-feed {
  width: 100%;
  max-width: 360px;
  height: 208px;
  flex: 0 0 208px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 6px 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.notification-card {
  width: 100%;
  height: 60px;
  flex: 0 0 60px;
  background: rgba(59, 42, 102, 0.8);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  border: 1px solid #5B4A8A;
  border-radius: 14px;
  padding: 6px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  animation: slideInFade 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  box-sizing: border-box;
  overflow: hidden;
}

.notification-card.exit {
  flex: 0 0 0 !important;
  min-height: 0;
  animation: slideOutFade 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideInFade {
  0% { opacity: 0; transform: translateY(20px) scale(0.93); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideOutFade {
  0% { opacity: 1; transform: translateY(0); height: auto; margin: 0 0 8px 0; }
  100% { opacity: 0; transform: translateY(-12px) scale(0.9); height: 0; margin: 0; padding: 0; border-width: 0; overflow: hidden; }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3B2A66;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 1px solid #5B4A8A;
  color: #fff;
  position: relative;
  overflow: hidden;
  filter: none;
}

.avatar::before {
  display: none;
}

.avatar::after {
  display: none;
}

@keyframes avatarGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-text {
  color: #fff;
  font-size: 0.82rem;
  margin-bottom: 3px;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message-sender {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0;
  filter: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.message-time {
  color: #A6A6B3;
  font-size: 0.66rem;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #b7f34b;
  color: #1a1a1a;
  border: 3px solid #b7f34b;
  border-radius: 999px;
  padding: 15px 30px;
  font-size: 1.15rem;
  font-weight: 900;
  margin: 0 0 14px 0;
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(163, 230, 53, 0.5);
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  width: min(420px, calc(100% - 24px));
  max-width: 420px;
  white-space: nowrap;
}

.play-button:hover {
  border-color: #b7f34b;
  box-shadow: 0 0 0 5px rgba(163, 230, 53, 0.42), 0 0 45px rgba(163, 230, 53, 0.72);
}

.play-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.play-button:active {
  transform: scale(0.94);
}

.cta-subtext {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.8);
  margin: 0 0 12px 0;
  text-align: center;
}
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.78rem;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.footer-stat {
  margin: 2px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 20px;
  padding: 4px 12px;
  color: #86efac;
  font-weight: 700;
  font-size: 0.76rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  animation: pulseLive 2.5s ease-in-out infinite;
  margin: 0 0 4px 0;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (min-width: 700px) {
  .mobile-container {
    padding: 24px 20px;
  }
  .landing-logo {
    width: 157.5px;
    height: 157.5px;
    flex-basis: 157.5px;
  }
  .landing-headline {
    font-size: 3rem;
  }
  .notification-feed {
    max-width: 380px;
  }
}

@media (max-height: 700px) {
  .mobile-container {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .landing-logo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }
  .landing-headline {
    font-size: 2rem;
    margin-bottom: 8px;
  }
  .notification-feed {
    height: 180px;
    flex-basis: 180px;
    margin-bottom: 4px;
  }
  .notification-card {
    height: 60px;
    flex-basis: 60px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .play-button {
    padding-top: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #landing-view::before,
  #landing-view::after,
  .notification-card,
  .status-pill {
    animation: none !important;
  }
}

.feed-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; height:100%; color:rgba(226,232,240,0.8); font-size:0.8rem; text-align:center; }
.spinner { width:24px; height:24px; border:3px solid rgba(255,255,255,0.2); border-top-color:#b7f34b; border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-container { align-items: center; text-align: center; margin: 0 auto; }

html {
  width: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%);
}
body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: auto;
  background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%);
}

#registration-view, .card { color: #111; }
.gender-label {
  margin: -3px 0 8px;
  font-weight: 800;
  color: #111;
  text-align: left;
}

.gender-pills {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 6px;
}

.gender-pill {
  flex: 1;
  height: 44px;
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  font-size: 0.7rem;
  white-space: nowrap;
  cursor: pointer;
}

.gender-pill.selected {
  border-color: #111;
  background: #111;
  color: #b7f34b;
}

.gender-pill.selected::after {
  content: " ✓";
}

.gender-helper {
  margin: 0 0 16px;
  color: #6B7280;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: left;
}

.vibe-label {
  margin: -3px 0 8px;
  font-weight: 800;
  color: #111;
  text-align: left;
}

.vibe-pills {
  display: block;
  width: 100%;
  margin-bottom: 6px;
}

.vibe-group {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  width: 100%;
}

.vibe-pill {
  flex: 1;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  padding: 4px 2px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  font-size: 1.2rem;
  white-space: nowrap;
  cursor: pointer;
}

.vibe-pill.selected {
  border-color: #111;
  background: #111;
}

.vibe-pill.selected::after {
  content: " ✓";
  font-size: 0.6rem;
  vertical-align: middle;
}

.register-page-html {
  background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%) !important;
  height: 100%;
  overflow: hidden;
}
.register-page {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #1A0B2E 0%, #2D1B4E 100%) !important;
  height: 100vh;
  height: 100dvh;
  overflow: hidden !important;
  overscroll-behavior: none;
}
.register-page .app-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.register-page::before,
.register-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
}
.register-page::before {
  width: 260px;
  height: 260px;
  top: -70px;
  left: -80px;
  background: rgba(139, 92, 246, 0.20);
  filter: blur(80px);
}
.register-page::after {
  width: 300px;
  height: 300px;
  right: -100px;
  bottom: -110px;
  background: rgba(200, 255, 0, 0.15);
  filter: blur(100px);
}
#registration-view {
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #FFFFFF !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24) !important;
  border: none !important;
  color: #111 !important;
  border-radius: 18px;
}

.search-picker {
  position: relative;
  width: 100%;
}
#school-select {
  padding-right: 64px;
}
.school-picker-indicators {
  position: absolute;
  top: 0;
  right: 12px;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.school-selected-check {
  color: #16A34A;
  font-size: 1rem;
  font-weight: 800;
}
.school-picker-arrow {
  color: #6B6B6B;
  font-size: 1.25rem;
  line-height: 1;
}
.search-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  display: grid;
  gap: 2px;
  max-height: 160px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 10px 24px rgba(26, 11, 46, 0.18);
}
.search-options[hidden] { display: none; }
.search-options-header {
  padding: 7px 10px 6px;
  color: #6B6B6B;
  font-size: 0.75rem;
  font-weight: 800;
}
.search-option,
.search-add-option {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  padding: 7px 10px;
  text-align: left;
  background: #FFFFFF;
  color: #111827;
}
.search-option:hover { background: #F3F4F6; }
.search-add-option {
  color: #5B21B6;
  background: #F5F3FF;
  font-weight: 800;
}
.custom-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 7px;
  margin-top: 7px;
}
.custom-add-row input {
  min-height: 44px !important;
}
.custom-add-row button {
  min-height: 44px;
  border-radius: 10px;
  padding: 8px;
  background: #1A0B2E;
  color: #B7F34B;
}

#registration-complete {
  text-align: left;
}
#registration-view.registration-success-active {
  overflow-y: auto;
}
#registration-complete:not([hidden]) {
  display: grid;
  gap: 11px;
}
.success-card {
  padding: 15px;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  background: #FFFFFF;
}
.success-card h3 {
  margin: 0 0 6px;
  color: #241834;
  font-size: 1rem;
}
.success-card p {
  margin: 0;
  color: #5B5564;
  font-size: 0.8rem;
  line-height: 1.45;
}
.success-title {
  margin: 0 0 10px;
  color: #111827;
  font-size: 1.8rem;
  line-height: 1.05;
}
.success-intro {
  margin: 0;
  color: #374151;
  font-size: 0.9rem;
}
.success-share-card {
  border-color: #B7F34B;
  background: #F6FBEA;
}
.success-share-card h3 {
  font-size: 1.08rem;
}
.success-share-button {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 15px;
  background: #B7F34B;
  color: #1A1A1A;
  font-size: 0.92rem;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(110, 160, 20, 0.25);
  cursor: pointer;
}
.success-share-button:disabled {
  opacity: 0.75;
  cursor: wait;
}
.success-play-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  margin-top: 11px;
  padding: 12px 16px;
  border: 1px solid #D5D0DB;
  border-radius: 15px;
  background: #FFFFFF;
  color: #241834;
  font-weight: 900;
  text-decoration: none;
}
.success-backup-note {
  margin: 0;
  color: #6B7280;
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: center;
}
.registration-toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 36px);
  padding: 12px 16px;
  border-radius: 13px;
  background: #1E1038;
  color: #FFFFFF;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}
.registration-toast[hidden] { display: none; }
.backup-key-label {
  margin: 0 0 6px;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 800;
}
.backup-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}
#registration-recovery-code {
  min-width: 0;
  min-height: 48px;
  font-size: 0.78rem;
  text-overflow: ellipsis;
}
#show-recovery-button {
  min-height: 48px;
  padding: 8px;
  border-radius: 10px;
  background: #111827;
  color: #B7F34B;
  font-size: 0.75rem;
}
.success-warning {
  margin: 12px 0 14px;
  color: #6B7280;
  font-size: 0.72rem;
  line-height: 1.45;
}
.success-leaks-button {
  width: 100%;
  min-height: 56px;
  border: 3px solid #B7F34B;
  border-radius: 999px;
  background: #B7F34B;
  color: #1A1A1A;
  box-shadow: 0 0 30px rgba(163, 230, 53, 0.45);
}

.founder-success-summary {
  margin: 0 0 10px;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 800;
}
.founder-waiting-copy {
  margin: 0 0 14px;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 700;
}
.success-secondary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 9px;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  background: #FFFFFF;
  color: #111827;
  font-weight: 800;
}

.recovery-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(26, 11, 46, 0.72);
  backdrop-filter: blur(6px);
}
.recovery-sheet-backdrop[hidden] { display: none; }
.recovery-sheet {
  position: relative;
  width: min(100%, 420px);
  border-radius: 22px;
  padding: 22px;
  background: #FFFFFF;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.recovery-sheet h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 1.15rem;
}
.recovery-sheet textarea {
  width: 100%;
  height: 78px;
  resize: none;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 12px;
  color: #111827;
  background: #F9FAFB;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.45;
}
.sheet-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #F3F4F6;
  color: #111827;
  font-size: 1.25rem;
}
.sheet-action {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
}
.sheet-screenshot {
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #111827;
}
.sheet-copy {
  background: #B7F34B;
  color: #1A1A1A;
}
.recovery-sheet > p:last-child {
  margin: 10px 0 0;
  color: #6B7280;
  font-size: 0.75rem;
}
#registration-view input,
#registration-view select {
  background: #FFFFFF;
  color: #111;
  border: 1px solid #CBD5E1;
}
#registration-view input::placeholder {
  color: #9CA3AF;
}
.registration-title {
  margin: 0 0 20px;
  text-align: left;
  color: #111;
  font-size: 1.8rem;
  line-height: 1.05;
}
#registration-form > label {
  margin-bottom: 12px;
}
#registration-form > button[type="submit"] {
  width: min(420px, 100%);
  min-height: 56px;
  margin: 0 auto 8px;
  padding: 15px 30px;
  border: 3px solid #b7f34b;
  border-radius: 999px;
  background: #b7f34b;
  color: #1a1a1a;
  font-size: 1.15rem;
  white-space: nowrap;
  box-shadow: 0 0 30px rgba(163, 230, 53, 0.5);
}
#registration-form > button[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: .5;
  box-shadow: none;
}
.signup-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 420px;
  margin: 8px auto 12px;
  color: #4f4b5c;
  font-size: .82rem;
  line-height: 1.5;
  text-align: left;
}
.signup-consent input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #7138b5; }
.signup-consent a { color: #7138b5; font-weight: 650; text-underline-offset: 2px; }

.status-pill { min-width: 220px; text-align: center; white-space: nowrap; }
.mobile-container { overflow: hidden; }

html, body { width: 100%; min-height: 100%; }
html { position: relative; overflow-x: hidden; }
body { position: relative; overflow-x: hidden; }

#landing-view[hidden] { display: none !important; }
