@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&display=swap');

:root {
  color-scheme: light;
  --ink: #22242f;
  --muted: #535971;
  --paper: #fffaf0;
  --panel: rgba(255, 255, 255, 0.94);
  --cream: #fff4cc;
  --blue: #9ed8ff;
  --pink: #ff9fc0;
  --green: #9af0c3;
  --purple: #bba5ff;
  --orange: #ffbd76;
  --line: #22242f;
  --shadow: 0 10px 0 rgba(34, 36, 47, 0.15);
  --small-shadow: 0 4px 0 #22242f;
  --radius: 12px;
  font-family: 'Fredoka', 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
}

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

body.needs-onboarding {
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 16% 12%, rgba(255, 244, 168, 0.95) 0 12%, transparent 28%),
    radial-gradient(ellipse at 84% 4%, rgba(255, 255, 255, 0.9) 0 9%, transparent 22%),
    linear-gradient(180deg, #7bc8ff 0%, #bfe9ff 36%, #fff1c8 100%);
  background-attachment: fixed;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  color: var(--ink);
  border: 0;
}

.app-shell {
  width: min(100%, 450px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
}

.needs-onboarding .app-shell {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
}

.onboarding {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 216, 77, 0.52), transparent 30%),
    radial-gradient(circle at 92% 22%, rgba(255, 127, 172, 0.6), transparent 34%),
    linear-gradient(135deg, #fffcf0, #e6f7ff 50%, #fff0f6);
  overflow: hidden;
}

.onboarding[hidden] {
  display: none;
}

.onboarding-card {
  width: min(100%, 440px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 20px;
  border-radius: var(--radius);
  border: 4px solid var(--ink);
  box-shadow: 0 10px 0 var(--ink);
  position: relative;
  transition: background 0.4s ease;
  --step-bg: linear-gradient(135deg, #ff7fac 0%, #ffbe54 100%);
  background: 
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M10 20l5-5 3 3-5 5-3-3z' stroke='rgba(0,0,0,0.08)' stroke-width='1.5' fill='none'/><rect x='40' y='10' width='12' height='16' rx='1' stroke='rgba(0,0,0,0.08)' stroke-width='1.5' fill='none'/><path d='M80 20l2 2 2-2-2-2z' fill='rgba(0,0,0,0.08)'/><path d='M15 70l6-10 6 10h-12z' stroke='rgba(0,0,0,0.08)' stroke-width='1.5' fill='none'/><circle cx='80' cy='70' r='6' stroke='rgba(0,0,0,0.08)' stroke-width='1.5' fill='none'/><path d='M78 76h4' stroke='rgba(0,0,0,0.08)' stroke-width='1.5'/><path d='M45 50l1 2 2 1-2 1-1 2-1-2-2-1 2-1z' fill='rgba(0,0,0,0.08)'/></svg>") repeat,
    var(--step-bg);
}

/* Step Progress Indicator */
.step-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}
.step-progress-bar {
  height: 8px;
  background: linear-gradient(90deg, #ff7fac, #ffbd54);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.step-counter {
  font-size: 11px;
  font-weight: 950;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: right;
}

/* Onboarding Step Container */
.onboarding-step {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.onboarding-step.active {
  display: flex;
  animation: stepSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stepSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-hero {
  text-align: center;
  margin-bottom: 8px;
}
.step-mascot {
  width: 90px;
  height: 90px;
  margin-bottom: 12px;
  animation: bounceSlow 3s infinite ease-in-out;
}
.step-hero h3 {
  font-size: 20px;
  font-weight: 950;
  color: var(--ink);
  line-height: 1.2;
}
.step-hero p {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  margin-top: 4px;
}

/* Option Pill Cards */
.pill-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 290px;
  overflow-y: auto;
  padding: 4px;
}

.pill-card {
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  background: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.pill-desc {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.1;
  text-align: center;
}
.pill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 127, 172, 0.1);
  border-color: rgba(255, 127, 172, 0.3);
  background: #fffcfd;
}
.pill-card.selected {
  background: linear-gradient(135deg, #fffcf3, #ffeef3);
  border-color: #ff7fac;
  box-shadow: 0 4px 12px rgba(255, 127, 172, 0.15);
  transform: translateY(0);
}

/* Navigation Row */
.step-navigation {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}
.step-navigation button,
.next-step-btn {
  flex: 1;
  min-height: 48px;
  border-radius: var(--radius);
  font-weight: 950;
  font-size: 14px;
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}
.next-step-btn,
.submit-step-btn {
  background: linear-gradient(135deg, #ff7fac, #ffbd54);
}
.prev-step-btn {
  background: #ffffff;
  color: var(--ink);
  flex-grow: 0 !important;
  width: 80px;
}
.step-navigation button:active,
.next-step-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}

/* Onboarding Loading State */
.onboarding-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
}
.loading-spinner-container {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-mascot {
  width: 66px;
  height: 66px;
  z-index: 2;
  animation: pulseSlow 1.5s infinite ease-in-out;
}
.orbiting-circle {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.orbiting-circle.circle-1 {
  width: 96px;
  height: 96px;
  border-style: dashed;
  animation: rotateClockwise 8s linear infinite;
}
.orbiting-circle.circle-2 {
  width: 116px;
  height: 116px;
  border-style: dotted;
  animation: rotateCounterClockwise 12s linear infinite;
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rotateCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulseSlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.quiz-form {
  display: grid;
  gap: 9px;
}

.quiz-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quiz-form input,
.quiz-form select {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(34, 36, 47, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
}

.quiz-form button {
  min-height: 50px;
  margin-top: 4px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ff9fc0, #ffbd76);
  box-shadow: var(--small-shadow);
  font-weight: 950;
}

.topbar,
.chat-header,
.modal-head,
.native-strip,
.voice-premium {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px 0 10px;
  background: linear-gradient(180deg, rgba(123, 200, 255, 0.92) 72%, rgba(123, 200, 255, 0));
  backdrop-filter: blur(14px);
}

.brand-lockup {
  min-width: 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.08;
}

.icon-btn,
.pass-btn,
.small-btn,
.composer button,
.mode-card,
.unlock-card,
.price-card,
.voice-premium,
.quiz-form button,
.voice-actions button,
.starter-row button {
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.icon-btn:active,
.pass-btn:active,
.small-btn:active,
.composer button:active,
.mode-card:active,
.unlock-card:active,
.price-card:active,
.voice-premium:active,
.quiz-form button:active,
.voice-actions button:active,
.starter-row button:active {
  transform: scale(0.97) translateY(1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.icon-btn,
.pass-btn {
  display: grid;
  place-items: center;
  height: 42px;
  flex: 0 0 auto;
  padding: 0 13px;
  font-weight: 950;
}

.icon-btn {
  width: 42px;
  padding: 0;
}

.avatar-dot span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0 18%, transparent 19%),
    linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: inset -4px -5px 8px rgba(22, 35, 65, 0.13);
}

.pass-btn {
  background: linear-gradient(135deg, #fff4a8, #ffb3c8);
}

.hero-panel,
.chat-panel,
.native-strip,
.usage-strip {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 168px;
  padding: 12px;
  background:
    radial-gradient(ellipse at 14% 88%, rgba(255, 255, 255, 0.9) 0 14%, transparent 31%),
    radial-gradient(ellipse at 92% 82%, rgba(255, 255, 255, 0.72) 0 10%, transparent 25%),
    linear-gradient(145deg, rgba(174, 226, 255, 0.95), rgba(229, 247, 255, 0.82));
}

.mascot-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #ffffff;
  border: 3.5px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  overflow: hidden;
}

.mascot-stage::after {
  content: "";
  position: absolute;
  inset: auto 22px 14px;
  height: 16px;
  border-radius: 50%;
  background: rgba(30, 41, 70, 0.18);
  filter: blur(4px);
}

.mascot-stage img {
  position: relative;
  z-index: 1;
  width: 90%;
  height: 90%;
  object-fit: contain;
  animation: floaty 3.6s ease-in-out infinite;
}

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

.speech-bubble {
  position: relative;
  min-height: 116px;
  padding: 14px;
  border-radius: var(--radius);
  background: #fffcee;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.03);
  color: #252839;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.speech-bubble::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50px;
  width: 16px;
  height: 16px;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fffcee;
  transform: rotate(45deg);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.stat-tile {
  min-width: 0;
  min-height: 70px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.83);
  box-shadow: var(--small-shadow);
}

.stat-tile:nth-child(1) {
  background: linear-gradient(145deg, #fff5ba, #ffffff);
}

.stat-tile:nth-child(2) {
  background: linear-gradient(145deg, #c7f6dd, #ffffff);
}

.stat-tile:nth-child(3) {
  background: linear-gradient(145deg, #d8ccff, #ffffff);
}

.stat-label,
.unlock-card span,
.price-card span,
.mode-card small,
.native-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.stat-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
}

.usage-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff4a8, #dff5ff 48%, #ffd1df);
}

.usage-pill {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 12px;
  background: transparent;
}

.usage-pill + .usage-pill {
  border-left: 1px solid rgba(35, 38, 56, 0.16);
}

.usage-strip span,
.usage-strip strong {
  display: inline;
}

.usage-strip span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
}

.usage-strip strong {
  font-size: 13px;
  line-height: 1;
}

.attach-modal {
  width: min(calc(100% - 42px), 330px);
  padding: 12px;
  border: 0;
  border-radius: 22px;
  background: #fffaf0;
  box-shadow: var(--shadow);
}

.attach-modal::backdrop {
  background: rgba(34, 36, 47, 0.34);
  backdrop-filter: blur(3px);
}

.attach-modal button {
  width: 100%;
  min-height: 46px;
  margin: 6px 0;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff7fac, #ffbd54);
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 4px 10px rgba(255, 127, 172, 0.25);
}

.attach-modal button:last-child {
  background: #ffffff;
  color: var(--muted);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.mode-card {
  min-height: 76px;
  padding: 11px;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mode-card:nth-child(1) {
  background: linear-gradient(145deg, #ffffff, #dff4ff);
}

.mode-card:nth-child(2) {
  background: linear-gradient(145deg, #ffffff, #ffe0ea);
}

.mode-card:nth-child(3) {
  background: linear-gradient(145deg, #ffffff, #fff0b6);
}

.mode-card:nth-child(4) {
  background: linear-gradient(145deg, #ffffff, #ddffe9);
}

.mode-card span {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 950;
}

.mode-card.active {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(34, 36, 47, 0.18);
  outline: 3px solid rgba(34, 36, 47, 0.09);
}

.chat-panel {
  margin-top: 12px;
  padding: 12px;
  background: 
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M10 20l5-5 3 3-5 5-3-3z' stroke='rgba(0,0,0,0.04)' stroke-width='1.5' fill='none'/><rect x='40' y='10' width='12' height='16' rx='1' stroke='rgba(0,0,0,0.04)' stroke-width='1.5' fill='none'/><path d='M80 20l2 2 2-2-2-2z' fill='rgba(0,0,0,0.04)'/><path d='M15 70l6-10 6 10h-12z' stroke='rgba(0,0,0,0.04)' stroke-width='1.5' fill='none'/><circle cx='80' cy='70' r='6' stroke='rgba(0,0,0,0.04)' stroke-width='1.5' fill='none'/><path d='M78 76h4' stroke='rgba(0,0,0,0.04)' stroke-width='1.5'/><path d='M45 50l1 2 2 1-2 1-1 2-1-2-2-1 2-1z' fill='rgba(0,0,0,0.04)'/></svg>") repeat,
    linear-gradient(180deg, rgba(174, 226, 255, 0.95), rgba(234, 248, 255, 0.98));
}

.app-shell.circle-mode .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='112' height='112' viewBox='0 0 112 112'><path d='M18 24h18M18 34h30M70 22l9 9 15-18M22 78l12-18 12 18h-24zM74 78h24M74 88h16' stroke='rgba(34,36,47,0.055)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>") repeat,
    linear-gradient(180deg, rgba(209, 255, 229, 0.98), rgba(255, 247, 181, 0.96));
}

.app-shell.circle-mode .messages {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12));
  border-radius: 14px;
  padding: 10px 8px 12px;
}

.app-shell.theme-green-garden .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='116' height='116' viewBox='0 0 116 116'><path d='M18 82c24-16 42-16 80 0M28 52c16-18 38-20 58-2M30 82c7-20 20-34 38-42' stroke='rgba(24,113,74,0.07)' stroke-width='5' fill='none' stroke-linecap='round'/><path d='M78 36c14-12 26-8 28 6-14 8-24 8-28-6zM18 42c10-12 22-11 27 1-10 8-20 8-27-1z' fill='rgba(24,113,74,0.07)'/></svg>") repeat,
    linear-gradient(180deg, rgba(206, 255, 226, 0.98), rgba(196, 237, 255, 0.96));
}

.app-shell.theme-ocean-adventure .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><path d='M6 72c12-9 22-9 34 0s22 9 34 0 22-9 40 0M18 92c10-7 18-7 28 0s18 7 28 0 18-7 28 0M64 24l22 14-22 14-22-14z' stroke='rgba(12,113,178,0.075)' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(193, 241, 255, 0.98), rgba(167, 230, 230, 0.96));
}

.app-shell.theme-cloud-city .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128'><path d='M20 80h78a16 16 0 0 0-16-16 24 24 0 0 0-45-10 19 19 0 0 0-17 26zM76 28c8 8 8 20 0 28-8-8-8-20 0-28zM34 30l4 7 8 3-8 3-4 7-4-7-8-3 8-3z' fill='rgba(210,104,145,0.075)'/></svg>") repeat,
    linear-gradient(180deg, rgba(255, 221, 197, 0.98), rgba(255, 205, 234, 0.96));
}

.app-shell.theme-magic-library .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='118' height='118' viewBox='0 0 118 118'><path d='M24 28h26v52H24zM52 28h42v52H52zM32 40h10M32 52h10M62 42h22M62 56h18M90 22l3 7 7 3-7 3-3 7-3-7-7-3 7-3z' stroke='rgba(102,61,161,0.075)' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(235, 221, 255, 0.98), rgba(255, 236, 207, 0.96));
}

.app-shell.theme-peak-ascent .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='124' height='124' viewBox='0 0 124 124'><path d='M10 94l30-48 18 28 22-38 34 58H10zM40 46l8 20 10 8M80 36l12 26 10 10' stroke='rgba(44,111,160,0.075)' stroke-width='5' fill='none' stroke-linejoin='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(220, 241, 255, 0.98), rgba(240, 247, 255, 0.97));
}

.app-shell.theme-desert-quest .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='126' height='126' viewBox='0 0 126 126'><path d='M10 90c24-12 42-12 60 0s32 12 48 0M34 70V38m0 16H20m14-4h14M84 78V42m0 18H70m14-6h14' stroke='rgba(177,89,26,0.08)' stroke-width='5' fill='none' stroke-linecap='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(255, 230, 174, 0.98), rgba(255, 197, 149, 0.96));
}

.app-shell.theme-future-metro .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='124' height='124' viewBox='0 0 124 124'><path d='M20 86V46h20v40M52 86V26h22v60M86 86V38h18v48M14 86h96M22 58h12M56 40h14M56 56h14M90 52h10' stroke='rgba(46,91,196,0.07)' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(218, 228, 255, 0.98), rgba(255, 209, 232, 0.96));
}

.app-shell.theme-galaxy-quest .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='126' height='126' viewBox='0 0 126 126'><path d='M28 28l3 7 7 3-7 3-3 7-3-7-7-3 7-3zM90 18l2 5 5 2-5 2-2 5-2-5-5-2 5-2zM74 82c18-8 30-6 36 4-12 12-28 12-44 0-14-10-28-10-44 0' stroke='rgba(255,255,255,0.12)' stroke-width='4' fill='none' stroke-linecap='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(55, 61, 147, 0.96), rgba(131, 92, 194, 0.94));
}

.app-shell.theme-aurora-nights .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='126' height='126' viewBox='0 0 126 126'><path d='M8 96l28-42 18 26 20-34 44 50H8zM16 30c18-16 38-14 56 6s32 20 44 4' stroke='rgba(255,255,255,0.14)' stroke-width='5' fill='none' stroke-linecap='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(86, 226, 196, 0.92), rgba(87, 106, 199, 0.94));
}

.app-shell.theme-sakura-mountain .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='126' height='126' viewBox='0 0 126 126'><path d='M10 94l32-44 22 28 22-38 30 54H10zM28 34c6-8 16-8 22 0-6 8-16 8-22 0zM82 28c6-8 16-8 22 0-6 8-16 8-22 0z' stroke='rgba(174,74,126,0.075)' stroke-width='4' fill='none' stroke-linejoin='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(255, 220, 235, 0.98), rgba(214, 238, 255, 0.96));
}

.app-shell.theme-monsoon-window .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='118' height='118' viewBox='0 0 118 118'><path d='M26 24h66v50H26zM59 24v50M26 49h66M30 92h58M38 86c-4-18 38-18 42 0M20 16l-6 16M106 20l-6 16M96 82l-5 13' stroke='rgba(28,98,131,0.075)' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(207, 234, 240, 0.98), rgba(236, 229, 255, 0.96));
}

.app-shell.theme-sunrise-campus .chat-panel {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='124' height='124' viewBox='0 0 124 124'><path d='M18 88h88M28 88V48h68v40M42 88V62h16v26M66 88V62h16v26M22 48h80L62 24zM18 30c8-10 18-10 26 0' stroke='rgba(186,98,31,0.075)' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") repeat,
    linear-gradient(180deg, rgba(255, 222, 180, 0.98), rgba(255, 240, 172, 0.96));
}

.voice-premium {
  width: 100%;
  min-height: 70px;
  margin-top: 10px;
  padding: 10px;
  text-align: left;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.82), transparent 24%),
    linear-gradient(135deg, #fff2a8 0%, #ff9fc0 52%, #bba5ff 100%);
}

.voice-premium strong,
.voice-premium small {
  display: block;
}

.voice-premium strong {
  font-size: 17px;
  line-height: 1.05;
}

.voice-premium small {
  margin-top: 4px;
  color: rgba(34, 36, 47, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.voice-premium b {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.voice-mascot-mini {
  position: relative;
  flex: 0 0 45px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 36%, #22242f 0 5%, transparent 6%),
    radial-gradient(circle at 62% 36%, #22242f 0 5%, transparent 6%),
    radial-gradient(circle at 50% 60%, #ff7fac 0 6%, transparent 7%),
    linear-gradient(135deg, #ffffff, #dff5ff);
  box-shadow: inset -4px -5px 8px rgba(22, 35, 65, 0.13);
}

.voice-stage {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dff5ff, #fff4cc);
}

.voice-stage img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #7bc8ff, #fff4cc);
}

.voice-stage p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.voice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.voice-actions button {
  min-height: 48px;
  border-radius: var(--radius);
  font-weight: 950;
  box-shadow: var(--small-shadow);
}

.voice-actions button:first-child {
  background: linear-gradient(135deg, #ffffff, #dff5ff);
}

.voice-actions button:last-child {
  background: linear-gradient(135deg, #ff9fc0, #ffbd76);
}

.voice-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.voice-picker button {
  min-height: 58px;
  padding: 9px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--small-shadow);
  text-align: left;
}

.voice-picker button.active {
  outline: 3px solid rgba(255, 127, 172, 0.5);
  background: linear-gradient(135deg, #fff4a8, #ffffff);
}

.voice-picker strong,
.voice-picker span {
  display: block;
}

.voice-picker strong {
  font-size: 14px;
  line-height: 1.05;
}

.voice-picker span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.chat-header {
  margin-bottom: 10px;
}

.chat-header-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
}

.small-btn {
  min-width: 64px;
  min-height: 38px;
  padding: 0 10px;
  background: linear-gradient(135deg, #ffffff, #e4f8ff);
  font-weight: 950;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: min(55vh, 520px);
  min-height: 200px;
  padding: 8px 2px 12px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.message-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 78%;
  width: fit-content;
}

.message-wrapper.user {
  align-self: flex-end;
  margin-left: auto;
  flex-direction: row-reverse;
}

.message-wrapper.ai,
.message-wrapper.peer {
  align-self: flex-start;
  margin-right: auto;
  flex-direction: row;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink);
  object-fit: cover;
  flex-shrink: 0;
  background: #ffffff;
}

.chat-avatar.peer-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
  border-radius: 50%;
}

.message {
  width: auto;
  padding: 11px 12px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.message.user {
  background: #ffb6cf;
}

.message.ai {
  background: #fff3aa;
}

.academic-ai-disclaimer {
  margin-top: 10px;
  color: #d91f2b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.message.system {
  align-self: center;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.message.notification-message {
  align-self: stretch;
  background: linear-gradient(135deg, #fff8c8, #dcf5ff);
  color: var(--ink);
  border: 2px solid rgba(34, 36, 47, 0.5);
  box-shadow: 0 3px 0 rgba(34, 36, 47, 0.2);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  white-space: pre-line;
}

.notification-chat-panel {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 244, 168, 0.78), transparent 28%),
    radial-gradient(circle at 92% 22%, rgba(191, 239, 216, 0.74), transparent 30%),
    linear-gradient(180deg, rgba(255, 249, 218, 0.98), rgba(218, 244, 255, 0.96));
}

.composer-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.unlock-more-panel {
  margin: 10px 14px 14px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff4a8, #ffd1df);
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 850;
}

.unlock-more-panel strong,
.unlock-more-panel span {
  display: block;
}

.unlock-more-panel span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.unlock-more-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.unlock-more-actions button {
  min-height: 38px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 0 var(--ink);
  font-weight: 950;
  color: var(--ink);
}

.message.typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  width: auto;
  padding: 13px 14px;
  background: #ffffff;
}

.message.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8a92a5;
  animation: typingPulse 1s ease-in-out infinite;
}

.message.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.message.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.starter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 4px 0 8px;
}

.starter-row button {
  min-height: 34px;
  padding: 6px 7px;
  border-radius: var(--radius);
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  box-shadow: var(--small-shadow);
}

@keyframes typingPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 0;
  width: 100%;
}

.composer input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}
.composer input:focus {
  border-color: #ff7fac;
  box-shadow: 0 0 0 3px rgba(255, 127, 172, 0.15);
  outline: none;
}

.composer button {
  min-height: 48px;
  background: linear-gradient(135deg, #ff7fac, #ffbd54);
  box-shadow: 0 4px 10px rgba(255, 127, 172, 0.25);
  font-weight: 950;
  border-radius: 24px;
  border: none;
}

.composer button[type="submit"] {
  width: 80px;
  flex-shrink: 0;
}

.composer.is-thinking {
  opacity: 0.72;
}

.unlock-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.unlock-card,
.price-card {
  min-height: 72px;
  padding: 11px;
  text-align: left;
}

.unlock-card {
  background: linear-gradient(145deg, #ffffff, #edf8ff);
}

.unlock-card strong,
.price-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 1;
}

.unlock-card.primary {
  background: linear-gradient(135deg, #bba5ff, #ffd1df);
}

.native-strip {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.native-strip strong {
  display: block;
  font-size: 14px;
}

.native-strip span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(154, 240, 195, 0.72);
  color: #1b5a41;
}

.modal {
  width: min(calc(100% - 24px), 430px);
  padding: 14px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 216, 77, 0.35), transparent 30%),
    #fffaf0;
}

.modal::backdrop {
  background: rgba(34, 36, 47, 0.36);
  backdrop-filter: blur(3px);
}

.close-btn {
  background: #ffffff;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.payment-note {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(31, 34, 49, 0.72);
}

.auto-renew-panel {
  margin-top: 12px;
  padding: 10px;
  border: 2px dashed rgba(34, 36, 47, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.auto-renew-panel strong,
.auto-renew-panel span {
  display: block;
}

.auto-renew-panel strong {
  font-size: 13px;
}

.auto-renew-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}

.auto-renew-panel div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.auto-renew-panel button {
  min-height: 36px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 0 var(--ink);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 950;
}

.worlds-modal {
  width: min(calc(100% - 20px), 460px);
}

.worlds-summary {
  margin-top: 10px;
  padding: 9px 11px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  color: var(--ink);
}

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding-right: 2px;
}

.world-card {
  min-width: 0;
  overflow: hidden;
  border: 2px solid rgba(34, 36, 47, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 4px 0 rgba(34, 36, 47, 0.16);
}

.world-card.active {
  border-color: var(--ink);
  box-shadow: 0 5px 0 var(--ink);
}

.world-card.locked {
  filter: saturate(0.55);
  opacity: 0.72;
}

.world-preview {
  position: relative;
  min-height: 84px;
  border-bottom: 2px solid rgba(34, 36, 47, 0.12);
  overflow: hidden;
}

.world-step {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 10px;
  font-weight: 950;
  z-index: 3;
}

.world-preview::before,
.world-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.world-preview::after {
  opacity: 0.92;
}

.world-path {
  position: absolute;
  left: 17%;
  right: 16%;
  bottom: 13px;
  z-index: 2;
  height: 34px;
  background:
    radial-gradient(circle at 8% 84%, rgba(255,255,255,0.96) 0 8px, rgba(34,36,47,0.12) 8.5px 10px, transparent 10.5px),
    radial-gradient(circle at 37% 58%, rgba(255,255,255,0.96) 0 8px, rgba(34,36,47,0.12) 8.5px 10px, transparent 10.5px),
    radial-gradient(circle at 68% 36%, rgba(255,255,255,0.96) 0 8px, rgba(34,36,47,0.12) 8.5px 10px, transparent 10.5px);
}

.world-path::after {
  content: "";
  position: absolute;
  left: 11%;
  right: 20%;
  top: 16px;
  border-top: 2px dashed rgba(255, 255, 255, 0.9);
  transform: rotate(-14deg);
}

.world-chest {
  position: absolute;
  right: 13px;
  bottom: 18px;
  z-index: 3;
  width: 28px;
  height: 22px;
  border-radius: 7px 7px 5px 5px;
  background:
    linear-gradient(90deg, transparent 44%, rgba(255,245,166,0.9) 45% 56%, transparent 57%),
    linear-gradient(180deg, #ffd960 0 38%, #ad6b28 39% 100%);
  border: 2px solid rgba(91, 57, 33, 0.62);
  box-shadow: 0 4px 10px rgba(34, 36, 47, 0.18);
}

.world-copy {
  padding: 8px 9px 9px;
}

.world-copy strong,
.world-copy span {
  display: block;
}

.world-copy strong {
  font-size: 12px;
  line-height: 1.05;
}

.world-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
}

.world-green-garden .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><path d='M0 72c28-24 58-26 91-7 25 14 48 12 72-4 24-15 42-13 57 1v54H0z' fill='%2391d88a'/><path d='M0 84c37-12 74-10 111 4 35 13 72 11 109-4v32H0z' fill='%236fcf97'/><path d='M120 68c2-28 22-42 46-34 19 7 28 25 20 42-22 7-43 5-66-8z' fill='%234ba95e'/><path d='M150 70V38' stroke='%2364462d' stroke-width='9' stroke-linecap='round'/><path d='M28 43c12-22 34-26 56-10' stroke='rgba(255,255,255,0.62)' stroke-width='8' stroke-linecap='round'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #ceffe2, #c4edff);
}

.world-ocean-adventure .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><path d='M0 56c36-15 58-13 88 0s61 15 132-2v62H0z' fill='%234cc6df'/><path d='M0 82c37-13 72-13 105 0s68 13 115 0v34H0z' fill='%232aa7d8'/><path d='M28 84l28-28 30 28zM133 78l24-28 26 28z' fill='%2382e3bc'/><path d='M142 36h30l-14-18z' fill='%23ffffff'/><path d='M155 18v48' stroke='%23ffffff' stroke-width='3'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #c1f1ff, #a7e6e6);
}

.world-cloud-city .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><path d='M0 72h220v44H0z' fill='%23fff4f5'/><path d='M18 80c8-22 35-28 51-9 12-27 55-27 68 1 23-12 51 0 60 26H18z' fill='%23ffffff'/><path d='M70 78h34V40H70zM116 78h42V28h-42z' fill='%23d6b3ff'/><path d='M79 40l8-18 8 18M126 28l11-20 11 20' fill='%239e70ea'/><circle cx='50' cy='33' r='13' fill='%23ff96b8'/><path d='M50 46v22' stroke='%23ffffff' stroke-width='3'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #ffddc5, #ffcdea);
}

.world-magic-library .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><path d='M0 0h220v116H0z' fill='%238a56b7'/><path d='M20 30h44v74H20zM72 22h50v82H72zM132 34h62v70h-62z' fill='%23683a91'/><path d='M32 42h20M32 58h20M84 38h24M84 54h24M146 48h34M146 66h34' stroke='%23ffd77a' stroke-width='5' stroke-linecap='round'/><path d='M164 16l4 8 9 4-9 4-4 8-4-8-9-4 9-4zM52 18l3 6 6 3-6 3-3 6-3-6-6-3 6-3z' fill='%23f9e1ff'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #ebddff, #ffecd0);
}

.world-peak-ascent .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><path d='M0 68l46-50 34 38 32-48 58 70 20-22 30 40v20H0z' fill='%2389bde8'/><path d='M46 18l16 18-24 2zM112 8l18 22-28 4zM170 78l9-10 14 18z' fill='%23ffffff'/><path d='M0 86c44-18 92-16 140 6 25 11 52 12 80 0v24H0z' fill='%23dff5ff'/><path d='M26 96l8-18 8 18M62 99l8-17 8 17' stroke='%2350a56b' stroke-width='5' stroke-linecap='round'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #dcf1ff, #f0f7ff);
}

.world-desert-quest .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><circle cx='164' cy='28' r='20' fill='%23ffd16c'/><path d='M0 74c28-18 55-22 84-10s57 11 85-8c21-14 37-12 51 4v56H0z' fill='%23d9914d'/><path d='M0 88c36-12 78-11 126 3 31 9 62 9 94-2v27H0z' fill='%23f0b067'/><path d='M42 70V38m0 16H25m17-2h18M148 76V44m0 16h-16m16-2h18' stroke='%2379a655' stroke-width='8' stroke-linecap='round'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #ffe6ae, #ffc595);
}

.world-future-metro .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><path d='M0 86h220v30H0z' fill='%23849aea'/><path d='M28 86V42h26v44M70 86V20h36v66M122 86V36h24v50M162 86V28h36v58' fill='%23835cc2'/><path d='M36 54h10M36 68h10M80 36h16M80 52h16M130 50h8M170 42h16M170 58h16' stroke='%236ff3ff' stroke-width='4' stroke-linecap='round'/><path d='M38 92c38-12 79-12 122 0' stroke='%23ffd1e8' stroke-width='6' fill='none'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #dae4ff, #ffd1e8);
}

.world-galaxy-quest .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><rect width='220' height='116' fill='%23272e78'/><circle cx='64' cy='46' r='22' fill='%23e17fff'/><ellipse cx='64' cy='46' rx='34' ry='8' fill='none' stroke='%23ffc1ff' stroke-width='4' transform='rotate(-16 64 46)'/><circle cx='160' cy='34' r='16' fill='%23ffb36b'/><circle cx='126' cy='74' r='8' fill='%237ee8ff'/><path d='M28 22l3 7 7 3-7 3-3 7-3-7-7-3 7-3zM182 74l4 9 9 4-9 4-4 9-4-9-9-4 9-4z' fill='%23ffffff'/><path d='M20 96c40-26 80-32 130-20 20 5 43 3 70-8v48H20z' fill='%23523fa5'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #373d93, #835cc2);
}

.world-aurora-nights .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><rect width='220' height='116' fill='%232b417d'/><path d='M0 34c36-28 65-28 98 0s70 25 122-16v34c-42 26-77 25-105-2S56 24 0 62z' fill='%2354f0ba' opacity='0.8'/><path d='M0 70l38-38 28 34 32-46 44 52 22-28 56 54v18H0z' fill='%23c9e8ff'/><path d='M0 92c44-12 92-10 144 6 25 8 50 7 76-3v21H0z' fill='%237ab6dd'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #56e2c4, #576ac7);
}

.world-sakura-mountain .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><path d='M0 76l44-52 30 42 40-50 48 58 28-28 30 40v30H0z' fill='%239ec7e8'/><path d='M44 24l13 18-23 2zM114 16l17 20-28 4z' fill='%23ffffff'/><path d='M26 76c18-30 52-34 80-8 24-20 58-18 88 4v44H26z' fill='%23ffb4ce'/><path d='M40 58c7-13 20-13 28 0-10 8-19 8-28 0zM150 50c7-13 20-13 28 0-10 8-19 8-28 0z' fill='%23ffe9f3'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #ffdceb, #d6eeff);
}

.world-monsoon-window .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><rect width='220' height='116' fill='%23b8dce8'/><path d='M28 20h164v64H28z' fill='%23f7fbff' opacity='0.62'/><path d='M110 20v64M28 52h164' stroke='%237ea8bd' stroke-width='5'/><path d='M44 12l-8 22M86 8l-8 22M142 12l-8 22M186 8l-8 22' stroke='%236c92ad' stroke-width='4' stroke-linecap='round'/><path d='M62 98c8-24 88-24 96 0z' fill='%23d19869'/><path d='M84 82h52v16H84z' fill='%23fff0b8'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #cfeaf0, #ece5ff);
}

.world-sunrise-campus .world-preview {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='116' viewBox='0 0 220 116'><circle cx='168' cy='30' r='24' fill='%23ffb45d'/><path d='M0 78c44-18 88-18 132 0 29 12 58 12 88 0v38H0z' fill='%23ffd47a'/><path d='M34 86V52h124v34M52 86V64h22v22M86 86V64h22v22M122 86V64h22v22M28 52h136L96 24z' fill='%23ffffff' opacity='0.8'/><path d='M28 52h136L96 24zM34 86V52h124v34' stroke='%23c5753c' stroke-width='5' fill='none' stroke-linejoin='round'/></svg>") center/cover no-repeat,
    linear-gradient(160deg, #ffdeb4, #fff0ac);
}

.price-card:nth-child(1) {
  background: linear-gradient(145deg, #fff4a8, #ffffff);
}

.price-card:nth-child(2) {
  background: linear-gradient(145deg, #bff7da, #ffffff);
}

.price-card:nth-child(3) {
  background: linear-gradient(145deg, #bfe8ff, #ffffff);
}

@media (max-width: 370px) {
  .starter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .speech-bubble::before {
    display: none;
  }

  .mascot-stage {
    max-width: 154px;
    margin: 0 auto;
  }
}

.mascot-pop {
  animation: popBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popBounce {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

/* Mode Toggles */
.mode-toggle-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 8px;
}
.toggle-btn {
  flex: 1;
  height: 40px;
  font-size: 13px;
  font-weight: 900;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: #ffffff;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.toggle-btn.active {
  background: linear-gradient(135deg, #ffd1df, #ffebd2);
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}
.toggle-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

/* Peer Presence Indicator Row */
.peer-presence-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 0 var(--ink);
  overflow-x: auto;
}
.peer-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 2px 0 var(--ink);
  flex-shrink: 0;
}
.peer-avatar[data-peer="Aman"] { background: var(--blue); }
.peer-avatar[data-peer="Riya"] { background: var(--pink); }
.peer-avatar[data-peer="Priya"] { background: var(--green); }
.peer-avatar[data-peer="Rahul"] { background: var(--purple); }

.neon-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: #9af0c3;
  box-shadow: 0 0 8px #9af0c3;
}
.peer-avatar.offline .neon-indicator {
  background: #c3c7db;
  box-shadow: none;
}
.peer-avatar.typing .neon-indicator {
  background: #ffbd76;
  box-shadow: 0 0 8px #ffbd76;
  animation: typingPulseStatus 0.8s infinite alternate;
}
@keyframes typingPulseStatus {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

.circle-status-text {
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Image Attachment Composer Styles */
.composer-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.camera-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: #ffffff;
  box-shadow: 0 4px 0 var(--ink);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  flex-shrink: 0;
}
.camera-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}
.gallery-btn {
  background: var(--surface, #f0f4ff);
  border-color: var(--ink);
}
.gallery-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.image-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  margin-bottom: 8px;
  position: relative;
}
.preview-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--ink);
}
.remove-preview-btn {
  position: absolute;
  top: -6px;
  left: 48px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff7fac;
  color: #ffffff;
  border: 1px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Message sharing controls */
.message-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  justify-content: flex-end;
}
.action-link {
  font-size: 11px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}
.action-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--ink);
}

.message.user .action-link {
  background: #ffffff;
}

/* Simulated peer message bubbles */
.message.peer-aman {
  align-self: flex-start;
  background: #dff5ff;
  border-left: 6px solid var(--blue);
}
.message.peer-riya {
  align-self: flex-start;
  background: #ffe0ea;
  border-left: 6px solid var(--pink);
}
.message.peer-priya {
  align-self: flex-start;
  background: #ddffe9;
  border-left: 6px solid var(--green);
}
.peer-sender-label {
  display: block;
  font-size: 10px;
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 2px;
}
.message img.sent-image {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  margin-bottom: 6px;
  display: block;
}

/* Circle Group Manager dropdown styling */
.circle-group-manager {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 8px;
  align-items: center;
  width: 100%;
}
.group-select {
  flex-grow: 1;
  height: 40px;
  font-size: 13px;
  font-weight: 900;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: #ffffff;
  padding: 0 10px;
  box-shadow: 0 4px 0 var(--ink);
  outline: none;
  cursor: pointer;
}
.group-select:focus {
  border-color: var(--pink);
}

/* History Drawer & Message Time */
.history-drawer.active {
  left: 0 !important;
}
.drawer-overlay.active {
  display: block !important;
  opacity: 1 !important;
}
.history-date-label {
  font-size: 10px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 4px 2px;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
  transition: background 0.15s, transform 0.1s;
}
.history-item-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-rename {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 3px;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 4px;
  line-height: 1;
}
.history-item:hover .history-item-rename {
  opacity: 1;
}
.history-rename-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 800;
  background: #fff;
  outline: none;
  color: var(--ink);
}
.history-item:hover {
  background: #fffcf3;
  transform: translateY(-1px);
}
.history-item.active {
  background: #ffeef2;
  border-color: #ff7fac;
  box-shadow: 0 2px 0 #ff7fac;
}
.message-time {
  font-size: 9px;
  color: var(--muted);
  display: block;
  text-align: right;
  margin-top: 4px;
  font-weight: bold;
}

/* Soothing and Jovial Onboarding Overrides */
.onboarding {
  background: 
    radial-gradient(circle at 10% 20%, rgba(191, 239, 216, 0.45), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(233, 221, 255, 0.45), transparent 45%),
    linear-gradient(135deg, #FFF4D8 0%, #CFEFFF 50%, #FFD8EC 100%) !important;
}

#authScreen {
  background: 
    radial-gradient(circle at 10% 15%, rgba(255, 212, 190, 0.92), transparent 45%),   /* Peach */
    radial-gradient(circle at 85% 20%, rgba(191, 239, 216, 0.92), transparent 45%),   /* Pista */
    radial-gradient(circle at 15% 80%, rgba(233, 221, 255, 0.95), transparent 45%),   /* Purple */
    radial-gradient(circle at 85% 75%, rgba(255, 245, 175, 0.95), transparent 45%),   /* Yellow */
    radial-gradient(circle at 50% 45%, rgba(255, 127, 172, 0.8), transparent 45%),    /* Vibrant Red/Pink */
    linear-gradient(135deg, #FFF4D8 0%, #FFFFFF 100%) !important;
  border: 3px solid var(--ink) !important;
  box-shadow: 0 10px 0 var(--ink) !important;
  border-radius: 24px !important;
}

#authScreen h2 {
  font-family: 'Outfit', 'Inter', sans-serif !important;
  color: #5B3CC4 !important; /* Royal Purple heading */
}

#authScreen input {
  border: 2.5px solid var(--ink) !important;
  box-shadow: 0 3px 0 var(--ink) !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  transition: all 0.1s ease !important;
}

#authScreen input:focus {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 0 var(--ink) !important;
  border-color: #5B3CC4 !important;
}

#authScreen button {
  border: 2.5px solid var(--ink) !important;
  box-shadow: 0 3px 0 var(--ink) !important;
  border-radius: 12px !important;
  transition: all 0.1s ease !important;
}

#authScreen button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 0 var(--ink) !important;
}

#authScreen button:active {
  transform: translateY(1.5px) !important;
  box-shadow: 0 1.5px 0 var(--ink) !important;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.legal-links a {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-decoration: underline;
}

#emailSignInBtn {
  background: #BFEFD8 !important; /* Mint Pistachio */
  color: #5B3CC4 !important; /* Royal Purple text */
}

#emailSignUpBtn {
  background: #FFD8EC !important; /* Cotton Candy Pink */
  color: #0E8A82 !important; /* Teal text */
}
