/* =========================
   Neon Vault Redesign Layer
   ========================= */
:root {
  --rd-bg: var(--bg-dark);
  --rd-panel: var(--surface);
  --rd-panel-strong: var(--surface-strong);
  --rd-line: var(--line);
  --rd-line-hot: var(--line-hot);
  --rd-text: var(--text-main);
  --rd-soft: var(--text-soft);
  --rd-muted: var(--text-muted);
  --rd-pink: var(--pink);
  --rd-pink-2: var(--pink-2);
  --rd-violet: var(--violet);
  --rd-cyan: var(--cyan);
  --rd-gold: var(--gold);
  --rd-glass: var(--glass);
  --rd-phone-max: var(--phone-max);
}

html,
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(232, 84, 158, 0.12), transparent 28%),
    radial-gradient(circle at 82% 4%, rgba(104, 212, 236, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg-dark) 0%, #090913 54%, #120c18 100%);
  color: var(--rd-text);
  font-family: "Trebuchet MS", "Segoe UI", "PingFang SC", sans-serif;
}

@media (hover: hover) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.18;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
  }
}

button {
  letter-spacing: 0;
}

#app {
  isolation: isolate;
  background:
    radial-gradient(circle at 50% -10%, rgba(232, 84, 158, 0.12), transparent 34%),
    linear-gradient(180deg, var(--bg-dark) 0%, #090913 100%);
}

.screen {
  color: var(--rd-text);
}

.screen::after {
  display: none;
}

/* Shared neon controls */
.primary-btn,
.send-btn,
.recharge-btn,
.gift-send {
  background:
    linear-gradient(110deg, #e04d82 0%, #e058a8 46%, var(--violet) 100%);
  color: #fff;
  box-shadow:
    0 14px 36px rgba(232, 84, 158, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.icon-btn,
.sheet-close {
  background: rgba(12, 15, 28, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.28);
  backdrop-filter: var(--rd-glass);
}

.toast {
  background: rgba(15, 18, 31, 0.92);
  border: 1px solid var(--rd-line);
}

/* Abstract media treatment */
.collection-preview,
.gift-icon {
  position: relative;
}

.collection-preview::before,
.gift-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 44%, rgba(232, 88, 168, 0.18), transparent 19%),
    conic-gradient(from 50deg at 50% 45%, transparent 0deg, rgba(232, 100, 168, 0.48) 48deg, rgba(104, 212, 236, 0.32) 84deg, transparent 130deg, transparent 360deg);
  opacity: 0.24;
  mix-blend-mode: screen;
}

.collection-preview::after,
.gift-icon::after {
  content: "";
  position: absolute;
  inset: 12%;
  pointer-events: none;
  z-index: 3;
  border: 1px solid rgba(232, 108, 178, 0.45);
  border-radius: 28px;
  box-shadow:
    0 0 22px rgba(232, 84, 158, 0.2),
    inset 0 0 14px rgba(104, 212, 236, 0.08);
  transform: rotate(45deg) scale(0.62);
  opacity: 0.68;
}

.character-img.is-ready,
.level-up-img {
  filter: saturate(1.02) contrast(1.02) brightness(0.9);
}

.character-visual::before,
.character-visual::after,
.level-up-image-container::before,
.level-up-image-container::after {
  display: none;
}

/* Welcome */
#welcomeScreen {
  background:
    radial-gradient(circle at 50% 20%, rgba(232, 84, 158, 0.22), transparent 25%),
    radial-gradient(circle at 50% 54%, rgba(148, 80, 232, 0.12), transparent 36%),
    linear-gradient(180deg, #090913 0%, #080812 100%);
}

.welcome-overlay {
  background:
    linear-gradient(180deg, rgba(5, 6, 12, 0.05) 0%, rgba(5, 6, 12, 0.38) 52%, rgba(5, 6, 12, 0.84) 100%),
    radial-gradient(circle at 50% 31%, rgba(232, 100, 168, 0.12), transparent 25%);
  z-index: 2;
}

.welcome-shell {
  max-width: var(--rd-phone-max);
  margin: 0 auto;
}

.welcome-overlay,
.welcome-particles {
  left: 50% !important;
  right: auto !important;
  width: min(100%, var(--rd-phone-max));
  transform: translateX(-50%);
}

#welcomeVisual.character-visual {
  background:
    radial-gradient(circle at 50% 33%, rgba(232, 100, 168, 0.12), transparent 23%),
    linear-gradient(180deg, #080913 0%, #080812 100%);
}

#welcomeVisual .character-img {
  opacity: 0.82;
  object-position: center 18%;
}

.welcome-copy {
  bottom: calc(var(--safe-bottom) + 184px);
  z-index: 3;
}

.welcome-title {
  font-size: clamp(3.1rem, 16vw, 5.7rem);
  letter-spacing: 0;
  font-weight: 500;
  text-shadow:
    0 0 18px rgba(232, 84, 158, 0.58),
    0 0 42px rgba(232, 84, 158, 0.2);
}

.welcome-title::after {
  content: "";
  display: block;
  width: min(150px, 42vw);
  height: 16px;
  margin: -2px auto 0;
  background:
    radial-gradient(circle at 48% 50%, var(--pink) 0 3px, transparent 4px),
    linear-gradient(90deg, transparent 0%, rgba(232, 100, 168, 0.5) 38%, rgba(255, 255, 255, 0.6) 50%, rgba(232, 100, 168, 0.5) 62%, transparent 100%);
  opacity: 0.72;
}

.welcome-subtitle {
  margin-top: 6px;
  color: var(--rd-soft);
}

.welcome-footer {
  bottom: calc(var(--safe-bottom) + 20px);
}

.welcome-actions {
  width: min(76vw, 300px);
  flex-direction: column;
  gap: 18px;
}

#enterChatBtn {
  width: 100%;
  animation: rd-pulse 2.8s ease-in-out infinite;
}

.welcome-progress-card,
.collection-progress-card {
  width: 100%;
  padding: 13px 15px 14px;
  border-radius: 16px;
  color: var(--rd-text);
  background: rgba(12, 15, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.welcome-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 0.78rem;
  color: var(--rd-soft);
}

.welcome-progress-row strong {
  color: var(--rd-text);
  font-weight: 600;
}

.welcome-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.welcome-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  box-shadow: 0 0 10px rgba(232, 84, 158, 0.45);
}

/* Chat */
#chatScreen {
  background: var(--bg-dark);
}

#chatScreen::before {
  display: none;
}

.chat-shell {
  max-width: var(--rd-phone-max);
  margin: 0 auto;
  background:
    radial-gradient(circle at 50% 20%, rgba(232, 84, 158, 0.14), transparent 25%),
    linear-gradient(180deg, #080914 0%, #080812 100%);
}

.chat-background {
  background:
    radial-gradient(circle at 50% 28%, rgba(232, 84, 158, 0.14), transparent 23%),
    linear-gradient(180deg, #090b16 0%, #080812 100%);
}

.chat-background::before {
  display: none;
}

.chat-header {
  padding:
    calc(var(--safe-top) + 10px)
    12px
    8px;
  color: var(--rd-text);
}

.chat-header-top {
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 7px 10px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(13, 16, 29, 0.78), rgba(8, 10, 19, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.header-left,
.header-right {
  align-items: center;
  gap: 8px;
}

.header-right {
  align-self: center;
  margin-bottom: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-meta-panel {
  align-self: center;
  justify-self: stretch;
  gap: 5px;
  max-width: none;
  padding: 0 2px;
}

.header-summary {
  gap: 8px;
  min-height: 22px;
}

.header-summary strong {
  color: var(--rd-text);
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.level-pill {
  min-height: 22px;
  padding: 0 9px;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  border: 0;
  box-shadow: 0 0 18px rgba(232, 84, 158, 0.2);
}

.header-affinity {
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 220px;
}

.affinity-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.header-affinity-value {
  display: block;
  min-width: 38px;
  margin-bottom: 0;
  color: rgba(255, 241, 249, 0.78);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.affinity-fill {
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
  box-shadow: 0 0 12px rgba(232, 84, 158, 0.5);
}

.header-coin-pill {
  height: 36px !important;
  min-width: 72px;
  justify-content: center;
  padding: 0 5px 0 10px;
  background: rgba(10, 12, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

.header-coin-pill .coin-add {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

@media (max-width: 380px) {
  .chat-header {
    padding-left: 8px;
    padding-right: 8px;
  }

  .chat-header-top {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 5px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .header-right {
    gap: 6px;
  }

  .header-coin-pill {
    min-width: 64px;
    padding-left: 8px;
  }

  .header-affinity {
    max-width: 170px;
    gap: 6px;
  }
}

.collection-icon-mark {
  width: 16px;
  height: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.collection-icon-mark::before,
.collection-icon-mark::after {
  content: "";
}

.collection-icon-mark,
.collection-icon-mark::before,
.collection-icon-mark::after {
  border-radius: 4px;
}

.collection-icon-mark {
  background:
    linear-gradient(#fff, #fff) 0 0 / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) 10px 0 / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) 0 10px / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) 10px 10px / 6px 6px no-repeat;
  opacity: 0.9;
}

.header-portrait-stage {
  align-items: stretch;
  padding: 0;
}

.portrait-visual {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 84, 158, 0.18), transparent 35%),
    rgba(12, 15, 28, 0.58);
  border: 0;
  box-shadow: none;
}

.portrait-visual .character-img {
  opacity: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.chat-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 5, 12, 0.08) 0%, rgba(4, 5, 12, 0.12) 34%, rgba(4, 5, 12, 0.66) 100%),
    radial-gradient(ellipse at 50% 78%, rgba(232, 84, 158, 0.16), transparent 42%);
}

.conversation-panel {
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + 112px);
  height: min(44dvh, 360px);
  padding: 0 20px 0;
  z-index: 8;
  mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 88%, transparent 100%);
}

.conversation-panel::before {
  opacity: 0;
}

.day-divider {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-list {
  gap: 10px;
  overflow-x: hidden !important;
  padding-bottom: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.message-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.message-delivery.is-idle {
  display: none !important;
}

.message-row {
  gap: 5px;
}

.message-header-wrap {
  color: var(--rd-muted);
}

.avatar-dot {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--rd-text);
}

.avatar-dot.ai-avatar {
  background-color: transparent !important;
  background-image: url("/cdn/ai-adultlife/avatars/avatar_1.png") !important;
  background-size: 120% 120% !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: 0 !important;
  color: transparent !important;
}

.message-bubble {
  display: inline-block;
  max-width: var(--message-bubble-max);
  width: max-content;
  border-radius: 16px;
  padding: 10px 14px;
  color: rgba(255, 250, 253, 0.94);
  background: rgba(22, 25, 38, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px rgba(0, 0, 0, 0.18);
  overflow-wrap: break-word;
  word-break: normal;
  white-space: pre-wrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.message-row.user .message-bubble {
  background: linear-gradient(135deg, rgba(232, 84, 158, 0.65), rgba(148, 80, 232, 0.55));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 18px rgba(148, 80, 232, 0.14);
}

.quick-strip-wrap {
  bottom: calc(var(--safe-bottom) + 76px);
  padding: 0 20px;
  z-index: 11;
}

.quick-strip {
  gap: 9px;
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  padding-left: 0;
  padding-right: 0;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.quick-strip::-webkit-scrollbar {
  display: none;
}

.quick-btn {
  flex: 0 0 auto !important;
  min-width: max-content;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(255, 241, 249, 0.78);
  background: rgba(20, 22, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 0.74rem;
  scroll-snap-align: start;
}

.chat-input-area {
  left: 12px;
  right: 12px;
  bottom: calc(var(--safe-bottom) + 10px);
  min-height: 60px;
  padding: 9px;
  border-radius: 20px;
  background: rgba(13, 16, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gift-btn .gift-tool-icon {
  width: 30px;
  height: 30px;
  margin: 0;
  position: relative;
  display: block;
  background: transparent;
  box-shadow: none;
}

.gift-tool-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 4px;
  height: 16px;
  border: 2px solid rgba(255, 241, 249, 0.92);
  border-radius: 4px;
  box-shadow:
    inset 0 6px 0 rgba(255, 241, 249, 0.14),
    0 0 12px rgba(232, 100, 168, 0.18);
}

.gift-tool-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 4px;
  height: 10px;
  border: 2px solid rgba(255, 241, 249, 0.92);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 241, 249, 0.92) 0 calc(50% + 1px), transparent 0),
    linear-gradient(180deg, transparent 5px, rgba(255, 241, 249, 0.92) 0 7px, transparent 0);
}

.input-pill {
  min-height: 42px;
  background: rgba(3, 5, 12, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.text-input {
  color: var(--rd-text);
}

.text-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.gift-btn .tool-icon {
  font-size: 1.7rem;
  filter: drop-shadow(0 0 10px rgba(232, 84, 158, 0.45));
}

.send-btn {
  height: 42px;
  min-width: 72px;
}

/* Sheets */
.sheet-backdrop {
  position: fixed;
  max-width: none;
  margin: 0;
  background: rgba(3, 5, 12, 0.68);
  backdrop-filter: blur(12px) saturate(1.2);
}

.gift-sheet,
.collection-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--safe-bottom) + 10px);
  max-width: calc(var(--rd-phone-max) - 24px);
  margin: 0 auto;
  border-radius: 22px;
  padding: 18px;
  color: var(--rd-text);
  background:
    radial-gradient(circle at 24% 0%, rgba(232, 84, 158, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(17, 20, 34, 0.96), rgba(8, 10, 18, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gift-sheet {
  max-height: min(78dvh, 680px);
}

.gift-sheet::before,
.collection-sheet::before {
  content: "";
  width: 56px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  align-self: center;
  margin: -5px 0 14px;
  flex: 0 0 auto;
}

.sheet-header strong {
  color: var(--rd-text);
  text-shadow: none;
}

.sheet-header span {
  color: var(--rd-soft);
  font-size: 0.74rem;
}

.gift-grid {
  gap: 10px;
  max-height: 414px;
  flex: 0 1 auto;
}

.gift-card {
  position: relative;
  min-height: 158px;
  padding: 12px;
  text-align: left;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(232, 84, 158, 0.14), transparent 35%),
    linear-gradient(180deg, rgba(16, 19, 32, 0.94), rgba(8, 10, 18, 0.94));
  border: 1px solid rgba(232, 100, 168, 0.35);
}

.gift-card[data-rarity="epic"] {
  border-color: rgba(148, 80, 232, 0.5);
}

.gift-card[data-rarity="legendary"] {
  border-color: rgba(247, 188, 86, 0.55);
}

.gift-rarity {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  padding: 3px 8px;
  border-radius: 999px;
  color: rgba(255, 245, 252, 0.78);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gift-icon {
  width: 100%;
  aspect-ratio: 1.3;
  margin: 12px 0 8px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 52%, rgba(232, 84, 158, 0.22), transparent 31%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  font-size: 2rem;
  text-align: center;
}

.gift-icon.has-image {
  display: grid;
  place-items: center;
}

.gift-icon.has-image::before {
  opacity: 0.16;
}

.gift-icon.has-image::after {
  opacity: 0.24;
}

.gift-icon-img {
  width: min(82%, 134px);
  height: min(82%, 134px);
  position: relative;
  z-index: 4;
  object-fit: contain;
  filter:
    drop-shadow(0 14px 24px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 20px rgba(232, 100, 168, 0.16));
}

.gift-icon::after {
  inset: 26%;
}

.gift-card strong {
  color: var(--rd-text);
  font-size: 0.9rem;
}

.gift-card-footer {
  flex-direction: row;
  justify-content: space-between;
  gap: 8px;
}

.gift-cost {
  min-width: 74px;
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--rd-soft);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.gift-cost::before {
  content: "♡";
  margin-right: 7px;
  color: var(--rd-pink-2);
}

.gift-send {
  width: auto;
  min-width: 62px;
}

.gift-sheet-footer {
  padding: 12px 0 0;
  border-color: rgba(255, 255, 255, 0.1);
}

.gift-balance {
  min-height: 38px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--rd-text);
}

.gift-balance > span {
  display: none;
}

.gift-balance-value {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.recharge-btn::after {
  content: "+";
  margin-left: 18px;
}

/* Collection */
.collection-sheet {
  max-height: min(82dvh, 680px);
}

.collection-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  min-height: 36px;
  margin-bottom: 12px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.collection-tab {
  color: var(--rd-soft);
  background: transparent;
  border-radius: 999px;
  font-size: 0.76rem;
}

.collection-tab.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  box-shadow: 0 6px 16px rgba(232, 84, 158, 0.18);
}

.collection-grid {
  gap: 12px;
}

.collection-card {
  position: relative;
  padding: 11px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 19, 32, 0.94), rgba(8, 10, 18, 0.94));
  border-color: rgba(255, 255, 255, 0.12);
}

.collection-card:not(.is-locked) {
  border-color: rgba(255, 112, 188, 0.46);
}

.collection-preview {
  aspect-ratio: 1.04;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 45%, rgba(232, 84, 158, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.collection-blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  backdrop-filter: blur(6px) saturate(1.2);
  background: rgba(12, 14, 26, 0.18);
  border-radius: inherit;
}

.collection-lock {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: inherit;
  color: transparent;
}

.collection-lock::before {
  content: "🔒";
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

.collection-kind {
  color: var(--rd-pink-2);
  font-size: 0.65rem;
}

.collection-card strong {
  color: var(--rd-text);
}

.collection-card p {
  color: var(--rd-soft);
}

.collection-card p::before {
  content: "♡ ";
  color: var(--rd-pink-2);
}

.collection-progress-card {
  margin-top: 12px;
  flex-shrink: 0;
}

/* Focus mode */
.ui-transparent-mode .chat-header,
.ui-transparent-mode .conversation-panel,
.ui-transparent-mode .quick-strip-wrap,
.ui-transparent-mode .chat-input-area {
  opacity: 0.18;
  transform: scale(0.98);
  pointer-events: none;
}

.ui-transparent-mode .portrait-visual {
  transform: none;
  box-shadow: none;
}

/* Reward modal */
.level-up-overlay {
  background:
    radial-gradient(circle at 50% 44%, rgba(232, 84, 158, 0.16), transparent 36%),
    rgba(2, 3, 9, 0.86);
}

.level-up-modal {
  width: min(82vw, 330px);
  padding: 0;
}

.level-up-title {
  color: var(--rd-text);
  -webkit-text-fill-color: initial;
  background: none;
  font-size: clamp(1.3rem, 5vw, 1.7rem);
}

.level-up-title::before,
.level-up-title::after {
  content: "✦";
  color: var(--rd-pink-2);
  margin: 0 10px;
  text-shadow: 0 0 16px rgba(232, 84, 158, 0.7);
}

.level-up-image-container {
  width: min(62vw, 230px);
  aspect-ratio: 0.82;
  border-radius: 22px;
  border: 1px solid rgba(255, 112, 188, 0.62);
}

.level-up-text {
  bottom: 20px;
  color: #fff6d8;
  text-shadow:
    0 0 12px rgba(232, 84, 158, 0.76),
    0 0 22px rgba(247, 188, 86, 0.34);
}

.level-up-rewards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 18px;
}

.level-up-reward {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.level-up-reward span {
  grid-row: 1 / 3;
  color: var(--rd-pink-2);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 12px rgba(232, 84, 158, 0.58));
}

.level-up-reward strong {
  font-size: 1.04rem;
}

.level-up-reward small {
  color: var(--rd-soft);
}

.level-up-btn {
  width: 100%;
  margin-top: 16px;
}

@keyframes rd-pulse {
  0%,
  100% {
    box-shadow:
      0 12px 32px rgba(232, 84, 158, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.32);
  }
  50% {
    box-shadow:
      0 16px 40px rgba(232, 84, 158, 0.32),
      0 0 24px rgba(148, 80, 232, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.36);
  }
}

@media (min-width: 620px) {
  .chat-shell,
  #welcomeScreen > *,
  #chatScreen > * {
    max-width: var(--rd-phone-max);
  }
}

@media (max-height: 760px) {
  .welcome-copy {
    bottom: calc(var(--safe-bottom) + 160px);
  }

  .welcome-actions {
    gap: 12px;
  }

  .conversation-panel {
    height: min(40dvh, 310px);
  }
}

/* =========================
   Neon Vault Animation Enhancements
   ========================= */

/* Message entrance glow for user bubbles */
.message-row.user.message-appear .message-bubble {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 18px rgba(148, 80, 232, 0.14),
    0 0 20px rgba(232, 84, 158, 0.25);
}

/* Message entrance glow for AI bubbles */
.message-row.ai.message-appear .message-bubble {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px rgba(0, 0, 0, 0.18),
    0 0 16px rgba(104, 212, 236, 0.12);
}

/* Send button pop enhancement */
.send-btn.is-popping {
  animation: rdBtnPop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rdBtnPop {
  0% {
    transform: scale(1);
    box-shadow:
      0 14px 36px rgba(232, 84, 158, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.32);
  }
  35% {
    transform: scale(0.9);
    box-shadow:
      0 6px 18px rgba(232, 84, 158, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.32);
  }
  65% {
    transform: scale(1.08);
    box-shadow:
      0 18px 44px rgba(232, 84, 158, 0.32),
      0 0 28px rgba(148, 80, 232, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.36);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 14px 36px rgba(232, 84, 158, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.32);
  }
}

/* Quick button pop enhancement */
.quick-btn.is-popping {
  animation: rdQuickPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rdQuickPop {
  0% {
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.1);
  }
  40% {
    transform: scale(0.92);
    border-color: rgba(232, 84, 158, 0.45);
    background: rgba(232, 84, 158, 0.14);
  }
  70% {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.22);
  }
  100% {
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* Sticker entrance glow */
.message-sticker {
  animation: rdStickerIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes rdStickerIn {
  0% {
    opacity: 0;
    transform: scale(0.82);
    filter: drop-shadow(0 0 0 transparent);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
  }
}

/* System card neon entrance */
.system-card {
  animation: rdSysCardIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes rdSysCardIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    border-color: rgba(255, 255, 255, 0.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: rgba(255, 255, 255, 0.12);
  }
}
