﻿:root {
  --ink: #142e27;
  --ink-soft: #33584e;
  --ink-mute: rgba(20, 46, 39, .58);
  --jade: #1d574a;
  --jade-deep: #123d34;
  --jade-bright: #2e7563;
  --paper: #f4ecd9;
  --paper-deep: #e7d8bc;
  --paper-light: #fbf6e9;
  --cinnabar: #b24b37;
  --gold: #c9a15a;
  --gold-soft: rgba(201, 161, 90, .34);
  --line: rgba(30, 71, 60, .14);
  --glass: rgba(247, 241, 227, .62);
  --glass-strong: rgba(249, 244, 232, .86);
  --shadow: 0 34px 80px rgba(10, 38, 31, .27);
  --btn-a: #327766;
  --btn-b: #174b40;
  /* 对话面板玻璃底色：RGB 通道 × 基准透明度 × 用户可调整体不透明度（后台「H5 页面定制」） */
  --panel-tint-a: 250 246 235;
  --panel-tint-b: 242 233 215;
  --panel-tint-c: 235 224 203;
  --panel-alpha-a: .74;
  --panel-alpha-b: .66;
  --panel-alpha-c: .7;
  --panel-opacity: 1;
  --skin-wash: rgba(23, 63, 53, 0);
  /* 直接落在背景上的文字配色（hero / 顶栏 / 诗句等），每套皮肤独立保证对比度 */
  --on-bg: #14362e;
  --on-bg-soft: rgba(20, 52, 43, .74);
  --on-bg-mute: rgba(20, 52, 43, .55);
  --on-bg-faint: rgba(20, 52, 43, .4);
  --on-bg-shadow: 0 1px 16px rgba(255, 255, 255, .3), 0 0 1px rgba(255, 255, 255, .4);
  /* 悬浮在背景上的玻璃小件（定位胶囊 / 天气 / 名片 / 信息卡） */
  --chip-bg: rgba(247, 241, 227, .5);
  --chip-border: rgba(255, 255, 255, .4);
  --chip-text: #1d4a3f;
  --chip-text-soft: rgba(29, 74, 63, .62);
  --chip-line: rgba(24, 68, 57, .16);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #173f35;
  color: var(--ink);
  font-family: var(--sans);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(201, 161, 90, .9);
  outline-offset: 3px;
}

::selection {
  color: var(--paper-light);
  background: var(--jade);
}

.app {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  grid-template-rows: 82px minmax(0, 1fr);
  column-gap: 24px;
width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 0 28px 28px;
  isolation: isolate;
}

/* ------------------------------------------------------------------ scene */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #a9c5b7;
}

.scene-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255, 244, 208, .84) 0%, rgba(255, 240, 199, .22) 21%, transparent 46%),
    linear-gradient(180deg, #e8efe4 0%, #d4e2d4 24%, #b7d0c0 50%, #91b5a7 72%, #6d998c 100%);
}

.sun {
  position: absolute;
  top: 9%;
  left: 15%;
  width: clamp(120px, 13vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #fff9e4 0%, #f7e1ad 38%, rgba(244, 217, 156, .18) 70%, transparent 72%);
  filter: blur(1px);
  box-shadow: 0 0 90px rgba(255, 236, 190, .5);
  animation: sunBreath 9s ease-in-out infinite;
}

.sun::after {
  content: "";
  position: absolute;
  inset: -34%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 242, 207, .25), transparent 66%);
}

.cloud {
  position: absolute;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(249, 252, 246, .62), transparent 68%);
  filter: blur(18px);
  opacity: .68;
  animation: cloudDrift 34s ease-in-out infinite alternate;
}

.cloud-a {
  top: 19%;
  left: 6%;
  width: 36%;
}

.cloud-b {
  top: 33%;
  right: 18%;
  width: 30%;
  opacity: .42;
  animation-duration: 44s;
  animation-direction: alternate-reverse;
}

.scene-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.birds {
  animation: birdDrift 18s ease-in-out infinite alternate;
}

.water-lines {
  animation: waterDrift 14s ease-in-out infinite alternate;
}

.pagoda {
  filter: drop-shadow(0 14px 20px rgba(13, 49, 42, .07));
}

.mist {
  position: absolute;
  left: -12%;
  width: 124%;
  height: 12%;
  background: linear-gradient(90deg, transparent 0%, rgba(239, 246, 238, .58) 35%, rgba(239, 246, 238, .42) 61%, transparent 100%);
  filter: blur(24px);
  pointer-events: none;
  animation: mistDrift 28s ease-in-out infinite alternate;
}

.mist-a {
  top: 48%;
}

.mist-b {
  top: 62%;
  opacity: .55;
  animation-duration: 38s;
  animation-direction: alternate-reverse;
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 44% 42%, transparent 32%, rgba(12, 42, 34, .18) 76%, rgba(8, 30, 25, .34) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .14) 0%, transparent 29%, rgba(8, 35, 28, .13) 100%);
  pointer-events: none;
}

.scene-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .1;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.leaves {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.leaf {
  position: absolute;
  top: -4%;
  left: var(--x);
  width: calc(7px * var(--s));
  height: calc(4px * var(--s));
  border-radius: 100% 0 100% 0;
  background: #8b6b3d;
  opacity: 0;
  animation: leafFall var(--d) linear var(--delay) infinite;
}

/* ----------------------------------------------------------------- topbar */

.topbar {
  position: relative;
  z-index: 30;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 2px 10px;
  color: var(--on-bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  animation: fadeDown .9s cubic-bezier(.2, .8, .2, 1) both;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 37px;
  height: 40px;
  border-radius: 7px 9px 7px 10px;
  background: var(--cinnabar);
  color: #f8edd7;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 7px 18px rgba(131, 47, 33, .22);
  transform: rotate(-2deg);
}

.brand-seal::after {
  content: "";
  position: absolute;
  width: 29px;
  height: 32px;
  border: 1px solid rgba(255, 245, 222, .55);
  border-radius: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1;
}

.brand-text small {
  color: var(--on-bg-mute);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .24em;
  line-height: 1;
}

.location {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  box-shadow: 0 10px 32px rgba(17, 54, 46, .08), inset 0 1px 0 rgba(255, 255, 255, .42);
  backdrop-filter: blur(16px) saturate(1.05);
  color: var(--chip-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  transform: translate(-50%, -50%);
  animation: fadeDown .9s .1s cubic-bezier(.2, .8, .2, 1) both;
}

.location svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--chip-text);
  stroke-width: 1.6;
}

.location i {
  width: 1px;
  height: 12px;
  background: var(--chip-line);
}

.location em {
  color: var(--chip-text-soft);
  font-size: 9px;
  font-style: normal;
  letter-spacing: .16em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeDown .9s .16s cubic-bezier(.2, .8, .2, 1) both;
}

.weather-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  backdrop-filter: blur(14px);
  color: var(--chip-text);
  font-size: 10px;
  letter-spacing: .04em;
}

.weather-chip svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.weather-chip strong {
  font-size: 12px;
  font-weight: 600;
}

.weather-chip span {
  color: var(--chip-text-soft);
}

.admin-link {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 32px rgba(17, 54, 46, .08), inset 0 1px 0 rgba(255, 255, 255, .42);
  color: var(--chip-text);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.admin-link:hover {
  background: var(--glass-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(17, 54, 46, .14), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.admin-link:focus-visible {
  outline: 2px solid rgba(201, 161, 90, .9);
  outline-offset: 3px;
}

.admin-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .5s ease;
}

.admin-link:hover svg {
  transform: rotate(60deg);
}

/* ------------------------------------------------------------------ stage */

.stage {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
}

.vertical-poem {
  position: absolute;
  top: 6%;
  left: -6px;
  z-index: 1;
  color: var(--on-bg-faint);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .48em;
  writing-mode: vertical-rl;
  animation: fadeIn 1.5s .7s both;
}

.hero {
  position: absolute;
  top: 10%;
  left: 1.5%;
  z-index: 4;
  width: min(340px, 40%);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--on-bg-mute);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .3em;
  animation: fadeUp .9s .2s cubic-bezier(.2, .8, .2, 1) both;
}

.hero-kicker span {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--on-bg-mute);
}

.hero h1 {
  margin: 0;
  color: var(--on-bg);
  font-family: var(--serif);
  font-size: clamp(48px, 4.35vw, 64px);
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.16;
  text-shadow: var(--on-bg-shadow);
  animation: fadeUp 1.05s .28s cubic-bezier(.2, .8, .2, 1) both;
}

.hero h1 em {
  color: var(--cinnabar);
  font-style: normal;
}

.hero-sub {
  width: 92%;
  margin: 22px 0 0;
  color: var(--on-bg-soft);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .03em;
  line-height: 1.95;
  text-shadow: var(--on-bg-shadow);
  animation: fadeUp 1.05s .38s cubic-bezier(.2, .8, .2, 1) both;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  color: var(--on-bg-mute);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .12em;
  animation: fadeUp 1.05s .46s cubic-bezier(.2, .8, .2, 1) both;
}

.meta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jade-bright);
  box-shadow: 0 0 0 4px rgba(46, 117, 99, .1);
  animation: dotPulse 2.8s ease-in-out infinite;
}

.meta-sep {
  width: 1px;
  height: 10px;
  background: var(--on-bg-faint);
}

/* ---------------------------------------------------------------- guide */

.guide-wrap {
  position: absolute;
  left: 62%;
  bottom: 0;
  z-index: 3;
  width: min(500px, 51%);
  height: min(78vh, 780px);
  pointer-events: none;
  transform: translateX(-50%);
  animation: guideIn 1.25s .12s cubic-bezier(.17, .85, .2, 1) both;
}

.guide-halo {
  position: absolute;
  top: 41%;
  left: 50%;
  width: 88%;
  aspect-ratio: 1;
  border: 1px solid rgba(244, 235, 213, .2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 237, 216, .24), rgba(246, 237, 216, .04) 58%, transparent 72%);
  box-shadow: inset 0 0 80px rgba(246, 237, 216, .07);
  transform: translate(-50%, -50%);
  animation: haloBreath 7s ease-in-out infinite;
}

.guide-halo::after {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(201, 161, 90, .16);
  border-radius: 50%;
}

.guide-photo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* 底部预留名片高度（padding 百分比按容器宽度计）：形象框尽量占满，名片在下方互不重叠 */
  padding-bottom: 12.5%;
  transition: opacity .55s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

.photo-frame {
  position: relative;
  /* 高度略大于宽度的肖像比例（h/w ≈ 1.25），配合近方形形象素材更协调 */
  width: min(460px, 92%);
  height: 80%;
  overflow: hidden;
  border: 1px solid rgba(201, 161, 90, .46);
  border-radius: 230px 230px 36px 36px;
  background: #f2e8d4;
  box-shadow: 0 30px 64px rgba(11, 44, 36, .28), inset 0 0 0 7px rgba(250, 245, 233, .46);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 3;
  border: 1px solid rgba(255, 251, 240, .38);
  border-radius: 224px 224px 30px 30px;
  pointer-events: none;
}

.photo-still,
.photo-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  transition: opacity .3s ease;
}

.photo-gif {
  opacity: 0;
}

.guide-wrap.speaking .guide-photo .photo-gif {
  opacity: 1;
}

.guide-wrap.speaking .guide-photo .photo-still {
  opacity: 0;
}

.photo-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(255, 250, 238, .1) 0%, transparent 40%, rgba(20, 54, 46, .18) 100%),
    radial-gradient(circle at 50% 30%, transparent 50%, rgba(30, 62, 51, .08) 100%);
}

.photo-caption {
  position: absolute;
  bottom: 17px;
  left: 50%;
  z-index: 4;
  padding: 5px 10px;
  border: 1px solid rgba(250, 245, 233, .34);
  border-radius: 999px;
  background: rgba(22, 56, 47, .3);
  color: rgba(252, 247, 236, .86);
  font-size: 8px;
  letter-spacing: .16em;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.guide-badge {
  position: absolute;
  bottom: 1.5%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  box-shadow: 0 12px 26px rgba(12, 45, 37, .12);
  color: var(--chip-text);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .12em;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  transition: opacity .35s ease, transform .35s ease;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jade-bright);
  box-shadow: 0 0 0 4px rgba(46, 117, 99, .12);
}

.speech-bubble {
  position: absolute;
  top: 1%;
  right: -20%;
  z-index: 6;
  width: 232px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 22px 22px 22px 6px;
  background: linear-gradient(145deg, rgba(251, 246, 234, .95), rgba(239, 229, 207, .92));
  box-shadow: 0 22px 50px rgba(11, 44, 36, .18);
  backdrop-filter: blur(18px);
  animation: bubbleIn .9s .7s cubic-bezier(.2, .8, .2, 1) both, bubbleFloat 6s 1.6s ease-in-out infinite;
}

.bubble-name {
  display: block;
  margin-bottom: 8px;
  color: var(--cinnabar);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .24em;
}

.speech-bubble p {
  margin: 0;
  color: #22483e;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.75;
}

.bubble-tail {
  position: absolute;
  bottom: 19px;
  left: -7px;
  width: 14px;
  height: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .58);
  border-left: 1px solid rgba(255, 255, 255, .58);
  background: #f2e8d4;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------- info card */

.info-card {
  position: absolute;
  left: 1.5%;
  bottom: 2%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 15px;
  width: 288px;
  padding: 15px 17px;
  border: 1px solid var(--chip-border);
  border-radius: 20px;
  background: var(--chip-bg);
  box-shadow: 0 18px 42px rgba(12, 45, 37, .11), inset 0 1px 0 rgba(255, 255, 255, .44);
  backdrop-filter: blur(18px) saturate(1.05);
  color: var(--chip-text);
  animation: fadeUp 1.05s .58s cubic-bezier(.2, .8, .2, 1) both;
}

.info-weather {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.temp {
  color: var(--chip-text);
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
}

.weather-label {
  color: var(--chip-text-soft);
  font-size: 8px;
  letter-spacing: .1em;
  white-space: nowrap;
}

.info-line {
  width: 1px;
  height: 34px;
  background: var(--chip-line);
}

.info-crowd {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 74px;
}

.info-label {
  color: var(--chip-text-soft);
  font-size: 8px;
  letter-spacing: .14em;
}

.info-crowd strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
}

.info-crowd strong i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jade-bright);
  box-shadow: 0 0 0 4px rgba(46, 117, 99, .1);
}

.info-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  margin-left: auto;
}

.info-wave span {
  width: 2px;
  border-radius: 2px;
  background: var(--chip-text-soft);
  animation: wave 1.6s ease-in-out infinite;
}

.info-wave span:nth-child(1) { height: 8px; animation-delay: -.2s; }
.info-wave span:nth-child(2) { height: 14px; animation-delay: -.4s; }
.info-wave span:nth-child(3) { height: 20px; animation-delay: -.6s; }
.info-wave span:nth-child(4) { height: 11px; animation-delay: -.8s; }
.info-wave span:nth-child(5) { height: 17px; animation-delay: -1s; }
.info-wave span:nth-child(6) { height: 9px; animation-delay: -1.2s; }
.info-wave span:nth-child(7) { height: 13px; animation-delay: -1.4s; }

.stage-footnote {
  position: absolute;
  right: 0;
  bottom: .5%;
  margin: 0;
  color: var(--on-bg-faint);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .22em;
  animation: fadeIn 1.5s 1s both;
}

/* ------------------------------------------------------------- chat panel */

.sheet-handle {
  display: none;
}

.chat-panel {
  position: relative;
  z-index: 10;
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 32px;
  background: linear-gradient(158deg,
    rgb(var(--panel-tint-a) / calc(var(--panel-alpha-a) * var(--panel-opacity, 1))) 0%,
    rgb(var(--panel-tint-b) / calc(var(--panel-alpha-b) * var(--panel-opacity, 1))) 58%,
    rgb(var(--panel-tint-c) / calc(var(--panel-alpha-c) * var(--panel-opacity, 1))) 100%);
  box-shadow: 0 42px 90px rgba(8, 34, 28, .34), inset 0 1px 0 rgba(255, 255, 255, .64);
  backdrop-filter: blur(26px) saturate(1.08);
  animation: panelIn 1.1s .3s cubic-bezier(.2, .8, .2, 1) both;
}

.panel-glow {
  position: absolute;
  top: -35%;
  right: -30%;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 117, 99, .15), transparent 66%);
  pointer-events: none;
}

.panel-texture {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: radial-gradient(rgba(41, 81, 68, .5) .45px, transparent .55px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.chat-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  right: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 161, 90, .64), transparent);
  pointer-events: none;
}

.chat-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 23px 24px 17px;
}

.mini-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(201, 161, 90, .5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 250, 236, .72), transparent 32%),
    linear-gradient(145deg, var(--btn-a), var(--btn-b));
  box-shadow: 0 10px 22px rgba(17, 57, 48, .18), inset 0 0 0 4px rgba(250, 245, 232, .26);
  color: #f6edd8;
  font-family: var(--serif);
  font-size: 21px;
}

.mini-avatar i {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #f3ead8;
  border-radius: 50%;
  background: #3d8d70;
}

.chat-identity {
  min-width: 0;
}

.chat-eyebrow {
  margin: 0 0 4px;
  color: var(--ink-mute);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .24em;
}

.chat-identity h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.1;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--jade-bright);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .1em;
}

.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jade-bright);
  box-shadow: 0 0 0 3px rgba(61, 141, 112, .1);
  animation: dotPulse 2.8s ease-in-out infinite;
}

.chat-place {
  margin: 5px 0 0;
  color: var(--ink-mute);
  font-size: 9px;
  letter-spacing: .1em;
}

.sound-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  color: var(--ink-mute);
  transition: color .3s ease, background .3s ease, border-color .3s ease;
}

.sound-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.sound-btn svg path:first-child {
  fill: currentColor;
}

.sound-btn .sound-wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: .45;
}

.sound-btn:hover {
  color: var(--jade);
  background: rgba(255, 255, 255, .55);
}

.sound-btn[aria-pressed="true"] {
  border-color: var(--jade);
  background: var(--jade);
  color: #f8efda;
  box-shadow: 0 8px 20px rgba(20, 69, 57, .22);
}

.sound-btn[aria-pressed="true"] .sound-wave {
  opacity: 1;
}

.chat-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0 24px;
  color: var(--ink-mute);
  font-size: 8px;
  letter-spacing: .16em;
}

.chat-rule::before,
.chat-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
padding: 18px 22px 12px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 87, 74, .22) transparent;
}

.messages::-webkit-scrollbar {
  width: 4px;
}

.messages::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(29, 87, 74, .2);
}

.msg {
  display: flex;
  animation: messageIn .45s cubic-bezier(.2, .8, .2, 1) both;
}

.msg.user {
  justify-content: flex-end;
}

.bubble {
  position: relative;
  max-width: 92%;
  padding: 13px 15px 11px;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 5px 18px 18px 18px;
  background: rgba(255, 252, 244, .58);
  box-shadow: 0 8px 20px rgba(25, 62, 52, .05);
}

.msg.user .bubble {
  max-width: 84%;
  border-color: rgba(255, 255, 255, .18);
  border-radius: 18px 18px 5px 18px;
  background: linear-gradient(140deg, var(--btn-a), var(--btn-b));
  box-shadow: 0 12px 26px rgba(16, 56, 47, .2);
}

.bubble-text {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .025em;
  line-height: 1.82;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.msg.user .bubble-text {
  color: #f8f0dd;
}

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--ink-mute);
  font-size: 7px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.voice-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 6px 9px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .04);
  color: var(--jade);
  transition: background .25s ease, border-color .25s ease;
}

.voice-note:hover {
  border-color: var(--jade-bright);
  background: rgba(0, 0, 0, .07);
}

.voice-note.playing {
  border-color: var(--jade-bright);
  background: rgba(0, 0, 0, .08);
}

.voice-note.paused {
  border-style: dashed;
  opacity: .88;
}

.voice-note.paused .voice-wave i {
  animation: none;
  opacity: .28;
}

.voice-play {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--jade);
  color: #f7efda;
}

.voice-play svg {
  width: 9px;
  height: 9px;
  fill: currentColor;
}

/* 播放三角 / 暂停双杠按状态切换（playing=点击可暂停；paused/idle=点击可播放） */
.voice-play .icon-pause {
  display: none;
}

.voice-note.playing .voice-play .icon-play {
  display: none;
}

.voice-note.playing .voice-play .icon-pause {
  display: block;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.voice-wave i {
  display: block;
  width: 2px;
  height: var(--h);
  border-radius: 2px;
  background: currentColor;
  opacity: .62;
  transform-origin: center;
}

.voice-note.playing .voice-wave i {
  animation: voiceBar .7s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

.voice-time {
  font-size: 8px;
  letter-spacing: .06em;
  opacity: .62;
}

.msg.user .msg-meta {
  justify-content: flex-end;
  color: rgba(248, 240, 221, .55);
}

.msg.typing .bubble {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(29, 87, 74, .42);
  animation: typingDot 1.2s ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: .15s;
}

.typing-dots i:nth-child(3) {
  animation-delay: .3s;
}

.typing-text {
  color: rgba(39, 82, 70, .46);
  font-size: 9px;
  letter-spacing: .06em;
}

.plan-card {
  position: relative;
  width: 94%;
  margin-left: 0;
  padding: 15px 16px 13px;
  overflow: hidden;
  border: 1px solid rgba(201, 161, 90, .22);
  border-radius: 5px 20px 20px 20px;
  background:
    linear-gradient(115deg, rgba(255, 252, 243, .72), rgba(241, 231, 211, .6)),
    radial-gradient(circle at 100% 0, rgba(201, 161, 90, .12), transparent 52%);
  box-shadow: 0 10px 24px rgba(26, 62, 52, .06);
  animation: messageIn .55s .25s cubic-bezier(.2, .8, .2, 1) both;
}

.plan-card::after {
  content: "";
  position: absolute;
  top: -18px;
  right: -18px;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(178, 75, 55, .16);
  border-radius: 50%;
}

.plan-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-kicker {
  color: var(--cinnabar);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .22em;
}

.plan-time {
  color: var(--ink-mute);
  font-size: 7.5px;
  letter-spacing: .1em;
}

.plan-card h3 {
  position: relative;
  z-index: 1;
  margin: 8px 0 11px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
}

.plan-route {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-stop {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.plan-stop i {
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: var(--jade-bright);
  box-shadow: 0 0 0 3px rgba(46, 117, 99, .08);
}

.plan-dash {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 3px, transparent 3px 6px);
}

.plan-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--ink-mute);
  font-size: 8.5px;
  letter-spacing: .02em;
}

.plan-foot button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--jade);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}

.plan-foot button i {
  font-style: normal;
  transition: transform .25s ease;
}

.plan-foot button:hover i {
  transform: translateX(2px);
}

.quick-area {
  flex: 0 0 auto;
  padding: 8px 22px 0;
}

.quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--ink-mute);
  font-size: 9.5px;
  letter-spacing: .14em;
}

.quick-hint {
  color: var(--ink-mute);
  letter-spacing: .06em;
}

.quick-list {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 5px;
  scrollbar-width: none;
}

.quick-list::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .3);
  color: var(--jade-deep);
  font-size: 11.5px;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.chip::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .8;
}

.chip:hover {
  border-color: rgba(29, 87, 74, .25);
  background: rgba(255, 255, 255, .6);
  transform: translateY(-1px);
}

.chip:active {
  transform: translateY(0);
}

.chat-panel.is-busy .chip,
.chat-panel.is-busy .send-btn {
  pointer-events: none;
  opacity: .52;
}

.composer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 9px 16px 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 18px;
  background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68), 0 9px 22px rgba(29, 66, 57, .06);
  backdrop-filter: blur(10px);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.composer:focus-within {
  border-color: rgba(29, 87, 74, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 0 4px rgba(29, 87, 74, .06), 0 9px 22px rgba(29, 66, 57, .06);
}

.composer input {
  flex: 1;
  min-width: 0;
  padding: 8px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .02em;
}

.composer input::placeholder {
  color: var(--ink-mute);
}

.mic-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .05);
  color: var(--jade);
  transition: color .25s ease, background .25s ease;
}

.mic-btn:hover {
  color: var(--jade-deep);
  background: rgba(0, 0, 0, .09);
}

.mic-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.send-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--btn-a), var(--btn-b));
  box-shadow: 0 7px 16px rgba(16, 56, 47, .2);
  color: var(--paper-light);
  transition: transform .25s ease, box-shadow .25s ease;
}

.send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(16, 56, 47, .26);
}

.send-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-note {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 0 16px;
  color: rgba(32, 76, 64, .32);
  font-size: 7px;
  letter-spacing: .08em;
  text-align: center;
}

.page-footer {
  flex: 0 0 auto;
}

.page-footer .demo-note {
  padding-bottom: 2px;
}

.corp-note {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0 16px;
  color: rgba(32, 76, 64, .4);
  font-size: 8px;
  letter-spacing: .06em;
  text-align: center;
}

.listening {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 49px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-radius: 18px;
  background: rgba(247, 241, 227, .97);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  cursor: pointer;
}

.composer.is-listening .listening {
  opacity: 1;
  pointer-events: auto;
}

.composer.is-listening .mic-btn {
  color: var(--cinnabar);
  background: rgba(178, 75, 55, .12);
  animation: micPulse 1.6s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(178, 75, 55, .28); }
  50% { box-shadow: 0 0 0 6px rgba(178, 75, 55, .06); }
}

.listening-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}

.listening-wave span {
  width: 2px;
  border-radius: 2px;
  background: var(--cinnabar);
  animation: wave 1s ease-in-out infinite;
}

.listening-wave span:nth-child(1) { height: 7px; animation-delay: -.2s; }
.listening-wave span:nth-child(2) { height: 13px; animation-delay: -.4s; }
.listening-wave span:nth-child(3) { height: 18px; animation-delay: -.6s; }
.listening-wave span:nth-child(4) { height: 11px; animation-delay: -.8s; }
.listening-wave span:nth-child(5) { height: 15px; animation-delay: -1s; }

.listening > span {
  color: rgba(32, 76, 64, .7);
  font-size: 10px;
  letter-spacing: .06em;
}

.listening button {
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--cinnabar);
  font-size: 9px;
  letter-spacing: .06em;
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  right: 34px;
  bottom: 34px;
  z-index: 100;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(18, 57, 48, .92);
  box-shadow: 0 14px 32px rgba(7, 31, 25, .24);
  color: #f8efda;
  font-size: 10px;
  letter-spacing: .06em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
  backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------- animation */

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(22px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes guideIn {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes haloBreath {
  0%, 100% { opacity: .8; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.035); }
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes messageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: .34; }
  30% { transform: translateY(-3px); opacity: .8; }
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(46, 117, 99, .1); }
  50% { box-shadow: 0 0 0 5px rgba(46, 117, 99, .04); }
}

@keyframes wave {
  0%, 100% { transform: scaleY(.55); opacity: .55; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes voiceBar {
  from { transform: scaleY(.45); opacity: .45; }
  to { transform: scaleY(1.15); opacity: 1; }
}

@keyframes sunBreath {
  0%, 100% { transform: scale(1); opacity: .95; }
  50% { transform: scale(1.03); opacity: 1; }
}

@keyframes cloudDrift {
  from { transform: translateX(-18px); }
  to { transform: translateX(28px); }
}

@keyframes mistDrift {
  from { transform: translateX(-2.5%); }
  to { transform: translateX(2.5%); }
}

@keyframes waterDrift {
  from { transform: translateX(-6px); }
  to { transform: translateX(8px); }
}

@keyframes birdDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(14px, -6px); }
}

@keyframes leafFall {
  0% { opacity: 0; transform: translate3d(0, -10vh, 0) rotate(0deg); }
  10% { opacity: .4; }
  80% { opacity: .32; }
  100% { opacity: 0; transform: translate3d(70px, 112vh, 0) rotate(320deg); }
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1320px) {
  .speech-bubble {
    display: none;
  }
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: minmax(0, 1fr) 390px;
    column-gap: 18px;
    padding: 0 20px 20px;
  }

.guide-wrap {
    left: 68%;
    width: min(320px, 48%);
  }

  .hero {
    width: 42%;
  }

  .hero h1 {
    font-size: clamp(36px, 4.2vw, 48px);
  }

  .hero-sub {
    font-size: 11px;
  }

  .vertical-poem,
  .weather-chip {
    display: none;
  }

  .info-card {
    width: 260px;
  }
}

@media (max-width: 980px) {
  .app {
    display: block;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    overflow: hidden;
  }

.topbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 40;
    padding: max(14px, env(safe-area-inset-top)) 18px 12px;
    background: linear-gradient(180deg, rgba(226, 237, 226, .34), transparent);
  }

  .brand {
    gap: 9px;
  }

  .brand-seal {
    width: 31px;
    height: 34px;
    font-size: 18px;
  }

  .brand-seal::after {
    width: 24px;
    height: 27px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    font-size: 6px;
  }

  .location,
  .weather-chip,
  .stage-footnote,
  .vertical-poem {
    display: none;
  }

  .top-actions {
    gap: 0;
  }

  .stage {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .hero,
  .info-card {
    display: none;
  }

.guide-wrap {
    top: calc(env(safe-area-inset-top) + 58px);
    bottom: auto;
    left: 50%;
    width: min(245px, 62vw);
    height: 33dvh;
    min-height: 175px;
    transition: opacity .28s ease;
    animation: guideInMobile 1.1s .1s cubic-bezier(.17, .85, .2, 1) both;
  }

  .guide-halo {
    width: 94%;
  }

  .guide-photo {
    padding-bottom: 13%;
  }

  .guide-badge {
    bottom: -2%;
    padding: 6px 10px;
    font-size: 8px;
  }

  .speech-bubble {
    display: none;
  }

  .photo-frame {
    width: 72%;
    height: 80%;
    border-radius: 140px 140px 26px 26px;
  }

  .photo-frame::after {
    border-radius: 134px 134px 20px 20px;
  }

.chat-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    height: 58dvh;
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -24px 60px rgba(8, 34, 28, .26);
    transition: height .38s cubic-bezier(.2, .8, .2, 1);
    animation: panelInMobile .95s .18s cubic-bezier(.2, .8, .2, 1) both;
  }

  .chat-panel.expanded {
    height: 86dvh;
  }

  .app.sheet-expanded .guide-wrap {
    opacity: 0;
    visibility: hidden;
  }

  .sheet-handle {
    position: absolute;
    top: 2px;
    left: 50%;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 96px;
    height: 28px;
    border-radius: 0 0 14px 14px;
    transform: translateX(-50%);
  }

  .sheet-handle span {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: rgba(29, 87, 74, .2);
    transition: background .25s ease, width .25s ease;
  }

  .sheet-handle:active span {
    width: 44px;
    background: rgba(29, 87, 74, .34);
  }

  .chat-head {
    padding: 20px 20px 13px;
  }

.mini-avatar {
    width: 44px;
    height: 44px;
    font-size: 19px;
  }

  .chat-identity h2 {
    font-size: 19px;
  }

  .sound-btn {
    width: 42px;
    height: 42px;
  }

  .chat-rule {
    padding: 0 20px;
  }

  .messages {
    padding: 14px 18px 8px;
    gap: 12px;
  }

  .bubble {
    max-width: 94%;
    padding: 11px 13px 9px;
  }

  .bubble-text {
    font-size: 11.5px;
    line-height: 1.75;
  }

  .msg-meta {
    font-size: 6.5px;
  }

  .quick-area {
    padding: 6px 18px 0;
  }

.quick-head {
    margin-bottom: 6px;
  }

  .quick-list {
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  }

.chip {
    padding: 9px 12px;
    font-size: 11px;
  }

  .composer {
    margin: 9px 14px 0;
    padding: 5px 5px 5px 7px;
  }

  .composer input {
    font-size: 16px;
  }

  .composer input::placeholder {
    font-size: 13px;
  }

  .mic-btn {
    width: 38px;
    height: 38px;
  }

  .send-btn {
    width: 38px;
    height: 38px;
  }

  .demo-note {
    padding: 7px 0 10px;
  }

  .corp-note {
    padding-bottom: 10px;
  }

  .admin-link {
    height: 34px;
    padding: 0 12px;
  }

  .toast {
    right: 50%;
    bottom: 32px;
    transform: translate(50%, 10px);
  }

  .toast.show {
    transform: translate(50%, 0);
  }
}

@media (max-width: 480px) {
  .brand-text small {
    display: none;
  }

.chat-head {
    padding: 18px 18px 11px;
  }

  .chat-eyebrow {
    display: none;
  }

  .chat-identity h2 {
    font-size: 18px;
  }

  .chat-place {
    margin-top: 4px;
    font-size: 8px;
  }

  .messages {
    padding: 12px 16px 6px;
  }

  .quick-area {
    padding: 5px 16px 0;
  }

  .quick-hint {
    display: none;
  }

  .composer {
    margin: 8px 12px 0;
  }

  .demo-note {
    font-size: 6.5px;
  }

  .corp-note {
    font-size: 7px;
  }
}

@media (max-height: 700px) and (max-width: 980px) {
  .topbar {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .brand-seal {
    width: 28px;
    height: 31px;
    font-size: 16px;
  }

  .brand-seal::after {
    width: 21px;
    height: 24px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .guide-wrap {
    top: calc(env(safe-area-inset-top) + 50px);
    width: min(230px, 60vw);
    height: 33dvh;
    min-height: 170px;
  }

  .guide-badge {
    padding: 5px 9px;
    font-size: 7.5px;
  }

  .chat-panel {
    height: 60dvh;
  }

  .chat-panel.expanded {
    height: 88dvh;
  }

  .chat-head {
    padding: 14px 18px 9px;
  }

  .mini-avatar {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .chat-eyebrow {
    display: none;
  }

  .chat-identity h2 {
    font-size: 17px;
  }

  .chat-place {
    margin-top: 3px;
    font-size: 8px;
  }

  .sound-btn {
    width: 38px;
    height: 38px;
  }

  .chat-rule {
    font-size: 7px;
  }

  .messages {
    gap: 10px;
    padding: 10px 16px 6px;
  }

  .bubble {
    padding: 10px 12px 8px;
  }

  .bubble-text {
    font-size: 11px;
    line-height: 1.7;
  }

  .quick-area {
    padding: 4px 16px 0;
  }

  .quick-head {
    margin-bottom: 4px;
    font-size: 8.5px;
  }

  .chip {
    padding: 8px 12px;
    font-size: 11px;
  }

  .composer {
    margin: 7px 12px 0;
  }

  .page-footer {
    display: none;
  }
}

@media (max-height: 660px) and (max-width: 980px) {
  .plan-card {
    display: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) and (max-width: 980px) {
  .topbar {
    padding: max(8px, env(safe-area-inset-top)) 16px 8px;
  }

  .brand-seal {
    width: 28px;
    height: 30px;
    font-size: 15px;
  }

  .brand-seal::after {
    width: 21px;
    height: 23px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .brand-text small,
  .guide-wrap,
  .sheet-handle,
  .plan-card,
  .page-footer {
    display: none;
  }

  .chat-panel {
    top: calc(env(safe-area-inset-top) + 48px);
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
    border-radius: 20px 20px 0 0;
  }

  .chat-head {
    padding: 12px 18px 8px;
  }

  .mini-avatar {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .chat-eyebrow {
    display: none;
  }

  .chat-identity h2 {
    font-size: 17px;
  }

  .chat-place {
    margin-top: 3px;
    font-size: 8px;
  }

  .sound-btn {
    width: 36px;
    height: 36px;
  }

  .chat-rule {
    font-size: 7px;
  }

  .messages {
    padding: 8px 16px 6px;
  }

  .bubble {
    padding: 10px 12px 8px;
  }

  .bubble-text {
    font-size: 11px;
    line-height: 1.65;
  }

  .quick-area {
    padding: 4px 16px 0;
  }

  .quick-head {
    margin-bottom: 4px;
    font-size: 8px;
  }

  .chip {
    padding: 7px 11px;
    font-size: 10.5px;
  }

  .composer {
    margin: 6px 12px 0;
  }

  .composer input {
    font-size: 16px;
  }
}

@keyframes guideInMobile {
  from { opacity: 0; transform: translate(-50%, 18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes panelInMobile {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ================================================================ *
 *  H5 页面定制：自定义背景 / 预览标识 / 预置风格皮肤（后台可选）  *
 * ================================================================ */

/* ---- 自定义背景（管理后台上传，body.custom-bg 时替换默认山水画布） ---- */
.scene-custom {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
}

body.custom-bg .scene-custom {
  display: block;
}

body.custom-bg .scene > :not(.scene-custom) {
  display: none !important;
}

.scene-custom-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.scene-custom-overlay {
  position: absolute;
  inset: 0;
}

/* 未配置背景时，非默认皮肤给默认画布叠加同色系淡彩，保证整体协调 */
body:not(.custom-bg)[data-skin]:not([data-skin="default"]) .scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--skin-wash), rgba(0, 0, 0, .12));
  pointer-events: none;
}

/* ---- 管理后台实时预览标识 ---- */
.preview-badge {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 999;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  background: rgba(178, 75, 55, .88);
  box-shadow: 0 10px 26px rgba(10, 38, 31, .3);
  color: #fdf6ec;
  font-size: 11px;
  letter-spacing: .12em;
  white-space: nowrap;
  transform: translateX(-50%) translateY(-56px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  pointer-events: none;
}

.preview-badge.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---- 风格皮肤：水墨黛青（烟雨/水墨/园林背景） ---- */
body[data-skin="shuimo"] {
  --ink: #243240;
  --ink-soft: #41566a;
  --ink-mute: rgba(36, 50, 64, .58);
  --jade: #3e5266;
  --jade-deep: #2a3c4d;
  --jade-bright: #54718c;
  --paper: #eef1f4;
  --paper-deep: #dbe2e9;
  --paper-light: #f8fafc;
  --cinnabar: #a0564a;
  --gold: #b8a77e;
  --gold-soft: rgba(184, 167, 126, .34);
  --line: rgba(45, 63, 80, .16);
  --glass: rgba(241, 245, 248, .62);
  --glass-strong: rgba(245, 248, 250, .86);
  --btn-a: #56708a;
  --btn-b: #32465a;
  --panel-tint-a: 243 246 249;
  --panel-tint-b: 233 239 245;
  --panel-tint-c: 223 232 240;
  --skin-wash: rgba(43, 58, 71, .16);
  --on-bg: #232f3d;
  --on-bg-soft: rgba(35, 47, 61, .76);
  --on-bg-mute: rgba(35, 47, 61, .56);
  --on-bg-faint: rgba(35, 47, 61, .42);
  --on-bg-shadow: 0 1px 16px rgba(255, 255, 255, .32), 0 0 1px rgba(255, 255, 255, .4);
  --chip-bg: rgba(238, 243, 248, .52);
  --chip-border: rgba(255, 255, 255, .44);
  --chip-text: #2a3b4d;
  --chip-text-soft: rgba(42, 59, 77, .66);
  --chip-line: rgba(42, 59, 77, .18);
  background: #263543;
}

body[data-skin="shuimo"] .scene {
  background: #8fa3b0;
}

/* ---- 风格皮肤：碧海云天（海洋/湖泊/晴空背景） ---- */
body[data-skin="lanhai"] {
  --ink: #0f3348;
  --ink-soft: #2c5a77;
  --ink-mute: rgba(15, 51, 72, .58);
  --jade: #16648f;
  --jade-deep: #0d4666;
  --jade-bright: #2a86b5;
  --paper: #eaf4f8;
  --paper-deep: #d3e7f0;
  --paper-light: #f5fbfd;
  --cinnabar: #c26a4e;
  --gold: #e0b964;
  --gold-soft: rgba(224, 185, 100, .34);
  --line: rgba(18, 74, 105, .16);
  --glass: rgba(240, 248, 252, .62);
  --glass-strong: rgba(243, 250, 253, .86);
  --btn-a: #2a86b5;
  --btn-b: #0f5378;
  --panel-tint-a: 240 248 252;
  --panel-tint-b: 228 241 248;
  --panel-tint-c: 216 233 243;
  --skin-wash: rgba(14, 61, 92, .14);
  --on-bg: #0d3247;
  --on-bg-soft: rgba(13, 50, 71, .76);
  --on-bg-mute: rgba(13, 50, 71, .57);
  --on-bg-faint: rgba(13, 50, 71, .43);
  --on-bg-shadow: 0 1px 16px rgba(255, 255, 255, .34), 0 0 1px rgba(255, 255, 255, .45);
  --chip-bg: rgba(240, 248, 252, .52);
  --chip-border: rgba(255, 255, 255, .46);
  --chip-text: #0f4463;
  --chip-text-soft: rgba(15, 68, 99, .66);
  --chip-line: rgba(15, 68, 99, .18);
  background: #0e3d5c;
}

body[data-skin="lanhai"] .scene {
  background: #7fb4cc;
}

/* ---- 风格皮肤：暖阳金秋（秋叶/夕阳/古镇背景） ---- */
body[data-skin="nuanyang"] {
  --ink: #4b2c10;
  --ink-soft: #7a4c1e;
  --ink-mute: rgba(75, 44, 16, .58);
  --jade: #9c6212;
  --jade-deep: #7a4a0e;
  --jade-bright: #c68430;
  --paper: #faf1df;
  --paper-deep: #f0dfc0;
  --paper-light: #fdf8ec;
  --cinnabar: #b5543c;
  --gold: #d3a63f;
  --gold-soft: rgba(211, 166, 63, .34);
  --line: rgba(122, 74, 14, .18);
  --glass: rgba(250, 243, 226, .62);
  --glass-strong: rgba(252, 247, 236, .86);
  --btn-a: #c68430;
  --btn-b: #8f5410;
  --panel-tint-a: 252 246 234;
  --panel-tint-b: 248 236 214;
  --panel-tint-c: 243 226 197;
  --skin-wash: rgba(124, 74, 28, .16);
  --on-bg: #45270c;
  --on-bg-soft: rgba(69, 39, 12, .76);
  --on-bg-mute: rgba(69, 39, 12, .58);
  --on-bg-faint: rgba(69, 39, 12, .44);
  --on-bg-shadow: 0 1px 16px rgba(255, 248, 233, .4), 0 0 1px rgba(255, 248, 233, .5);
  --chip-bg: rgba(252, 246, 234, .54);
  --chip-border: rgba(255, 251, 240, .46);
  --chip-text: #5a3308;
  --chip-text-soft: rgba(90, 51, 8, .66);
  --chip-line: rgba(122, 74, 14, .22);
  background: #7c4a1c;
}

body[data-skin="nuanyang"] .scene {
  background: #d9b98a;
}

/* ---- 风格皮肤：紫夜星辉（夜景/灯光/星空背景） ---- */
body[data-skin="ziye"] {
  --ink: #2e2650;
  --ink-soft: #554886;
  --ink-mute: rgba(46, 38, 80, .58);
  --jade: #6a56a8;
  --jade-deep: #4a3a80;
  --jade-bright: #8d76c9;
  --paper: #f1ecfa;
  --paper-deep: #e0d7f2;
  --paper-light: #f9f6fd;
  --cinnabar: #a05c8a;
  --gold: #b9a0e8;
  --gold-soft: rgba(185, 160, 232, .34);
  --line: rgba(74, 58, 128, .16);
  --glass: rgba(245, 241, 251, .62);
  --glass-strong: rgba(248, 245, 252, .86);
  --btn-a: #8d76c9;
  --btn-b: #553f96;
  --panel-tint-a: 246 242 252;
  --panel-tint-b: 238 231 248;
  --panel-tint-c: 229 219 244;
  --skin-wash: rgba(44, 36, 80, .2);
  /* 深色夜景背景：落在背景上的文字反转为浅色，玻璃小件改用暗色玻璃保证对比度 */
  --on-bg: #f4f0fe;
  --on-bg-soft: rgba(244, 240, 254, .85);
  --on-bg-mute: rgba(244, 240, 254, .68);
  --on-bg-faint: rgba(244, 240, 254, .5);
  --on-bg-shadow: 0 2px 18px rgba(18, 13, 44, .55), 0 0 1px rgba(18, 13, 44, .6);
  --chip-bg: rgba(28, 23, 54, .44);
  --chip-border: rgba(255, 255, 255, .24);
  --chip-text: #f0ebfd;
  --chip-text-soft: rgba(240, 235, 253, .7);
  --chip-line: rgba(240, 235, 253, .22);
  background: #2c2450;
}

body[data-skin="ziye"] .scene {
  background: #5b5288;
}

/* ---- 风格皮肤：朱砂点绛（红墙/枫叶/宫苑背景） ---- */
body[data-skin="zhusha"] {
  --ink: #4a1c16;
  --ink-soft: #7c3a2e;
  --ink-mute: rgba(74, 28, 22, .58);
  --jade: #9a4034;
  --jade-deep: #752b22;
  --jade-bright: #bc5a48;
  --paper: #f9ece2;
  --paper-deep: #eed6c5;
  --paper-light: #fdf6ef;
  --cinnabar: #c76a52;
  --gold: #d4a94e;
  --gold-soft: rgba(212, 169, 78, .34);
  --line: rgba(117, 43, 34, .18);
  --glass: rgba(250, 240, 233, .62);
  --glass-strong: rgba(252, 246, 240, .86);
  --btn-a: #bc5a48;
  --btn-b: #8a3125;
  --panel-tint-a: 252 243 237;
  --panel-tint-b: 248 231 220;
  --panel-tint-c: 243 218 202;
  --skin-wash: rgba(84, 33, 28, .16);
  --on-bg: #43150f;
  --on-bg-soft: rgba(67, 21, 15, .78);
  --on-bg-mute: rgba(67, 21, 15, .6);
  --on-bg-faint: rgba(67, 21, 15, .46);
  --on-bg-shadow: 0 1px 16px rgba(255, 243, 235, .38), 0 0 1px rgba(255, 243, 235, .5);
  --chip-bg: rgba(252, 241, 234, .52);
  --chip-border: rgba(255, 248, 240, .44);
  --chip-text: #58180f;
  --chip-text-soft: rgba(88, 24, 15, .66);
  --chip-line: rgba(117, 43, 34, .22);
  background: #54211c;
}

body[data-skin="zhusha"] .scene {
  background: #c98d7c;
}
