/* YPMR Web Chat — Romantic Dark Theme, Mobile-First, Full SPA */

:root {
  --rose-500: #f43f5e;
  --rose-400: #fb7185;
  --rose-300: #fda4af;
  --rose-600: #e11d48;
  --rose-700: #be123c;
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-elevated: #242424;
  --border: #2a2a2a;
  --text: #f1f1f1;
  --text-muted: #888;
  --text-dim: #666;
  --msg-user-bg: #e11d48;
  --msg-user-text: #fff;
  --msg-assistant-bg: #1e1e1e;
  --msg-assistant-text: #e5e5e5;
  --msg-assistant-border: #2a2a2a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ── Header ── */

#header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}

#header-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-300));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}
#header-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
#header-avatar::after { content: "💝"; }
#header-avatar.has-img::after { content: none; }

#header-info { flex: 1; min-width: 0; }

#header-name {
  font-size: 16px; font-weight: 600;
  color: var(--text); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

#header-style {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

#header-back {
  background: none; border: 1px solid var(--border);
  color: var(--text); width: 32px; height: 32px;
  border-radius: 50%; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#header-back.hidden { display: none; }

#header-credit-badge {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 14px; padding: 4px 10px; font-size: 12px;
  cursor: pointer; flex-shrink: 0;
}
#header-credit-badge.hidden { display: none; }
#credit-badge-icon { font-size: 14px; }
#credit-badge-value { color: var(--text); font-weight: 600; }

/* ── Toast ── */

#toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated); color: var(--text);
  padding: 10px 20px; border-radius: 20px;
  font-size: 13px; border: 1px solid var(--border);
  z-index: 100; transition: opacity 0.3s;
  pointer-events: none; white-space: nowrap;
}
#toast.hidden { opacity: 0; }
#toast:not(.hidden) { opacity: 1; }

/* ── Page system ── */

.page { display: flex; flex-direction: column; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.page.hidden { display: none !important; }

.page-scroll {
  flex: 1; overflow-y: auto; padding: 16px;
  -webkit-overflow-scrolling: touch;
}

/* ── Login Page ── */

.login-hero {
  text-align: center; padding: 48px 0 24px;
}
.login-hero .login-icon { font-size: 64px; margin-bottom: 12px; animation: float 3s ease-in-out infinite; }
.login-hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 4px; background: linear-gradient(135deg, var(--rose-400), var(--rose-300)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-hero p { font-size: 15px; color: var(--text-muted); }
.login-hero .login-sub { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

.login-form {
  display: flex; flex-direction: column; gap: 14px;
  padding: 0 4px;
}
.login-input-group { display: flex; flex-direction: column; gap: 4px; }
.login-input-group label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.login-input-group input {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; font-size: 15px;
  color: var(--text); outline: none; font-family: inherit;
  transition: border-color 0.15s;
}
.login-input-group input:focus { border-color: var(--rose-500); }
.login-input-group input::placeholder { color: var(--text-dim); }

.login-note {
  text-align: center; font-size: 11px; color: var(--text-dim);
  margin-top: 16px; padding: 0 16px;
}

.login-toggle {
  text-align: center; font-size: 13px; color: var(--text-muted);
  margin-top: 12px;
}
.login-toggle a {
  color: var(--rose-400); text-decoration: none; font-weight: 500;
}

/* ── Buttons ── */

.btn-primary {
  background: var(--rose-500); color: #fff; border: none;
  padding: 10px 28px; border-radius: 22px; font-size: 15px;
  font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:active { transform: scale(0.96); background: var(--rose-600); }
.btn-primary:disabled { opacity: 0.4; cursor: default; transform: none; }

.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); padding: 10px 28px;
  border-radius: 22px; font-size: 15px; cursor: pointer;
  transition: border-color 0.15s; font-family: inherit;
}
.btn-outline:active { border-color: var(--text-muted); }

.btn-large { width: 100%; padding: 14px; font-size: 17px; border-radius: 14px; }

/* ── Tab Bar ── */

#tab-bar {
  display: flex; align-items: center; justify-content: space-around;
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom); height: calc(var(--tab-height) + var(--safe-bottom));
  flex-shrink: 0; z-index: 10; position: sticky; bottom: 0;
}
#tab-bar.hidden { display: none; }

.tab-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 8px 16px; background: none; border: none;
  color: var(--text-dim); cursor: pointer; font-family: inherit;
  transition: color 0.15s; min-width: 60px; position: relative;
}
.tab-btn .tab-icon { font-size: 20px; transition: transform 0.15s; }
.tab-btn .tab-label { font-size: 10px; font-weight: 500; }
.tab-btn.active { color: var(--rose-400); }
.tab-btn.active .tab-icon { transform: scale(1.1); }
.tab-btn::before {
  content: ""; position: absolute; top: -1px; left: 50%;
  transform: translateX(-50%); width: 0; height: 2px;
  background: var(--rose-500); border-radius: 0 0 2px 2px;
  transition: width 0.2s;
}
.tab-btn.active::before { width: 24px; }

/* ── Messages ── */

#messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
}

#messages-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; text-align: center; padding: 24px;
}
#messages-empty .empty-icon { font-size: 48px; margin-bottom: 16px; animation: float 3s ease-in-out infinite; }
#messages-empty .empty-text { font-size: 18px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
#messages-empty .empty-sub { font-size: 13px; color: var(--text-muted); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── Message bubbles ── */

.msg {
  max-width: 80%; padding: 10px 14px; border-radius: 18px;
  font-size: 15px; line-height: 1.5; word-break: break-word;
  animation: msgIn 0.2s ease-out; position: relative; flex-shrink: 0;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-user {
  align-self: flex-end; background: var(--msg-user-bg);
  color: var(--msg-user-text); border-bottom-right-radius: 6px;
}
.msg-assistant {
  align-self: flex-start; background: var(--msg-assistant-bg);
  color: var(--msg-assistant-text); border: 1px solid var(--msg-assistant-border);
  border-bottom-left-radius: 6px;
}
.msg-time { font-size: 10px; opacity: 0.5; margin-top: 4px; }
.msg-user .msg-time { text-align: right; }
.msg-assistant .msg-time { text-align: left; }
.msg-image { max-width: 200px; border-radius: 12px; margin-top: 6px; }
.msg-error {
  align-self: center; font-size: 12px; color: var(--text-muted);
  text-align: center; padding: 8px;
}

/* ── Typing indicator ── */

#typing { display: flex; gap: 4px; padding: 8px 16px; align-self: flex-start; margin-left: 16px; }
#typing.hidden { display: none; }
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted); animation: typeBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typeBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Input bar ── */

#input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--bg-card);
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0; flex-shrink: 0;
}

#chat-input {
  flex: 1; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 22px;
  padding: 10px 18px; font-size: 15px; color: var(--text);
  outline: none; transition: border-color 0.15s; font-family: inherit;
}
#chat-input:focus { border-color: var(--rose-500); }
#chat-input::placeholder { color: var(--text-dim); }

#send-btn, #voice-toggle-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0;
  transition: background 0.15s, transform 0.1s;
}
#send-btn { background: var(--rose-500); color: #fff; }
#send-btn:active { transform: scale(0.92); background: var(--rose-600); }
#send-btn:disabled { opacity: 0.4; cursor: default; transform: none; }

#voice-toggle-btn {
  background: var(--bg-elevated); color: var(--text-muted);
  border: 1px solid var(--border);
}
#voice-toggle-btn:active { color: var(--text); }
#voice-toggle-btn.recording {
  background: var(--rose-500); color: #fff; border-color: var(--rose-500);
  animation: pulse-rec 1.5s ease-in-out infinite;
}
@keyframes pulse-rec {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
}

/* ── Questionnaire ── */

.q-hero { text-align: center; padding: 24px 0 16px; }
.q-hero-icon { font-size: 40px; margin-bottom: 8px; }
.q-hero h1 { font-size: 20px; margin-bottom: 6px; }
.q-hero p { font-size: 13px; color: var(--text-muted); }

#q-progress-bar {
  height: 4px; background: var(--bg-elevated);
  border-radius: 2px; margin-bottom: 6px; overflow: hidden;
}
#q-progress-fill {
  height: 100%; background: var(--rose-500);
  border-radius: 2px; transition: width 0.3s ease; width: 0%;
}
#q-progress-text { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 16px; }
#q-container { margin-bottom: 16px; }

.q-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 10px;
  animation: msgIn 0.25s ease-out;
}
.q-block .q-section { font-size: 10px; text-transform: uppercase; color: var(--rose-400); margin-bottom: 6px; letter-spacing: 0.5px; }
.q-block .q-question { font-size: 16px; font-weight: 500; margin-bottom: 12px; line-height: 1.4; }
.q-block .q-options { display: flex; flex-direction: column; gap: 8px; }

.q-option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  font-size: 14px; color: var(--text);
}
.q-option:active { background: #2a2a2a; }
.q-option.selected { border-color: var(--rose-500); background: rgba(244, 63, 94, 0.1); }
.q-option .q-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.q-option.selected .q-radio { border-color: var(--rose-500); }
.q-option.selected .q-radio::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--rose-500);
}
.q-option.multi .q-radio { border-radius: 4px; }
.q-option.multi.selected .q-radio::after { border-radius: 2px; }

.q-textarea {
  width: 100%; min-height: 80px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; font-size: 14px; color: var(--text);
  resize: vertical; font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
.q-textarea:focus { border-color: var(--rose-500); }
.q-textarea::placeholder { color: var(--text-dim); }

#q-nav { display: flex; gap: 10px; justify-content: center; padding-bottom: 32px; }

/* ── Candidate Selection ── */

.select-hero { text-align: center; padding: 16px 0 12px; }
.select-hero h2 { font-size: 20px; margin-bottom: 6px; }
.select-hero p { font-size: 13px; color: var(--text-muted); }

.select-loading { text-align: center; padding: 40px 0; }
.select-loading p { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.select-loading .loading-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.loading-spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--rose-500); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.candidates-grid { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }
.candidates-grid.hidden { display: none; }

.candidate-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; animation: msgIn 0.3s ease-out;
  transition: border-color 0.2s; cursor: pointer;
}
.candidate-card:active { border-color: var(--rose-500); }
.candidate-card.selected { border-color: var(--rose-500); border-width: 2px; }

.candidate-img {
  width: 100%; aspect-ratio: 3/4; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; position: relative; overflow: hidden;
}
.candidate-img img { width: 100%; height: 100%; object-fit: cover; }
.candidate-img .placeholder-avatar { font-size: 64px; opacity: 0.6; }
.candidate-img .img-loading {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: var(--bg-elevated);
}

.candidate-info { padding: 14px; }
.candidate-info .candidate-vibe { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.candidate-info .candidate-desc { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

.candidate-select-btn {
  display: block; width: calc(100% - 28px); margin: 0 14px 14px;
  padding: 10px; background: var(--rose-500); color: #fff;
  border: none; border-radius: 10px; font-size: 15px;
  font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.candidate-select-btn:active { background: var(--rose-600); }

.select-hint { text-align: center; font-size: 12px; color: var(--text-dim); padding-bottom: 24px; }

/* ── Confirm Page ── */

.confirm-hero { text-align: center; padding: 16px 0 8px; }
.confirm-hero h2 { font-size: 20px; }

.confirm-card {
  background: var(--bg-card); border: 2px solid var(--rose-500);
  border-radius: 16px; overflow: hidden; margin-bottom: 16px;
}
.confirm-portrait {
  width: 100%; aspect-ratio: 3/4; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; font-size: 64px;
  overflow: hidden;
}
.confirm-portrait img { width: 100%; height: 100%; object-fit: cover; }

#confirm-info { padding: 16px; text-align: center; }
#confirm-info .confirm-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
#confirm-info .confirm-vibe { font-size: 14px; color: var(--rose-400); margin-bottom: 8px; }
#confirm-info .confirm-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; text-align: left; }

.assets-gallery { padding-bottom: 16px; }
.assets-gallery.hidden { display: none; }
.assets-gallery h3 { font-size: 16px; margin-bottom: 12px; text-align: center; }

#assets-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 420px) {
  #assets-grid { grid-template-columns: repeat(3, 1fr); }
}

.asset-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; aspect-ratio: 1; position: relative;
}
.asset-item .asset-img {
  width: 100%; height: 100%; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  overflow: hidden;
}
.asset-item .asset-img img { width: 100%; height: 100%; object-fit: cover; }
.asset-item .asset-scene {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 8px; background: rgba(0,0,0,0.7);
  font-size: 11px; color: var(--text); text-align: center;
}

#confirm-actions { display: flex; flex-direction: column; gap: 10px; padding-bottom: 32px; }
#confirm-actions.hidden { display: none; }

#btn-reselect {
  text-align: center; background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 13px;
  padding: 8px; font-family: inherit;
}

/* ── Voice Call ── */

.voice-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; padding: 24px;
  gap: 20px; background: linear-gradient(180deg, #1a0a0e 0%, var(--bg) 100%);
}
.voice-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-300));
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; animation: float 3s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(244, 63, 94, 0.3);
}
.voice-avatar.speaking {
  animation: pulse-glow 0.8s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(244, 63, 94, 0.3); }
  50% { box-shadow: 0 0 80px rgba(244, 63, 94, 0.6); }
}

.voice-status { font-size: 16px; color: var(--text-muted); }
.voice-timer { font-size: 24px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; font-family: monospace; }

.voice-wave {
  display: flex; align-items: center; gap: 3px; height: 40px;
}
.voice-wave .wave-bar {
  width: 3px; border-radius: 2px; background: var(--rose-400);
  height: 8px; transition: height 0.15s;
}
.voice-wave.active .wave-bar:nth-child(1) { animation: wave 0.6s ease-in-out infinite; }
.voice-wave.active .wave-bar:nth-child(2) { animation: wave 0.6s ease-in-out 0.15s infinite; }
.voice-wave.active .wave-bar:nth-child(3) { animation: wave 0.6s ease-in-out 0.3s infinite; }
.voice-wave.active .wave-bar:nth-child(4) { animation: wave 0.6s ease-in-out 0.45s infinite; }
.voice-wave.active .wave-bar:nth-child(5) { animation: wave 0.6s ease-in-out 0.6s infinite; }
@keyframes wave {
  0%, 100% { height: 8px; }
  50% { height: 32px; }
}

.voice-transcript {
  max-width: 280px; text-align: center; font-size: 13px;
  color: var(--text-muted); min-height: 20px; line-height: 1.5;
}

.voice-actions {
  display: flex; align-items: center; gap: 20px; margin-top: 16px;
}
.voice-action-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-muted); display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: all 0.15s;
}
.voice-action-btn:active { color: var(--text); border-color: var(--text-muted); }
.voice-end-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--rose-500); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.voice-end-btn:active { background: var(--rose-700); }

.voice-text-fallback { margin-top: 12px; width: 100%; max-width: 300px; }
.voice-text-fallback.hidden { display: none; }
.voice-error-hint { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 8px; line-height: 1.4; }
.voice-text-row { display: flex; gap: 8px; align-items: center; }
.voice-text-row input {
  flex: 1; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font-size: 14px; outline: none;
}
.voice-text-row input:focus { border-color: var(--rose-400); }
.voice-text-row input:disabled { opacity: 0.5; }
#voice-text-send-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--rose-500); color: #fff; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0;
}
#voice-text-send-btn:active { background: var(--rose-700); }
#voice-text-send-btn:disabled { opacity: 0.5; }

/* ── Credit Page ── */

.credit-hero { padding: 16px 0; }
.credit-balance-card {
  background: linear-gradient(135deg, #1a0a2e, #1a1a2e);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; text-align: center;
}
.credit-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.credit-amount { font-size: 48px; font-weight: 700; color: var(--rose-400); }
.credit-unit { font-size: 13px; color: var(--text-dim); }

/* ── VIP Card ── */

.credit-vip { padding: 4px 0 20px; }

.vip-card {
  background: linear-gradient(135deg, #1a0a2e 0%, #1e1030 50%, #1a0a1e 100%);
  border: 2px solid var(--rose-500); border-radius: 18px;
  padding: 24px 20px; text-align: center; position: relative;
  overflow: hidden;
}
.vip-card::before {
  content: ""; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(244,63,94,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.vip-badge {
  display: inline-block; background: var(--rose-500);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 14px; border-radius: 12px;
  margin-bottom: 12px; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.vip-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.vip-price {
  font-size: 48px; font-weight: 800; color: var(--rose-400);
  margin-bottom: 4px; line-height: 1;
}
.vip-price span { font-size: 18px; font-weight: 400; color: var(--text-muted); }

.vip-features {
  list-style: none; padding: 16px 0; margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.vip-features li {
  font-size: 14px; color: var(--text-muted); padding: 0;
}
.vip-features li::before { content: "✓ "; color: var(--rose-400); font-weight: 700; }

.vip-secure {
  font-size: 11px; color: var(--text-dim); margin-top: 10px;
}

#btn-subscribe {
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  font-weight: 600; font-size: 16px; letter-spacing: 0.3px;
}
#btn-subscribe:disabled { opacity: 0.5; cursor: default; }

.credit-packages { padding: 20px 0; }
.credit-packages h3 { font-size: 16px; margin-bottom: 12px; }

.package-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.package-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; text-align: center;
  cursor: pointer; transition: border-color 0.15s;
}
.package-item:active { border-color: var(--rose-500); }
.package-item .pkg-credits { font-size: 28px; font-weight: 700; color: var(--rose-400); }
.package-item .pkg-price { font-size: 14px; color: var(--text); margin-top: 4px; }
.package-item .pkg-bonus { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.package-item.best-value { border-color: var(--rose-500); position: relative; }
.package-item .best-tag {
  position: absolute; top: -8px; right: 10px; background: var(--rose-500);
  color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 8px;
}

.credit-history { padding: 10px 0 32px; }
.credit-history h3 { font-size: 16px; margin-bottom: 12px; }
.credit-history-list { display: flex; flex-direction: column; gap: 8px; }
.credit-empty { text-align: center; color: var(--text-dim); font-size: 13px; padding: 20px; }
.credit-history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px;
}
.credit-history-item .h-item-desc { font-size: 14px; color: var(--text); }
.credit-history-item .h-item-date { font-size: 11px; color: var(--text-dim); }
.credit-history-item .h-item-amount { font-size: 14px; font-weight: 600; }
.credit-history-item .h-item-amount.plus { color: #22c55e; }
.credit-history-item .h-item-amount.minus { color: var(--rose-400); }

/* ── Profile Page ── */

.profile-hero { text-align: center; padding: 24px 0 20px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-300));
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: 0 auto 12px;
}
.profile-hero h2 { font-size: 20px; margin-bottom: 4px; }
.profile-hero p { font-size: 13px; color: var(--text-muted); }

.profile-section { padding: 12px 0; }
.profile-section h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

.profile-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.profile-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.profile-row:last-child { border-bottom: none; }
.profile-row span:first-child { color: var(--text-muted); }
.profile-row span:last-child { color: var(--text); font-weight: 500; }

/* ── Image container ── */

.img-container {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.img-container img { width: 100%; height: 100%; object-fit: cover; }
.img-container .img-placeholder { font-size: 48px; opacity: 0.6; }

/* ── Image Modal ── */

.image-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.image-modal.hidden { display: none; }
.image-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.image-modal-content {
  position: relative; max-width: 92vw; max-height: 92vh;
  display: flex; flex-direction: column; align-items: center;
  animation: modalZoom 0.25s ease-out;
}
@keyframes modalZoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.image-modal-content img {
  max-width: 100%; max-height: 75vh; border-radius: 16px;
  object-fit: contain; box-shadow: 0 0 60px rgba(244,63,94,0.15);
}
.image-modal-close {
  position: absolute; top: -40px; right: 0;
  background: none; border: none; color: #fff;
  font-size: 32px; cursor: pointer; line-height: 1;
  padding: 4px 8px; z-index: 1;
}
.image-modal-caption {
  color: var(--text-muted); font-size: 13px;
  margin-top: 12px; text-align: center; min-height: 20px;
}
.image-modal-download {
  margin-top: 12px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 22px;
  color: var(--text); padding: 8px 20px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-family: inherit;
}
.image-modal-download:active { border-color: var(--rose-500); }

/* ── Photo Request Button ── */

#photo-request-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0;
  transition: all 0.15s;
}
#photo-request-btn:active { color: var(--rose-400); border-color: var(--rose-400); }
#photo-request-btn.loading {
  animation: spin 1s linear infinite;
  color: var(--rose-400);
}

/* ── Proactive Image Sharing (system message style) ── */

.msg-system {
  align-self: center; text-align: center;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(244,63,94,0.08); border: 1px solid rgba(244,63,94,0.15);
  font-size: 12px; color: var(--rose-300);
  max-width: 85%; animation: msgIn 0.3s ease-out;
}
.msg-system .sys-icon { font-size: 18px; margin-bottom: 2px; }
.msg-system .sys-text { line-height: 1.4; }

.msg-image-preview {
  width: 180px; border-radius: 12px; margin-top: 8px;
  cursor: pointer; transition: transform 0.15s;
  border: 1px solid var(--border);
}
.msg-image-preview:active { transform: scale(1.02); }
.msg-image-loading {
  width: 180px; height: 120px; border-radius: 12px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-top: 8px;
}
.msg-image-loading .loading-spinner {
  width: 24px; height: 24px; border-width: 2px;
}

/* ── Quick Action Chips ── */

.quick-actions {
  display: flex; gap: 8px; padding: 6px 0; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  flex-shrink: 0;
}
.quick-actions::-webkit-scrollbar { display: none; }

.quick-action-chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 18px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-muted); font-size: 12px; font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.quick-action-chip:active {
  color: var(--rose-300); border-color: var(--rose-500);
  background: rgba(244,63,94,0.08);
}

/* ── Input Row (chips + input on same line or stacked) ── */

#input-bar { flex-direction: column; }
#input-bar .input-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
}

/* ── Image Share Card (type: assistant_image_share) ── */

.msg-image-share {
  align-self: flex-start; max-width: 85%;
  background: var(--msg-assistant-bg); border: 1px solid var(--msg-assistant-border);
  border-radius: 18px; border-bottom-left-radius: 6px;
  overflow: hidden; animation: msgIn 0.3s ease-out;
}

.img-share-badge {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px 6px; font-size: 11px; font-weight: 600;
  color: var(--rose-300); letter-spacing: 0.5px;
}

.img-share-caption {
  padding: 0 14px 8px; font-size: 13px; color: var(--text-muted);
  line-height: 1.4;
}

.img-share-photo {
  width: 100%; max-height: 320px; object-fit: cover; cursor: pointer;
  display: block; border-top: 1px solid var(--border);
  transition: opacity 0.2s;
}
.img-share-photo:active { opacity: 0.85; }

.img-share-broken {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 16px; gap: 8px; background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}
.img-share-broken .broken-icon { font-size: 32px; opacity: 0.5; }
.img-share-broken .broken-text { font-size: 12px; color: var(--text-dim); }

/* ── Audio Block (type: assistant_voice) ── */

.msg-audio {
  align-self: flex-start; max-width: 85%;
  background: var(--msg-assistant-bg); border: 1px solid var(--msg-assistant-border);
  border-radius: 18px; border-bottom-left-radius: 6px;
  padding: 10px 14px; animation: msgIn 0.3s ease-out;
}

.audio-label {
  font-size: 11px; color: var(--rose-300); font-weight: 600;
  margin-bottom: 8px; letter-spacing: 0.5px;
}

.audio-player {
  width: 100%; max-width: 260px; height: 36px;
  border-radius: 8px; outline: none;
}
.audio-player::-webkit-media-controls-panel {
  background: var(--bg-elevated);
}
.audio-player::-webkit-media-controls-current-time-display,
.audio-player::-webkit-media-controls-time-remaining-display {
  color: var(--text-muted); font-size: 11px;
}

.audio-error {
  font-size: 11px; color: var(--text-dim); margin-top: 4px;
}

/* ── Relationship Stage Header ── */

#header-relationship {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 3px 10px; font-size: 11px;
  cursor: pointer; flex-shrink: 0; transition: border-color 0.15s;
}
#header-relationship.hidden { display: none; }
#header-relationship:active { border-color: var(--rose-500); }
#rel-stage-emoji { font-size: 13px; }
#rel-stage-label { color: var(--text-muted); white-space: nowrap; }

/* ── Relationship Stage in Profile ── */

.rel-stage-display {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
}
.rel-stage-icon { font-size: 36px; flex-shrink: 0; }
.rel-stage-info { flex: 1; }
.rel-stage-name { font-size: 16px; font-weight: 600; color: var(--text); }
.rel-stage-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.rel-progress-bar {
  height: 4px; background: var(--bg-elevated);
  margin: 0 16px 12px; border-radius: 2px; overflow: hidden;
}
.rel-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--rose-500), var(--rose-300));
  border-radius: 2px; transition: width 0.5s ease;
}

.rel-signals {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 6px; padding: 0 16px 16px;
}
.rel-signal-item {
  display: flex; justify-content: space-between;
  font-size: 11px; padding: 4px 8px;
  background: var(--bg-elevated); border-radius: 6px;
}
.rel-signal-item .sig-label { color: var(--text-dim); }
.rel-signal-item .sig-value { color: var(--text); font-weight: 600; }

/* Product design polish: identity, pursuit, memory transparency */
#header-relationship {
  display: flex; align-items: center; gap: 4px;
  background: rgba(244,63,94,0.08); border: 1px solid rgba(244,63,94,0.2);
  border-radius: 14px; padding: 4px 9px; font-size: 12px; flex-shrink: 0;
}
#header-relationship.hidden { display: none; }
#header-style { color: var(--rose-300); }
.pursuit-empty { padding: 28px 24px; }
#messages-empty .empty-icon { font-size: 30px; color: var(--rose-300); margin-bottom: 8px; }
#messages-empty .empty-text { font-size: 16px; font-weight: 650; color: var(--text); }
#messages-empty .empty-sub { font-size: 13px; color: var(--text-muted); line-height: 1.45; margin-top: 6px; }
.candidate-info .candidate-name { font-size: 20px; font-weight: 750; margin-bottom: 4px; color: var(--text); }
.candidate-reason { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(244,63,94,0.07); color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.candidate-reason span { display: block; color: var(--rose-300); font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 3px; }
.candidate-line { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text); border-left: 2px solid var(--rose-500); padding-left: 10px; }
.confirm-promise { margin-top: 10px; font-size: 12px; color: var(--rose-300); line-height: 1.45; }
.memory-card .profile-row span:last-child { max-width: 58%; text-align: right; line-height: 1.35; }
.vip-secure { line-height: 1.4; max-width: 280px; margin-left: auto; margin-right: auto; }


/* Topic-specific login hero */
.login-hero-boyfriend {
  padding: 24px 18px 18px;
  text-align: left;
}
.login-scene {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.login-phone-card {
  width: min(100%, 292px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  box-shadow: 0 18px 44px rgba(0,0,0,0.28);
  padding: 14px;
}
.login-phone-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.login-avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-300));
  color: white;
  font-size: 19px;
  font-weight: 700;
}
.login-phone-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.login-bubble {
  max-width: 82%;
  padding: 9px 11px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 8px;
}
.login-bubble-left {
  background: rgba(255,255,255,0.09);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.login-bubble-right {
  margin-left: auto;
  background: var(--rose-500);
  color: white;
  border-bottom-right-radius: 4px;
}
.login-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}
.login-photo-strip span {
  aspect-ratio: 1;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,0.36), transparent 20%),
    linear-gradient(145deg, rgba(244,63,94,0.9), rgba(15,23,42,0.95));
}
.login-hero-boyfriend h1 {
  font-size: 27px;
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--text);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.login-hero-boyfriend p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.login-topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}
.login-topic-tags span {
  border: 1px solid rgba(244,63,94,0.28);
  background: rgba(244,63,94,0.08);
  color: var(--rose-300);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  white-space: nowrap;
}


/* Warm romantic login background */
#page-login {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 181, 202, 0.26), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(255, 214, 165, 0.16), transparent 26%),
    linear-gradient(180deg, #201722 0%, #151019 46%, #0f0d12 100%);
}
#page-login::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.06), transparent 34%);
  opacity: 0.55;
}
#page-login .page-scroll {
  position: relative;
  z-index: 1;
  background: transparent;
}
#page-login .login-form,
#page-login #register-form {
  background: rgba(31, 22, 31, 0.58);
  border: 1px solid rgba(255, 199, 213, 0.10);
  border-radius: 18px;
  padding: 16px;
  margin: 0 14px 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.20);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
#page-login .login-input-group input {
  background: rgba(255,255,255,0.075);
  border: 1px solid rgba(255, 199, 213, 0.10);
}
#page-login .login-input-group input:focus {
  border-color: rgba(253,164,175,0.58);
  box-shadow: 0 0 0 3px rgba(253,164,175,0.10);
}
.login-phone-card {
  border-color: rgba(255, 199, 213, 0.18);
  background:
    linear-gradient(150deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045)),
    linear-gradient(180deg, rgba(86, 45, 73, 0.60), rgba(36, 24, 41, 0.74));
  box-shadow: 0 22px 56px rgba(60, 18, 42, 0.32);
}
.login-bubble-left {
  background: rgba(255,255,255,0.12);
}
.login-bubble-right {
  background: linear-gradient(135deg, #fb7185, #d94676);
}
.login-photo-strip span {
  background:
    radial-gradient(circle at 50% 29%, rgba(255,255,255,0.38), transparent 18%),
    linear-gradient(145deg, rgba(251,113,133,0.88), rgba(102,58,89,0.94) 52%, rgba(35,30,55,0.96));
}
.login-topic-tags span {
  border-color: rgba(253,164,175,0.34);
  background: rgba(253,164,175,0.10);
  color: #ffc4cf;
}


/* Full warm romantic app shell */
:root {
  --bg: #151018;
  --bg-card: rgba(32, 22, 33, 0.78);
  --bg-elevated: rgba(255,255,255,0.075);
  --border: rgba(255, 205, 218, 0.12);
  --text-muted: #b9a7b0;
  --text-dim: #8f7e88;
  --msg-assistant-bg: rgba(255,255,255,0.08);
  --msg-assistant-border: rgba(255, 205, 218, 0.10);
}
html,
body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 184, 205, 0.28), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(255, 222, 180, 0.18), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(113, 58, 94, 0.22), transparent 36%),
    linear-gradient(180deg, #241724 0%, #161018 48%, #100d12 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 22px),
    radial-gradient(circle at 34% 16%, rgba(255,255,255,0.06), transparent 26%);
  opacity: 0.62;
}
#app {
  background:
    linear-gradient(180deg, rgba(42, 25, 42, 0.50), rgba(16, 13, 18, 0.80)),
    radial-gradient(circle at 50% 0%, rgba(255, 181, 202, 0.12), transparent 34%);
  box-shadow: 0 0 80px rgba(50, 15, 38, 0.28);
}
#header {
  background: rgba(31, 20, 31, 0.78);
  border-bottom-color: rgba(255, 205, 218, 0.12);
  box-shadow: 0 8px 28px rgba(24, 10, 20, 0.20);
}
#header-avatar {
  background: linear-gradient(135deg, #fb7185, #f9a8d4);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.22);
}
#page-login {
  background:
    radial-gradient(circle at 18% 6%, rgba(255, 201, 218, 0.30), transparent 30%),
    radial-gradient(circle at 78% 2%, rgba(255, 230, 190, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(44, 25, 42, 0.28) 0%, rgba(20, 13, 20, 0.14) 48%, rgba(15, 12, 17, 0.08) 100%);
}
#page-login::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 96px;
  height: 220px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 180, 205, 0.14), transparent 70%);
  filter: blur(22px);
}
#page-login .page-scroll {
  background: transparent;
}
#page-login .login-hero-boyfriend,
#page-login .login-form,
#page-login #register-form {
  position: relative;
  z-index: 1;
}
#page-login .login-form,
#page-login #register-form {
  background: rgba(28, 19, 29, 0.66);
  border-color: rgba(255, 205, 218, 0.16);
}
.login-phone-card {
  border-color: rgba(255, 205, 218, 0.22);
  background:
    linear-gradient(150deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05)),
    linear-gradient(180deg, rgba(91, 49, 76, 0.72), rgba(38, 25, 42, 0.84));
  box-shadow: 0 28px 68px rgba(64, 20, 48, 0.42);
}
.login-hero-boyfriend h1 {
  text-shadow: 0 8px 32px rgba(255, 190, 210, 0.12);
}


/* Visible full-page warm redesign override */
html,
body,
#app,
.page,
#page-login {
  background-color: #2a1422 !important;
}
html,
body {
  background-image:
    radial-gradient(circle at 12% 6%, rgba(255, 178, 202, 0.46), transparent 31%),
    radial-gradient(circle at 90% 0%, rgba(255, 219, 176, 0.32), transparent 28%),
    linear-gradient(180deg, #3a1d32 0%, #241424 44%, #130d13 100%) !important;
}
#app {
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 187, 209, 0.30), transparent 34%),
    linear-gradient(180deg, rgba(66, 31, 55, 0.86), rgba(19, 13, 19, 0.92)) !important;
}
#header {
  background: linear-gradient(135deg, rgba(73, 35, 59, 0.96), rgba(45, 24, 41, 0.96)) !important;
  border-bottom: 1px solid rgba(255, 205, 218, 0.22) !important;
}
#page-login {
  background-image:
    linear-gradient(180deg, rgba(255, 179, 202, 0.18), rgba(255,255,255,0) 34%),
    radial-gradient(circle at 20% 12%, rgba(255, 199, 219, 0.22), transparent 34%) !important;
}
.login-phone-card {
  background:
    linear-gradient(145deg, rgba(255, 219, 229, 0.20), rgba(255,255,255,0.06)),
    linear-gradient(180deg, rgba(111, 54, 87, 0.88), rgba(44, 26, 45, 0.92)) !important;
  border-color: rgba(255, 213, 225, 0.30) !important;
}
#page-login .login-form,
#page-login #register-form {
  background: rgba(39, 22, 38, 0.82) !important;
  border-color: rgba(255, 213, 225, 0.20) !important;
}


/* Light romance login viewport override */
body:has(#page-login:not(.hidden)),
body:has(#page-login:not(.hidden)) #app,
body:has(#page-login:not(.hidden)) #page-login {
  background-color: #fff1f5 !important;
}
body:has(#page-login:not(.hidden)) {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 126, 162, 0.28), transparent 28%),
    radial-gradient(circle at 88% 2%, rgba(255, 216, 158, 0.38), transparent 26%),
    linear-gradient(180deg, #fff6f8 0%, #ffe8ef 42%, #f9dce7 100%) !important;
}
body:has(#page-login:not(.hidden))::before {
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.74), transparent 24%),
    linear-gradient(135deg, rgba(205, 92, 125, 0.06) 0 1px, transparent 1px 24px) !important;
  opacity: 1 !important;
}
body:has(#page-login:not(.hidden)) #app {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.46), rgba(255, 238, 244, 0.72)),
    radial-gradient(circle at 50% 0%, rgba(255, 136, 170, 0.22), transparent 34%) !important;
  box-shadow: 0 0 90px rgba(205, 92, 125, 0.18) !important;
}
body:has(#page-login:not(.hidden)) #header {
  background: rgba(255, 244, 248, 0.92) !important;
  border-bottom: 1px solid rgba(205, 92, 125, 0.18) !important;
  box-shadow: 0 10px 30px rgba(205, 92, 125, 0.12) !important;
}
body:has(#page-login:not(.hidden)) #header-name {
  color: #392632 !important;
}
body:has(#page-login:not(.hidden)) #header-style {
  color: #b45b7c !important;
}
body:has(#page-login:not(.hidden)) #header-avatar {
  background: linear-gradient(135deg, #ff6f91, #ffc1d6) !important;
}
body:has(#page-login:not(.hidden)) #page-login {
  background-image:
    radial-gradient(circle at 18% 6%, rgba(255,255,255,0.62), transparent 30%),
    radial-gradient(circle at 78% 12%, rgba(255, 189, 211, 0.26), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.36), rgba(255, 232, 240, 0.22)) !important;
}
body:has(#page-login:not(.hidden)) .login-phone-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.78), rgba(255, 234, 242, 0.70)),
    linear-gradient(180deg, rgba(255, 204, 220, 0.56), rgba(255, 245, 248, 0.82)) !important;
  border-color: rgba(205, 92, 125, 0.20) !important;
  box-shadow: 0 24px 60px rgba(205, 92, 125, 0.18) !important;
}
body:has(#page-login:not(.hidden)) .login-phone-name,
body:has(#page-login:not(.hidden)) .login-hero-boyfriend h1 {
  color: #3a2631 !important;
  -webkit-text-fill-color: currentColor !important;
}
body:has(#page-login:not(.hidden)) .login-hero-boyfriend p {
  color: #7d6672 !important;
}
body:has(#page-login:not(.hidden)) .login-bubble-left {
  background: rgba(255,255,255,0.84) !important;
  color: #5d4451 !important;
}
body:has(#page-login:not(.hidden)) .login-bubble-right {
  background: linear-gradient(135deg, #ff6f91, #d94f7b) !important;
  color: white !important;
}
body:has(#page-login:not(.hidden)) .login-photo-strip span {
  background:
    radial-gradient(circle at 50% 29%, rgba(255,255,255,0.78), transparent 18%),
    linear-gradient(145deg, #ff8fb0, #d67aa0 50%, #7c5b88) !important;
}
body:has(#page-login:not(.hidden)) .login-topic-tags span {
  border-color: rgba(205, 92, 125, 0.28) !important;
  background: rgba(255,255,255,0.62) !important;
  color: #a54970 !important;
}
body:has(#page-login:not(.hidden)) .login-form,
body:has(#page-login:not(.hidden)) #register-form {
  background: rgba(255,255,255,0.68) !important;
  border-color: rgba(205, 92, 125, 0.18) !important;
  box-shadow: 0 18px 48px rgba(205, 92, 125, 0.12) !important;
}
body:has(#page-login:not(.hidden)) .login-input-group label {
  color: #8b6577 !important;
}
body:has(#page-login:not(.hidden)) .login-input-group input {
  background: rgba(255,255,255,0.78) !important;
  border-color: rgba(205, 92, 125, 0.18) !important;
  color: #3a2631 !important;
}
body:has(#page-login:not(.hidden)) .login-toggle {
  color: #7d6672 !important;
}


/* Feminine-friendly typography */
:root {
  --font-ui: "Noto Sans TC", "PingFang TC", "PingFang HK", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Noto Serif TC", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", serif;
}
body,
input,
button,
textarea,
select {
  font-family: var(--font-ui) !important;
  letter-spacing: 0 !important;
}
.login-hero-boyfriend h1,
.q-hero h1,
.select-hero h2,
.confirm-hero h2,
.credit-vip h3,
.profile-hero h2 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}
.login-hero-boyfriend h1 {
  font-size: 29px !important;
  line-height: 1.22 !important;
}
.login-hero-boyfriend p,
.login-bubble,
.login-topic-tags span,
.login-phone-name {
  font-weight: 500 !important;
}
#header-name,
.btn-primary,
.btn-outline,
.candidate-name,
.confirm-name {
  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
}
#header-style,
.login-input-group label,
.login-toggle,
.empty-sub,
.candidate-reason,
.confirm-promise {
  font-family: var(--font-ui) !important;
  font-weight: 500 !important;
}


/* Animated intro splash */
body.intro-lock #app { opacity: 0; transform: scale(0.985); }
body.intro-done #app { opacity: 1; transform: scale(1); transition: opacity 520ms ease, transform 520ms ease; }
#intro-splash {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 18% 10%, rgba(255, 143, 176, 0.38), transparent 30%), radial-gradient(circle at 86% 8%, rgba(255, 220, 170, 0.30), transparent 28%), linear-gradient(180deg, #fff7f9 0%, #ffe8ef 48%, #f6d7e3 100%);
  color: #372430;
}
#intro-splash.intro-hide { opacity: 0; transform: scale(1.015); pointer-events: none; transition: opacity 520ms ease, transform 520ms ease; }
.intro-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; filter: blur(24px); opacity: 0.55; animation: introFloat 3.2s ease-in-out infinite; }
.intro-glow-a { left: -60px; top: 6%; background: rgba(255, 112, 145, 0.32); }
.intro-glow-b { right: -80px; bottom: 8%; background: rgba(255, 211, 160, 0.34); animation-delay: -1.2s; }
.intro-card { width: min(82vw, 330px); border: 1px solid rgba(191, 88, 121, 0.18); border-radius: 28px; padding: 28px 22px 22px; background: rgba(255,255,255,0.68); box-shadow: 0 28px 80px rgba(191, 88, 121, 0.22); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); text-align: center; animation: introCardIn 780ms cubic-bezier(.2,.8,.2,1) both; }
.intro-heart { width: 74px; height: 74px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ff6f91, #ffc1d6); color: #fff; font-size: 46px; line-height: 1; box-shadow: 0 18px 42px rgba(255, 111, 145, 0.34); animation: introPulse 1.45s ease-in-out infinite; }
.intro-title { font-family: var(--font-display, serif); font-size: 34px; font-weight: 700; letter-spacing: 0; color: #3a2631; }
.intro-subtitle { margin-top: 4px; color: #9b5d78; font-size: 14px; font-weight: 600; }
.intro-chat { margin: 20px 0 14px; display: grid; gap: 9px; }
.intro-msg { padding: 10px 12px; border-radius: 15px; font-size: 12px; line-height: 1.45; animation: introBubble 560ms ease both; }
.intro-msg-left { justify-self: start; max-width: 86%; background: rgba(255,255,255,0.86); color: #5d4451; border-bottom-left-radius: 5px; animation-delay: 520ms; }
.intro-msg-right { justify-self: end; max-width: 86%; background: linear-gradient(135deg, #ff6f91, #d94f7b); color: #fff; border-bottom-right-radius: 5px; animation-delay: 850ms; }
.intro-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 10px 18px; }
.intro-photos span { aspect-ratio: 1; border-radius: 14px; background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.76), transparent 18%), linear-gradient(145deg, #ff9ab7, #d77da2 52%, #80608c); animation: introPhoto 880ms ease both; }
.intro-photos span:nth-child(1) { animation-delay: 1.05s; }
.intro-photos span:nth-child(2) { animation-delay: 1.18s; }
.intro-photos span:nth-child(3) { animation-delay: 1.31s; }
.intro-progress { height: 4px; border-radius: 999px; overflow: hidden; background: rgba(155, 93, 120, 0.15); }
.intro-progress span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff6f91, #ffc1d6); transform-origin: left; animation: introProgress 2.65s linear forwards; }
#intro-skip { position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); border: 1px solid rgba(155, 93, 120, 0.20); background: rgba(255,255,255,0.58); color: #8f526b; border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 600; }
@keyframes introCardIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes introPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes introFloat { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(12px, -10px, 0); } }
@keyframes introBubble { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes introPhoto { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes introProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { #intro-splash, #intro-splash * { animation: none !important; transition: none !important; } }


/* Realtime phone-call voice UX */
.voice-call-mode { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(244, 63, 94, 0.24); color: var(--rose-300); font-size: 12px; font-weight: 700; }
.voice-call-mode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; box-shadow: 0 0 0 0 rgba(156, 163, 175, 0.4); }
.voice-call-mode.connected::before, .voice-call-mode.listening::before { background: #22c55e; animation: callPulse 1.4s ease-in-out infinite; }
.voice-call-mode.connecting::before { background: #f59e0b; animation: callPulse 1s ease-in-out infinite; }
.voice-call-mode.fallback::before { background: #fb7185; }
.voice-container.call-live .voice-avatar { box-shadow: 0 0 0 10px rgba(244,63,94,0.08), 0 0 52px rgba(244,63,94,0.28); }
.voice-container.call-live .voice-wave .wave-bar { background: linear-gradient(180deg, var(--rose-300), var(--rose-500)); }
.voice-call-hint { max-width: 300px; text-align: center; color: var(--text-dim); font-size: 12px; line-height: 1.45; margin-top: -8px; }
@keyframes callPulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.38); } 100% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } }


/* YPMR feminine page ambience backgrounds */
:root {
  --ambience-rose: #fff1f5;
  --ambience-pearl: #fffaf8;
  --ambience-champagne: #fff0d8;
  --ambience-lavender: #efe7ff;
  --ambience-sage: #eaf6ef;
  --ambience-ink: #3c2632;
}

html,
body {
  background-color: var(--ambience-pearl) !important;
  background-image:
    linear-gradient(145deg, rgba(255, 238, 244, 0.96), rgba(255, 250, 247, 0.94) 42%, rgba(242, 232, 255, 0.72)),
    repeating-linear-gradient(115deg, rgba(188, 119, 142, 0.055) 0 1px, transparent 1px 24px) !important;
}

#app {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 244, 248, 0.48)),
    var(--page-bg, linear-gradient(155deg, #fff7f9, #f8edf3 48%, #f1edf9)) !important;
  box-shadow: 0 0 90px rgba(188, 119, 142, 0.16) !important;
}

#header,
#tab-bar,
#input-bar {
  background: rgba(255, 250, 250, 0.86) !important;
  border-color: rgba(188, 119, 142, 0.18) !important;
  color: var(--ambience-ink) !important;
  box-shadow: 0 12px 36px rgba(121, 77, 98, 0.10) !important;
}

#header-name,
#messages-empty .empty-text,
.voice-status,
.voice-timer,
.profile-hero h2,
.credit-vip h3,
.select-hero h2,
.confirm-hero h2,
.q-hero h1 {
  color: var(--ambience-ink) !important;
}

#header-style,
#messages-empty .empty-sub,
.voice-call-hint,
.profile-hero p,
.select-hero p,
.confirm-promise,
.q-hero p,
.credit-label,
.credit-unit {
  color: #8f6878 !important;
}

.page {
  --page-bg: linear-gradient(155deg, #fff8f9 0%, #f8edf3 48%, #f1edf9 100%);
  background: var(--page-bg) !important;
  isolation: isolate;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255,255,255,0.70), transparent 34%, rgba(255,255,255,0.34) 68%, transparent),
    linear-gradient(32deg, var(--page-sheen-a, rgba(255, 190, 209, 0.32)), transparent 44%),
    linear-gradient(212deg, var(--page-sheen-b, rgba(255, 224, 178, 0.22)), transparent 46%),
    repeating-linear-gradient(100deg, rgba(122, 77, 98, 0.045) 0 1px, transparent 1px 28px);
  opacity: 0.96;
}

.page > * {
  position: relative;
  z-index: 1;
}

.page-scroll,
#messages,
.voice-container {
  background: transparent !important;
}

#page-login {
  --page-bg: linear-gradient(156deg, #fff9f7 0%, #ffeaf0 36%, #f7edf8 72%, #fff2df 100%);
  --page-sheen-a: rgba(255, 146, 174, 0.26);
  --page-sheen-b: rgba(255, 214, 164, 0.26);
}

#page-questionnaire {
  --page-bg: linear-gradient(158deg, #fffaf8 0%, #fff0f4 42%, #eef7f2 100%);
  --page-sheen-a: rgba(255, 188, 203, 0.24);
  --page-sheen-b: rgba(172, 212, 190, 0.20);
}

#page-select {
  --page-bg: linear-gradient(155deg, #fdf8ff 0%, #f1e8ff 38%, #ffeef4 76%, #fff8eb 100%);
  --page-sheen-a: rgba(197, 166, 244, 0.24);
  --page-sheen-b: rgba(255, 171, 196, 0.22);
}

#page-confirm {
  --page-bg: linear-gradient(155deg, #fff8f3 0%, #ffe8ef 44%, #edf6ff 100%);
  --page-sheen-a: rgba(255, 170, 191, 0.26);
  --page-sheen-b: rgba(178, 210, 238, 0.20);
}

#page-chat {
  --page-bg: linear-gradient(160deg, #fff8f5 0%, #fff1e4 28%, #f7eef8 62%, #eef7f2 100%);
  --page-sheen-a: rgba(255, 205, 178, 0.24);
  --page-sheen-b: rgba(205, 188, 235, 0.22);
}

#page-voice {
  --page-bg: linear-gradient(158deg, #fff6f8 0%, #f3eafe 34%, #fff1e5 72%, #eef7f4 100%);
  --page-sheen-a: rgba(203, 174, 242, 0.25);
  --page-sheen-b: rgba(255, 192, 205, 0.22);
}

#page-credit {
  --page-bg: linear-gradient(156deg, #fffaf2 0%, #fff0d8 34%, #ffeaf1 72%, #f3f5ff 100%);
  --page-sheen-a: rgba(255, 210, 132, 0.28);
  --page-sheen-b: rgba(255, 153, 180, 0.18);
}

#page-profile {
  --page-bg: linear-gradient(158deg, #fff9f8 0%, #f4f0ff 36%, #fff0f4 70%, #eef8f1 100%);
  --page-sheen-a: rgba(187, 169, 235, 0.23);
  --page-sheen-b: rgba(255, 184, 204, 0.20);
}

body:has(#page-login:not(.hidden)),
body:has(#page-login:not(.hidden)) #app,
body:has(#page-login:not(.hidden)) #page-login,
body:has(#page-questionnaire:not(.hidden)),
body:has(#page-select:not(.hidden)),
body:has(#page-confirm:not(.hidden)),
body:has(#page-chat:not(.hidden)),
body:has(#page-voice:not(.hidden)),
body:has(#page-credit:not(.hidden)),
body:has(#page-profile:not(.hidden)) {
  background-image: none !important;
}

body:has(#page-login:not(.hidden)) #app,
body:has(#page-questionnaire:not(.hidden)) #app,
body:has(#page-select:not(.hidden)) #app,
body:has(#page-confirm:not(.hidden)) #app,
body:has(#page-chat:not(.hidden)) #app,
body:has(#page-voice:not(.hidden)) #app,
body:has(#page-credit:not(.hidden)) #app,
body:has(#page-profile:not(.hidden)) #app {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0.22)),
    var(--page-bg, linear-gradient(155deg, #fff7f9, #f8edf3 48%, #f1edf9)) !important;
}

.q-block,
.candidate-card,
.confirm-card,
.profile-card,
.credit-balance-card,
.vip-card,
.package-item,
.voice-transcript,
.voice-text-fallback {
  background: rgba(255, 255, 255, 0.68) !important;
  border-color: rgba(188, 119, 142, 0.18) !important;
  box-shadow: 0 18px 46px rgba(121, 77, 98, 0.10) !important;
  color: var(--ambience-ink) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-form,
#register-form {
  background: rgba(255,255,255,0.72) !important;
  border-color: rgba(188, 119, 142, 0.18) !important;
  box-shadow: 0 20px 54px rgba(121, 77, 98, 0.12) !important;
}

.login-input-group input,
.q-option,
.q-textarea,
#chat-input,
.voice-text-row input {
  background: rgba(255, 255, 255, 0.76) !important;
  border-color: rgba(188, 119, 142, 0.20) !important;
  color: #3c2632 !important;
}

.q-option.selected {
  background: rgba(255, 225, 234, 0.78) !important;
  border-color: rgba(236, 92, 129, 0.50) !important;
}

.msg-assistant {
  background: rgba(255, 255, 255, 0.78) !important;
  color: #3d2a34 !important;
  border-color: rgba(188, 119, 142, 0.18) !important;
  box-shadow: 0 12px 32px rgba(121, 77, 98, 0.09) !important;
}

.msg-user {
  background: linear-gradient(135deg, #f45d82, #d94f7b) !important;
  color: #fff !important;
  box-shadow: 0 14px 36px rgba(217, 79, 123, 0.20) !important;
}

.quick-action-chip,
#photo-request-btn,
#voice-toggle-btn,
.voice-action-btn {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(188, 119, 142, 0.18) !important;
  color: #7c5265 !important;
}

#send-btn,
.btn-primary,
.voice-end-btn {
  background: linear-gradient(135deg, #f45d82, #d94f7b) !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(217, 79, 123, 0.22) !important;
}

#tab-bar .tab-btn.active,
#header-credit-badge,
.voice-call-mode {
  color: #c64f77 !important;
  background: rgba(255, 238, 244, 0.72) !important;
  border-color: rgba(217, 79, 123, 0.18) !important;
}

#intro-splash {
  background:
    linear-gradient(145deg, #fffaf8 0%, #ffeaf0 44%, #f2ecff 72%, #fff1df 100%) !important;
}

@supports not selector(body:has(#page-login:not(.hidden))) {
  #app { background: linear-gradient(155deg, #fff8f9, #f7edf6 48%, #fff1e1) !important; }
}


/* YPMR product design acceptance polish */
body:has(#page-login:not(.hidden)) #app {
  --page-bg: linear-gradient(156deg, #fff9f7 0%, #ffeaf0 36%, #f7edf8 72%, #fff2df 100%);
  --page-sheen-a: rgba(255, 146, 174, 0.26);
  --page-sheen-b: rgba(255, 214, 164, 0.26);
}
body:has(#page-questionnaire:not(.hidden)) #app {
  --page-bg: linear-gradient(158deg, #fffaf8 0%, #fff0f4 42%, #eef7f2 100%);
  --page-sheen-a: rgba(255, 188, 203, 0.24);
  --page-sheen-b: rgba(172, 212, 190, 0.20);
}
body:has(#page-select:not(.hidden)) #app {
  --page-bg: linear-gradient(155deg, #fdf8ff 0%, #f1e8ff 38%, #ffeef4 76%, #fff8eb 100%);
  --page-sheen-a: rgba(197, 166, 244, 0.24);
  --page-sheen-b: rgba(255, 171, 196, 0.22);
}
body:has(#page-confirm:not(.hidden)) #app {
  --page-bg: linear-gradient(155deg, #fff8f3 0%, #ffe8ef 44%, #edf6ff 100%);
  --page-sheen-a: rgba(255, 170, 191, 0.26);
  --page-sheen-b: rgba(178, 210, 238, 0.20);
}
body:has(#page-chat:not(.hidden)) #app {
  --page-bg: linear-gradient(160deg, #fff8f5 0%, #fff1e4 28%, #f7eef8 62%, #eef7f2 100%);
  --page-sheen-a: rgba(255, 205, 178, 0.24);
  --page-sheen-b: rgba(205, 188, 235, 0.22);
}
body:has(#page-voice:not(.hidden)) #app {
  --page-bg: linear-gradient(158deg, #fff6f8 0%, #f3eafe 34%, #fff1e5 72%, #eef7f4 100%);
  --page-sheen-a: rgba(203, 174, 242, 0.25);
  --page-sheen-b: rgba(255, 192, 205, 0.22);
}
body:has(#page-credit:not(.hidden)) #app {
  --page-bg: linear-gradient(156deg, #fffaf2 0%, #fff0d8 34%, #ffeaf1 72%, #f3f5ff 100%);
  --page-sheen-a: rgba(255, 210, 132, 0.28);
  --page-sheen-b: rgba(255, 153, 180, 0.18);
}
body:has(#page-profile:not(.hidden)) #app {
  --page-bg: linear-gradient(158deg, #fff9f8 0%, #f4f0ff 36%, #fff0f4 70%, #eef8f1 100%);
  --page-sheen-a: rgba(187, 169, 235, 0.23);
  --page-sheen-b: rgba(255, 184, 204, 0.20);
}

#messages,
.page-scroll {
  scrollbar-color: rgba(188, 119, 142, 0.38) transparent;
}

.candidate-info .candidate-desc,
#confirm-info .confirm-desc,
.img-share-caption,
.audio-error,
.voice-error-hint,
.credit-empty,
.profile-section h3,
.rel-stage-desc,
.rel-signal-item .sig-label,
.package-item .pkg-bonus {
  color: #765c69 !important;
}

.candidate-info .candidate-name,
.candidate-info .candidate-vibe,
.confirm-name,
.profile-row span:last-child,
.rel-stage-name,
.package-item .pkg-price,
.credit-history-item .h-item-desc,
.img-share-badge,
.audio-label {
  color: #3c2632 !important;
}

.asset-item,
.msg-image-share,
.msg-audio,
.rel-signal-item,
.credit-history-item,
.image-modal-download,
.msg-image-loading,
.img-share-broken {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(188, 119, 142, 0.18) !important;
  color: #3c2632 !important;
  box-shadow: 0 12px 32px rgba(121, 77, 98, 0.08) !important;
}

.asset-item .asset-scene {
  background: linear-gradient(180deg, transparent, rgba(48, 31, 42, 0.76)) !important;
  color: #fff8fb !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.28);
}

.vip-card {
  border-width: 1px !important;
  border-color: rgba(205, 145, 74, 0.26) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.78), rgba(255, 245, 230, 0.72)),
    linear-gradient(155deg, rgba(255, 215, 145, 0.24), rgba(255, 188, 207, 0.18)) !important;
}
.vip-badge {
  background: linear-gradient(135deg, #d6a84f, #e76f91) !important;
  color: #fff !important;
  letter-spacing: 0 !important;
}
.vip-price {
  color: #c64f77 !important;
  font-size: clamp(38px, 11vw, 48px) !important;
}
.vip-price span,
.vip-features li,
.vip-secure {
  color: #765c69 !important;
}
.credit-amount,
.package-item .pkg-credits {
  color: #c64f77 !important;
}

.voice-container {
  justify-content: flex-start !important;
  min-height: 100%;
  overflow-y: auto;
  padding: clamp(28px, 8vh, 56px) 24px calc(28px + var(--safe-bottom)) !important;
  gap: clamp(12px, 2.8vh, 20px) !important;
}
.voice-call-mode {
  min-height: 34px;
  padding: 8px 14px !important;
  color: #ad3f69 !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 10px 28px rgba(121, 77, 98, 0.10) !important;
}
.voice-avatar {
  width: clamp(92px, 27vw, 118px) !important;
  height: clamp(92px, 27vw, 118px) !important;
  background:
    radial-gradient(circle at 35% 26%, rgba(255,255,255,0.76), transparent 25%),
    linear-gradient(135deg, #f45d82, #c8a2ff) !important;
  box-shadow: 0 0 0 10px rgba(255,255,255,0.54), 0 24px 64px rgba(172, 96, 132, 0.22) !important;
}
.voice-status {
  max-width: 320px;
  text-align: center;
  font-size: clamp(15px, 4vw, 18px) !important;
  line-height: 1.45;
  font-weight: 700;
}
.voice-timer {
  font-size: clamp(28px, 9vw, 40px) !important;
  line-height: 1;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.54);
  border: 1px solid rgba(188, 119, 142, 0.16);
}
.voice-wave {
  height: 38px !important;
  padding: 0 10px;
}
.voice-actions {
  margin-top: auto !important;
  padding-top: 10px;
  gap: clamp(18px, 7vw, 28px) !important;
}
.voice-action-btn {
  width: 48px !important;
  height: 48px !important;
}
.voice-end-btn {
  width: 64px !important;
  height: 64px !important;
  background: linear-gradient(135deg, #ef4444, #d94676) !important;
}
.voice-text-fallback {
  max-width: 340px !important;
}

#input-bar {
  padding-bottom: max(10px, var(--safe-bottom)) !important;
}
.quick-action-chip {
  min-height: 34px;
  font-size: 12px !important;
}
#chat-input {
  min-height: 44px;
}
#photo-request-btn,
#voice-toggle-btn,
#send-btn,
#voice-text-send-btn {
  width: 44px !important;
  height: 44px !important;
}

@media (max-width: 380px) {
  .page-scroll { padding-left: 14px !important; padding-right: 14px !important; }
  .login-hero-boyfriend h1 { font-size: 25px !important; }
  .vip-card { padding-left: 16px !important; padding-right: 16px !important; }
  .package-grid { grid-template-columns: 1fr !important; }
  .profile-row { align-items: flex-start !important; gap: 12px; }
  .profile-row span:last-child { text-align: right; overflow-wrap: anywhere; }
}
