* {
  box-sizing: border-box;
}

:root {
  --font-heading: "Playfair Display", "Georgia", serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 20% 20%, rgba(153, 126, 255, 0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(110, 210, 255, 0.12), transparent 30%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.55) 0px,
      rgba(255, 255, 255, 0.55) 8px,
      rgba(245, 241, 255, 0.55) 8px,
      rgba(245, 241, 255, 0.55) 16px
    ),
    linear-gradient(180deg, #f3efff 0%, #fffefe 100%);
  color: #2c2454;
  transition: background 0.35s ease;
}

body.mood-happy {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 215, 136, 0.22), transparent 38%),
    radial-gradient(circle at 80% 10%, rgba(255, 155, 180, 0.2), transparent 36%),
    linear-gradient(180deg, #fff8e8 0%, #fff2f6 100%);
}

body.mood-stressed,
body.mood-anxious,
body.mood-overwhelmed {
  background:
    radial-gradient(circle at 20% 20%, rgba(129, 122, 255, 0.18), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(110, 210, 255, 0.15), transparent 36%),
    linear-gradient(180deg, #edf0ff 0%, #f9fbff 100%);
}

body.mood-lonely,
body.mood-numb {
  background:
    radial-gradient(circle at 18% 24%, rgba(164, 146, 255, 0.16), transparent 38%),
    radial-gradient(circle at 78% 14%, rgba(203, 188, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #f1efff 0%, #fbfaff 100%);
}

body.wallpaper-default {
  background:
    radial-gradient(circle at 20% 20%, rgba(153, 126, 255, 0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(110, 210, 255, 0.12), transparent 30%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.55) 0px,
      rgba(255, 255, 255, 0.55) 8px,
      rgba(245, 241, 255, 0.55) 8px,
      rgba(245, 241, 255, 0.55) 16px
    ),
    linear-gradient(180deg, #f3efff 0%, #fffefe 100%);
}

body.wallpaper-lavender {
  background:
    radial-gradient(circle at 18% 18%, rgba(186, 160, 255, 0.22), transparent 36%),
    radial-gradient(circle at 82% 12%, rgba(255, 198, 236, 0.18), transparent 34%),
    linear-gradient(180deg, #f2ebff 0%, #fff8fd 100%);
}

body.wallpaper-sunrise {
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 214, 153, 0.28), transparent 36%),
    radial-gradient(circle at 84% 10%, rgba(255, 168, 140, 0.2), transparent 34%),
    linear-gradient(180deg, #fff4e8 0%, #fff8f2 100%);
}

body.wallpaper-ocean {
  background:
    radial-gradient(circle at 20% 18%, rgba(120, 198, 255, 0.24), transparent 36%),
    radial-gradient(circle at 80% 12%, rgba(126, 232, 214, 0.18), transparent 34%),
    linear-gradient(180deg, #edf8ff 0%, #f7fffd 100%);
}

body.wallpaper-forest {
  background:
    radial-gradient(circle at 18% 22%, rgba(146, 214, 164, 0.22), transparent 36%),
    radial-gradient(circle at 82% 12%, rgba(196, 232, 176, 0.18), transparent 34%),
    linear-gradient(180deg, #f0faf2 0%, #fbfef8 100%);
}

body.wallpaper-rose {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 176, 198, 0.24), transparent 36%),
    radial-gradient(circle at 82% 12%, rgba(255, 214, 228, 0.2), transparent 34%),
    linear-gradient(180deg, #fff0f5 0%, #fffafc 100%);
}

body.wallpaper-paws {
  background:
    radial-gradient(ellipse 22px 26px at 14% 28%, rgba(255, 186, 170, 0.24), transparent 72%),
    radial-gradient(circle 7px at 10% 22%, rgba(255, 186, 170, 0.2), transparent 72%),
    radial-gradient(circle 7px at 16% 20%, rgba(255, 186, 170, 0.2), transparent 72%),
    radial-gradient(circle 7px at 12% 32%, rgba(255, 186, 170, 0.2), transparent 72%),
    radial-gradient(ellipse 22px 26px at 78% 18%, rgba(255, 186, 170, 0.22), transparent 72%),
    radial-gradient(circle 7px at 74% 12%, rgba(255, 186, 170, 0.18), transparent 72%),
    radial-gradient(circle 7px at 80% 14%, rgba(255, 186, 170, 0.18), transparent 72%),
    radial-gradient(circle 7px at 76% 22%, rgba(255, 186, 170, 0.18), transparent 72%),
    radial-gradient(ellipse 22px 26px at 48% 72%, rgba(255, 186, 170, 0.2), transparent 72%),
    radial-gradient(circle 7px at 44% 66%, rgba(255, 186, 170, 0.16), transparent 72%),
    radial-gradient(circle 7px at 50% 68%, rgba(255, 186, 170, 0.16), transparent 72%),
    radial-gradient(circle 7px at 46% 76%, rgba(255, 186, 170, 0.16), transparent 72%),
    linear-gradient(180deg, #fff4ee 0%, #fffaf7 100%);
}

body.wallpaper-flowers {
  background:
    radial-gradient(circle at 16% 24%, rgba(255, 198, 214, 0.34) 0%, transparent 14%),
    radial-gradient(circle at 14% 22%, rgba(255, 244, 248, 0.9) 0%, transparent 6%),
    radial-gradient(circle at 72% 16%, rgba(255, 176, 198, 0.3) 0%, transparent 14%),
    radial-gradient(circle at 70% 14%, rgba(255, 244, 248, 0.88) 0%, transparent 6%),
    radial-gradient(circle at 34% 68%, rgba(255, 214, 176, 0.28) 0%, transparent 14%),
    radial-gradient(circle at 32% 66%, rgba(255, 250, 240, 0.88) 0%, transparent 6%),
    radial-gradient(circle at 84% 72%, rgba(214, 186, 255, 0.26) 0%, transparent 14%),
    radial-gradient(circle at 82% 70%, rgba(250, 246, 255, 0.9) 0%, transparent 6%),
    linear-gradient(180deg, #fff5f8 0%, #fffdf9 100%);
}

body.wallpaper-sky {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.82) 0%, transparent 16%),
    radial-gradient(circle at 24% 26%, rgba(255, 255, 255, 0.76) 0%, transparent 12%),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.78) 0%, transparent 18%),
    radial-gradient(circle at 80% 22%, rgba(255, 255, 255, 0.72) 0%, transparent 14%),
    radial-gradient(circle at 52% 62%, rgba(255, 255, 255, 0.7) 0%, transparent 16%),
    linear-gradient(180deg, #d8ecff 0%, #eef7ff 52%, #fffdf8 100%);
}

body.wallpaper-clouds {
  background:
    radial-gradient(circle at 12% 34%, rgba(255, 255, 255, 0.92) 0%, transparent 18%),
    radial-gradient(circle at 20% 32%, rgba(255, 255, 255, 0.86) 0%, transparent 14%),
    radial-gradient(circle at 28% 36%, rgba(255, 255, 255, 0.8) 0%, transparent 12%),
    radial-gradient(circle at 66% 24%, rgba(255, 255, 255, 0.9) 0%, transparent 18%),
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.84) 0%, transparent 14%),
    radial-gradient(circle at 46% 74%, rgba(255, 255, 255, 0.86) 0%, transparent 16%),
    radial-gradient(circle at 54% 72%, rgba(255, 255, 255, 0.8) 0%, transparent 12%),
    linear-gradient(180deg, #cfe6ff 0%, #e8f4ff 58%, #fffdf8 100%);
}

body.wallpaper-bloom {
  background:
    radial-gradient(circle at 20% 26%, rgba(255, 196, 214, 0.34) 0%, transparent 15%),
    radial-gradient(circle at 18% 24%, rgba(255, 244, 248, 0.92) 0%, transparent 6%),
    radial-gradient(circle at 24% 30%, rgba(255, 214, 228, 0.28) 0%, transparent 12%),
    radial-gradient(circle at 76% 20%, rgba(255, 176, 198, 0.3) 0%, transparent 15%),
    radial-gradient(circle at 74% 18%, rgba(255, 244, 248, 0.9) 0%, transparent 6%),
    radial-gradient(circle at 58% 68%, rgba(255, 214, 228, 0.26) 0%, transparent 14%),
    radial-gradient(circle at 56% 66%, rgba(255, 250, 252, 0.9) 0%, transparent 6%),
    linear-gradient(180deg, #fff0f6 0%, #fffafc 100%);
}

.settings-card .subtitle {
  margin-bottom: 18px;
}

.settings-stack {
  display: grid;
  gap: 14px;
}

.settings-section {
  margin: 0;
  padding: 16px;
  border: 1px solid #e8e2ff;
  border-radius: 14px;
  background: #faf8ff;
}

.settings-section h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.settings-section-note {
  margin: 0 0 12px;
  color: #6d6299;
  font-size: 14px;
  line-height: 1.45;
}

.settings-section label:not(.settings-toggle-row) {
  margin-top: 0;
}

.settings-section select {
  margin-top: 8px;
}

.settings-checklist {
  display: grid;
  gap: 8px;
}

.settings-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: #4a4268;
  cursor: pointer;
  font-weight: 500;
}

.settings-toggle-row input[type="checkbox"] {
  width: auto;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  flex: 0 0 auto;
}

.settings-actions {
  background: #fff;
}

.settings-actions .btn {
  margin-top: 0;
}

.settings-status {
  margin: 10px 0 0;
}

.settings-wallpaper-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-wallpaper-option {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.settings-wallpaper-option:has(input:checked) {
  border-color: #8f79e8;
  box-shadow: 0 0 0 2px rgba(143, 121, 232, 0.18);
}

.settings-wallpaper-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-wallpaper-swatch {
  display: block;
  width: 100%;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(47, 39, 96, 0.08);
}

.settings-wallpaper-label {
  font-size: 13px;
  font-weight: 600;
  color: #4a4268;
}

.settings-wallpaper-swatch.settings-wallpaper-default {
  background:
    linear-gradient(135deg, #f3efff 0%, #fffefe 100%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.55) 0px,
      rgba(255, 255, 255, 0.55) 8px,
      rgba(245, 241, 255, 0.55) 8px,
      rgba(245, 241, 255, 0.55) 16px
    );
}

.settings-wallpaper-swatch.settings-wallpaper-lavender {
  background: linear-gradient(135deg, #f2ebff 0%, #fff8fd 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-sunrise {
  background: linear-gradient(135deg, #fff4e8 0%, #fff8f2 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-ocean {
  background: linear-gradient(135deg, #edf8ff 0%, #f7fffd 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-forest {
  background: linear-gradient(135deg, #f0faf2 0%, #fbfef8 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-rose {
  background: linear-gradient(135deg, #fff0f5 0%, #fffafc 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-paws {
  background:
    radial-gradient(ellipse 10px 12px at 24% 42%, rgba(255, 186, 170, 0.45), transparent 72%),
    radial-gradient(circle 4px at 18% 34%, rgba(255, 186, 170, 0.4), transparent 72%),
    radial-gradient(circle 4px at 28% 36%, rgba(255, 186, 170, 0.4), transparent 72%),
    linear-gradient(135deg, #fff4ee 0%, #fffaf7 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-flowers {
  background:
    radial-gradient(circle at 24% 34%, rgba(255, 198, 214, 0.55) 0%, transparent 24%),
    radial-gradient(circle at 72% 28%, rgba(214, 186, 255, 0.45) 0%, transparent 24%),
    linear-gradient(135deg, #fff5f8 0%, #fffdf9 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-sky {
  background:
    radial-gradient(circle at 28% 38%, rgba(255, 255, 255, 0.9) 0%, transparent 28%),
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.82) 0%, transparent 24%),
    linear-gradient(135deg, #d8ecff 0%, #eef7ff 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-clouds {
  background:
    radial-gradient(circle at 22% 40%, rgba(255, 255, 255, 0.95) 0%, transparent 28%),
    radial-gradient(circle at 68% 34%, rgba(255, 255, 255, 0.9) 0%, transparent 26%),
    linear-gradient(135deg, #cfe6ff 0%, #e8f4ff 100%);
}

.settings-wallpaper-swatch.settings-wallpaper-bloom {
  background:
    radial-gradient(circle at 26% 36%, rgba(255, 196, 214, 0.55) 0%, transparent 24%),
    radial-gradient(circle at 74% 32%, rgba(255, 214, 228, 0.45) 0%, transparent 24%),
    linear-gradient(135deg, #fff0f6 0%, #fffafc 100%);
}

.app-layout {
  min-height: 100vh;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 24px;
}

.app-layout.with-sidebar {
  grid-template-columns: 180px minmax(0, 1fr);
}

.app-sidebar-card {
  background: #fff;
  border: 1px solid #ebe5ff;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(58, 45, 105, 0.1);
  padding: 14px;
  position: sticky;
  top: 24px;
}

.app-sidebar-title {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #2f2760;
}

.app-nav {
  display: grid;
  gap: 8px;
}

.app-nav-btn {
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #faf8ff;
  color: #2f2760;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.app-nav-btn:hover,
.app-nav-btn.active {
  background: #6e5bd0;
  border-color: #6e5bd0;
  color: #fff;
}

.app-main {
  min-width: 0;
}

.page-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.icon-action-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin-top: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid #ddd4ff;
  background: rgba(255, 255, 255, 0.9);
  color: #4a3f8a;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(74, 63, 138, 0.08);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.icon-action-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-action-btn:hover {
  background: #f3efff;
  border-color: #b8a9f0;
  color: #5d4bc4;
}

.icon-action-btn:active {
  transform: scale(0.94);
}

.icon-action-btn:focus-visible {
  outline: 2px solid #7d67e8;
  outline-offset: 2px;
}

.profile-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #faf8ff;
}

.profile-card p {
  margin: 0;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  padding: 12px 14px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #faf8ff;
}

.history-item p {
  margin: 8px 0 0;
  color: #5e548f;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.screen {
  width: 100%;
  max-width: 640px;
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: #fff;
  border-radius: 22px;
  border: 1px solid #ebe5ff;
  box-shadow: 0 12px 30px rgba(58, 45, 105, 0.12);
  padding: 24px;
}

.card.large {
  padding: 28px;
}

.chat-page-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 190, 110, 0.22), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(255, 155, 186, 0.2), transparent 30%),
    linear-gradient(180deg, #fff8ef 0%, #fff2f8 100%);
}

.chat-page-card::before {
  content: "🐾  🐾  🐾  🐾  🐾  🐾  🐾  🐾";
  position: absolute;
  inset: 12px 10px auto 10px;
  color: rgba(132, 93, 52, 0.22);
  font-size: 22px;
  letter-spacing: 8px;
  pointer-events: none;
}

.chat-page-card > * {
  position: relative;
  z-index: 1;
}

.logo {
  width: min(300px, 100%);
  display: block;
  margin: 0 auto 16px;
  border-radius: 18px;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-weight: 600;
}

.subtitle {
  margin-top: 0;
  margin-bottom: 14px;
  color: #5f558f;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.auth-mode-btn {
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #faf8ff;
  color: #2f2760;
  font-weight: 700;
  cursor: pointer;
}

.auth-mode-btn.active {
  background: #6e5bd0;
  border-color: #6e5bd0;
  color: #fff;
}

.signup-image-reader {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.signup-image-preview {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.signup-image-preview img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #ddd4ff;
  background: #faf8ff;
}

.otp-section {
  margin-top: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signup-animation-note {
  margin: 6px 0 10px;
  color: #6d6299;
  font-size: 14px;
}

.signup-animation-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signup-animation-card {
  margin-top: 0;
  padding: 10px;
  border: 1px solid #ddd4ff;
  border-radius: 14px;
  background: #faf8ff;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.signup-animation-card:hover {
  transform: translateY(-1px);
}

.signup-animation-card.active {
  border-color: #6e5bd0;
  box-shadow: 0 0 0 2px rgba(110, 91, 208, 0.16);
  background: #f3efff;
}

.signup-animation-scene {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 12px;
  font-size: 34px;
  margin-bottom: 8px;
}

.scene-cloud {
  background: linear-gradient(180deg, #edf4ff 0%, #dcecff 100%);
  animation: floatY 3.2s ease-in-out infinite;
}

.scene-sun {
  background: linear-gradient(180deg, #fff4d8 0%, #ffe8b0 100%);
  animation: pulseGlow 2.4s ease-in-out infinite;
}

.scene-heart {
  background: linear-gradient(180deg, #f8e9ff 0%, #efd9ff 100%);
  animation: heartbeat 1.8s ease-in-out infinite;
}

.scene-cat {
  background: linear-gradient(180deg, #fff0e8 0%, #ffe2d2 100%);
  animation: wiggle 2.6s ease-in-out infinite;
}

.signup-animation-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #2f2760;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.06);
    filter: brightness(1.08);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
  }
  70% {
    transform: scale(1);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-4deg);
  }
  75% {
    transform: rotate(4deg);
  }
}

label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
}

input,
select,
textarea,
button {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #d8d0f1;
  padding: 11px 12px;
  font: inherit;
}

.btn {
  margin-top: 14px;
  border: none;
  cursor: pointer;
  background: linear-gradient(120deg, #5d4bc4, #7d67e8);
  color: #fff;
}

.btn.secondary {
  background: linear-gradient(120deg, #3f376f, #56508c);
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chat-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.chat-rating-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(34, 27, 66, 0.42);
}

.chat-rating-overlay.hidden,
.chat-rating-overlay[hidden] {
  display: none !important;
}

.chat-rating-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 18px;
  border: 1px solid #ddd4ff;
  background: #fff;
  box-shadow: 0 16px 36px rgba(58, 45, 105, 0.18);
}

.chat-rating-stars {
  display: flex;
  gap: 8px;
  margin: 12px 0 14px;
}

.chat-rating-star {
  flex: 1;
  margin-top: 0;
  padding: 10px 0;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #faf8ff;
  color: #2f2760;
  font-weight: 700;
  cursor: pointer;
}

.chat-rating-star.active {
  background: #6e5bd0;
  border-color: #6e5bd0;
  color: #fff;
}

.mood-slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.mood-card {
  border: 1px solid #d8d0f1;
  background: #faf8ff;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mood-card:hover {
  transform: translateY(-1px);
}

.mood-card.active {
  border-color: #6e5bd0;
  box-shadow: 0 0 0 2px rgba(110, 91, 208, 0.16);
  background: #f3efff;
}

.mood-art {
  display: block;
  font-size: 30px;
  margin-bottom: 4px;
}

.mood-title {
  display: block;
  font-weight: 700;
  color: #2f2760;
}

.mood-text {
  display: block;
  margin-top: 2px;
  color: #5e548f;
  font-size: 13px;
}

.panel {
  margin-top: 14px;
}

.online-member-scroller {
  max-height: 260px;
  overflow-y: auto;
  margin: 12px 0;
  border: 1px solid #ddd4ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #faf8ff 0%, #f3efff 100%);
  scrollbar-width: thin;
}

.online-member-scroller.is-empty {
  max-height: none;
  padding: 12px;
}

.online-member-list {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.online-member-empty {
  margin: 0;
}

.online-member-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  width: 100%;
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.online-member-card:hover,
.online-member-card.active {
  transform: translateY(-1px);
  border-color: #6e5bd0;
  box-shadow: 0 0 0 2px rgba(110, 91, 208, 0.16);
  background: #f3efff;
}

.online-member-check {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: #6e5bd0;
}

.online-member-copy {
  display: grid;
  gap: 4px;
}

.online-member-name {
  display: block;
  font-weight: 700;
  color: #2f2760;
}

.online-member-badge {
  display: block;
  color: #5e548f;
  font-size: 13px;
}

.hidden {
  display: none;
}

.chat-side {
  width: 100%;
}

.chat-thread {
  margin-top: 10px;
  margin-bottom: 10px;
  min-height: 210px;
  max-height: 320px;
  overflow-y: auto;
  background: #faf8ff;
  border: 1px solid #e8e2ff;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.support-mailbox {
  min-height: 160px;
  max-height: 260px;
}

.chat-input-wrap {
  position: relative;
  margin-top: 6px;
}

.chat-input-wrap textarea {
  padding-right: 92px;
}

.audio-trigger {
  position: absolute;
  right: 48px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  margin-top: 0;
  padding: 0;
  border: 1px solid #ddd4ff;
  border-radius: 10px;
  background: #f3efff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.audio-trigger.recording {
  background: #ffe8ea;
  border-color: #f0a8b0;
  color: #8f2f3d;
}

.bubble.audio-bubble audio {
  width: min(240px, 100%);
  margin-top: 4px;
}

.bubble-audio-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5f558f;
}

.emoji-trigger {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  margin-top: 0;
  padding: 0;
  border: 1px solid #ddd4ff;
  border-radius: 10px;
  background: #f3efff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.emoji-picker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 3;
  width: min(320px, 100%);
  padding: 10px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(58, 45, 105, 0.14);
}

.emoji-categories {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #efe8ff;
  scrollbar-width: thin;
}

.emoji-category-btn {
  width: 34px;
  height: 34px;
  margin-top: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.emoji-category-btn:hover,
.emoji-category-btn.active {
  background: #f3efff;
  border-color: #ddd4ff;
}

.emoji-options {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  margin-top: 0;
  scrollbar-width: thin;
}

.emoji-option {
  width: 100%;
  aspect-ratio: 1;
  min-height: 34px;
  margin-top: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.emoji-option:hover {
  background: #f3efff;
  border-color: #b8a8f0;
}

.bubble {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 12px;
  line-height: 1.4;
}

.bubble-text {
  margin: 0;
  white-space: pre-wrap;
}

.bubble-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.75;
}

.bubble-delete-btn {
  margin-right: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7a63c9;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.bubble-delete-btn:hover {
  color: #5f4aa8;
}

.bubble-ticks.read {
  color: #4f9ef5;
}

.chat-session-timer {
  margin: 0 0 8px;
  font-size: 13px;
  color: #5f558f;
}

.chat-tool-row {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}

.chat-tool-trigger {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #ddd4ff;
  border-radius: 10px;
  background: #f3efff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.chat-tool-trigger[aria-expanded="true"] {
  background: #e8e0ff;
  border-color: #b8a8f0;
}

.chat-tool-panel {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e8e2ff;
  border-radius: 12px;
  background: #faf8ff;
}

.chat-dedicate-panel {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e8e2ff;
  border-radius: 12px;
  background: #faf8ff;
}

.chat-translator-panel textarea[readonly] {
  background: #fff;
}

.chat-dedicate-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #2f2760;
}

.bubble.song-bubble audio {
  width: min(240px, 100%);
  margin-top: 6px;
}

.bubble-song-title {
  margin: 0;
  font-weight: 700;
}

.bubble-song-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: #4a4268;
}

.signup-guidelines {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #4a4268;
}

.signup-guidelines li + li {
  margin-top: 8px;
}

.signup-terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  color: #4a4268;
}

.signup-terms-row input {
  margin-top: 4px;
}

.bubble.user {
  margin-left: auto;
  background: #ddd4ff;
  color: #2f245f;
}

.bubble.ai.typing {
  opacity: 0.75;
  font-style: italic;
}

.bubble.ai.error {
  background: #fff1f1;
  border-color: #f0b4b4;
  color: #7a2f2f;
}

@media (max-width: 760px) {
  .app-layout.with-sidebar {
    grid-template-columns: 1fr;
  }

  .app-sidebar-card {
    position: static;
  }

  .app-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#choiceStatus,
#signupStatus,
#humanConnectStatus,
#humanChatStatus,
#historyStatus,
#supportStatus,
#chatRatingStatus {
  margin-top: 10px;
  color: #5a4f8f;
}

.reply {
  background: #f7f4ff;
  border-left: 4px solid #7a66da;
  border-radius: 8px;
  padding: 10px;
}

.page-top-bar .icon-action-btn {
  width: 34px;
  height: 34px;
  margin-top: 0;
}
