:root {
  --ink: #17211f;
  --muted: #68736f;
  --jade: #0f8b74;
  --jade-dark: #0b6657;
  --gold: #d8a940;
  --paper: #f8f5ee;
  --mist: #e8f1ed;
  --line: rgba(23, 33, 31, 0.12);
  --shadow: 0 24px 70px rgba(22, 38, 34, 0.18);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(15, 139, 116, 0.14), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(216, 169, 64, 0.24), transparent 24%),
  var(--paper);
}

body.entry-locked { overflow: hidden; }

.entry-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(28px, 7vw, 100px);
  color: white;
  overflow: hidden;
  isolation: isolate;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.entry-screen.leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.entry-screen__image, .entry-screen__shade { position: absolute; inset: 0; z-index: -2; }
.entry-screen__image {
  background: url("/static/assets/lingxiao-avatar.png") center 18% / cover no-repeat;
  animation: entryImageDrift 12s ease-out both;
}
.entry-screen__shade {
  z-index: -1;
  background: linear-gradient(90deg, rgba(7, 21, 18, 0.9) 0%, rgba(7, 21, 18, 0.62) 43%, rgba(7, 21, 18, 0.12) 76%), linear-gradient(0deg, rgba(7, 21, 18, 0.68), transparent 45%);
}
.entry-screen__content {
  width: min(650px, 90vw);
  animation: entryContentIn 0.9s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.entry-screen__brand {
  margin: 0 0 24px;
  color: #e5c36f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
}
.entry-screen h1 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.02em;
}
.entry-screen__content > p:not(.entry-screen__brand) {
  max-width: 520px;
  margin: 28px 0 34px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.8;
}
.entry-screen button {
  display: inline-flex;
  align-items: center;
  gap: 44px;
  padding: 15px 18px 15px 24px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  font-weight: 800;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.entry-screen button span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #e5c36f;
  color: #17211f;
  transition: transform 0.25s ease;
}
.entry-screen button:hover { color: #17211f; background: white; transform: translateY(-2px); }
.entry-screen button:hover span { transform: translateX(3px); }
.entry-screen__foot {
  position: absolute;
  right: clamp(28px, 5vw, 70px);
  bottom: clamp(24px, 4vw, 50px);
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  letter-spacing: 0.14em;
}
@keyframes entryImageDrift { from { transform: scale(1.035); } to { transform: scale(1.1); } }
@keyframes entryContentIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  background: rgba(248, 245, 238, 0.78);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--jade);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.panel-head span,
.hint {
  color: var(--muted);
}

.topbar nav {
  display: flex;
  gap: 10px;
}

.topbar a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
}

.topbar a:hover {
  background: var(--mist);
}

.visitor-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(22px, 5vw, 64px);
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  overflow-x: clip;
}

.avatar-stage {
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  min-width: 0;
}

.scene-orbit {
  position: absolute;
  inset: 8% 2% auto auto;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(15, 139, 116, 0.18);
  border-radius: 50%;
}

.avatar-frame {
  --mouth-scale: 0.78;
  width: min(430px, 82vw);
  aspect-ratio: 4 / 5;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg, #eef7f2 0%, #fffbf1 60%, #f3e4bd 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.74);
  animation: avatarBreath 5.6s ease-in-out infinite;
}

.avatar-3d-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(251, 251, 246, 0.98) 0%, rgba(235, 244, 238, 0.94) 58%, rgba(216, 228, 218, 0.98) 100%),
    repeating-linear-gradient(90deg, rgba(15, 139, 116, 0.045) 0 1px, transparent 1px 42px);
  transition: opacity 0.28s ease;
}

.avatar-frame[data-model="gltf"] .avatar-3d-viewport {
  background:
    linear-gradient(180deg, rgba(250, 251, 247, 0.98) 0%, rgba(237, 242, 236, 0.94) 54%, rgba(215, 226, 220, 0.96) 100%);
}

/* 5 种可选舞台背景——叠一层很淡的白色渐变在图片上面，保证数字人和顶部徽章/字幕
   在任何背景图上都还看得清楚，图片本身负责“简洁、配色鲜明”的视觉风格。 */
.avatar-frame[data-bg="dawn"] .avatar-3d-viewport,
.avatar-frame[data-bg="lotus"] .avatar-3d-viewport,
.avatar-frame[data-bg="golden"] .avatar-3d-viewport,
.avatar-frame[data-bg="bamboo"] .avatar-3d-viewport,
.avatar-frame[data-bg="night"] .avatar-3d-viewport {
  background-size: cover;
  background-position: center bottom;
}

.avatar-frame[data-bg="dawn"] .avatar-3d-viewport {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 40%),
    url("/static/assets/backgrounds/dawn.png");
}

.avatar-frame[data-bg="lotus"] .avatar-3d-viewport {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 40%),
    url("/static/assets/backgrounds/lotus.png");
}

.avatar-frame[data-bg="golden"] .avatar-3d-viewport {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 40%),
    url("/static/assets/backgrounds/golden.png");
}

.avatar-frame[data-bg="bamboo"] .avatar-3d-viewport {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 40%),
    url("/static/assets/backgrounds/bamboo.png");
}

.avatar-frame[data-bg="night"] .avatar-3d-viewport {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 40%),
    url("/static/assets/backgrounds/night.png");
}

.avatar-frame[data-model="gltf"] {
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 58px rgba(22, 38, 34, 0.16);
}

.avatar-3d-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-frame[data-renderer="3d"] .avatar-3d-viewport {
  opacity: 1;
}

.avatar-frame[data-renderer="3d"] {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 70px rgba(22, 38, 34, 0.14), 0 1px 0 rgba(255, 255, 255, 0.94) inset;
}

.avatar-frame[data-renderer="3d"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.52), transparent 18%),
    linear-gradient(120deg, transparent 0 58%, rgba(216, 169, 64, 0.1) 58% 59%, transparent 59% 100%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(15, 139, 116, 0.035) 34px 35px);
  mix-blend-mode: soft-light;
  opacity: 0.72;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.25s ease, transform 0.25s ease;
}

.avatar-fallback-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.avatar-frame[data-renderer="3d"] .avatar-fallback-image {
  opacity: 0;
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"] .avatar-fallback-image {
  opacity: 1;
  z-index: 2;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.96) contrast(1.02);
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"] .avatar-3d-viewport {
  opacity: 0;
  pointer-events: none;
}

.avatar-frame::after {
  content: "";
  position: absolute;
  left: 42%;
  top: 34%;
  width: 16%;
  height: 4px;
  border-radius: 999px;
  background: rgba(32, 44, 39, 0.18);
  opacity: 0;
  animation: avatarBlink 5.2s infinite;
  pointer-events: none;
  z-index: 4;
}

.avatar-frame[data-outfit*="青玉"] {
  background: linear-gradient(160deg, #eaf4ef, #fff7df);
}

.avatar-frame[data-outfit*="节庆"],
.avatar-frame[data-outfit*="红"] {
  background: linear-gradient(160deg, #fff2e7, #f7efe2);
}

.avatar-frame[data-outfit*="研学"],
.avatar-frame[data-outfit*="蓝"] {
  background: linear-gradient(160deg, #eaf3ff, #f7f2df);
}

.avatar-frame.dressup-changing {
  animation: avatarBreath 5.6s ease-in-out infinite, dressupPop 0.52s ease;
}

@keyframes avatarBreath {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes avatarBlink {
  0%,
  92%,
  100% {
    opacity: 0;
    transform: scaleY(1);
  }
  94%,
  96% {
    opacity: 1;
    transform: scaleY(1.7);
  }
}

@keyframes dressupPop {
  0% {
    transform: translateY(0) scale(1);
  }
  46% {
    transform: translateY(-6px) scale(1.018);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.avatar-frame.performing img {
  transform: scale(1.012);
}

.avatar-frame[data-expression="bright"] img {
  filter: saturate(1.14) brightness(1.03);
}

.avatar-frame[data-expression="focused"] img,
.avatar-frame[data-expression="careful"] img {
  filter: contrast(1.04) saturate(0.96);
}

.avatar-frame[data-expression="concerned"] img {
  filter: saturate(0.9) brightness(0.98);
}

.avatar-frame .mouth {
  position: absolute;
  left: 49.4%;
  top: 42.5%;
  width: 28px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 99px;
  background: rgba(64, 24, 18, 0.7);
  opacity: 0;
  z-index: 4;
}

.avatar-frame[data-renderer="3d"]::after {
  display: none;
}

.avatar-frame[data-renderer="3d"] .mouth {
  display: none;
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"]::after {
  display: none;
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"] .mouth {
  display: block;
  left: 50.35%;
  top: 39.55%;
  width: 36px;
  height: 20px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  z-index: 5;
}

.avatar-frame.speaking .mouth {
  opacity: 0.7;
  animation: speak 0.28s infinite alternate;
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"].speaking .mouth {
  opacity: 1;
  animation: none;
}

.portrait-mouth > span {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.mouth-skin {
  width: 24px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(246, 196, 178, 0.28), rgba(235, 166, 145, 0.1) 48%, rgba(221, 134, 116, 0.02) 78%, transparent 100%);
  filter: blur(1.8px);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.1s ease, width 0.12s ease, height 0.12s ease;
}

.mouth-cavity {
  width: 12px;
  height: 2.5px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(122, 42, 34, 0.95), rgba(54, 18, 15, 0.98) 72%);
  box-shadow: inset 0 1px 2px rgba(255, 185, 170, 0.35), 0 1px 2px rgba(38, 16, 13, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(calc(var(--mouth-scale) * 0.72));
  transition: width 0.08s linear, height 0.08s linear, border-radius 0.08s linear, opacity 0.08s linear;
}

.mouth-teeth {
  width: 10px;
  height: 2.5px;
  border-radius: 0 0 12px 12px;
  background: rgba(255, 247, 230, 0.92);
  box-shadow: inset 0 -1px 1px rgba(200, 180, 150, 0.35);
  opacity: 0;
  transform: translate(-50%, -7px);
  transition: opacity 0.08s linear, width 0.08s linear, transform 0.08s linear;
}

.mouth-lip {
  width: 14px;
  height: 5px;
  border-radius: 999px;
  opacity: 0;
  transition: width 0.08s linear, height 0.08s linear, transform 0.08s linear, opacity 0.08s linear;
}

.mouth-lip-top {
  background: linear-gradient(180deg, rgba(155, 55, 45, 0.7), rgba(117, 37, 32, 0.4));
  transform: translate(-50%, -11px) scaleY(0.32);
}

.mouth-lip-bottom {
  background: linear-gradient(180deg, rgba(178, 74, 60, 0.46), rgba(129, 42, 36, 0.62));
  transform: translate(-50%, 3px) scaleY(0.36);
}

.mouth-highlight {
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 200, 188, 0.5);
  opacity: 0;
  transform: translate(-26%, 4px);
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"].speaking .mouth-skin {
  opacity: 0.14;
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"].speaking .mouth-cavity,
.avatar-frame[data-renderer="3d"][data-visual="portrait"].speaking .mouth-highlight {
  opacity: 1;
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"].speaking .mouth-lip {
  opacity: 0.38;
}

.avatar-frame[data-renderer="3d"][data-visual="portrait"].speaking[data-mouth-shape="rest"] .portrait-mouth,
.avatar-frame[data-renderer="3d"][data-visual="portrait"].speaking[data-mouth-shape="closed"] .portrait-mouth {
  opacity: 0.86;
}

.avatar-frame[data-mouth-shape="closed"] .mouth-cavity {
  width: 13px;
  height: 2.5px;
  opacity: 0.56;
}

.avatar-frame[data-mouth-shape="soft"] .mouth-cavity {
  width: 13px;
  height: 4px;
}

.avatar-frame[data-mouth-shape="narrow"] .mouth-cavity {
  width: 15px;
  height: 5px;
}

.avatar-frame[data-mouth-shape="open"] .mouth-cavity {
  width: 12px;
  height: 9px;
  border-radius: 48% 48% 52% 52%;
}

.avatar-frame[data-mouth-shape="open"] .mouth-teeth,
.avatar-frame[data-mouth-shape="wide"] .mouth-teeth,
.avatar-frame[data-mouth-shape="bite"] .mouth-teeth {
  opacity: 0.88;
}

.avatar-frame[data-mouth-shape="wide"] .mouth-cavity {
  width: 19px;
  height: 4px;
}

.avatar-frame[data-mouth-shape="wide"] .mouth-teeth {
  width: 13px;
  transform: translate(-50%, -6px);
}

.avatar-frame[data-mouth-shape="round"] .mouth-cavity {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.avatar-frame[data-mouth-shape="round"] .mouth-lip {
  width: 13px;
}

.avatar-frame[data-mouth-shape="bite"] .mouth-cavity {
  width: 15px;
  height: 3px;
}

.avatar-frame[data-mouth-shape="bite"] .mouth-teeth {
  width: 15px;
  transform: translate(-50%, -4px);
}

.avatar-frame[data-mouth-shape="open"] .mouth-lip-top {
  transform: translate(-50%, -10px) scaleY(0.34);
}

.avatar-frame[data-mouth-shape="open"] .mouth-lip-bottom {
  transform: translate(-50%, 6px) scaleY(0.42);
}

.avatar-frame[data-mouth-shape="round"] .mouth-lip-top {
  transform: translate(-50%, -9px) scaleY(0.36);
}

.avatar-frame[data-mouth-shape="round"] .mouth-lip-bottom {
  transform: translate(-50%, 6px) scaleY(0.38);
}

.avatar-frame[data-expression="bright"].speaking .mouth {
  background: rgba(91, 33, 24, 0.78);
}

.avatar-frame[data-expression="concerned"].speaking .mouth,
.avatar-frame[data-expression="careful"].speaking .mouth {
  animation-duration: 0.36s;
}

@keyframes speak {
  from {
    height: 6px;
    transform: translate(-50%, -50%) scaleX(0.8);
  }
  to {
    height: 20px;
    transform: translate(-50%, -50%) scaleX(var(--mouth-scale));
  }
}

.gesture-badge {
  position: absolute;
  z-index: 5;
  left: 16px;
  top: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--jade-dark);
  background: rgba(250, 247, 237, 0.92);
  box-shadow: 0 8px 18px rgba(22, 38, 34, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.emotion-badge {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 139, 116, 0.9);
  box-shadow: 0 8px 18px rgba(15, 139, 116, 0.18);
  font-size: 13px;
}

.renderer-badge {
  position: absolute;
  z-index: 5;
  right: 16px;
  top: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(22, 38, 34, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.subtitle-ticker {
  position: absolute;
  z-index: 5;
  left: 16px;
  right: 16px;
  bottom: 54px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(23, 33, 31, 0.78), rgba(23, 33, 31, 0.68));
  color: white;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 24px rgba(22, 38, 34, 0.14);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.avatar-frame[data-model="gltf"] .subtitle-ticker {
  bottom: 10px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(23, 33, 31, 0.58);
  font-size: 12px;
}

.avatar-frame.performing .subtitle-ticker {
  transform: translateY(-2px);
}

/* 姿势调试面板：临时工具，调完手臂角度之后可以整段删掉。 */
.pose-debug-panel {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed rgba(15, 139, 116, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  font-size: 13px;
}

.pose-debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}

.pose-debug-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-weight: 700;
  cursor: pointer;
}

.pose-debug-side {
  margin-bottom: 10px;
}

.pose-debug-side-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 800;
  color: var(--muted);
}

.pose-debug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.pose-debug-grid label {
  display: grid;
  grid-template-columns: 52px 1fr 46px;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.pose-debug-grid input[type="range"] {
  width: 100%;
}

.pose-debug-panel textarea {
  width: 100%;
  margin-top: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  resize: vertical;
}

.guide-intro {
  max-width: 620px;
  margin-top: 28px;
}

.guide-intro h1,
.admin-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  margin: 8px 0 14px;
  letter-spacing: 0;
}

.guide-intro p,
.admin-hero p {
  font-size: 18px;
  line-height: 1.7;
}

.visitor-dressup {
  width: min(620px, 100%);
  min-width: 0;
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 139, 116, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 16px 48px rgba(22, 38, 34, 0.08);
  backdrop-filter: blur(14px);
}

.visitor-dressup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.visitor-dressup-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

.visitor-dressup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.visitor-dressup-actions button,
.visitor-dressup-option {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.visitor-dressup-actions button {
  padding: 8px 12px;
}

.visitor-dressup-actions button:hover,
.visitor-dressup-option:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 139, 116, 0.38);
}

.visitor-dressup-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(232, 241, 237, 0.78);
}

.visitor-dressup-preview strong,
.visitor-dressup-preview span {
  display: block;
  min-width: 0;
}

.visitor-dressup-preview span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.visitor-dressup-swatches {
  grid-row: span 2;
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.visitor-dressup-swatches span,
.visitor-dressup-dot {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(23, 33, 31, 0.14);
}

.visitor-dressup-dot {
  width: 18px;
  height: 18px;
  background:
    linear-gradient(135deg, var(--dressup-dot) 0 58%, var(--dressup-trim) 58% 100%);
}

.visitor-dressup-groups {
  display: grid;
  gap: 11px;
}

.visitor-dressup-group {
  display: grid;
  gap: 7px;
}

.visitor-dressup-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.visitor-dressup-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.visitor-dressup-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  font-size: 13px;
}

.visitor-dressup-option span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-dressup-option.active {
  border-color: transparent;
  background: var(--jade);
  color: white;
  box-shadow: 0 10px 22px rgba(15, 139, 116, 0.2);
}

.stage-bg-thumb {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 7px;
  border: 1px solid rgba(23, 33, 31, 0.14);
  background-image: var(--stage-bg-thumb);
  background-size: cover;
  background-position: center;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

.quick-facts,
.chips,
.demo-buttons,
.emergency-buttons,
.feedback-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-facts button,
.chip,
.composer button,
.image-input span,
.admin-hero button,
.settings-form button,
.bonus-card button,
.panel > button {
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 10px 14px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(22, 38, 34, 0.06);
}

.chip.active,
.composer button[type="submit"],
.admin-hero button,
.settings-form button {
  background: var(--jade);
  color: white;
}

.chat-panel,
.panel,
.route-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow: 0 18px 56px rgba(22, 38, 34, 0.1);
}

.chat-panel {
  height: clamp(1160px, calc(100dvh - 110px), 1320px);
  display: flex;
  flex-direction: column;
  padding: 22px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  align-self: start;
  position: sticky;
  top: 88px;
}

.chat-toolbar,
.route-head,
.panel-head,
.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.toolbar-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-toolbar h2,
.panel h2,
.route-head h3 {
  margin: 4px 0 0;
}

.location-pill {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--jade-dark);
  font-weight: 700;
}

.messages {
  flex: 1 1 50rem;
  min-height: 50rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 0;
  scroll-behavior: smooth;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 139, 116, 0.28);
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.message {
  width: min(88%, 700px);
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.65;
}

.message p {
  margin: 6px 0 0;
}

.message.bot {
  background: var(--mist);
  align-self: flex-start;
}

.message.user {
  background: var(--jade);
  color: white;
  align-self: flex-end;
}

.message .sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.message.has-speech p {
  cursor: pointer;
}

.speech-hint {
  opacity: 0.55;
  font-size: 12px;
}

.message-controls {
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 139, 116, 0.18);
}

.message-controls[hidden] {
  display: none;
}

.message-controls:not([hidden]) {
  display: flex;
}

.message-controls button {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  background: rgba(15, 139, 116, 0.12);
  color: var(--jade-dark);
  font-size: 13px;
  line-height: 1;
}

.message-controls button:hover {
  background: rgba(15, 139, 116, 0.22);
}

.message-controls input[type="range"] {
  flex: 1 1 auto;
  min-width: 60px;
  accent-color: var(--jade);
}

.message-controls input[type="range"]:disabled {
  opacity: 0.4;
}

.message-controls .msg-speech-time {
  flex: none;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.source {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 139, 116, 0.12);
  color: var(--jade-dark);
}

.vision-card {
  border: 1px solid rgba(15, 139, 116, 0.22);
  background: rgba(255, 255, 255, 0.82);
}

.vision-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 6px;
}

.vision-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--mist);
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 800;
}

.vision-card small {
  color: var(--muted);
}

.composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.composer input[type="file"] {
  display: none;
}

.composer input,
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
}

.settings-form input[type="color"] {
  height: 42px;
  padding: 4px;
}

.dressup-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(15, 139, 116, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(245, 250, 247, 0.9), rgba(255, 251, 240, 0.66));
}

.dressup-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dressup-editor-head span,
.dressup-preview small,
.dressup-preview p {
  color: var(--muted);
}

.dressup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dressup-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  border-top: 1px solid rgba(15, 139, 116, 0.14);
  padding-top: 10px;
}

.dressup-swatches {
  grid-row: span 3;
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.dressup-swatches span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(23, 33, 31, 0.12);
}

.dressup-preview strong,
.dressup-preview small,
.dressup-preview p {
  margin: 0;
}

.media-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-top: 12px;
}

.image-context-panel,
.speech-controls {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  padding: 10px;
}

.image-context-panel {
  display: grid;
  gap: 8px;
}

.image-context-panel label {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.image-context-panel select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.speech-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.speech-controls button,
.image-context-panel button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  border: 1px solid rgba(15, 139, 116, 0.22);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--mist);
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 800;
}

.image-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-panel {
  margin-top: 16px;
  padding: 16px;
}

.smart-map {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
}

.demo-strip {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
}

.demo-buttons {
  margin-top: 12px;
}

.demo-buttons button {
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 9px 12px;
  border: 0;
}

.map-canvas {
  position: relative;
  margin-top: 14px;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 139, 116, 0.18), transparent 42%),
    linear-gradient(25deg, transparent 45%, rgba(216, 169, 64, 0.18) 46%, transparent 48%),
    #eef6f2;
}

.map-canvas::before {
  content: "太湖 · 灵山胜境 · 拈花湾";
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: rgba(23, 33, 31, 0.45);
  font-weight: 800;
}

.map-point {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 58px;
  max-width: 116px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 12px;
  background: var(--jade);
  color: white;
  font-size: 11px;
  line-height: 1.15;
  box-shadow: 0 8px 22px rgba(15, 139, 116, 0.28);
}

.map-point span {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.map-route-line {
  position: absolute;
  z-index: 1;
  height: 4px;
  border-radius: 999px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--jade));
  box-shadow: 0 4px 14px rgba(216, 169, 64, 0.35);
  pointer-events: none;
}

.map-route-node {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(23, 33, 31, 0.2);
  pointer-events: none;
}

.route-panel ol {
  margin: 12px 0;
  padding-left: 22px;
}

.route-panel li {
  margin: 10px 0;
  line-height: 1.5;
}

.bonus-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

.bonus-card {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  min-width: 0;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.planner-grid.nav-grid {
  grid-template-columns: minmax(150px, 1.3fr) repeat(2, minmax(92px, 1fr));
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mode-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.planner-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  min-width: 0;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 12px 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.inline-check input {
  accent-color: var(--jade);
}

.planner-grid select,
.mode-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: white;
}

.tool-result {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.tour-stop-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.tour-stop {
  border: 1px solid var(--line);
  border-left: 4px solid var(--jade);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.tour-stop p {
  margin: 6px 0;
}

.tour-stop small {
  display: block;
  color: var(--jade-dark);
}

.accessibility-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.accessibility-list p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.offline-package-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.offline-package-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.multilingual-lines {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.multilingual-lines article {
  border: 1px solid var(--line);
  border-left: 4px solid rgba(216, 169, 64, 0.88);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.multilingual-lines strong,
.multilingual-lines span,
.multilingual-lines small {
  display: block;
}

.multilingual-lines span {
  margin-top: 5px;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.multilingual-lines small {
  margin-top: 5px;
  color: var(--muted);
}

.photo-frame-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.photo-frame-list article {
  border: 1px solid var(--line);
  border-left: 4px solid rgba(181, 109, 74, 0.88);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.photo-frame-list strong,
.photo-frame-list span,
.photo-frame-list small {
  display: block;
}

.photo-frame-list span {
  margin: 5px 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.photo-frame-list small {
  color: var(--muted);
  line-height: 1.4;
}

.passport-stamps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.passport-stamps article {
  border: 1px dashed rgba(15, 139, 116, 0.38);
  border-radius: 8px;
  padding: 9px;
  background: rgba(232, 241, 237, 0.55);
}

.passport-stamps article.unlocked {
  border-style: solid;
  border-color: rgba(216, 169, 64, 0.75);
  background: rgba(216, 169, 64, 0.12);
}

.passport-stamps strong,
.passport-stamps span,
.passport-stamps small {
  display: block;
}

.passport-stamps span {
  margin: 4px 0;
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 800;
}

.passport-stamps small {
  color: var(--muted);
  line-height: 1.4;
}

.guardian-checkpoints {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.guardian-checkpoints article {
  border: 1px solid var(--line);
  border-left: 4px solid var(--jade);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.72);
}

.guardian-checkpoints strong,
.guardian-checkpoints span,
.guardian-checkpoints small {
  display: block;
}

.guardian-checkpoints span {
  margin: 4px 0;
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 800;
}

.guardian-checkpoints small {
  color: var(--muted);
  line-height: 1.4;
}

.download-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--jade-dark);
  font-weight: 900;
}

.tool-result details {
  margin-top: 10px;
}

.tool-result pre {
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 8px;
  padding: 10px;
  background: rgba(23, 33, 31, 0.06);
}

.admin-shell {
  padding: clamp(22px, 4vw, 52px);
}

.admin-hero {
  padding-bottom: 24px;
}

.kpi-grid,
.dashboard-grid,
.config-grid {
  display: grid;
  gap: 18px;
}

.kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.kpi {
  background: var(--ink);
  color: white;
  border-radius: 14px;
  padding: 18px;
}

.kpi strong {
  display: block;
  font-size: 28px;
}

.kpi span {
  color: rgba(255, 255, 255, 0.72);
}

.scorecard-panel {
  margin-bottom: 18px;
}

.scorecard-panel #scorecardTotal {
  font-size: 34px;
  color: var(--jade-dark);
}

.scorecard-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.score-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.score-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.score-row-head span {
  color: var(--jade-dark);
  font-weight: 800;
  white-space: nowrap;
}

.score-track {
  height: 9px;
  border-radius: 999px;
  background: var(--mist);
  overflow: hidden;
  margin: 10px 0;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--gold));
}

.score-evidence p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.score-demo,
.scorecard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.score-demo span,
.scorecard-actions span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(15, 139, 116, 0.08);
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 700;
}

.scorecard-actions {
  margin-top: 14px;
}

.readiness-panel {
  margin-bottom: 18px;
}

.readiness-panel #readinessTotal {
  font-size: 30px;
  color: var(--jade-dark);
}

.readiness-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.readiness-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.76);
  min-height: 124px;
}

.readiness-item.ready {
  border-color: rgba(15, 139, 116, 0.35);
  background: rgba(15, 139, 116, 0.08);
}

.readiness-item.warn {
  border-color: rgba(182, 64, 54, 0.4);
  background: rgba(182, 64, 54, 0.08);
}

.readiness-status {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--jade);
  color: white;
  font-weight: 900;
}

.readiness-item.warn .readiness-status {
  background: #b64036;
}

.readiness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.readiness-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.readiness-item p {
  margin: 8px 0 6px;
  color: var(--ink);
  line-height: 1.45;
}

.readiness-item small {
  color: var(--muted);
  line-height: 1.45;
}

.action-plan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-item {
  border: 1px solid var(--line);
  border-left: 5px solid var(--jade);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.action-item.priority-高 {
  border-left-color: #b64036;
}

.action-item.priority-中 {
  border-left-color: var(--gold);
}

.action-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.action-head span {
  white-space: nowrap;
  color: var(--jade-dark);
  font-weight: 800;
}

.action-item p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.55;
}

.action-item small {
  display: inline-block;
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--jade-dark);
  font-weight: 800;
}

.strategy-panel {
  display: grid;
  gap: 12px;
}

.strategy-strip,
.strategy-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.strategy-strip span,
.strategy-kpis span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(15, 139, 116, 0.08);
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 800;
}

.strategy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.strategy-action {
  border: 1px solid var(--line);
  border-left: 5px solid var(--jade);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.strategy-action.priority-高 {
  border-left-color: #b64036;
}

.strategy-action.priority-中 {
  border-left-color: var(--gold);
}

.strategy-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.strategy-head span {
  color: var(--jade-dark);
  font-weight: 800;
  white-space: nowrap;
}

.strategy-action p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.55;
}

.strategy-action small {
  color: var(--jade-dark);
  line-height: 1.45;
  font-weight: 700;
}

.blueprint-panel {
  display: grid;
  gap: 14px;
}

.blueprint-broadcast {
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(216, 169, 64, 0.13);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 800;
}

.blueprint-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.blueprint-step {
  border: 1px solid var(--line);
  border-top: 4px solid var(--jade);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.blueprint-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.blueprint-head span {
  color: var(--jade-dark);
  font-weight: 800;
  white-space: nowrap;
}

.blueprint-step p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.55;
}

.blueprint-step small {
  color: var(--jade-dark);
  font-weight: 800;
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.blueprint-mini {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 139, 116, 0.07);
}

.blueprint-mini strong,
.blueprint-mini span,
.blueprint-mini small {
  display: block;
}

.blueprint-mini span {
  margin: 5px 0;
  color: var(--jade-dark);
  font-weight: 800;
}

.blueprint-mini small {
  color: var(--muted);
  line-height: 1.45;
}

.blueprint-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blueprint-kpis span {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.blueprint-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.blueprint-lists > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.blueprint-lists ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.gap-list {
  display: grid;
  gap: 12px;
}

.gap-row {
  border: 1px solid var(--line);
  border-left: 5px solid var(--jade);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.gap-row.severity-高 {
  border-left-color: #b64036;
}

.gap-row.severity-中 {
  border-left-color: var(--gold);
}

.gap-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.gap-head span {
  white-space: nowrap;
  color: var(--jade-dark);
  font-weight: 800;
}

.gap-row p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.55;
}

.gap-row small {
  color: var(--jade-dark);
  font-weight: 800;
}

.dashboard-grid {
  grid-template-columns: 1.4fr 1fr;
}

.config-grid {
  grid-template-columns: 0.9fr 1.1fr;
  margin-top: 18px;
}

.panel {
  padding: 18px;
}

.panel.wide {
  grid-column: span 2;
}

.bar-row,
.segment-row,
.question-row,
.provider-row,
.log-row {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.provider-row {
  display: grid;
  grid-template-columns: minmax(76px, 0.8fr) minmax(82px, 0.9fr) minmax(0, 2fr) auto;
  gap: 10px;
  align-items: center;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.preset-option {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 22px rgba(22, 38, 34, 0.06);
}

.preset-option:hover {
  border-color: rgba(15, 139, 116, 0.45);
  background: rgba(232, 241, 237, 0.82);
}

.preset-option span {
  color: var(--jade-dark);
  font-size: 13px;
  font-weight: 800;
  word-break: break-all;
}

.preset-option small {
  color: var(--muted);
  line-height: 1.4;
}

.provider-row span {
  color: #9a5c21;
  font-weight: 800;
}

.provider-row.ready span {
  color: var(--jade-dark);
}

.provider-row small {
  color: var(--muted);
  word-break: break-all;
}

.provider-row button {
  padding: 8px 10px;
  min-height: 36px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--mist);
  overflow: hidden;
  margin-top: 7px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--gold));
}

.settings-form {
  display: grid;
  gap: 12px;
}

.settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.settings-form .check-line {
  display: flex;
  align-items: center;
}

.settings-form .check-line input {
  width: auto;
}

.settings-form textarea {
  min-height: 82px;
  resize: vertical;
}

.rehearsal-form {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.rehearsal-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.rehearsal-segments span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(15, 139, 116, 0.08);
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 800;
}

.suggestion-list {
  padding-left: 20px;
  line-height: 1.7;
}

.visitor-feedback-form { display: grid; gap: 18px; margin-top: 14px; }
.visitor-feedback-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.visitor-feedback-form legend, .feedback-comment {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
#feedbackStars { flex-wrap: nowrap; width: max-content; }
#feedbackStars button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: #b8b2a2;
  font-size: 20px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
#feedbackStars button span { position: absolute; opacity: 0; pointer-events: none; }
#feedbackStars button.selected, #feedbackStars button.preview-selected {
  color: #fff7dc;
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.feedback-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-tags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}
.feedback-tags input { accent-color: var(--jade); }
.feedback-comment textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  line-height: 1.6;
}
.feedback-submit-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.feedback-submit-row button {
  padding: 11px 18px;
  border-radius: 999px;
  color: white;
  background: var(--jade);
  font-weight: 800;
}
.feedback-submit-row button:disabled { cursor: not-allowed; opacity: 0.42; }
.feedback-submit-row span { color: var(--muted); font-size: 12px; }

/* 2026 游客端：以数字人与对话为主的自适应工作区 */
.layout-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}
.layout-switch > span { padding: 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.layout-switch button {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.layout-switch button:hover { transform: translateY(-1px); }
.layout-switch button[aria-pressed="true"] { color: white; background: var(--jade); }

.mobile-primary-actions,
.mobile-tools-menu { display: none; }

.chat-panel {
  height: auto;
  overflow-x: hidden;
  overflow-y: visible;
  position: static;
}
.messages {
  flex: 0 0 50rem;
  height: 50rem;
}
.avatar-frame { transition: width .35s ease, border-radius .35s ease, box-shadow .35s ease; }
.message { animation: messageReveal .28s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes messageReveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

.layout-mobile-effective .topbar {
  gap: 10px;
  padding: 10px 12px;
}
.layout-mobile-effective .brand-mark { width: 36px; height: 36px; }
.layout-mobile-effective .brand small,
.layout-mobile-effective .topbar nav { display: none; }
.layout-mobile-effective .layout-switch {
  display: inline-flex !important;
  flex: 0 0 auto;
  margin-left: auto;
  position: relative;
  z-index: 1;
}
.layout-mobile-effective .layout-switch > span { display: none; }
.layout-mobile-effective .visitor-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 14px 12px 40px;
  max-width: 560px;
}
.layout-mobile-effective .avatar-stage { min-height: 0; }
.layout-mobile-effective .scene-orbit { display: none; }
.layout-mobile-effective .avatar-frame {
  width: 100%;
  height: clamp(320px, 46svh, 480px);
  max-height: none;
  aspect-ratio: auto;
  border-radius: 20px;
}
.layout-mobile-effective .guide-intro { padding: 18px 4px 4px; }
.layout-mobile-effective .guide-intro h1 { font-size: clamp(25px, 8vw, 36px); }
.layout-mobile-effective .guide-intro p { font-size: 14px; line-height: 1.7; }
.layout-mobile-effective .mobile-primary-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}
.layout-mobile-effective .mobile-primary-actions button {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 10px 5px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
}
.layout-mobile-effective .mobile-primary-actions span { font-size: 13px; font-weight: 800; }
.layout-mobile-effective .mobile-primary-actions small { color: var(--muted); font-size: 10px; }
.layout-mobile-effective .quick-facts,
.layout-mobile-effective .mobile-secondary-section { display: none; }
.layout-mobile-effective .mobile-secondary-section.mobile-section-active { display: grid; scroll-margin-top: 76px; }
.layout-mobile-effective #smartMap.mobile-section-active,
.layout-mobile-effective #demoTools.mobile-section-active,
.layout-mobile-effective #visitorDressup.mobile-section-active { margin-top: 18px; }
.layout-mobile-effective .chat-panel {
  padding: 16px 12px;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(22, 38, 34, .09);
  scroll-margin-top: 68px;
}
.layout-mobile-effective .chat-toolbar { align-items: flex-start; }
.layout-mobile-effective .chat-toolbar h2 { font-size: 20px; }
.layout-mobile-effective .toolbar-pills { max-width: 44%; }
.layout-mobile-effective .location-pill { padding: 6px 8px; font-size: 10px; }
.layout-mobile-effective .chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.layout-mobile-effective .chip { flex: 0 0 auto; }
.layout-mobile-effective .mode-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-mobile-effective .messages { height: 30rem; min-height: 30rem; padding: 14px 0; }
.layout-mobile-effective .message { width: 94%; }
.layout-mobile-effective .composer { position: sticky; bottom: 8px; z-index: 4; padding: 8px; border-radius: 16px; background: rgba(248, 245, 238, .92); backdrop-filter: blur(14px); }
.layout-mobile-effective .mobile-tools-menu {
  display: block;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.layout-mobile-effective .mobile-tools-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 8px;
  cursor: pointer;
  font-weight: 800;
}
.layout-mobile-effective .mobile-tools-menu summary small { color: var(--muted); font-size: 11px; font-weight: 500; text-align: right; }
.layout-mobile-effective .mobile-tools-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 0; }
.layout-mobile-effective .mobile-tools-links button { padding: 11px 8px; border-radius: 10px; background: var(--mist); color: var(--jade-dark); font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 980px) {
  .entry-screen { align-items: end; padding-bottom: 100px; }
  .entry-screen__image { background-position: 62% top; }
  .entry-screen__shade { background: linear-gradient(0deg, rgba(7, 21, 18, 0.94) 0%, rgba(7, 21, 18, 0.4) 70%, rgba(7, 21, 18, 0.16)); }
  .entry-screen__content { width: 100%; }
  .entry-screen h1 { font-size: clamp(36px, 11vw, 52px); }
  .entry-screen__content > p:not(.entry-screen__brand) { margin-block: 20px 24px; font-size: 15px; }
  .chat-panel { position: static; height: auto; max-height: none; }

  .visitor-shell,
  .dashboard-grid,
  .config-grid,
  .action-plan-list,
  .strategy-actions,
  .blueprint-timeline,
  .blueprint-grid,
  .blueprint-lists,
  .readiness-list,
  .scorecard-list,
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel.wide {
    grid-column: span 1;
  }

  .composer {
    grid-template-columns: 1fr auto;
  }

  .composer input {
    grid-column: span 2;
  }

  .visitor-dressup-head,
  .visitor-dressup-preview {
    grid-template-columns: 1fr;
  }

  .visitor-dressup-actions {
    justify-content: flex-start;
  }

  .visitor-dressup-swatches {
    grid-row: auto;
    width: max-content;
  }

  .visitor-dressup-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planner-grid,
  .planner-grid.nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-controls {
    grid-template-columns: 1fr;
  }

  .speech-controls {
    justify-content: flex-start;
  }

  .provider-row {
    grid-template-columns: 1fr;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }
}

/* 用户手动选择“桌面”时，优先于窄屏自动规则，便于横屏和平板预览完整双栏。 */
body[data-layout="desktop"] .visitor-shell {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}
body[data-layout="desktop"] .chat-panel { position: static; height: auto; }
body[data-layout="desktop"] .composer { grid-template-columns: auto 1fr auto auto; }
body[data-layout="desktop"] .composer input { grid-column: auto; }

/* 放在旧媒体查询之后，确保 320px 等极窄屏也不会被历史规则覆盖。 */
.layout-mobile-effective .chat-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.layout-mobile-effective .toolbar-pills {
  max-width: none;
  justify-content: flex-start;
}
.layout-mobile-effective .composer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
}
.layout-mobile-effective .composer input {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
}
.layout-mobile-effective .composer .image-input { grid-column: 1; grid-row: 2; }
.layout-mobile-effective .composer #voiceBtn { grid-column: 2; grid-row: 2; }
.layout-mobile-effective .composer button[type="submit"] { grid-column: 3; grid-row: 2; }

@media (max-width: 360px) {
  .layout-mobile-effective .brand strong { font-size: 14px; }
  .layout-mobile-effective .layout-switch button { padding-inline: 8px; font-size: 11px; }
  .layout-mobile-effective .mobile-primary-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-mobile-effective .mobile-primary-actions button { min-height: 58px; }
  .layout-mobile-effective .mobile-tools-links { grid-template-columns: 1fr; }
}

/* 2026-07 visual polish: image-led, restrained Lingjing workspace. */
:root {
  --ink: #13201d;
  --muted: #62716c;
  --jade: #087c68;
  --jade-dark: #075e50;
  --gold: #c99a38;
  --paper: #f5f3ec;
  --mist: #e8f0ec;
  --line: rgba(19, 32, 29, 0.1);
  --shadow: 0 30px 80px rgba(18, 38, 32, 0.16);
}

body {
  background:
    radial-gradient(circle at 8% 4%, rgba(8, 124, 104, 0.1), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(201, 154, 56, 0.12), transparent 24rem),
    #f5f3ec;
}

.entry-screen__image {
  background-image: url("/static/assets/backgrounds/dawn.png");
  background-position: center 42%;
}

.entry-screen__shade {
  background:
    linear-gradient(90deg, rgba(8, 22, 18, 0.9) 0%, rgba(8, 22, 18, 0.67) 42%, rgba(8, 22, 18, 0.12) 78%),
    linear-gradient(0deg, rgba(8, 22, 18, 0.58), transparent 50%);
}

.entry-screen__content { max-width: 720px; }
.entry-screen__brand { color: #efd18d; }
.entry-screen h1 { text-wrap: balance; text-shadow: 0 3px 30px rgba(0, 0, 0, 0.24); }
.entry-screen button { box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18); }

.topbar {
  padding-block: 13px;
  border-bottom-color: rgba(19, 32, 29, 0.08);
  background: rgba(245, 243, 236, 0.82);
  box-shadow: 0 8px 30px rgba(20, 40, 34, 0.05);
}

.brand-mark {
  border-radius: 14px;
  background: linear-gradient(145deg, #0a8b74, #086451);
  box-shadow: 0 8px 20px rgba(8, 124, 104, 0.22), inset 0 1px rgba(255, 255, 255, 0.24);
}

.brand strong { letter-spacing: 0.06em; }
.topbar a, .layout-switch button { transition: color .2s ease, background .2s ease, transform .2s ease; }
.topbar a:hover { color: var(--jade-dark); background: rgba(8, 124, 104, 0.08); }

.visitor-shell {
  grid-template-columns: minmax(420px, .94fr) minmax(520px, 1.06fr);
  gap: clamp(32px, 5vw, 76px);
  padding-top: clamp(30px, 4vw, 58px);
}

.avatar-stage, .chat-panel {
  animation: workspaceEnter .68s cubic-bezier(.22, 1, .36, 1) both;
}
.chat-panel { animation-delay: .1s; }

.avatar-frame {
  width: min(500px, 100%);
  border-radius: 26px;
  box-shadow: 0 34px 90px rgba(20, 42, 35, 0.19), 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  animation: none;
}

.avatar-frame[data-model="gltf"] { border-radius: 26px; }
.avatar-frame[data-renderer="3d"]::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 32%, rgba(6, 22, 17, .08));
  mix-blend-mode: normal;
}

.gesture-badge, .emotion-badge, .renderer-badge {
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(9, 28, 23, .12);
}

.guide-intro { max-width: 600px; padding-top: 28px; }
.guide-intro h1 { margin-block: 5px 10px; font-size: clamp(32px, 3.6vw, 54px); line-height: 1.12; letter-spacing: -.03em; }
.guide-intro > p:last-child { max-width: 55ch; color: var(--muted); line-height: 1.8; }
.eyebrow { color: var(--jade-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.chat-panel {
  padding: clamp(20px, 2.2vw, 32px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 28px;
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 30px 80px rgba(20, 42, 35, .11), inset 0 1px rgba(255, 255, 255, .8);
  backdrop-filter: blur(22px);
}

.chat-toolbar h2 { font-size: clamp(24px, 2vw, 32px); letter-spacing: -.025em; }
.location-pill { border: 1px solid rgba(8, 124, 104, .1); background: rgba(232, 240, 236, .72); font-size: 12px; }

.chips { gap: 7px; }
.chip {
  border: 1px solid rgba(19, 32, 29, .09);
  background: rgba(255, 255, 255, .62);
  transition: transform .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease;
}
.chip:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 42, 35, .08); }
.chip.active { box-shadow: 0 8px 20px rgba(8, 124, 104, .2); }

.message { border: 1px solid transparent; box-shadow: 0 8px 24px rgba(20, 42, 35, .055); }
.message.bot { border-top-left-radius: 5px; background: rgba(232, 240, 236, .82); border-color: rgba(8, 124, 104, .07); }
.message.user { border-top-right-radius: 5px; background: linear-gradient(145deg, #0a876f, #08705e); box-shadow: 0 10px 28px rgba(8, 124, 104, .18); }

.composer {
  border: 1px solid rgba(19, 32, 29, .09);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 34px rgba(20, 42, 35, .07);
}
.composer input { background: transparent; }
.composer button { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.composer button:hover { transform: translateY(-2px); }
.composer button[type="submit"] { box-shadow: 0 9px 22px rgba(8, 124, 104, .22); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(8, 124, 104, .28);
  outline-offset: 3px;
}

@keyframes workspaceEnter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .entry-screen__image { background-position: 58% center; }
  .entry-screen__content { width: min(100%, calc(100vw - 56px)); max-width: calc(100vw - 56px); }
  .entry-screen h1 { font-size: clamp(32px, 9vw, 40px); line-height: 1.18; letter-spacing: 0; }
  .entry-screen__content > p:not(.entry-screen__brand) { max-width: 100%; overflow-wrap: anywhere; }
  .entry-screen__foot { right: 28px; max-width: calc(100vw - 56px); text-align: right; }
  .visitor-shell { grid-template-columns: minmax(0, 1fr); }
}

.layout-mobile-effective .visitor-shell { gap: 24px; }
.layout-mobile-effective .avatar-frame { border-radius: 24px; box-shadow: 0 22px 56px rgba(20, 42, 35, .17); }
.layout-mobile-effective .guide-intro { padding: 20px 4px 2px; }
.layout-mobile-effective .mobile-primary-actions { gap: 8px; border: 0; overflow: visible; background: transparent; }
.layout-mobile-effective .mobile-primary-actions button {
  border: 1px solid rgba(19, 32, 29, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 22px rgba(20, 42, 35, .06);
}
.layout-mobile-effective .chat-panel { border-radius: 24px; background: rgba(255, 255, 255, .72); }
.layout-mobile-effective .composer { border-radius: 18px; background: rgba(250, 249, 245, .94); }

/* 2026-07-15 product workspace refinement */
:root {
  --ink: #14201d;
  --muted: #66736f;
  --jade: #0b7664;
  --jade-dark: #08584b;
  --gold: #c8963e;
  --terracotta: #b96955;
  --lake: #567b91;
  --paper: #f4f4ef;
  --surface: #fbfcf9;
  --surface-strong: #ffffff;
  --mist: #e8efeb;
  --line: rgba(20, 32, 29, 0.11);
  --line-strong: rgba(20, 32, 29, 0.18);
  --shadow-soft: 0 14px 38px rgba(24, 42, 36, 0.08);
  --shadow-panel: 0 24px 60px rgba(24, 42, 36, 0.11);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: linear-gradient(180deg, #f2f4ef 0%, #f8f6f0 46%, #edf2ef 100%);
}
button, input, select, textarea { color: inherit; }
button { transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
button:hover { transform: translateY(-1px); }
.eyebrow, .entry-screen__brand, .entry-screen__foot, .brand strong { letter-spacing: 0; }
.guide-intro h1, .chat-toolbar h2, .section-heading h2, .admin-hero h1, .panel h2 { letter-spacing: 0; }

.topbar {
  min-height: 70px;
  padding: 11px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(20, 32, 29, 0.08);
  background: rgba(248, 248, 244, 0.9);
  box-shadow: 0 8px 30px rgba(24, 42, 36, 0.045);
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #0b7664;
  box-shadow: 0 7px 18px rgba(11, 118, 100, 0.2);
}
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; font-size: 12px; }
.topbar nav { align-items: center; gap: 4px; }
.topbar a {
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.topbar a.current { color: var(--jade-dark); background: rgba(11, 118, 100, 0.09); }
.layout-switch {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}
.layout-switch button { min-height: 36px; border-radius: 6px; }
.layout-switch button[aria-pressed="true"] { background: var(--ink); }

.entry-screen__content { max-width: 680px; }
.entry-screen__brand { font-size: 13px; }
.entry-screen h1 { font-size: 72px; line-height: 1.12; letter-spacing: 0; }
.entry-screen button { border-radius: 8px; }

.visitor-main { width: 100%; }
.visitor-shell {
  width: min(100%, 1480px);
  grid-template-columns: minmax(390px, .9fr) minmax(520px, 1.1fr);
  align-items: start;
  gap: clamp(34px, 4vw, 60px);
  margin-inline: auto;
  padding: 34px clamp(24px, 4vw, 54px) 72px;
}
.avatar-stage {
  min-height: 0;
  align-items: stretch;
}
.scene-orbit { display: none; }
.layout-desktop-effective .guide-intro {
  order: -1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 0 18px;
}
.guide-intro h1 {
  margin: 5px 0 9px;
  font-size: 42px;
  line-height: 1.16;
}
.guide-intro > p:last-child { margin: 0; font-size: 15px; line-height: 1.75; }
.avatar-frame,
.avatar-frame[data-model="gltf"] {
  width: min(100%, 500px);
  height: clamp(490px, 57vh, 560px);
  max-height: none;
  aspect-ratio: auto;
  align-self: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 26px 68px rgba(24, 42, 36, 0.17);
}
.gesture-badge, .renderer-badge, .emotion-badge { border-radius: 6px; }
.subtitle-ticker, .avatar-frame[data-model="gltf"] .subtitle-ticker { border-radius: 6px; }
.quick-facts { justify-content: center; margin-top: 16px; }
.quick-facts button, .chip {
  border-radius: 999px;
  box-shadow: none;
}

.chat-panel {
  min-width: 0;
  min-height: 0;
  padding: 26px;
  border: 1px solid rgba(20, 32, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px);
}
.layout-desktop-effective .chat-panel { position: sticky; top: 92px; }
.chat-toolbar h2 { margin-top: 4px; font-size: 28px; line-height: 1.2; }
.toolbar-pills { gap: 6px; }
.location-pill {
  padding: 7px 9px;
  border-radius: 6px;
  background: #edf3ef;
  font-size: 11px;
}
.chips { margin-top: 4px; }
.chip { padding: 8px 12px; background: #fff; }
.chip.active { background: var(--jade); box-shadow: none; }
.mode-row { margin-top: 14px; }
.mode-row label, .planner-grid label { font-weight: 700; }
.mode-row select, .planner-grid select, .planner-grid input {
  min-height: 40px;
  border-radius: 6px;
  border-color: var(--line);
  background: #fff;
}
.messages {
  flex: 0 0 auto;
  height: clamp(270px, 34vh, 350px);
  min-height: 270px;
  padding: 18px 4px;
  border-top: 1px solid rgba(20, 32, 29, 0.07);
  border-bottom: 1px solid rgba(20, 32, 29, 0.07);
  scrollbar-color: rgba(11, 118, 100, .3) transparent;
}
.message {
  border-radius: 8px;
  box-shadow: none;
}
.message.bot { border-top-left-radius: 2px; background: #edf3ef; }
.message.user { border-top-right-radius: 2px; background: var(--jade); }
.composer {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 12px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.composer input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  outline: 0;
}
.composer button, .image-input span {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 6px;
  box-shadow: none;
}
.composer button[type="submit"] { box-shadow: none; }
.media-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 9px;
}
.media-controls.has-images { grid-template-columns: minmax(0, 1fr) auto; }
.image-context-panel { display: none; border-radius: 6px; background: #f8faf8; }
.media-controls.has-images .image-context-panel { display: grid; }
.image-context-panel select { border-radius: 5px; }
.speech-controls {
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
}
.speech-controls button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 6px;
  background: #f1f4f2;
  font-size: 14px;
}
.route-panel { border-radius: 8px; box-shadow: none; background: #f7faf8; }

.visitor-support, .service-suite {
  width: min(100%, 1480px);
  margin-inline: auto;
  padding: 0 clamp(24px, 4vw, 54px) 78px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
}
.section-heading h2 { margin: 5px 0 0; font-size: 32px; line-height: 1.2; }
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.7; }
.visitor-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
  gap: 18px;
  align-items: start;
}
.visitor-support-side { display: grid; gap: 18px; }
.visitor-dressup, .demo-strip, .smart-map {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}
.visitor-dressup { padding: 20px; }
.visitor-dressup-head h2 { font-size: 22px; }
.visitor-dressup-actions button, .visitor-dressup-option { border-radius: 6px; }
.visitor-dressup-preview { border-radius: 6px; background: #edf3ef; }
.demo-strip, .smart-map { padding: 18px; }
.demo-strip h2, .smart-map h2 { font-size: 21px; }
.demo-buttons button { border-radius: 6px; background: var(--ink); }
.map-canvas { height: 330px; border-radius: 6px; }
.map-point { border-radius: 5px; }

.service-suite-heading { align-items: center; }
.tool-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.tool-tabs button {
  min-width: 70px;
  padding: 9px 13px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}
.tool-tabs button.active { color: #fff; background: var(--ink); }
.bonus-tools {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}
.bonus-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--jade);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}
.bonus-card[data-tool-group="discovery"] { border-top-color: var(--gold); }
.bonus-card[data-tool-group="care"] { border-top-color: var(--lake); }
.bonus-card[data-tool-group="insight"] { border-top-color: var(--terracotta); }
.bonus-card > .eyebrow { margin-bottom: 12px; }
.bonus-card > button, .emergency-buttons button {
  border-radius: 6px;
  box-shadow: none;
  font-weight: 800;
}
.bonus-card > button:hover { border-color: var(--jade); background: #f2f7f4; }
.planner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.planner-grid.nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#feedbackTool { grid-column: 1 / -1; }
.visitor-feedback-form fieldset { border-radius: 6px; }
.feedback-tags label, .feedback-comment textarea { border-radius: 6px; }

.admin-page { background: linear-gradient(180deg, #f4f5f1 0%, #eef2ef 100%); }
.admin-shell {
  width: min(100%, 1600px);
  margin-inline: auto;
  padding: 34px clamp(24px, 4vw, 54px) 76px;
}
.admin-hero { align-items: center; padding: 0 0 24px; }
.admin-hero h1 { margin: 5px 0 8px; font-size: 40px; line-height: 1.18; }
.admin-hero p { margin: 0; font-size: 15px; }
.admin-hero button {
  border-radius: 6px;
  background: var(--ink);
  box-shadow: none;
}
.admin-workspace-tabs {
  position: sticky;
  top: 82px;
  z-index: 12;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 249, 246, 0.92);
  box-shadow: 0 8px 24px rgba(24, 42, 36, 0.07);
  backdrop-filter: blur(16px);
}
.admin-workspace-tabs button {
  padding: 10px 16px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}
.admin-workspace-tabs button.active { color: #fff; background: var(--ink); }
.admin-view.active { animation: workspaceEnter .35s ease both; }
.kpi-grid { gap: 12px; margin-bottom: 16px; }
.kpi {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  padding: 17px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--jade);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}
.kpi-2 { border-left-color: var(--gold); }
.kpi-3 { border-left-color: var(--lake); }
.kpi-4 { border-left-color: var(--terracotta); }
.kpi-5 { border-left-color: #786c98; }
.kpi strong { margin: 5px 0 2px; font-size: 30px; }
.kpi span { color: var(--muted); }
.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}
.scorecard-panel, .readiness-panel { margin-bottom: 16px; }
.scorecard-panel #scorecardTotal { font-size: 30px; }
.scorecard-list { gap: 10px; }
.score-row {
  padding: 13px;
  border-radius: 6px;
  background: #fafbf9;
}
.score-details { margin-top: 9px; border-top: 1px solid var(--line); }
.score-details summary {
  padding-top: 9px;
  color: var(--jade-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.score-evidence p { margin: 7px 0; }
.readiness-list { gap: 10px; }
.readiness-item { min-height: 0; border-radius: 6px; background: #fafbf9; }
.dashboard-grid, .config-grid { gap: 16px; }
.action-item, .strategy-action, .blueprint-step, .blueprint-mini, .gap-row { border-radius: 6px; }
.settings-form input, .settings-form select, .settings-form textarea { border-radius: 6px; background: #fff; }
.settings-form button, .panel > button { border-radius: 6px; box-shadow: none; }
.preset-option, .dressup-editor { border-radius: 6px; box-shadow: none; }
.provider-row button, .log-row button { border-radius: 5px; }
canvas { max-width: 100%; height: auto; }

@media (max-width: 1180px) {
  .visitor-shell { grid-template-columns: minmax(350px, .86fr) minmax(500px, 1.14fr); gap: 28px; }
  .bonus-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scorecard-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .entry-screen h1 { font-size: 42px; }
  .visitor-shell { grid-template-columns: minmax(0, 1fr); }
  .visitor-support-grid { grid-template-columns: minmax(0, 1fr); }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .section-heading h2 { font-size: 28px; }
  .admin-hero h1 { font-size: 34px; }
}

.layout-mobile-effective .topbar { min-height: 64px; padding: 10px 12px; }
.layout-mobile-effective .brand-mark { border-radius: 7px; }
.layout-mobile-effective .visitor-shell { gap: 18px; padding: 14px 12px 36px; }
.layout-mobile-effective .avatar-frame,
.layout-mobile-effective .avatar-frame[data-model="gltf"] {
  width: 100%;
  height: clamp(350px, 52svh, 470px);
  min-height: 0;
  border-radius: 10px;
}
.layout-mobile-effective .guide-intro { padding: 18px 4px 2px; }
.layout-mobile-effective .guide-intro h1 { font-size: 32px; }
.layout-mobile-effective .mobile-primary-actions { gap: 8px; }
.layout-mobile-effective .mobile-primary-actions button {
  min-height: 62px;
  border-radius: 8px;
  box-shadow: none;
}
.layout-mobile-effective .chat-panel { padding: 18px 14px; border-radius: 10px; box-shadow: var(--shadow-soft); }
.layout-mobile-effective .messages { height: 350px; min-height: 350px; }
.layout-mobile-effective .composer { border-radius: 8px; }
.layout-mobile-effective .media-controls.has-images { grid-template-columns: 1fr; }
.layout-mobile-effective .visitor-support,
.layout-mobile-effective .service-suite { display: none; padding: 0 12px 42px; }
.layout-mobile-effective .visitor-support.mobile-parent-active,
.layout-mobile-effective .service-suite.mobile-parent-active { display: block; }
.layout-mobile-effective .visitor-support .section-heading { display: none; }
.layout-mobile-effective .visitor-support-grid { display: block; }
.layout-mobile-effective .visitor-support-side { display: block; }
.layout-mobile-effective .mobile-secondary-section.mobile-section-active { margin-top: 0; }
.layout-mobile-effective .service-suite-heading { margin-bottom: 14px; }
.layout-mobile-effective .service-suite-heading > div { display: none; }
.layout-mobile-effective .tool-tabs {
  width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.layout-mobile-effective .tool-tabs button { flex: 1 0 68px; }
.layout-mobile-effective .bonus-tools { grid-template-columns: minmax(0, 1fr); }
.layout-mobile-effective #feedbackTool { grid-column: auto; }
.layout-mobile-effective .bonus-card { padding: 17px; }
.layout-mobile-effective .smart-map, .layout-mobile-effective .demo-strip, .layout-mobile-effective .visitor-dressup { border-radius: 8px; }
.layout-mobile-effective .map-canvas { height: 300px; }

@media (max-width: 700px) {
  .admin-shell { padding: 24px 14px 50px; }
  .admin-hero { align-items: flex-start; flex-direction: column; }
  .admin-hero h1 { font-size: 30px; }
  .admin-workspace-tabs { top: 72px; width: 100%; }
  .admin-workspace-tabs button { flex: 1; padding-inline: 8px; }
  .kpi-grid, .scorecard-list, .readiness-list, .bonus-tools { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 16px; }
  .scorecard-panel #scorecardTotal, .readiness-panel #readinessTotal { font-size: 24px; }
}

@media (max-width: 520px) {
  .entry-screen { padding-inline: 24px; padding-bottom: 72px; }
  .entry-screen__content { width: 100%; max-width: 100%; }
  .entry-screen h1 { font-size: 38px; line-height: 1.2; }
  .entry-screen__content > p:not(.entry-screen__brand) { font-size: 14px; }
  .entry-screen__foot { right: 24px; bottom: 20px; }
  .layout-mobile-effective .brand small { display: none; }
  .layout-mobile-effective .layout-switch button { min-height: 34px; }
  .planner-grid, .planner-grid.nav-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 2026-07-16 synchronized avatar and conversation workspace */
.layout-desktop-effective .visitor-shell {
  grid-template-columns: minmax(280px, .86fr) minmax(410px, 1.14fr);
  align-items: stretch;
  gap: clamp(18px, 3vw, 48px);
  padding-top: 20px;
  padding-bottom: 54px;
}

.layout-desktop-effective .avatar-stage,
.layout-desktop-effective .chat-panel {
  height: clamp(600px, calc(100svh - 118px), 790px);
  max-height: 790px;
}

.layout-desktop-effective .avatar-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
}

.layout-desktop-effective .guide-intro {
  padding-bottom: 12px;
}

.layout-desktop-effective .guide-intro h1 {
  font-size: clamp(30px, 3vw, 42px);
}

.layout-desktop-effective .guide-intro > p:last-child {
  line-height: 1.55;
}

.layout-desktop-effective .avatar-frame,
.layout-desktop-effective .avatar-frame[data-model="gltf"] {
  width: min(100%, 500px);
  height: 100%;
  min-height: 0;
  max-height: none;
}

.layout-desktop-effective .quick-facts {
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin-top: 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.layout-desktop-effective .quick-facts button {
  flex: 0 0 auto;
  padding: 8px 11px;
  font-size: 12px;
}

.layout-desktop-effective .chat-panel {
  position: sticky;
  top: 90px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.layout-desktop-effective .messages {
  flex: 1 1 200px;
  height: auto;
  min-height: 160px;
}

@media (min-width: 761px) and (max-width: 980px) {
  .layout-desktop-effective .visitor-shell {
    grid-template-columns: minmax(280px, .82fr) minmax(410px, 1.18fr);
    padding-inline: 16px;
  }

  .layout-desktop-effective .chat-panel {
    padding: 20px;
  }

  .layout-desktop-effective .chat-toolbar h2 {
    font-size: 23px;
  }

  .layout-desktop-effective .composer {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .layout-desktop-effective .composer input {
    grid-column: auto;
  }

  .layout-desktop-effective .guide-intro > p:last-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
}
