/* 通用组件：按钮、标签、玻璃卡、聊天、回复卡、弹层、表单等 */

/* ---------- 标识 ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 22px/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo__dots {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
}
.logo__dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.logo__dots i:nth-child(1) { color: var(--safe); }
.logo__dots i:nth-child(2) { color: var(--bold); }
.logo__dots i:nth-child(3) { color: var(--play); }
.logo--sm {
  font-size: 19px;
  gap: 8px;
}
.logo--sm .logo__dots i {
  width: 7px;
  height: 7px;
}

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font: 600 16px/1 var(--font-body);
  color: var(--text);
  white-space: nowrap;
  isolation: isolate;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s, color 0.2s;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn .ico {
  width: 18px;
  height: 18px;
}
.btn--primary {
  color: var(--ink);
  background: var(--grad);
  background-size: 170% 100%;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}
.btn--primary:hover {
  background-position: 90% 0;
  transform: translateY(-2px);
  box-shadow: 0 16px 54px rgba(197, 107, 255, 0.5);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.5) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 0.8s var(--ease);
}
.btn--primary:hover::after {
  transform: translateX(130%);
}
.btn--glass {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--glass:hover {
  background: var(--surface-3);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}
.btn--ghost {
  min-height: 44px;
  padding: 0 16px;
  color: var(--text-2);
}
.btn--ghost:hover {
  color: var(--text);
}
.btn--danger {
  color: var(--error);
  border: 1px solid rgba(255, 107, 107, 0.35);
}
.btn--danger:hover {
  background: rgba(255, 107, 107, 0.1);
}
.btn--tone {
  --t: var(--safe);
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  color: var(--ink);
  background: var(--t);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease), filter 0.2s;
}
.btn--tone:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}
.rcard--safe .btn--tone { --t: var(--safe); }
.rcard--bold .btn--tone { --t: var(--bold); }
.rcard--playful .btn--tone { --t: var(--play); }
.btn--sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}
.btn--lg {
  min-height: 58px;
  padding: 0 34px;
  font-size: 17px;
}
.btn--block {
  width: 100%;
}
.btn.is-copied {
  background: var(--t, var(--safe));
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--text-2);
  transition: color 0.18s, background 0.18s, transform 0.18s var(--ease);
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.icon-btn--sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.icon-btn--sm .ico {
  width: 18px;
  height: 18px;
}
.icon-btn[aria-pressed="true"] {
  color: var(--t, var(--pink));
  background: rgba(255, 255, 255, 0.08);
}
.link {
  color: var(--text-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 4px;
  transition: color 0.18s;
}
.link:hover {
  color: var(--text);
}

/* ---------- 标签与小胶囊 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font: 600 13px/1 var(--font-body);
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill b {
  font-weight: 700;
  color: var(--text);
}
.pill--quota.is-empty {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.45);
}
.pill--quota.is-empty b {
  color: var(--warn);
}
.pill--quota.is-pro {
  color: var(--ink);
  background: var(--grad);
  border-color: transparent;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px 0 10px;
  border-radius: var(--r-pill);
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px var(--pink);
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font: 700 11px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag--brand {
  color: var(--ink);
  background: var(--grad);
}
.tone-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  font: 700 12px/1 var(--font-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tone-2);
  background: var(--tone-bg);
  border: 1px solid var(--tone-bd);
}
.tone-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 10px var(--tone);
}
.tone-chip--safe { --tone: var(--safe); --tone-2: var(--safe-2); --tone-bg: var(--safe-bg); --tone-bd: var(--safe-bd); }
.tone-chip--bold { --tone: var(--bold); --tone-2: var(--bold-2); --tone-bg: var(--bold-bg); --tone-bd: var(--bold-bd); }
.tone-chip--playful { --tone: var(--play); --tone-2: var(--play-2); --tone-bg: var(--play-bg); --tone-bd: var(--play-bd); }

/* ---------- 卡片容器 ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.gb {
  border: 1px solid transparent;
  border-radius: 28px;
  background: linear-gradient(180deg, #1a1428, #0f0c18) padding-box, linear-gradient(135deg, rgba(255, 111, 165, 0.85), rgba(197, 107, 255, 0.7) 50%, rgba(123, 140, 255, 0.6)) border-box;
}
.sec {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0;
}
.sec-head {
  display: grid;
  gap: 18px;
  justify-items: center;
  max-width: 780px;
  margin: 0 auto clamp(36px, 5vw, 60px);
  text-align: center;
}
.sec-head h2 {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.1;
}
.sec-head p {
  max-width: 620px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-2);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 9, 18, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.topbar.is-scrolled {
  border-color: var(--border);
  background: rgba(11, 9, 18, 0.88);
}
.topbar__in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 60px;
}
.topbar__side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.topbar__side--r {
  justify-content: flex-end;
}
.topbar__title {
  font: 600 15px/1.2 var(--font-body);
  color: var(--text-2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 底部标签 ---------- */
.appnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  justify-content: center;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: rgba(11, 9, 18, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.appnav__in {
  display: flex;
  gap: 4px;
  width: min(100%, 420px);
}
.appnav__tab {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 14px;
  font: 600 12px/1 var(--font-body);
  color: var(--text-3);
  transition: color 0.18s;
}
.appnav__tab:hover {
  color: var(--text-2);
}
.appnav__tab.is-active {
  color: var(--text);
}
.appnav__tab.is-active .ico {
  color: var(--pink);
}

/* ---------- 聊天 ---------- */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 84%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  animation: bubbleIn 0.4s var(--ease) both;
}
.bubble--them {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: 6px;
}
.bubble--me {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(255, 111, 165, 0.34), rgba(197, 107, 255, 0.3) 55%, rgba(123, 140, 255, 0.32));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-right-radius: 6px;
}
.bubble__who {
  display: block;
  margin-bottom: 4px;
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.typing {
  display: inline-flex;
  align-self: flex-start;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.chat--sm .bubble {
  padding: 9px 14px;
  font-size: 14px;
  border-radius: 16px;
}

/* ---------- 回复卡 ---------- */
.rcard {
  --tone: var(--safe);
  --tone-2: var(--safe-2);
  --tone-bg: var(--safe-bg);
  --tone-bd: var(--safe-bd);
  position: relative;
  padding: 20px 20px 16px 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.028));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: riseIn 0.5s var(--ease) both;
  transition: opacity 0.2s;
}
.rcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--tone);
  box-shadow: 0 0 24px var(--tone);
}
.rcard::after {
  content: "";
  position: absolute;
  left: -60px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tone-bg), transparent 70%);
  opacity: 0.9;
  pointer-events: none;
}
.rcard > * {
  position: relative;
}
.rcard--safe { --tone: var(--safe); --tone-2: var(--safe-2); --tone-bg: var(--safe-bg); --tone-bd: var(--safe-bd); }
.rcard--bold { --tone: var(--bold); --tone-2: var(--bold-2); --tone-bg: var(--bold-bg); --tone-bd: var(--bold-bd); }
.rcard--playful { --tone: var(--play); --tone-2: var(--play-2); --tone-bg: var(--play-bg); --tone-bd: var(--play-bd); }
.rcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rcard__flag {
  font: 600 12px/1 var(--font-body);
  color: var(--text-3);
}
.rcard__text {
  margin: 14px 0 10px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--text);
}
.rcard__why {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.rcard__why b {
  color: var(--tone-2);
  font-weight: 700;
}
.rcard__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}
.rcard__actions .btn--tone {
  min-width: 104px;
}
.rcard__actions .spacer {
  flex: 1;
}
.paste-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--tone-2);
  opacity: 0;
  transform: translateY(-4px);
  transition: 0.25s var(--ease);
}
.paste-hint.is-show {
  opacity: 1;
  transform: none;
}
.rcard__edit {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.rcard__edit textarea {
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--tone-bd);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
}
.rcard__edit textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--tone-bg);
}
.rcard__edit-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.rcard.is-refining > *:not(.rcard__skel) {
  opacity: 0.18;
}
.rcard__skel {
  position: absolute;
  inset: 20px 20px 16px 26px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.rcard.is-refining {
  animation: none;
}

/* ---------- 语气滑杆 ---------- */
.tone-slider {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  isolation: isolate;
}
.tone-slider__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.24s var(--ease);
}
.tone-slider[data-value="safe"] .tone-slider__thumb { transform: translateX(100%); }
.tone-slider[data-value="bold"] .tone-slider__thumb { transform: translateX(200%); }
.tone-slider[data-value="playful"] .tone-slider__thumb { transform: translateX(300%); }
.tone-slider.is-disabled .tone-opt {
  pointer-events: none;
  opacity: 0.5;
}
.tone-opt {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border-radius: var(--r-pill);
  font: 600 14px/1 var(--font-body);
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s;
}
.tone-opt:hover {
  color: var(--text-2);
}
.tone-opt.is-active {
  color: var(--text);
}
.tone-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tone-opt i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--t, var(--safe));
}
.tone-opt[data-tone="mix"] i { background: var(--grad); }
.tone-opt[data-tone="safe"] i { background: var(--safe); box-shadow: 0 0 8px var(--safe); }
.tone-opt[data-tone="bold"] i { background: var(--bold); box-shadow: 0 0 8px var(--bold); }
.tone-opt[data-tone="playful"] i { background: var(--play); box-shadow: 0 0 8px var(--play); }

/* ---------- 骨架屏与阶段 ---------- */
.skel {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  transform: translateX(-100%);
  animation: skelMove 1.5s var(--ease) infinite;
}
@keyframes skelMove {
  to { transform: translateX(100%); }
}
.rcard--skel {
  min-height: 168px;
  animation: none;
}
.rcard--skel::after {
  display: none;
}
.stages {
  display: grid;
  gap: 12px;
  margin: 20px 0 22px;
}
.stage {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  transition: color 0.3s;
}
.stage__dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  color: var(--ink);
  transition: 0.3s var(--ease);
}
.stage__dot .ico {
  width: 13px;
  height: 13px;
  stroke-width: 3;
  opacity: 0;
}
.stage.is-active {
  color: var(--text);
}
.stage.is-active .stage__dot {
  border-color: var(--pink);
  box-shadow: 0 0 0 5px rgba(255, 111, 165, 0.14), 0 0 18px rgba(255, 111, 165, 0.4);
}
.stage.is-done {
  color: var(--text-2);
}
.stage.is-done .stage__dot {
  background: var(--safe);
  border-color: var(--safe);
}
.stage.is-done .stage__dot .ico {
  opacity: 1;
}

/* ---------- 追问 ---------- */
.followups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.followup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 14px 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-2);
  text-align: left;
  transition: 0.2s var(--ease);
}
.followup:hover {
  color: var(--text);
  border-color: rgba(197, 107, 255, 0.6);
  background: rgba(197, 107, 255, 0.1);
  transform: translateY(-1px);
}
.followup .ico {
  width: 16px;
  height: 16px;
  color: var(--text-3);
}

/* ---------- 诊断条 ---------- */
.note {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(255, 111, 165, 0.1), rgba(123, 140, 255, 0.07));
  border: 1px solid rgba(197, 107, 255, 0.28);
}
.note::before {
  content: "";
  flex: none;
  width: 4px;
  border-radius: 4px;
  background: var(--grad);
}
.note p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
.note b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- 弹层 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
}
.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 8, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s var(--ease);
}
.sheet__panel {
  position: relative;
  width: min(100%, 520px);
  max-height: 92dvh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 22px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #1b1429, #0f0c18);
  border: 1px solid var(--border-2);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.32s var(--ease);
}
.sheet__grip {
  width: 44px;
  height: 5px;
  margin: 4px auto 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}
.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.sheet__title {
  font: 700 26px/1.18 var(--font-display);
  letter-spacing: -0.02em;
}
.sheet__sub {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
.sheet__body {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .sheet {
    place-items: center;
  }
  .sheet__panel {
    border-bottom: 1px solid var(--border-2);
    border-radius: 28px;
    padding: 28px 30px;
  }
  .sheet__grip {
    display: none;
  }
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: rgba(27, 20, 41, 0.94);
  border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  font: 600 14px/1.3 var(--font-body);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: 0.28s var(--ease);
}
.toast .ico {
  color: var(--safe-2);
}
.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
body.has-sticky .toast {
  bottom: calc(104px + env(safe-area-inset-bottom));
}

/* ---------- 表单 ---------- */
.field {
  display: grid;
  gap: 8px;
}
.field > label,
.field__label {
  font: 600 14px/1 var(--font-body);
  color: var(--text-2);
}
.input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.input::placeholder {
  color: var(--text-3);
}
.input:focus {
  outline: none;
  border-color: rgba(197, 107, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(197, 107, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}
.input--area {
  height: auto;
  min-height: 200px;
  padding: 14px 18px;
  line-height: 1.6;
  resize: vertical;
}
.field__hint {
  font-size: 13px;
  color: var(--text-3);
}
.field__err {
  display: none;
  font-size: 13px;
  color: var(--error);
}
.field.is-error .input {
  border-color: rgba(255, 107, 107, 0.7);
}
.field.is-error .field__err {
  display: block;
}
.seg {
  display: inline-grid;
  grid-auto-flow: column;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
}
.seg__opt {
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font: 600 14px/1 var(--font-body);
  color: var(--text-2);
  transition: 0.2s var(--ease);
  white-space: nowrap;
}
.seg__opt:hover {
  color: var(--text);
}
.seg__opt.is-active {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.seg--brand .seg__opt.is-active {
  color: var(--ink);
  background: var(--grad);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-check {
  position: relative;
  cursor: pointer;
}
.chip-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip-check span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  background: var(--surface);
  font: 600 14px/1 var(--font-body);
  color: var(--text-2);
  transition: 0.18s var(--ease);
}
.chip-check:hover span {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}
.chip-check input:checked + span {
  color: var(--ink);
  background: var(--grad);
  border-color: transparent;
}
.chip-check input:focus-visible + span {
  outline: 2px solid var(--peri);
  outline-offset: 2px;
}

/* ---------- 进度环 ---------- */
.ring {
  --ring-c: 207.3;
  --ring-off: 138.2;
  position: relative;
  width: 84px;
  height: 84px;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring__track,
.ring__bar {
  fill: none;
  stroke-width: 8;
}
.ring__track {
  stroke: rgba(255, 255, 255, 0.1);
}
.ring__bar {
  stroke: url(#ringGrad);
  stroke-linecap: round;
  stroke-dasharray: var(--ring-c);
  stroke-dashoffset: var(--ring-off, 0);
  animation: ringPop 1.1s var(--ease) 0.2s backwards;
}
.ring__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 18px/1 var(--font-display);
}

/* ---------- 列表与空状态 ---------- */
.check-li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}
.check-li .ico {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--safe-2);
}
.check-li b {
  color: var(--text);
  font-weight: 600;
}
.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 15px;
}
.empty .ico {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  color: var(--text-3);
}
.list {
  display: grid;
  gap: 10px;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  transition: 0.2s var(--ease);
}
.list-item:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  transform: translateY(-1px);
}
.list-item__main {
  flex: 1;
  min-width: 0;
}
.list-item__title {
  display: block;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item__sub {
  display: block;
  font-size: 13px;
  color: var(--text-3);
}
.list-item .ico {
  color: var(--text-3);
}

/* ---------- 常见问题 ---------- */
.faq {
  display: grid;
  gap: 12px;
  max-width: 840px;
  margin: 0 auto;
}
.faq details {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color 0.25s;
}
.faq details[open] {
  border-color: rgba(197, 107, 255, 0.35);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font: 600 17px/1.4 var(--font-display);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .ico {
  color: var(--text-3);
  transition: transform 0.25s var(--ease), color 0.25s;
}
.faq details[open] summary .ico {
  transform: rotate(180deg);
  color: var(--pink);
}
.faq details p {
  padding: 0 22px 20px;
  max-width: 68ch;
  color: var(--text-2);
}

/* ---------- 固定操作条：悬浮玻璃坞 ---------- */
.stickybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(11, 9, 18, 0.96) 55%, rgba(11, 9, 18, 0));
  pointer-events: none;
}
.stickybar__in {
  display: flex;
  gap: 10px;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 10px;
  border-radius: 28px;
  background: rgba(23, 18, 37, 0.9);
  border: 1px solid var(--border-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}
.stickybar__in .btn {
  flex: 1;
}
.stickybar__in .btn--ghost {
  flex: 0 0 auto;
}

/* ---------- 场景标签 ---------- */
.scen-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.scen-tab {
  padding: 11px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  background: var(--surface);
  font: 600 14px/1 var(--font-body);
  color: var(--text-2);
  transition: 0.2s var(--ease);
}
.scen-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.32);
}
.scen-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 8px 26px rgba(197, 107, 255, 0.38);
}

/* ---------- 年龄门 ---------- */
.agegate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 5, 11, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: fadeIn 0.3s var(--ease);
}
.agegate.leaving {
  opacity: 0;
  transition: opacity 0.26s;
  pointer-events: none;
}
.agegate__card {
  width: min(100%, 440px);
  padding: 44px 32px 36px;
  text-align: center;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-card), 0 0 140px rgba(197, 107, 255, 0.22);
  animation: sheetUp 0.4s var(--ease);
}
.agegate__card .logo {
  justify-content: center;
  margin-bottom: 34px;
}
.agegate__title {
  font-size: 44px;
  line-height: 1;
}
.agegate__body {
  margin: 18px auto 30px;
  max-width: 300px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
}
.agegate__card .btn {
  width: 100%;
}
.agegate__leave {
  margin-top: 14px;
}
