/* ============================================================
   MinxTok 新用户引导
   Apple / iCloud 式的留白、字重、模糊形变与气泡物理场
   ============================================================ */

.ob {
  position: fixed;
  inset: 0;
  bottom: auto;
  height: var(--ob-vh, 100vh);
  height: var(--ob-vh, 100dvh);
  z-index: 95;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 520ms var(--ease-out), visibility 520ms;
}
.ob.show { opacity: 1; visibility: visible; }
.ob[hidden] { display: none; }
body.ob-open { overflow: hidden; }

/* 兴趣页全屏：气泡铺满，顶栏和底栏让位 */
.ob.is-bubbles .ob-top,
.ob.is-bubbles .ob-progress,
.ob.is-bubbles .ob-bottom {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.ob::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 42% at 18% 0%, color-mix(in srgb, var(--text) 9%, transparent), transparent 68%),
    radial-gradient(ellipse 48% 38% at 92% 22%, color-mix(in srgb, var(--text) 6%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, color-mix(in srgb, var(--text) 5%, transparent), transparent 72%);
}

.ob-aurora {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  filter: blur(58px);
  opacity: 0.55;
}
.ob-aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  animation: obAurora 18s var(--ease-in-out) infinite alternate;
}
.ob-aurora i:nth-child(1) { width: 46vw; height: 46vw; left: 6%; top: 12%; animation-delay: -3s; }
.ob-aurora i:nth-child(2) { width: 38vw; height: 38vw; right: 2%; top: 32%; animation-delay: -8s; animation-duration: 22s; }
.ob-aurora i:nth-child(3) { width: 52vw; height: 52vw; left: 24%; bottom: -14%; animation-delay: -13s; animation-duration: 26s; }
@keyframes obAurora {
  0% { transform: translate3d(-2%, 1%, 0) scale(0.94); }
  50% { transform: translate3d(3%, -3%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 3%, 0) scale(0.98); }
}

/* ---------------- 顶栏与进度 ---------------- */

.ob-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: max(18px, env(safe-area-inset-top)) 22px 0;
  flex: 0 0 auto;
}
.ob-back {
  width: 40px;
  height: 40px;
  margin-left: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  display: grid;
  place-items: center;
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.ob-back svg { width: 23px; height: 23px; }
.ob-back:active { transform: scale(0.9); }
.ob-back.hide { opacity: 0; pointer-events: none; }
.ob-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ob-lang {
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
}
.ob-lang:active { color: var(--text); transform: scale(0.94); }
.ob-lang-bubble { flex: 0 0 auto; font-size: 10px; }
.ob-brand {
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.ob-brand em {
  font-style: normal;
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.22em;
}
.ob-skip {
  justify-self: end;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 52%, transparent);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  transition: color 200ms, border-color 200ms, transform 200ms var(--ease-spring);
}
.ob-skip:active { transform: scale(0.94); }
.ob-skip:disabled { opacity: 0.42; }
.ob-skip:hover { color: var(--text-2); border-color: var(--line-strong); }
.ob-count {
  min-width: 58px;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ob-progress {
  position: relative;
  z-index: 2;
  height: 2px;
  margin: 18px 22px 0;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  flex: 0 0 auto;
}
.ob-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
  transition: width 680ms var(--ease-out);
}

/* ---------------- 舞台与文字形变 ---------------- */

.ob-stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}
.ob-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78vw, 430px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 42% 58% 54% 46% / 48% 44% 56% 52%;
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--text) 7%, transparent), transparent 66%);
  filter: blur(30px);
  opacity: 0.65;
  pointer-events: none;
  animation: obMorph 18s var(--ease-in-out) infinite alternate;
}
.ob-stage.morph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(66vw, 360px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 36% 64% 58% 42% / 44% 36% 64% 56%;
  pointer-events: none;
  animation: obFrame 900ms var(--ease-out) both;
}
@keyframes obMorph {
  0% { border-radius: 42% 58% 54% 46% / 48% 44% 56% 52%; transform: translate(-50%, -50%) scale(0.94) rotate(-4deg); }
  50% { border-radius: 58% 42% 46% 54% / 54% 58% 42% 46%; transform: translate(-50%, -50%) scale(1.05) rotate(3deg); }
  100% { border-radius: 48% 52% 62% 38% / 42% 50% 50% 58%; transform: translate(-50%, -50%) scale(0.98) rotate(-2deg); }
}
@keyframes obFrame {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.72) rotate(-8deg); filter: blur(8px); }
  55% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.16) rotate(6deg); filter: blur(2px); }
}

.ob-step {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 24px 26px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  filter: blur(18px);
  transform: translateY(22px) scale(0.972);
  transition: opacity 680ms var(--ease-out), filter 680ms var(--ease-out), transform 680ms var(--ease-out);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
}
.ob-step::-webkit-scrollbar { display: none; }
.ob-step.in { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
.ob-step.leaving { opacity: 0; filter: blur(16px); transform: translateY(-18px) scale(1.018); }

/* 键盘弹起：只保留必要重绘，输入区贴住可视区，别再抖 */
.ob-keyboard .ob-aurora,
.ob-keyboard .ob-stage::before,
.ob-keyboard .ob-stage.morph::after,
.ob-keyboard .ob-orb-glow,
.ob-keyboard .ob-emoji,
.ob-keyboard .ob-welcome-mark {
  animation: none !important;
}
.ob-keyboard .ob-step {
  scroll-padding-bottom: 42vh;
  transition: none;
}
.ob-keyboard .ob-input,
.ob-keyboard .ob-date { scroll-margin-bottom: 34vh; }
.ob-keyboard .ob-choice,
.ob-keyboard .ob-bubble-back,
.ob-keyboard .ob-tilt {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ob-intro, .ob-q, .ob-welcome {
  width: min(100%, 430px);
  margin: auto;
}

/* ---------------- 首屏 ---------------- */

.ob-intro { text-align: center; padding-bottom: 8px; }
.ob-orb {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
}
.ob-orb-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--text) 16%, transparent), transparent 64%);
  filter: blur(22px);
  animation: obGlow 4.8s var(--ease-in-out) infinite alternate;
}
.ob-orb-ring {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: 0.65;
}
.ob-ring-a { inset: 2%; animation: obOrbit 12s linear infinite; }
.ob-ring-b { inset: 17%; border-style: dashed; opacity: 0.38; animation: obOrbit 18s linear infinite reverse; }
.ob-emoji {
  position: relative;
  z-index: 1;
  display: block;
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.28));
  transition: filter 260ms var(--ease-out), transform 260ms var(--ease-out), opacity 260ms var(--ease-out);
  animation: obFloat 5.5s var(--ease-in-out) infinite alternate;
}
.ob-emoji.swap { animation: none; filter: blur(9px); transform: scale(0.78); opacity: 0.3; }
.ob-emoji-stack {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  animation: obFloat 5.5s var(--ease-in-out) infinite alternate;
}
.ob-emoji-stack .ob-emoji {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(14px) scale(0.72) rotate(7deg);
  transition: opacity 420ms var(--ease-out), transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: none;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.26));
  will-change: transform, opacity;
}
.ob-emoji-stack .ob-emoji.active {
  opacity: 1;
  transform: translateY(0) scale(var(--emoji-scale, 1)) rotate(var(--emoji-tilt, 0deg));
}
.ob-keyboard .ob-emoji-stack { animation: none !important; }
@keyframes obGlow { from { transform: scale(0.88); opacity: 0.45; } to { transform: scale(1.1); opacity: 0.9; } }
@keyframes obOrbit { to { transform: rotate(360deg); } }
@keyframes obFloat { from { transform: translateY(-3px) rotate(-2deg); } to { transform: translateY(7px) rotate(2deg); } }

.ob-kicker {
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.ob-h1 {
  font-family: var(--font-title);
  font-size: clamp(44px, 13vw, 68px);
  font-weight: 680;
  line-height: 0.94;
  letter-spacing: -0.055em;
  margin: 14px 0 10px;
}
.ob-h1 em {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-size: 0.24em;
  font-weight: 450;
  letter-spacing: 0.42em;
  color: var(--muted);
  transform: translateX(0.2em);
}
.ob-lede {
  max-width: 340px;
  margin: 0 auto;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: var(--ls-body);
}
.ob-caps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 18px auto 0;
  max-width: 360px;
}
.ob-cap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 54%, transparent);
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ob-cap b { font-weight: 400; color: var(--muted); font-size: 13px; }
.ob-privacy {
  margin: 16px auto 0;
  max-width: 330px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* ---------------- 问题页 ---------------- */

.ob-q { text-align: left; padding-top: 2vh; }
.ob-index {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
}
.ob-h2 {
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-size: clamp(32px, 9vw, 46px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.ob-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.ob-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 8px 0 14px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-title);
  font-size: clamp(26px, 8vw, 36px);
  font-weight: 520;
  letter-spacing: -0.02em;
  transition: border-color 260ms var(--ease-out);
}
.ob-input::placeholder { color: var(--muted); opacity: 0.42; }
.ob-input:focus { border-color: var(--text); }
.ob-under {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.ob-choices { display: grid; gap: 10px; margin-top: 4px; }
.ob-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  color: var(--text);
  font-size: 17px;
  font-weight: 520;
  text-align: left;
  transition: background 260ms var(--ease-out), color 260ms var(--ease-out), border-color 260ms var(--ease-out), transform 260ms var(--ease-spring);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ob-choice small { color: var(--muted); font-size: 12px; font-weight: 400; }
.ob-choice:active { transform: scale(0.985); }
.ob-choice.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.ob-choice.on small { color: color-mix(in srgb, var(--bg) 56%, transparent); }

.ob-date {
  width: 100%;
  min-height: 64px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  color: var(--text);
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 520;
  color-scheme: dark;
  transition: border-color 260ms var(--ease-out);
}
[data-theme="light"] .ob-date { color-scheme: light; }
.ob-date:focus { border-color: var(--line-strong); }
.ob-q-birthday { padding-top: 1vh; }
.ob-wheel-units {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 2px;
  margin: 2px 0 8px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-align: center;
}
.ob-wheel {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 2px;
  height: 276px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  overflow: hidden;
}
.ob-wheel::before,
.ob-wheel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  height: 82px;
  pointer-events: none;
}
.ob-wheel::before {
  top: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 92%, transparent), transparent);
}
.ob-wheel::after {
  bottom: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--surface) 92%, transparent), transparent);
}
.ob-wheel-frame {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 46px;
  margin-top: -23px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-2) 46%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
[data-theme="light"] .ob-wheel-frame { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.ob-wheel-col {
  position: relative;
  z-index: 3;
  height: 100%;
  padding: 115px 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.ob-wheel-col::-webkit-scrollbar { display: none; }
.ob-wheel-item {
  display: block;
  width: 100%;
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "MinxTok Sans", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 46px;
  text-align: center;
  opacity: 0.34;
  scroll-snap-align: center;
  transition: opacity 160ms, color 160ms, transform 160ms;
}
.ob-wheel-item.on {
  color: var(--text);
  font-weight: 650;
  opacity: 1;
  transform: scale(1.06);
}
.ob-age {
  min-height: 44px;
  margin-top: 14px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}
.ob-quiet {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------- 兴趣气泡 ---------------- */

.ob-q-interests {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}
.ob-step[data-step="5"] {
  padding: 0;
  justify-content: stretch;
  overflow: hidden;
}
.ob-bubble-top {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(to bottom, var(--bg) 35%, transparent);
}
.ob-bubble-back {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  color: var(--text-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ob-bubble-back svg { width: 20px; height: 20px; }
.ob-bubble-top .ob-cats {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 6px;
}
.ob-bubble-top .ob-cat {
  padding: 7px 10px;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ob-bubble-top .ob-count {
  position: static;
  flex: 0 0 auto;
  color: var(--text-2);
  font-size: 10px;
}
.ob-bubble-top .ob-skip { flex: 0 0 auto; }
.ob-cats {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 12px;
  margin: 0 -2px;
  scrollbar-width: none;
  flex: 0 0 auto;
}
.ob-cats::-webkit-scrollbar { display: none; }
.ob-cat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  transition: color 240ms, background 240ms, border-color 240ms, transform 240ms var(--ease-spring);
}
.ob-cat b { font-weight: 400; font-size: 12px; }
.ob-cat.on { color: var(--bg); background: var(--text); border-color: var(--text); }
.ob-cat:active { transform: scale(0.95); }

.ob-bubble-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--text) 4%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface) 32%, transparent);
  touch-action: none;
}
.ob-bubble-field { position: absolute; inset: 56px 0 76px; }
.ob-bubble {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
  color: var(--text-2);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: background 260ms var(--ease-out), color 260ms var(--ease-out), border-color 260ms var(--ease-out);
  will-change: transform;
}
[data-theme="light"] .ob-bubble { box-shadow: 0 10px 22px rgba(12, 12, 14, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.65); }
.ob-bubble-in {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  padding: 8px;
  pointer-events: none;
}
.ob-bubble.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.ob-bubble.burst {
  z-index: 4;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transition: none;
  animation: obBubbleShell 680ms var(--ease-out) both;
}
.ob-bubble.burst .ob-bubble-in {
  color: var(--text);
  animation: obBubbleBurst 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ob-bubble.burst::after {
  content: "";
  position: absolute;
  inset: -18%;
  border: 1px solid var(--text);
  border-radius: 50%;
  animation: obBurstRing 620ms var(--ease-out) both;
}
@keyframes obBubbleBurst {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  28% { opacity: 1; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(0.16); filter: blur(12px); }
}
@keyframes obBubbleShell {
  0%, 56% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes obBurstRing {
  0% { opacity: 0.75; transform: scale(0.55); }
  100% { opacity: 0; transform: scale(1.6); }
}
.ob-bubble.nope .ob-bubble-in { animation: obBubbleNope 300ms var(--ease-out); }
@keyframes obBubbleNope {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
}
.ob-bubble.dragging {
  z-index: 3;
  border-color: var(--text);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}
.ob-bubble.pop .ob-bubble-in {
  animation: obBubblePop 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes obBubblePop {
  0% { transform: scale(1); opacity: 1; filter: blur(0); }
  38% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(0.24); opacity: 0; filter: blur(8px); }
}
.ob-bubble .ob-bubble-in {
  animation: obBubbleIn 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes obBubbleIn {
  from { transform: scale(0.64); opacity: 0; filter: blur(5px); }
  to { transform: scale(1); opacity: 1; filter: blur(0); }
}
.ob-bubble-hint {
  position: absolute;
  left: 14px;
  bottom: 86px;
  max-width: 54%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
  transition: color 200ms;
}
.ob-bubble-hint.warn { color: var(--text); }
.ob-count {
  position: absolute;
  right: 14px;
  bottom: 13px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ob-tilt {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 56%, transparent);
  color: var(--muted);
  font-size: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 300ms, color 200ms;
}
.ob-tilt.done { color: var(--text); }
.ob-tilt.hide { opacity: 0; pointer-events: none; }

.ob-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  padding: 0;
  flex: 0 0 auto;
}
.ob-bubble-bottom {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 14px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 56%, transparent);
  pointer-events: none;
}
.ob-bubble-bottom .ob-picked {
  flex: 1 1 auto;
  max-height: 62px;
  overflow-y: auto;
  pointer-events: auto;
  scrollbar-width: none;
}
.ob-bubble-bottom .ob-picked::-webkit-scrollbar { display: none; }
.ob-bubble-next {
  flex: 0 0 auto;
  min-width: 92px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 650;
  pointer-events: auto;
}
.ob-bubble-next:active { transform: scale(0.95); }
.ob-picked-empty { color: var(--muted); font-size: 10px; line-height: 2.6; }
.ob-picked-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10px;
  line-height: 1;
}
.ob-picked-chip i { font-style: normal; color: var(--muted); font-size: 12px; }

/* ---------------- 欢迎页 ---------------- */

.ob-welcome { text-align: center; }
.ob-welcome-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  font-size: 24px;
  animation: obMark 4s var(--ease-in-out) infinite alternate;
}
@keyframes obMark {
  from { transform: translateY(-2px) rotate(-4deg); box-shadow: 0 0 0 0 color-mix(in srgb, var(--text) 8%, transparent); }
  to { transform: translateY(4px) rotate(4deg); box-shadow: 0 0 0 16px transparent; }
}
.ob-h1-welcome {
  font-size: clamp(40px, 12vw, 64px);
  margin-top: 12px;
  letter-spacing: -0.05em;
}
.ob-h1-welcome span {
  display: inline;
  background: linear-gradient(100deg, var(--text), color-mix(in srgb, var(--text) 42%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ob-welcome .ob-lede b { color: var(--text); font-weight: 600; }
.ob-summary {
  width: 100%;
  margin: 26px auto 0;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  text-align: left;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ob-summary-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ob-summary-row {
  display: flex;
  gap: 12px;
  padding: 4px 0;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.65;
}
.ob-summary-key {
  flex: 0 0 34px;
  color: var(--muted);
}

/* ---------------- 底栏 ---------------- */

.ob-bottom {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 22px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
}
.ob-note {
  order: 2;
  flex: 0 0 auto;
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-align: center;
}
.ob-next {
  order: 1;
  flex: 0 0 auto;
  min-width: 112px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 260ms var(--ease-spring), opacity 220ms;
}
.ob-next:active { transform: scale(0.95); }
.ob-next:disabled { opacity: 0.34; }
.ob-next:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent); }

@media (min-width: 700px) {
  .ob-top { padding-left: 40px; padding-right: 40px; }
  .ob-progress { margin-left: 40px; margin-right: 40px; }
  .ob-step { padding-left: 40px; padding-right: 40px; }
  .ob-bottom { padding-left: 40px; padding-right: 40px; }
  .ob-q-interests .ob-bubble-stage { min-height: 330px; }
}

@media (max-height: 700px) {
  .ob-orb { width: 112px; height: 112px; margin-bottom: 14px; }
  .ob-emoji { font-size: 48px; }
  .ob-h1 { font-size: clamp(40px, 11vw, 60px); }
  .ob-lede { font-size: 13px; line-height: 1.7; }
  .ob-caps { margin-top: 16px; }
  .ob-privacy { margin-top: 16px; }
  .ob-sub { margin-bottom: 20px; }
  .ob-q { padding-top: 2vh; }
  .ob-bubble-stage { min-height: 210px; }
}

/* ---------------- 兴趣气泡 v2：大分类 → 子分类 ---------------- */

.ob-bubble-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(to bottom, var(--bg) 58%, transparent);
}
.ob-bubble-heading {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ob-bubble-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.ob-bubble-all {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 48%, transparent);
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}
.ob-bubble-all:active { transform: scale(0.94); }
.ob-bubble-all[hidden] { display: none; }
.ob-bubble-top .ob-count {
  position: static;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}
.ob-bubble-top .ob-skip {
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 10px;
}
.ob-bubble-stage {
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--text) 3%, transparent), transparent 62%),
    color-mix(in srgb, var(--surface) 24%, transparent);
}
.ob-bubble-field { inset: 58px 12px 76px; }
.ob-bubble {
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  background: color-mix(in srgb, var(--surface-2) 66%, transparent);
  backdrop-filter: blur(7px) saturate(1.08);
  -webkit-backdrop-filter: blur(7px) saturate(1.08);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 220ms var(--ease-out), color 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
[data-theme="light"] .ob-bubble {
  box-shadow: 0 7px 18px rgba(12, 12, 14, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.ob-bubble-in { padding: 6px; }
.ob-bubble-mark {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}
.ob-bubble-label { display: block; line-height: 1.12; }
.ob-bubble.is-group { font-weight: 620; letter-spacing: 0.02em; }
.ob-bubble.is-tag { font-weight: 520; }
.ob-bubble.on {
  z-index: 2;
  border-color: color-mix(in srgb, var(--text) 38%, var(--line-strong));
  background: color-mix(in srgb, var(--text) 10%, var(--surface-2));
  color: var(--text);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1), inset 0 0 0 1px color-mix(in srgb, var(--text) 16%, transparent);
}
.ob-bubble.dragging {
  z-index: 20;
  border-color: color-mix(in srgb, var(--text) 42%, var(--line-strong));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}
.ob-bubble.burst {
  z-index: 10;
  animation: none;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.ob-bubble.burst .ob-bubble-in {
  color: var(--text);
  animation: obBubbleBurstV2 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ob-bubble.burst::after {
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
  animation: obBurstRing 440ms var(--ease-out) both;
}
@keyframes obBubbleBurstV2 {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  35% { opacity: 1; transform: scale(1.08); filter: blur(0); }
  100% { opacity: 0; transform: scale(0.18); filter: blur(4px); }
}
.ob-bubble-hint {
  left: 16px;
  bottom: 78px;
  max-width: 60%;
  font-size: 10px;
}
.ob-bubble-bottom {
  align-items: center;
  gap: 10px;
  padding: 8px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 64%, transparent);
}
.ob-bubble-bottom .ob-picked {
  flex-wrap: nowrap;
  min-height: 28px;
  max-height: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
}
.ob-picked-empty { white-space: nowrap; line-height: 1.6; }
.ob-bubble-next {
  min-width: 86px;
  height: 42px;
  padding: 0 16px;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .ob, .ob-step, .ob-bubble, .ob-emoji, .ob-orb-glow, .ob-aurora i, .ob-welcome-mark {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}
