/* 小雾陪伴空间 · 站点版：雾蓝玻璃，随站内双主题；手机端 main 只补差值（全局已有 84px 顶 + 底栏留白） */
.xw-main { max-width: 560px; margin: 0 auto; padding: 96px 14px 60px; overflow-x: clip; }
@media (max-width: 980px) {
  .xw-main { padding: 16px 10px 40px; }
}

.xw-app {
  border-radius: 26px;
  padding: 14px 14px 10px;
  background: rgba(120, 170, 235, .07);
  border: 1px solid rgba(140, 180, 230, .28);
  box-shadow: 0 18px 50px rgba(10, 30, 70, .18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* 顶栏 */
.xw-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xw-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(140, 180, 230, .5); }
.xw-name { display: flex; align-items: baseline; gap: 8px; margin-right: auto; min-width: 0; }
.xw-name h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .04em; }
.xw-pinyin { font-size: 13px; opacity: .55; }
.xw-toggles { display: flex; gap: 7px; flex-wrap: wrap; }

.xw-chip {
  border: 1px solid rgba(140, 180, 230, .4);
  background: rgba(120, 170, 235, .08);
  color: inherit;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  line-height: 1;
  min-height: 40px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.xw-chip:active { transform: scale(.96); }
.xw-chip.is-on, .xw-chip.is-active {
  background: #6cb4ee;
  border-color: #6cb4ee;
  color: #0b2a4a;
  font-weight: 700;
}
.xw-chip.is-danger { background: #e2607a; border-color: #e2607a; color: #fff; font-weight: 700; }

/* 舞台 */
.xw-stage {
  position: relative;
  cursor: pointer;
  margin-top: 12px;
  border-radius: 22px;
  overflow: hidden;
  height: min(52vh, 470px);
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    radial-gradient(2px 2px at 18% 22%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 76% 14%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 62% 34%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 34% 12%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 42%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 48%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 46% 26%, rgba(255,255,255,.65) 50%, transparent 51%),
    linear-gradient(180deg, #a8cdf2 0%, #7fb2e8 55%, #5f97dd 100%);
  transition: background .5s ease;
}
.xw-stage.is-dark {
  background:
    radial-gradient(2px 2px at 18% 22%, rgba(255,255,255,.95) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 76% 14%, rgba(255,255,255,.85) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 62% 34%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 34% 12%, rgba(255,255,255,.85) 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 42%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 48%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 46% 26%, rgba(255,255,255,.7) 50%, transparent 51%),
    linear-gradient(180deg, #16283f 0%, #1d3a5f 58%, #274b78 100%);
}
.xw-figure {
  position: relative;
  z-index: 2;
  height: 92%;
  display: flex;
  align-items: flex-end;
  will-change: transform;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.xw-figure img {
  height: 100%;
  width: auto;
  max-width: 88vw;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  animation: xw-breathe 4.2s ease-in-out infinite;
}
.xw-figure.is-fade img { animation: xw-breathe 4.2s ease-in-out infinite, xw-fadein .45s ease; }
.xw-figure.is-poked { animation: xw-poke .45s ease; }
@keyframes xw-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes xw-fadein {
  from { opacity: .25; }
  to { opacity: 1; }
}
@keyframes xw-poke {
  0% { transform: scale(1); }
  35% { transform: scale(.965) translateY(3px); }
  70% { transform: scale(1.012); }
  100% { transform: scale(1); }
}
.xw-ground {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 12px;
  width: 62%;
  height: 30px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(10, 30, 60, .35) 0%, transparent 68%);
  pointer-events: none;
}
.xw-status, .xw-hint, .xw-pokes {
  position: absolute;
  z-index: 3;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #eaf4ff;
  background: rgba(13, 32, 58, .55);
  border: 1px solid rgba(190, 220, 255, .25);
  border-radius: 999px;
  padding: 7px 13px;
  max-width: 72%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.xw-status, .xw-hint, .xw-pokes { pointer-events: none; }
.xw-status { left: 12px; bottom: 12px; }
.xw-hint { right: 12px; bottom: 12px; opacity: .85; }
.xw-pokes { right: 12px; top: 12px; }
.xw-pokes b { color: #ffd98a; }

/* 表情行 */
.xw-exprbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.xw-expr-label { font-size: 13.5px; font-weight: 700; opacity: .75; margin-right: 2px; }

/* 对话区 */
.xw-chat {
  margin-top: 12px;
  height: 300px;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid rgba(140, 180, 230, .22);
  background: rgba(110, 160, 230, .05);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
@media (max-width: 980px) { .xw-chat { height: 264px; } }
.xw-msg { max-width: 86%; font-size: 15px; line-height: 1.6; }
.xw-msg .xw-bubble { padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; }
.xw-msg-xw { align-self: flex-start; }
.xw-msg-xw .xw-bubble {
  background: rgba(108, 180, 238, .18);
  border: 1px solid rgba(108, 180, 238, .35);
  border-bottom-left-radius: 5px;
}
.xw-msg-me { align-self: flex-end; }
.xw-msg-me .xw-bubble {
  background: rgba(150, 170, 200, .16);
  border: 1px solid rgba(150, 170, 200, .3);
  border-bottom-right-radius: 5px;
}
.xw-speak {
  margin-top: 5px;
  border: 0;
  background: transparent;
  color: #6cb4ee;
  font-size: 12.5px;
  padding: 4px 6px;
  min-height: 32px;
  cursor: pointer;
}
.xw-typing { align-self: flex-start; font-size: 13px; opacity: .6; padding: 2px 6px; }

/* 输入栏 */
.xw-composer { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; }
.xw-micwrap { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; }
.xw-mic {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 0;
  background: #6cb4ee;
  color: #0b2a4a;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(80, 140, 220, .35);
  transition: transform .12s ease, background .2s ease;
}
.xw-mic:active { transform: scale(.93); }
.xw-mic.is-listening { background: #e2607a; color: #fff; animation: xw-pulse 1.1s ease-in-out infinite; }
@keyframes xw-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 96, 122, .45); }
  55% { box-shadow: 0 0 0 12px rgba(226, 96, 122, 0); }
}
.xw-mic-label { font-size: 12px; opacity: .6; }
.xw-composer input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(140, 180, 230, .4);
  background: rgba(120, 170, 235, .07);
  color: inherit;
  font-size: 15.5px;
  padding: 0 18px;
  outline: none;
}
.xw-composer input:focus { border-color: #6cb4ee; }
.xw-send {
  flex: none;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #6cb4ee;
  color: #0b2a4a;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease;
}
.xw-send:active { transform: scale(.95); }

.xw-note { margin-top: 10px; }
.xw-note p { margin: 0; font-size: 12.5px; opacity: .55; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .xw-figure img, .xw-mic.is-listening { animation: none; }
}

/* ---------- 台词卡＋装扮场景（2026-11-10 xw4） ---------- */
.xw-linecard { margin-top: 12px; border: 1px solid rgba(140, 180, 230, .35); background: rgba(120, 170, 235, .09); border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.xw-line-text { margin: 0; flex: 1 1 220px; min-width: 0; font-size: 15.5px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.xw-line-btns { display: flex; gap: 7px; flex: none; }
.xw-panel { margin-top: 12px; }
.xw-panel-head { width: 100%; appearance: none; border: 1px solid rgba(140, 180, 230, .4); background: rgba(120, 170, 235, .08); color: inherit; border-radius: 14px; padding: 11px 14px; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.xw-panel-arrow { font-size: 12.5px; opacity: .7; font-weight: 400; }
.xw-panel-body { padding: 10px 2px 2px; }
.xw-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 8px; }
.xw-panel-note { margin: 10px 0 2px; font-size: 12.5px; opacity: .65; line-height: 1.6; }
.xw-acc { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 3; animation: xw-breathe 4.2s ease-in-out infinite; }
.xw-figure[data-accview="full"] .xw-acc { display: block; }
.xw-acc .acc { position: absolute; display: block; }
.acc-ears { left: 27%; top: 5%; width: 32%; }
.acc-crown { left: 33%; top: 6.5%; width: 22%; transform: rotate(-6deg); }
.acc-shades { left: 30%; top: 10.5%; width: 30%; }
.acc-scarf { left: 26%; top: 24%; width: 36%; }
.xw-stage[data-scene="night"] { background: radial-gradient(2px 2px at 18% 22%, rgba(255,255,255,.95) 50%, transparent 51%), radial-gradient(1.6px 1.6px at 76% 14%, rgba(255,255,255,.9) 50%, transparent 51%), radial-gradient(1.8px 1.8px at 62% 34%, rgba(255,255,255,.85) 50%, transparent 51%), radial-gradient(1.4px 1.4px at 34% 12%, rgba(255,255,255,.9) 50%, transparent 51%), radial-gradient(2.4px 2.4px at 88% 42%, rgba(255,255,255,.85) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 8% 48%, rgba(255,255,255,.8) 50%, transparent 51%), radial-gradient(1.6px 1.6px at 46% 26%, rgba(255,255,255,.75) 50%, transparent 51%), radial-gradient(2px 2px at 55% 8%, rgba(255,255,255,.8) 50%, transparent 51%), radial-gradient(90px 90px at 84% 12%, rgba(240,246,255,.9) 50%, rgba(240,246,255,0) 51%), linear-gradient(180deg, #0a1526 0%, #14294a 58%, #1d3a5f 100%); }
.xw-stage[data-scene="dusk"] { background: radial-gradient(150px 150px at 50% 96%, rgba(255,214,150,.95) 50%, rgba(255,214,150,0) 51%), linear-gradient(180deg, #f2a56b 0%, #e2707a 52%, #6d4a7e 100%); }
.xw-stage[data-scene="studio"] { background: radial-gradient(190px 190px at 50% 34%, rgba(255,255,255,.85) 50%, rgba(255,255,255,0) 51%), radial-gradient(2px 2px at 22% 20%, rgba(255,255,255,.8) 50%, transparent 51%), radial-gradient(1.6px 1.6px at 78% 16%, rgba(255,255,255,.75) 50%, transparent 51%), linear-gradient(180deg, #f6dce9 0%, #cfdff5 58%, #a9c8ee 100%); }

/* 2026-11-11 PC 体检优化（站主整包点选）： 桌面栏宽 560→720，舞台与聊天区不再两侧大片留空。 */
@media (min-width: 981px) {
  .xw-main { max-width: 720px; }
}
