/* =========================================================
   Wish Bubble — 视觉系统
   方向：梦境夜空 · 极光 · 肥皂泡薄膜 · 石刻铭文
   ========================================================= */

:root {
  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #070914;
  --bg-deep: #04050c;
  --ink: #eef0ff;
  --ink-soft: rgba(226, 230, 255, 0.72);
  --ink-mute: rgba(196, 202, 235, 0.48);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --glass: rgba(16, 19, 40, 0.58);
  --glass-strong: rgba(13, 15, 32, 0.94);
  --glass-hi: rgba(255, 255, 255, 0.06);

  --accent-1: #8ab4ff;
  --accent-2: #c79bff;
  --accent-3: #ff9ccf;
  --accent-grad: linear-gradient(120deg, #8ab4ff 0%, #c79bff 50%, #ff9ccf 100%);

  --tile-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  --tile-border: rgba(255, 255, 255, 0.07);
  --tile-ink: rgba(228, 232, 255, 0.86);
  --tile-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -18px 30px rgba(0, 0, 0, 0.18);

  --aurora-a: #4f46e5;
  --aurora-b: #db2777;
  --aurora-c: #0ea5e9;
  --aurora-opacity: 0.32;

  --radius-lg: 22px;
  --radius-md: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="light"] {
  --bg: #f5f0ea;
  --bg-deep: #ece4dc;
  --ink: #1d1b3a;
  --ink-soft: rgba(37, 33, 74, 0.74);
  --ink-mute: rgba(55, 50, 98, 0.5);
  --line: rgba(40, 32, 90, 0.08);
  --line-strong: rgba(40, 32, 90, 0.16);

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 253, 250, 0.96);
  --glass-hi: rgba(255, 255, 255, 0.7);

  --accent-1: #5b7cfa;
  --accent-2: #9b6bf2;
  --accent-3: #e2589b;
  --accent-grad: linear-gradient(120deg, #5b7cfa 0%, #9b6bf2 50%, #e2589b 100%);

  --tile-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  --tile-border: rgba(60, 50, 120, 0.09);
  --tile-ink: rgba(36, 32, 72, 0.86);
  --tile-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 18px rgba(80, 60, 140, 0.06);

  --aurora-a: #c7d2fe;
  --aurora-b: #fbcfe8;
  --aurora-c: #bae6fd;
  --aurora-opacity: 0.85;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--bg) 0%, var(--bg-deep) 100%);
}

/* ==================== 夜空背景 ==================== */
.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--aurora-opacity);
  will-change: transform;
}

.aurora-a {
  width: 62vw;
  height: 52vw;
  left: -14vw;
  top: -22vw;
  background: radial-gradient(circle, var(--aurora-a) 0%, transparent 68%);
  animation: auroraDrift 38s ease-in-out infinite alternate;
}

.aurora-b {
  width: 54vw;
  height: 46vw;
  right: -16vw;
  top: 8vh;
  background: radial-gradient(circle, var(--aurora-b) 0%, transparent 66%);
  animation: auroraDrift 46s ease-in-out infinite alternate-reverse;
}

.aurora-c {
  width: 70vw;
  height: 40vw;
  left: 14vw;
  bottom: -24vw;
  background: radial-gradient(circle, var(--aurora-c) 0%, transparent 66%);
  animation: auroraDrift 52s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, 3vh, 0) scale(1.08); }
  100% { transform: translate3d(-3vw, -2vh, 0) scale(0.96); }
}

.stars {
  position: absolute;
  inset: -10%;
  background-repeat: repeat;
}

.stars-far {
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 140px 80px, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 90px 160px, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 210px 210px, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1px 1px at 260px 40px, rgba(255, 255, 255, 0.45), transparent 60%);
  background-size: 280px 260px;
  opacity: 0.7;
  animation: twinkle 7s ease-in-out infinite alternate;
}

.stars-near {
  background-image:
    radial-gradient(1.5px 1.5px at 60px 120px, rgba(214, 226, 255, 0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 330px 260px, rgba(255, 220, 245, 0.8), transparent 60%),
    radial-gradient(2px 2px at 480px 60px, rgba(255, 255, 255, 0.85), transparent 60%);
  background-size: 560px 420px;
  opacity: 0.6;
  animation: twinkle 11s ease-in-out infinite alternate-reverse;
}

@keyframes twinkle {
  0% { opacity: 0.25; }
  100% { opacity: 0.8; }
}

html[data-theme="light"] .stars {
  display: none;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==================== 背景刻板墙 ==================== */
.wall-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 88px 24px 126px;
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: none;
  filter: blur(5px);
  opacity: 0.34;
  transition: filter 0.45s var(--ease-out), opacity 0.45s var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 170, 220, 0.2) transparent;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 76px, #000 calc(100% - 110px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 76px, #000 calc(100% - 110px), transparent 100%);
}

.app-shell.wall-focus .wall-layer {
  z-index: 5;
  pointer-events: auto;
  filter: none;
  opacity: 1;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(194px, 1fr));
  grid-auto-rows: 136px;
  gap: 12px;
  min-height: 100%;
  align-content: start;
}

.wall-tile {
  position: relative;
  border-radius: var(--radius-md);
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}

.wall-tile.is-empty {
  border: 1px dashed rgba(255, 255, 255, 0.045);
}

html[data-theme="light"] .wall-tile.is-empty {
  border-color: rgba(60, 50, 120, 0.07);
}

.wall-tile.is-empty::after {
  content: attr(data-slot);
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  opacity: 0.35;
}

.wall-tile.is-engraved {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  box-shadow: var(--tile-shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.62;
}

.wall-tile.is-engraved::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 0% 0%, var(--tile-glow, rgba(138, 180, 255, 0.16)), transparent 60%);
  pointer-events: none;
}

.wall-tile.is-engraved::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  pointer-events: none;
}

.wall-tile.is-engraved:hover {
  opacity: 1;
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--tile-shadow), 0 18px 40px rgba(0, 0, 0, 0.28);
}

.app-shell.wall-focus .wall-tile.is-engraved {
  opacity: 1;
}

.wall-tile.is-newly-engraved {
  opacity: 1;
  animation: engraveFlash 1.6s var(--ease-out);
}

@keyframes engraveFlash {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 1px var(--accent-2), 0 0 48px var(--accent-2);
  }
  45% {
    transform: scale(1.03);
    box-shadow: 0 0 0 1px var(--accent-1), 0 0 30px rgba(138, 180, 255, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--tile-shadow);
  }
}

.tile-text {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--tile-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .tile-text {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tile-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-mute);
}

.tile-index {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

.tile-likes {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  transition: transform 0.2s var(--ease-spring), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tile-likes:hover {
  transform: scale(1.08);
  color: var(--ink);
  background: rgba(255, 143, 184, 0.16);
  border-color: rgba(255, 143, 184, 0.42);
}

.tile-likes .like-heart {
  color: #ff8fb8;
}

/* ==================== 特效画布 & 泡泡舞台 ==================== */
.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.bubble-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.app-shell.wall-focus .bubble-stage {
  opacity: 0.08;
  filter: blur(4px);
}

.app-shell.wall-focus .bubble {
  pointer-events: none;
}

/* ==================== 肥皂泡 ==================== */
.bubble {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform, width, height;
  transition: filter 0.3s ease;
  -webkit-tap-highlight-color: transparent;

  --b-tint: #8ab4ff;
  --b-rim: rgba(176, 204, 255, 0.7);
  --b-glow: rgba(110, 150, 255, 0.35);
}

.bubble-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 22px;
  overflow: hidden;
}

.bubble.is-inspecting {
  z-index: 40;
}

.bubble:hover {
  z-index: 30;
}

.bubble[data-tint="amber"] {
  --b-tint: #ffc36b;
  --b-rim: rgba(255, 218, 160, 0.72);
  --b-glow: rgba(255, 176, 70, 0.32);
}
.bubble[data-tint="mint"] {
  --b-tint: #6ef0c3;
  --b-rim: rgba(170, 248, 218, 0.7);
  --b-glow: rgba(52, 211, 153, 0.32);
}
.bubble[data-tint="rose"] {
  --b-tint: #ff8fc8;
  --b-rim: rgba(255, 196, 226, 0.72);
  --b-glow: rgba(244, 114, 182, 0.34);
}
.bubble[data-tint="violet"] {
  --b-tint: #b99bff;
  --b-rim: rgba(214, 200, 255, 0.72);
  --b-glow: rgba(150, 110, 255, 0.34);
}

.bubble-skin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  backdrop-filter: blur(8px) saturate(1.3);
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.06) 14%, transparent 30%),
    radial-gradient(circle at 72% 82%, color-mix(in srgb, var(--b-tint) 38%, transparent) 0%, transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(10, 12, 32, 0.42) 0%, rgba(10, 12, 32, 0.3) 60%, color-mix(in srgb, var(--b-tint) 22%, transparent) 86%, var(--b-rim) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 0 26px color-mix(in srgb, var(--b-tint) 30%, transparent),
    inset -10px -14px 30px var(--b-glow),
    0 20px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 40px -6px var(--b-glow);
  animation: bubbleBreathe 8s ease-in-out infinite;
  animation-delay: var(--breathe-delay, 0s);
  transition: box-shadow 0.4s ease;
}

html[data-theme="light"] .bubble-skin {
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.3) 16%, transparent 32%),
    radial-gradient(circle at 72% 82%, color-mix(in srgb, var(--b-tint) 34%, transparent) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.5) 60%, color-mix(in srgb, var(--b-tint) 30%, transparent) 86%, var(--b-rim) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset -10px -14px 30px var(--b-glow),
    0 20px 44px -16px rgba(70, 50, 140, 0.35),
    0 0 30px -8px var(--b-glow);
}

/* 主高光 */
.bubble-skin::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 18%;
  width: 30%;
  height: 15%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  transform: rotate(-30deg);
  filter: blur(0.5px);
}

/* 虹彩薄膜 */
.bubble-skin::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(138, 180, 255, 0.55),
    rgba(255, 150, 210, 0.45),
    rgba(255, 210, 120, 0.4),
    rgba(110, 240, 200, 0.45),
    rgba(185, 155, 255, 0.55),
    rgba(138, 180, 255, 0.55)
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 0.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 0.5px));
  opacity: 0.85;
  animation: filmSpin 16s linear infinite;
}

@keyframes filmSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bubbleBreathe {
  0%, 100% { transform: scale(1, 1); }
  33% { transform: scale(1.018, 0.986); }
  66% { transform: scale(0.988, 1.016); }
}

.bubble:hover {
  z-index: 30;
}

.bubble:hover .bubble-skin {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    inset 0 0 30px color-mix(in srgb, var(--b-tint) 40%, transparent),
    inset -10px -14px 30px var(--b-glow),
    0 26px 60px -12px rgba(0, 0, 0, 0.55),
    0 0 60px -4px var(--b-glow);
}

.bubble.is-near-pop .bubble-skin {
  animation: bubbleBreathe 8s ease-in-out infinite, nearPopGlow 1.6s ease-in-out infinite;
}

@keyframes nearPopGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25) saturate(1.2); }
}

/* 吹出 */
.bubble.is-blowing .bubble-skin {
  animation: bubbleBlowOut 0.95s var(--ease-out) forwards;
}

.bubble.is-blowing .bubble-body {
  animation: bubbleTextPopIn 0.75s var(--ease-out) forwards;
}

@keyframes bubbleBlowOut {
  0% { opacity: 0.2; transform: scale(0.16, 0.22); }
  38% { opacity: 1; transform: scale(1.16, 0.86); }
  62% { transform: scale(0.92, 1.09); }
  82% { transform: scale(1.03, 0.98); }
  100% { opacity: 1; transform: scale(1, 1); }
}

@keyframes bubbleTextPopIn {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.9; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.bubble.is-pulsing .bubble-skin {
  animation: bubbleJellyLike 0.5s var(--ease-spring);
}

.bubble.is-like-shake .bubble-inner {
  animation: bubbleLikeShake 0.46s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes bubbleLikeShake {
  0% { transform: scale(1, 1) rotate(0deg); }
  16% { transform: scale(1.09, 0.92) rotate(-3.2deg); }
  34% { transform: scale(0.94, 1.07) rotate(3deg); }
  52% { transform: scale(1.05, 0.96) rotate(-2deg); }
  72% { transform: scale(0.98, 1.03) rotate(1.2deg); }
  100% { transform: scale(1, 1) rotate(0deg); }
}

.bubble.is-tapping .bubble-like-chip {
  transform: scale(1.16);
}

.floating-tap {
  position: absolute;
  pointer-events: none;
  z-index: 40;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 170, 206, 0.95);
  text-shadow: 0 1px 6px rgba(5, 6, 20, 0.65);
  animation: floatTapUp 0.55s var(--ease-out) forwards;
}

@keyframes floatTapUp {
  0% { opacity: 0.95; transform: translate(-50%, 0) scale(0.85); }
  100% { opacity: 0; transform: translate(-50%, -22px) scale(1.05); }
}

@keyframes bubbleJellyLike {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.12, 0.9); }
  62% { transform: scale(0.95, 1.06); }
  100% { transform: scale(1, 1); }
}

.bubble.is-bumping .bubble-skin {
  animation: bubbleBumpWobble 0.42s ease-out;
}

@keyframes bubbleBumpWobble {
  0% { transform: scale(1, 1); }
  30% { transform: scale(0.94, 1.06); }
  65% { transform: scale(1.03, 0.97); }
  100% { transform: scale(1, 1); }
}

/* 点赞进度环 */
.bubble-progress {
  position: absolute;
  inset: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  pointer-events: none;
  transform: rotate(-90deg);
  overflow: visible;
}

.bubble-progress-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1.2;
}

html[data-theme="light"] .bubble-progress-track {
  stroke: rgba(60, 50, 120, 0.08);
}

.bubble-progress-fill {
  fill: none;
  stroke: var(--b-tint);
  stroke-width: 1.8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px var(--b-tint));
  transition: stroke-dashoffset 0.5s var(--ease-out);
}

/* 内容 */
.bubble-body {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transform-origin: center center;
  will-change: transform;
}

/* 双层文字：自然态省略层 + 固定宽度完整层，放大过程零重排 */
.bubble-text-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bubble-text {
  width: 100%;
  min-width: 0;
  color: #f6f7ff;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 10px rgba(5, 6, 20, 0.75);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}

.bubble-text-full {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 204px;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  pointer-events: none;
  color: #f6f7ff;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: 0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: center;
  text-shadow: 0 1px 10px rgba(5, 6, 20, 0.75);
  transition: opacity 0.28s ease 0.06s, transform 0.34s var(--ease-out) 0.04s;
}

.bubble.is-expanded .bubble-text-compact {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.bubble.is-expanded .bubble-text-full {
  position: relative;
  left: auto;
  top: auto;
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.bubble.is-expanded .bubble-text-compact {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
}

html[data-theme="light"] .bubble-text,
html[data-theme="light"] .bubble-text-full {
  color: #1d1b3a;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.9);
}

.bubble-like-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(246, 247, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 0.25s var(--ease-spring), background 0.25s ease;
  white-space: nowrap;
}

html[data-theme="light"] .bubble-like-chip {
  color: #2a2655;
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(60, 50, 120, 0.12);
}

.bubble:hover .bubble-like-chip {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.16);
}

.bubble.is-pulsing .bubble-like-chip {
  transform: scale(1.22);
}

.like-heart {
  color: #ff8fb8;
  filter: drop-shadow(0 0 4px rgba(255, 120, 170, 0.6));
}

.bubble.is-compact .bubble-inner {
  padding: 10px 12px;
}

.bubble.is-compact .bubble-body {
  gap: 4px;
}

.bubble.is-compact .bubble-text-compact {
  line-height: 1.25;
  -webkit-line-clamp: 2;
}

.bubble.is-compact .bubble-like-chip {
  padding: 1px 7px;
  font-size: 10px;
}

.floating-plus {
  position: absolute;
  pointer-events: none;
  z-index: 40;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: floatPlusUp 0.85s var(--ease-out) forwards;
}

@keyframes floatPlusUp {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(0.7); }
  25% { opacity: 1; transform: translate(-50%, -12px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(0.95); }
}

/* ==================== 顶部导航 ==================== */
.top-bar {
  position: absolute;
  top: 16px;
  left: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-orb {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.2) 18%, transparent 34%),
    radial-gradient(circle at 50% 50%, rgba(20, 22, 50, 0.2) 55%, rgba(185, 160, 255, 0.55) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 24px rgba(160, 150, 255, 0.45);
}

.brand-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #8ab4ff, #ff9ccf, #ffd28a, #7ef0c8, #c79bff, #8ab4ff);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 0.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 0.5px));
  animation: filmSpin 10s linear infinite;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variation-settings: "opsz" 144;
}

.brand-text h1 em {
  font-style: italic;
  font-weight: 400;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bust-caption {
  margin-top: 3px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  white-space: nowrap;
}

.bust-caption strong {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-1);
  font-variant-numeric: tabular-nums;
}

.community-stats {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  opacity: 0.8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

.stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 12px;
  font-size: 12px;
  color: var(--ink-mute);
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.stat strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.divider {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

.icon-btn,
.lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.icon-btn:hover,
.lang-wrap:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

html[data-theme="light"] .icon-btn:hover,
html[data-theme="light"] .lang-wrap:hover {
  background: rgba(60, 50, 120, 0.06);
}

.icon-btn.icon-only {
  width: 34px;
  padding: 0;
  justify-content: center;
}

.icon-btn svg,
.lang-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-btn.is-active {
  color: var(--ink);
  background: rgba(138, 180, 255, 0.14);
  border-color: rgba(138, 180, 255, 0.28);
}

.btn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 8px var(--accent-2);
}

.lang-menu-wrap {
  position: relative;
}

.lang-trigger {
  gap: 6px;
  padding: 0 11px 0 12px;
  white-space: nowrap;
}

.lang-chevron {
  width: 13px;
  height: 13px;
  opacity: 0.72;
  transition: transform 0.2s ease;
}

.lang-trigger[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 136px;
  padding: 6px;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 20px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 36;
  animation: popIn 0.24s var(--ease-out);
}

.lang-popover[hidden] {
  display: none;
}

.lang-option {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.lang-option.is-selected {
  background: rgba(138, 180, 255, 0.16);
  color: var(--ink);
  font-weight: 600;
}

html[data-theme="light"] .lang-option:hover {
  background: rgba(60, 50, 120, 0.07);
}

.rule-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.settings-wrap {
  position: relative;
}

.settings-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: -5px;
  width: 268px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 35;
  animation: popIn 0.28s var(--ease-out);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.settings-popover[hidden] {
  display: none;
}

.popover-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
}

.popover-row select {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.popover-row select:hover,
.popover-row select:focus {
  border-color: var(--line-strong);
}

.popover-row select option {
  background: #12142a;
  color: #eef0ff;
}

html[data-theme="light"] .popover-row select option {
  background: #fffdfa;
  color: #1d1b3a;
}

.popover-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.secondary-btn {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.secondary-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}

/* ==================== 底部输入 ==================== */
.composer-dock {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.composer-form {
  position: relative;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.composer-form::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--accent-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.composer-form:focus-within::before {
  opacity: 0.85;
}

.composer-form:focus-within {
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px -20px rgba(0, 0, 0, 0.6), 0 0 40px -10px rgba(199, 155, 255, 0.45);
}

.tint-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.tint-dot {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: none;
  transition: transform 0.25s var(--ease-spring);
}

.tint-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  transition: border-color 0.25s ease;
}

.tint-dot:hover {
  transform: scale(1.15);
}

.tint-dot.active::after {
  border-color: var(--ink-soft);
}

.tint-dot[data-tint="azure"] { background: radial-gradient(circle at 35% 30%, #d6e4ff, #6f9dff); }
.tint-dot[data-tint="amber"] { background: radial-gradient(circle at 35% 30%, #fff0cf, #ffb34d); }
.tint-dot[data-tint="mint"] { background: radial-gradient(circle at 35% 30%, #d7fff0, #3fdca8); }
.tint-dot[data-tint="rose"] { background: radial-gradient(circle at 35% 30%, #ffe0ef, #ff74b5); }
.tint-dot[data-tint="violet"] { background: radial-gradient(circle at 35% 30%, #ece4ff, #a37dff); }

.whatif-prefix {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wish-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  user-select: text;
}

.wish-input::placeholder {
  color: var(--ink-mute);
  opacity: 0.42;
  font-weight: 400;
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  opacity: 0.65;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.char-counter.is-near-limit {
  color: #ffc36b;
  opacity: 0.95;
}

.composer-form.is-daily-limited {
  opacity: 0.72;
}

.composer-form.is-daily-limited .release-btn {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: var(--ink-mute);
  cursor: not-allowed;
}

.release-btn {
  position: relative;
  height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  background: var(--accent-grad);
  background-size: 160% 100%;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(199, 155, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.3s ease, background-position 0.6s ease;
}

.release-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease-out);
}

.release-btn:hover {
  transform: translateY(-1px);
  background-position: 100% 0;
  box-shadow: 0 12px 30px -8px rgba(199, 155, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.release-btn:hover::after {
  left: 120%;
}

.release-btn:active {
  transform: scale(0.96);
}

.release-btn.is-blowing-btn {
  animation: wandPulse 0.6s var(--ease-out);
}

@keyframes wandPulse {
  0% { box-shadow: 0 0 0 0 rgba(199, 155, 255, 0.7); }
  50% { transform: scale(0.94); box-shadow: 0 0 0 16px rgba(199, 155, 255, 0); }
  100% { transform: scale(1); box-shadow: 0 8px 24px -8px rgba(199, 155, 255, 0.7); }
}

.composer-hint {
  max-width: 560px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-mute);
  text-align: center;
}

/* ==================== 详情弹窗 ==================== */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 5, 14, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

html[data-theme="light"] .detail-modal {
  background: rgba(240, 232, 225, 0.55);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.detail-modal[hidden] {
  display: none;
}

.detail-card {
  position: relative;
  width: min(500px, 100%);
  padding: 36px 34px 28px;
  border-radius: 28px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 40px 100px -20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  animation: cardRise 0.45s var(--ease-out);
}

.detail-card::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  top: -140px;
  right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 155, 255, 0.28), transparent 70%);
  pointer-events: none;
}

@keyframes cardRise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-mute);
  transition: color 0.2s ease, background 0.2s ease, transform 0.3s var(--ease-spring);
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

.modal-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  transform: rotate(90deg);
}

.modal-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.modal-text {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
  user-select: text;
}

.modal-text::before {
  content: "\201C";
  display: block;
  height: 34px;
  font-size: 64px;
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-mute);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions:empty {
  display: none;
}

.modal-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 143, 184, 0.42);
  background: rgba(255, 143, 184, 0.14);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s var(--ease-spring), background 0.2s ease, border-color 0.2s ease;
}

.modal-like-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 143, 184, 0.24);
  border-color: rgba(255, 143, 184, 0.65);
}

.modal-like-btn:active {
  transform: scale(0.96);
}

/* ==================== 提示条 ==================== */
.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--ink);
  font-size: 13px;
  text-align: center;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.4s var(--ease-out);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.toast[hidden] {
  display: none;
}

/* ==================== 响应式 ==================== */
@media (max-width: 960px) {
  .stats-pill {
    display: none;
  }
}

@media (max-width: 720px) {
  .top-bar {
    left: 14px;
    right: 14px;
    top: 12px;
  }

  .brand-text h1 {
    font-size: 19px;
  }

  #toggle-wall-label {
    display: none;
  }

  .composer-hint,
  .tint-picker {
    display: none;
  }

  .composer-form {
    height: 54px;
    padding-left: 16px;
  }

  .whatif-prefix {
    font-size: 16px;
  }

  .release-btn {
    height: 40px;
    padding: 0 16px;
  }

  .wall-layer {
    padding: 76px 12px 96px;
  }

  .wall-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    grid-auto-rows: 118px;
    gap: 8px;
  }

  .modal-text {
    font-size: 20px;
  }
}

/* ============================================================
   初始空池引导：巨型通透肥皂泡泡（菲涅尔透明球体 + SVG 球面高光）
   ============================================================ */
.empty-hero-bubble {
  position: absolute;
  top: 47%;
  left: 50%;
  width: clamp(320px, min(60vh, 72vw), 540px);
  height: clamp(320px, min(60vh, 72vw), 540px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  z-index: 6;
  animation: heroFloat 9s ease-in-out infinite;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.empty-hero-bubble[hidden] {
  display: none;
}

.empty-hero-bubble:hover {
  transform: translate(-50%, -51.2%) scale(1.024);
}

.empty-hero-bubble:active {
  transform: translate(-50%, -50%) scale(0.985);
}

.hero-bubble-skin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  overflow: hidden;
  /* 真实肥皂泡菲涅尔效应：中心完全透明，仅在边缘15%急剧产生折射亮边 */
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 64%,
      rgba(138, 180, 255, 0.08) 80%,
      rgba(196, 174, 255, 0.18) 91%,
      rgba(255, 224, 244, 0.34) 97%,
      rgba(255, 255, 255, 0.62) 100%
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 0 36px rgba(138, 180, 255, 0.16),
    inset -24px -30px 64px rgba(185, 145, 255, 0.22),
    inset 22px 24px 56px rgba(145, 232, 222, 0.14),
    0 0 68px -18px rgba(138, 180, 255, 0.28);
  animation: heroBubbleWobble 10s ease-in-out infinite;
  transition: box-shadow 0.45s ease;
}

/* 肥皂薄膜外圈柔和虹彩流动（中间完全镂空，不遮挡内部通透感） */
.hero-bubble-iridescence {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: conic-gradient(
    from 20deg,
    rgba(110, 240, 210, 0.55),
    rgba(138, 180, 255, 0.62),
    rgba(192, 152, 255, 0.58),
    rgba(255, 148, 210, 0.54),
    rgba(255, 214, 138, 0.44),
    rgba(110, 240, 210, 0.55)
  );
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 74%, rgba(0, 0, 0, 0.32) 89%, rgba(0, 0, 0, 0.95) 98%, transparent 100%);
  mask: radial-gradient(circle at 50% 50%, transparent 74%, rgba(0, 0, 0, 0.32) 89%, rgba(0, 0, 0, 0.95) 98%, transparent 100%);
  opacity: 0.78;
  animation: heroSpin 22s linear infinite;
  pointer-events: none;
}

/* 极细锐利外膜反光线 */
.hero-bubble-skin::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 140deg,
    rgba(255, 255, 255, 0.65),
    rgba(138, 180, 255, 0.55),
    rgba(255, 150, 212, 0.48),
    rgba(110, 242, 204, 0.52),
    rgba(255, 255, 255, 0.65)
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 0.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 0.5px));
  opacity: 0.85;
  animation: heroSpin 28s linear infinite reverse;
}

.hero-bubble-specular {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.empty-hero-bubble:hover .hero-bubble-skin {
  box-shadow:
    inset 0 0 0 1.2px rgba(255, 255, 255, 0.42),
    inset 0 0 46px rgba(138, 180, 255, 0.24),
    inset -26px -32px 72px rgba(185, 145, 255, 0.3),
    inset 24px 26px 64px rgba(145, 232, 222, 0.2),
    0 0 92px -12px rgba(138, 180, 255, 0.4);
}

.hero-bubble-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 14%;
  pointer-events: none;
}

.hero-bubble-text {
  font-family: 'Fraunces', 'PingFang SC', 'Microsoft YaHei', serif;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 24px rgba(8, 12, 34, 0.65), 0 0 30px rgba(138, 180, 255, 0.22);
  max-width: 13em;
}

html[data-theme="light"] .hero-bubble-skin {
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(255, 255, 255, 0.1) 66%,
      rgba(148, 178, 240, 0.18) 86%,
      rgba(255, 255, 255, 0.85) 100%
    );
  box-shadow:
    inset 0 0 0 1.2px rgba(255, 255, 255, 0.92),
    inset -20px -24px 52px rgba(154, 146, 224, 0.22),
    inset 18px 20px 44px rgba(110, 218, 198, 0.18),
    0 24px 64px -20px rgba(68, 76, 126, 0.22);
}

html[data-theme="light"] .hero-bubble-text {
  color: #1f2540;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.9);
}

.composer-form.is-guided-pulse {
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    0 0 0 2px rgba(138, 180, 255, 0.55),
    0 0 34px rgba(138, 180, 255, 0.32);
}

@keyframes heroFloat {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0px);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-10px);
  }
}

@keyframes heroBubbleWobble {
  0%, 100% {
    transform: scale(1, 1);
  }
  33% {
    transform: scale(1.012, 0.99);
  }
  66% {
    transform: scale(0.99, 1.012);
  }
}

@keyframes heroSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .stars,
  .bubble-skin,
  .bubble-skin::after,
  .brand-orb::after,
  .empty-hero-bubble,
  .hero-bubble-skin,
  .hero-bubble-iridescence,
  .hero-bubble-skin::after {
    animation: none !important;
  }
}
