/* ==========================================================================
   安澜 · ANLAN — 运动安全用户端样式
   设计语言：阳光运动风 / 晴空与跑道 / 奶油玻璃 / 橙色能量强调
   ========================================================================== */

:root {
  --ink: #f2fbfb;
  --ink-soft: rgba(231, 249, 249, 0.66);
  --ink-faint: rgba(220, 244, 246, 0.42);
  --teal: #66e8dc;
  --teal-bright: #a9fff3;
  --aqua: #46d8f0;
  --deep: #031a29;
  --green: #30d19a;
  --glass: rgba(5, 30, 45, 0.5);
  --line: rgba(199, 246, 247, 0.15);
  --paper: #f4fbf9;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Noto Serif SC Variable", "Songti SC", "STZhongsong", "SimSun", "宋体", "Noto Serif CJK SC", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 80px rgba(0, 11, 20, 0.38);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #031821;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
::selection { background: rgba(92, 233, 223, 0.36); color: white; }
:focus-visible { outline: 2px solid rgba(141, 255, 242, 0.9); outline-offset: 3px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 20px; top: -80px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--paper); color: #06384f; font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* ============================== 全屏运动场 ============================== */
.ocean {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 72% 26%, rgba(38, 157, 169, 0.4), transparent 46%),
    linear-gradient(180deg, #082f3f 0%, #062331 44%, #03151f 100%);
}
.ocean__video,
.ocean__canvas {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  transform: translateZ(0);
}
.ocean__video {
  filter: saturate(0.92) contrast(1.1) brightness(0.82);
  transition: opacity 1.4s ease;
  animation: ocean-breathe 32s ease-in-out infinite alternate;
}
.ocean__canvas { opacity: 0; pointer-events: none; transition: opacity 1s ease; }
.ocean.video-failed .ocean__canvas { opacity: 1; }
.ocean.video-failed .ocean__video { opacity: 0; }

.ocean__wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 16, 25, 0.94) 0%, rgba(2, 18, 27, 0.72) 27%, rgba(2, 20, 29, 0.22) 56%, rgba(1, 15, 23, 0.24) 76%, rgba(1, 13, 20, 0.64) 100%),
    linear-gradient(180deg, rgba(2, 15, 24, 0.64) 0%, transparent 24%, transparent 58%, rgba(1, 13, 20, 0.82) 100%);
}
.ocean__glow {
  position: absolute;
  width: 52vw; height: 52vw;
  right: 8vw; top: 2vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 249, 239, 0.15), rgba(31, 143, 164, 0.07) 38%, transparent 68%);
  filter: blur(12px);
  animation: glow-drift 14s ease-in-out infinite alternate;
}
.ocean__rays {
  position: absolute;
  inset: -30% -15% auto 34%;
  height: 100%;
  opacity: 0.23;
  background:
    linear-gradient(108deg, transparent 32%, rgba(187, 255, 248, 0.23) 34%, transparent 38%),
    linear-gradient(106deg, transparent 53%, rgba(156, 246, 238, 0.13) 55%, transparent 60%),
    linear-gradient(114deg, transparent 70%, rgba(167, 250, 242, 0.15) 72%, transparent 77%);
  filter: blur(10px);
  animation: rays-sway 18s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}
.ocean__grain {
  position: absolute; inset: 0; opacity: .065; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubbles i {
  position: absolute;
  left: var(--x);
  bottom: -20px;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  border: 1px solid rgba(194, 253, 255, .35);
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, .35);
  animation: bubble-rise var(--d) linear var(--t) infinite;
  opacity: 0;
}

/* ================================ 顶栏 ================================ */
.topbar {
  position: fixed;
  z-index: 30;
  top: 0; left: 0; right: 0;
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 3.8vw, 62px);
  background: linear-gradient(180deg, rgba(1, 14, 23, 0.65), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(190, 251, 250, .22);
  border-radius: 14px;
  background: rgba(221, 253, 253, .07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.brand__mark svg { width: 27px; height: 27px; filter: drop-shadow(0 0 10px rgba(97, 235, 235, .35)); }
.brand__type { display: flex; align-items: baseline; gap: 8px; letter-spacing: .02em; }
.brand__type strong { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: .1em; }
.brand__type span { font-size: 10px; font-weight: 600; letter-spacing: .38em; color: var(--ink-faint); }

.status-pill {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 15px;
  border: 1px solid rgba(185, 247, 246, .14);
  border-radius: 999px;
  background: rgba(5, 34, 45, 0.38);
  backdrop-filter: blur(16px);
  color: rgba(229, 251, 251, .84);
  font-size: 12px;
  letter-spacing: .03em;
}
.status-pill__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(102, 232, 220, .12), 0 0 12px rgba(102, 232, 220, .8);
  animation: status-pulse 2.8s ease-in-out infinite;
}
.status-pill.is-demo .status-pill__dot { background: #f1c477; box-shadow: 0 0 0 4px rgba(241,196,119,.1), 0 0 12px rgba(241,196,119,.5); }

.topnav { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.topnav__link {
  border: 0; background: none; padding: 5px 0;
  color: rgba(229, 249, 249, .66);
  font-size: 12px; letter-spacing: .1em;
  transition: color .25s ease;
  position: relative;
}
.topnav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--teal); transition: right .3s var(--ease);
}
.topnav__link:hover { color: white; }
.topnav__link:hover::after { right: 0; }
.topnav__sound {
  display: flex; align-items: center; gap: 6px;
  padding-left: 18px; border-left: 1px solid var(--line);
  color: var(--ink-faint); font-size: 11px; letter-spacing: .05em;
}
.topnav__sound i { width: 5px; height: 5px; border-radius: 50%; background: #80e6c9; }
.topnav__sound.is-off i { background: #879da7; }

/* ================================ 主舞台 ================================ */
.stage { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.stage > * { pointer-events: auto; }

.hero {
  position: absolute;
  left: clamp(28px, 7.2vw, 118px);
  top: 24.5vh;
  width: min(620px, 44vw);
  transition: opacity .65s var(--ease), transform .8s var(--ease), visibility .65s;
  animation: hero-in 1.1s var(--ease) .15s both;
}
.hero__eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
  color: rgba(214, 246, 246, .55);
  font-size: 10px; font-weight: 600; letter-spacing: .22em;
}
.hero__line { display: block; width: 34px; height: 1px; background: rgba(155, 241, 235, .6); }
.hero__title {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-size: clamp(46px, 5.3vw, 76px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.035em;
  text-wrap: balance;
  text-shadow: 0 16px 48px rgba(0, 8, 14, .3);
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, #e5fffc 4%, #82f3e8 45%, #b8fbff 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(88, 237, 229, .15));
}
.hero__copy {
  max-width: 430px;
  margin: 0 0 34px;
  color: rgba(229, 249, 249, .68);
  font-size: 14px;
  line-height: 2;
  letter-spacing: .035em;
}
.suggestions { display: grid; grid-template-columns: repeat(2, max-content); gap: 9px; max-width: 560px; justify-content: start; }
.suggestion {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 8px 15px;
  border: 1px solid rgba(198, 246, 246, .14);
  border-radius: 999px;
  background: rgba(11, 43, 55, .28);
  backdrop-filter: blur(14px);
  color: rgba(238, 253, 253, .78);
  font-size: 12px; letter-spacing: .02em;
  transition: background .3s ease, border-color .3s ease, transform .3s var(--ease), color .3s ease;
  animation: chip-in .7s var(--ease) both;
}
.suggestion:hover {
  background: rgba(165, 248, 240, .12);
  border-color: rgba(165, 248, 240, .36);
  color: white;
  transform: translateY(-2px);
}
.suggestion svg { width: 13px; height: 13px; opacity: .55; }
.hero__meta {
  display: flex; align-items: center; gap: 11px;
  margin-top: 38px;
  color: rgba(202, 239, 240, .37);
  font-size: 9px; letter-spacing: .19em;
}
.hero__meta-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
body.has-chat .hero { opacity: 0; transform: translateY(-20px); visibility: hidden; pointer-events: none; }

/* ================================ 聊天气泡 ================================ */
.chat-panel {
  position: absolute;
  z-index: 3;
  left: clamp(24px, 6vw, 96px);
  top: 12.5vh;
  bottom: 184px;
  width: min(610px, 46vw);
  display: flex; flex-direction: column;
  padding: 0;
  border: 1px solid rgba(196, 247, 247, .13);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(5, 30, 45, .66), rgba(2, 20, 32, .44));
  backdrop-filter: blur(24px) saturate(1.1);
  box-shadow: 0 28px 80px rgba(0, 10, 18, .24), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 0; transform: translateY(22px) scale(.985);
  visibility: hidden; pointer-events: none;
  transition: opacity .6s var(--ease), transform .7s var(--ease), visibility .6s;
  overflow: hidden;
}
body.has-chat .chat-panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.chat-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  flex: 0 0 auto;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(197, 246, 246, .08);
}
.chat-panel__title { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .08em; color: rgba(235, 252, 252, .76); }
.chat-panel__signal { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px rgba(102,232,220,.5); }
.mode-chip {
  margin-left: 3px; padding: 2px 8px;
  border: 1px solid rgba(180, 246, 240, .14);
  border-radius: 999px;
  color: rgba(182, 247, 241, .6);
  font-size: 9px; letter-spacing: .08em;
}
.text-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: none; padding: 6px;
  color: rgba(228, 250, 250, .48);
  font-size: 11px; letter-spacing: .04em;
  transition: color .2s ease;
}
.text-btn:hover { color: white; }
.text-btn svg { width: 14px; height: 14px; }
.messages {
  flex: 1 1 auto;
  padding: 20px 22px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 242, 242, .18) transparent;
}
.messages::-webkit-scrollbar { width: 5px; }
.messages::-webkit-scrollbar-thumb { background: rgba(180, 242, 242, .17); border-radius: 99px; }
.chat-panel__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
  background: linear-gradient(transparent, rgba(3, 21, 33, .45));
  pointer-events: none;
}

.msg { display: flex; gap: 10px; margin-bottom: 22px; animation: msg-in .5s var(--ease) both; }
.msg--user { justify-content: flex-end; }
.msg__avatar {
  flex: 0 0 26px; width: 26px; height: 26px;
  margin-top: 2px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(94, 227, 244, .25), rgba(13, 103, 160, .12));
  border: 1px solid rgba(168, 249, 247, .2);
  color: var(--teal);
}
.msg__avatar svg { width: 15px; height: 15px; }
.msg__body { min-width: 0; max-width: calc(100% - 38px); }
.msg--user .msg__body { max-width: 84%; }
.msg__name {
  margin-bottom: 5px;
  color: rgba(230, 253, 252, .42);
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
}
.msg--user .msg__name { text-align: right; }
.msg__bubble {
  padding: 12px 15px;
  border: 1px solid rgba(193, 246, 246, .11);
  border-radius: 4px 16px 16px 16px;
  background: rgba(219, 253, 253, .075);
  color: rgba(243, 254, 254, .92);
  font-size: 13.5px;
  line-height: 1.82;
  letter-spacing: .018em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg--user .msg__bubble {
  border: 1px solid rgba(136, 241, 232, .24);
  border-radius: 16px 4px 16px 16px;
  background: linear-gradient(145deg, rgba(67, 199, 189, .34), rgba(18, 107, 118, .34));
  color: #f3fffe;
}
.msg__bubble p { margin: 0; }
.msg__bubble p + p { margin-top: 8px; }
.msg__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 7px;
  color: rgba(219, 248, 248, .34);
  font-size: 9px; letter-spacing: .03em;
}
.msg--user .msg__meta { justify-content: flex-end; }
.msg__action {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; padding: 2px 3px;
  color: rgba(219, 248, 248, .34); font-size: 9px;
  transition: color .2s;
}
.msg__action:hover { color: var(--teal-bright); }
.msg__action svg { width: 11px; height: 11px; }
.msg__mode { padding: 1px 6px; border: 1px solid rgba(185, 244, 241, .1); border-radius: 99px; }
.typing { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; }
.typing i {
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(192, 250, 248, .65);
  animation: typing 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }

.citations { margin-top: 9px; }
.citations details {
  border: 1px solid rgba(185, 244, 241, .1);
  border-radius: 12px;
  background: rgba(5, 36, 47, .25);
  overflow: hidden;
}
.citations summary {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px;
  cursor: pointer; list-style: none;
  color: rgba(196, 249, 245, .5);
  font-size: 10px; letter-spacing: .04em;
}
.citations summary::-webkit-details-marker { display: none; }
.citations summary::after { content: "﹀"; margin-left: auto; font-size: 9px; transition: transform .2s; }
.citations details[open] summary::after { transform: rotate(180deg); }
.citations summary svg { width: 12px; height: 12px; }
.citation-list { padding: 2px 9px 9px; display: grid; gap: 7px; }
.citation {
  display: grid; gap: 2px; padding: 8px 9px;
  border-radius: 8px; background: rgba(225, 253, 252, .04);
}
.citation__head { display: flex; align-items: center; gap: 6px; color: rgba(235, 254, 253, .72); font-size: 10px; }
.citation__index { flex: 0 0 auto; color: var(--teal); font-family: var(--serif); }
.citation__score { margin-left: auto; color: rgba(190, 242, 239, .35); font-size: 9px; }
.citation__kb { color: rgba(190, 242, 239, .38); font-size: 9px; }
.citation__excerpt { color: rgba(219, 249, 248, .42); font-size: 10px; line-height: 1.65; }
.msg-error .msg__bubble { border-color: rgba(255, 174, 142, .26); background: rgba(104, 40, 32, .22); }

/* ============================== 运动安全宣讲员 ================================ */
.companion {
  position: absolute;
  right: clamp(20px, 2.8vw, 44px);
  bottom: 150px;
  width: min(23vw, 330px);
  z-index: 2;
  animation: companion-in 1.3s var(--ease) .3s both;
}
.character-stage {
  position: relative;
  display: block; width: 100%;
  border: 0; background: none; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.character-aura {
  position: absolute;
  left: 50%; top: 49%;
  width: 72%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 238, 233, .18), rgba(31, 159, 181, .08) 42%, transparent 70%);
  filter: blur(16px);
  animation: aura-pulse 7s ease-in-out infinite;
}
.character {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 28px 36px rgba(0, 10, 18, .34)) drop-shadow(0 4px 12px rgba(0, 12, 20, .2));
}
.character-portrait {
  position: relative;
  display: block;
  width: 100%;
  transform-origin: 50% 100%;
  animation: character-idle 6.8s ease-in-out infinite;
  will-change: transform;
}
.speaker-image {
  user-select: none;
  -webkit-user-drag: none;
  transition: filter .35s ease;
}
.character-mouth-closed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  opacity: 1;
  transition: opacity .12s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.character-stage.is-speaking .character-mouth-closed {
  animation: mouth-flap .34s steps(1, end) infinite;
}
.character-stage.is-speaking .character-portrait { animation-duration: 4.6s; }
.character-stage.is-speaking .speaker-image {
  filter: drop-shadow(0 0 24px rgba(93, 232, 218, .34)) drop-shadow(0 28px 36px rgba(0, 10, 18, .34));
}
.character-stage.is-speaking .character-aura { animation: aura-pulse 1.8s ease-in-out infinite; }
.character-float { animation: char-float 6.5s ease-in-out infinite; transform-origin: 50% 90%; }
.character-shadow { animation: shadow-breathe 6.5s ease-in-out infinite; transform-origin: center; }
.character-pool { animation: pool-breathe 6.5s ease-in-out infinite; }
.pupils { transform-box: fill-box; transform-origin: center; animation: gaze 11s ease-in-out infinite; }
.eyelid {
  transform-box: fill-box; transform-origin: center;
  transform: scaleY(0);
  animation: blink 7.5s infinite;
}
.mouth-open { opacity: 0; transform-box: fill-box; transform-origin: center; }
.mouth-smile { transition: opacity .12s ease; }
.character-stage.is-speaking .mouth-smile { opacity: 0; }
.character-stage.is-speaking .mouth-open { opacity: 1; animation: talk .32s ease-in-out infinite alternate; }
.character-stage.is-speaking .character-float { animation-duration: 2.8s; }
.character-stage.is-listening .character-aura { animation: listen-aura 1.7s ease-out infinite; }
.character-stage.is-listening .character-splash { animation: splash-pulse 1.2s ease-in-out infinite alternate; transform-origin: center; }
.character-stage.is-listening .character-bubbles { animation: splash-pulse 1.6s ease-in-out infinite alternate; transform-origin: center; }
.book { transition: transform .5s var(--ease); transform-origin: 230px 500px; }
.character-stage:hover .book { transform: rotate(-1.3deg) translateY(-2px); }
.speaker-body {
  animation: speaker-breathe 5.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 88%;
}
.waving-hand {
  transform-box: fill-box;
  transform-origin: 50% 92%;
  animation: hand-wave 4.2s ease-in-out infinite;
}
.character-stage.is-speaking .speaker-body { animation-duration: 3.2s; }
.character-stage:hover .waving-hand { animation-duration: 2.4s; }

.character-caption {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  border: 1px solid rgba(194, 247, 245, .12);
  border-radius: 999px;
  background: rgba(3, 31, 43, .28);
  backdrop-filter: blur(10px);
  color: rgba(220, 251, 250, .42);
  font-size: 8px; letter-spacing: .18em; white-space: nowrap;
}
.character-caption i { width: 4px; height: 4px; border-radius: 50%; background: #80ead8; box-shadow: 0 0 7px #80ead8; }

.speech-bubble {
  position: absolute;
  left: -78%;
  top: 1%;
  width: min(260px, 20vw);
  min-width: 210px;
  padding: 17px 18px 18px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 20px 20px 20px 7px;
  background: linear-gradient(145deg, rgba(250, 255, 253, .95), rgba(227, 250, 247, .88));
  color: #07384a;
  box-shadow: 0 18px 50px rgba(0, 12, 20, .25);
  backdrop-filter: blur(14px);
  transform-origin: 100% 100%;
  animation: bubble-in .9s var(--ease) .9s both;
  transition: opacity .3s ease, transform .35s var(--ease);
  z-index: 3;
}
.speech-bubble::after {
  content: ""; position: absolute; right: -7px; bottom: 20px;
  width: 15px; height: 15px;
  background: #e4faf7;
  border-right: 1px solid rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(255,255,255,.55);
  transform: rotate(-45deg);
}
.speech-bubble.is-hidden { opacity: 0; transform: translateY(8px) scale(.96); pointer-events: none; }
body.has-chat .speech-bubble { display: none; }
.speech-bubble__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  color: #4c8a93;
  font-size: 9px; font-weight: 700; letter-spacing: .12em;
}
.speech-bubble__top > span { display: flex; align-items: center; gap: 6px; }
.speech-bubble__top i { width: 5px; height: 5px; border-radius: 50%; background: #35c3ac; box-shadow: 0 0 0 3px rgba(53,195,172,.12); }
.speech-bubble__top button {
  width: 22px; height: 22px; padding: 4px;
  border: 0; border-radius: 50%; background: rgba(7, 56, 74, .06); color: #6a9aa1;
}
.speech-bubble p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: .02em;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.speech-bubble.is-speaking p { -webkit-line-clamp: 6; }
.speech-bubble__tail { display: none; }
.companion.is-hidden .speech-bubble { opacity: 0; pointer-events: none; }

/* ================================ 输入区 ================================ */
.dock {
  position: fixed;
  z-index: 40;
  left: 0; right: 0;
  bottom: 52px;
  display: flex;
  justify-content: center;
  padding: 0 130px;
  pointer-events: none;
}
.composer-wrap {
  width: min(760px, 100%);
  pointer-events: auto;
}
.composer-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin: 0 4px 8px;
}
.kb-picker { position: relative; }
.kb-picker__trigger {
  display: flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 10px;
  border: 1px solid rgba(190, 245, 244, .13);
  border-radius: 7px;
  background: rgba(4, 31, 43, .32);
  backdrop-filter: blur(12px);
  color: rgba(218, 250, 249, .64);
  font-size: 10px; letter-spacing: .04em;
  transition: color .2s, border-color .2s, background .2s;
}
.kb-picker__trigger:hover { color: white; border-color: rgba(190, 245, 244, .28); background: rgba(11, 49, 60, .5); }
.kb-picker__trigger svg { width: 13px; height: 13px; opacity: .7; }
.kb-picker__trigger .chev { width: 10px; height: 10px; transition: transform .2s; }
.kb-picker.is-open .chev { transform: rotate(180deg); }
.kb-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  width: 230px; padding: 6px;
  border: 1px solid rgba(196, 247, 247, .15);
  border-radius: 13px;
  background: rgba(5, 32, 44, .9);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(5px) scale(.98);
  transform-origin: bottom left;
  pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease);
}
.kb-picker.is-open .kb-menu { opacity: 1; transform: none; pointer-events: auto; }
.kb-option {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 8px 9px;
  border: 0; border-radius: 8px;
  background: none; color: rgba(233, 252, 251, .65);
  font-size: 11px; text-align: left;
  transition: background .18s, color .18s;
}
.kb-option:hover { background: rgba(223, 253, 251, .07); color: white; }
.kb-option.is-active { color: var(--teal-bright); background: rgba(94, 232, 220, .08); }
.kb-option__dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--teal); }
.kb-option__count { margin-left: auto; color: rgba(190, 240, 239, .3); font-size: 9px; }
.voice-toggle {
  display: flex; align-items: center; gap: 6px;
  border: 0; background: none; padding: 4px 2px;
  color: rgba(214, 249, 248, .44); font-size: 10px; letter-spacing: .04em;
  transition: color .2s;
}
.voice-toggle:hover { color: rgba(235, 255, 254, .8); }
.voice-toggle svg { width: 14px; height: 14px; }
.voice-toggle i { width: 5px; height: 5px; border-radius: 50%; background: #62d9c4; box-shadow: 0 0 8px rgba(98,217,196,.5); }
.voice-toggle[aria-pressed="false"] { color: rgba(214, 249, 248, .3); }
.voice-toggle[aria-pressed="false"] i { background: #788f97; box-shadow: none; }

.composer {
  display: flex; align-items: flex-end; gap: 8px;
  min-height: 60px; padding: 9px 10px 9px 9px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(248, 255, 252, .97), rgba(228, 247, 244, .93));
  box-shadow: 0 20px 60px rgba(0, 13, 20, .36), inset 0 1px 0 white;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.composer:focus-within {
  border-color: rgba(122, 255, 239, .8);
  box-shadow: 0 22px 70px rgba(0, 13, 20, .42), 0 0 0 3px rgba(94, 232, 220, .12), inset 0 1px 0 white;
}
.composer textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px; max-height: 130px;
  padding: 9px 2px 7px;
  border: 0; outline: 0; resize: none;
  background: transparent;
  color: #073b4e;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: .02em;
  scrollbar-width: thin;
}
.composer textarea::placeholder { color: #7d9fa5; }
.mic-btn {
  position: relative;
  flex: 0 0 40px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid rgba(8, 72, 87, .12);
  border-radius: 13px;
  background: rgba(8, 65, 82, .04);
  color: #4e808b;
  transition: color .2s, background .2s, border-color .2s;
}
.mic-btn:hover { color: #0d7b88; background: rgba(38, 186, 173, .1); border-color: rgba(38, 186, 173, .25); }
.mic-btn svg { width: 20px; height: 20px; }
.mic-btn.is-listening { color: #fff; background: #1fbca3; border-color: #1fbca3; }
.mic-btn__ring { position: absolute; inset: -5px; border: 1px solid rgba(31,188,163,.4); border-radius: 17px; opacity: 0; }
.mic-btn.is-listening .mic-btn__ring { animation: mic-ring 1.4s ease-out infinite; opacity: 1; }
.send-btn {
  flex: 0 0 42px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 14px;
  background: linear-gradient(145deg, #24bfae, #087e89);
  color: white;
  box-shadow: 0 6px 18px rgba(9, 132, 133, .28);
  transition: transform .2s var(--ease), opacity .2s, box-shadow .2s;
}
.send-btn svg { width: 21px; height: 21px; }
.send-btn:hover:not(:disabled) { transform: translateY(-1px) scale(1.03); box-shadow: 0 9px 24px rgba(9, 132, 133, .36); }
.send-btn:active:not(:disabled) { transform: scale(.96); }
.send-btn:disabled { opacity: .38; cursor: default; box-shadow: none; }
.char-count {
  align-self: flex-end;
  padding-bottom: 13px;
  color: #8aa9ad; font-size: 9px;
  opacity: 0; transition: opacity .2s;
}
.char-count.is-visible { opacity: 1; }
.composer-hint {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px 0;
  color: rgba(214, 247, 246, .34);
  font-size: 9px; letter-spacing: .04em;
}
.composer-hint__secure { display: flex; align-items: center; gap: 4px; }
.composer-hint__secure svg { width: 11px; height: 11px; opacity: .7; }

.call-btn {
  position: fixed;
  z-index: 42;
  right: clamp(24px, 3vw, 48px);
  bottom: 68px;
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border: 1px solid rgba(232, 255, 246, .42);
  border-radius: 50%;
  background: linear-gradient(150deg, #45e0ad, #18b980);
  color: white;
  box-shadow: 0 14px 34px rgba(11, 149, 109, .42), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .25s var(--ease), background .3s, box-shadow .3s;
  pointer-events: auto;
}
.call-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 18px 42px rgba(11, 149, 109, .5); }
.call-btn:active { transform: scale(.95); }
.call-btn svg { width: 25px; height: 25px; grid-area: 1 / 1; transition: opacity .22s, transform .3s; }
.call-btn__hang { opacity: 0; transform: rotate(12deg) scale(.8); }
.call-btn.is-active { background: linear-gradient(150deg, #2bd69b, #0ba46f); box-shadow: 0 0 0 8px rgba(48, 209, 154, .1), 0 14px 34px rgba(11, 149, 109, .42); }
.call-btn.is-active .call-btn__phone { opacity: 0; transform: rotate(-12deg) scale(.8); }
.call-btn.is-active .call-btn__hang { opacity: 1; transform: none; }
.call-btn__ripple {
  position: absolute; inset: -1px;
  border: 1px solid rgba(102, 245, 197, .5);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.call-btn.is-active .call-btn__ripple { animation: call-ripple 2.4s ease-out infinite; }
.call-btn.is-active .call-btn__ripple--2 { animation-delay: 1.1s; }
.call-btn__label {
  position: absolute; right: 2px; bottom: -19px;
  color: rgba(220, 255, 244, .48);
  font-size: 8px; letter-spacing: .16em; white-space: nowrap;
}

/* ================================ 视频控制栏 ================================ */
.media-bar {
  position: fixed;
  z-index: 50;
  left: 0; right: 0; bottom: 0;
  height: 46px;
  display: flex; align-items: center; gap: 9px;
  padding: 0 clamp(18px, 2.4vw, 36px);
  border-top: 1px solid rgba(195, 246, 245, .1);
  background: linear-gradient(90deg, rgba(2, 19, 29, .78), rgba(2, 21, 30, .62));
  backdrop-filter: blur(18px);
  color: rgba(223, 250, 249, .55);
}
.media-btn {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 7px;
  background: none;
  color: rgba(226, 252, 250, .68);
  transition: color .2s, background .2s;
}
.media-btn:hover { color: white; background: rgba(222, 253, 251, .07); }
.media-btn svg { width: 16px; height: 16px; }
.media-btn .icon-pause, .media-btn .icon-muted { display: none; }
.media-btn.is-playing .icon-play { display: none; }
.media-btn.is-playing .icon-pause { display: block; }
.media-btn.is-muted .icon-volume { display: none; }
.media-btn.is-muted .icon-muted { display: block; }
.media-time { flex: 0 0 auto; width: 32px; font-size: 9px; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: rgba(228, 252, 250, .55); }
.media-time--muted { color: rgba(228, 252, 250, .3); }
.media-progress { flex: 1 1 auto; min-width: 30px; height: 16px; margin: 0; }
.media-volume { flex: 0 0 62px; height: 16px; margin: 0; }
.media-divider { flex: 0 0 auto; width: 1px; height: 14px; margin: 0 4px; background: rgba(208, 251, 249, .12); }
.media-caption { display: flex; align-items: center; gap: 7px; margin-left: auto; white-space: nowrap; color: rgba(213, 247, 246, .34); font-size: 9px; letter-spacing: .08em; }
.media-caption i { width: 4px; height: 4px; border-radius: 50%; background: #56cdbd; }
.media-caption__tip { color: rgba(213, 247, 246, .2); padding-left: 4px; border-left: 1px solid rgba(213, 247, 246, .1); }
.media-clock { flex: 0 0 auto; margin-left: 6px; color: rgba(213, 247, 246, .34); font-size: 9px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }

input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(146, 247, 236, .85) var(--progress, 0%), rgba(218, 251, 249, .16) var(--progress, 0%));
}
input[type="range"]::-moz-range-track { height: 3px; border-radius: 99px; background: rgba(218, 251, 249, .16); }
input[type="range"]::-moz-range-progress { height: 3px; border-radius: 99px; background: rgba(146, 247, 236, .85); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 10px; height: 10px; margin-top: -3.5px;
  border: 0; border-radius: 50%;
  background: #d8fffa;
  box-shadow: 0 0 0 4px rgba(127, 245, 234, .1), 0 0 10px rgba(127, 245, 234, .5);
  opacity: 0; transition: opacity .2s;
}
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #d8fffa; }

/* ================================= 弹层 ================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(1, 12, 20, .65); backdrop-filter: blur(8px); animation: fade-in .3s ease; }
.modal__card {
  position: relative;
  width: min(470px, 100%);
  max-height: 90vh; overflow-y: auto;
  padding: 42px 40px 36px;
  border: 1px solid rgba(191, 246, 245, .2);
  border-radius: 26px;
  background: linear-gradient(150deg, #f7fffc, #e7f6f2);
  color: #093c4b;
  box-shadow: 0 40px 100px rgba(0, 10, 18, .5);
  animation: modal-in .45s var(--ease);
}
.modal__close {
  position: absolute; right: 16px; top: 16px;
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(7, 52, 67, .06); color: #4c848c;
}
.modal__close svg { width: 17px; height: 17px; }
.about-card__drop { display: block; width: 50px; height: 50px; margin-bottom: 20px; filter: drop-shadow(0 8px 16px rgba(12, 150, 176, .25)); }
.about-card__eyebrow { display: block; margin-bottom: 7px; color: #75a09f; font-size: 9px; font-weight: 700; letter-spacing: .22em; }
.about-card h2 { margin: 0 0 16px; font-family: var(--serif); font-size: 32px; line-height: 1.3; font-weight: 600; color: #073948; }
.about-card > p { margin: 0 0 22px; color: #537c80; font-size: 12.5px; line-height: 1.9; }
.about-facts { margin: 0 0 24px; padding: 0; border-top: 1px solid rgba(13, 79, 91, .1); }
.about-facts > div { display: flex; gap: 20px; padding: 10px 0; border-bottom: 1px solid rgba(13, 79, 91, .08); }
.about-facts dt { flex: 0 0 74px; color: #7b9fa1; font-size: 10px; }
.about-facts dd { margin: 0; color: #255764; font-size: 11px; }
.about-card__link { display: inline-flex; align-items: center; gap: 8px; color: #087d81; font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.about-card__link span { transition: transform .2s; }
.about-card__link:hover span { transform: translateX(3px); }

.toast {
  position: fixed;
  z-index: 150;
  top: 104px; left: 50%;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px;
  border: 1px solid rgba(207, 252, 250, .18);
  border-radius: 10px;
  background: rgba(5, 33, 45, .92);
  backdrop-filter: blur(18px);
  color: rgba(239, 255, 254, .9);
  font-size: 11.5px; letter-spacing: .02em;
  box-shadow: 0 12px 36px rgba(0, 8, 14, .32);
  opacity: 0; transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  max-width: min(90vw, 460px);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast__icon { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); flex: 0 0 auto; }
.toast.is-error .toast__icon { background: #ffb18d; box-shadow: 0 0 8px #ffb18d; }

/* =============================== 动画 =============================== */
@keyframes hero-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes companion-in { from { opacity: 0; transform: translateY(34px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes chip-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes char-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-13px) rotate(.35deg); } }
@keyframes shadow-breathe { 0%, 100% { opacity: .3; transform: scaleX(1); } 50% { opacity: .2; transform: scaleX(.94); } }
@keyframes pool-breathe { 0%, 100% { opacity: .18; transform: scaleX(1); } 50% { opacity: .1; transform: scaleX(.9); } }
@keyframes aura-pulse { 0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(.96); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } }
@keyframes listen-aura { 0% { opacity: .5; transform: translate(-50%,-50%) scale(.86); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.24); } }
@keyframes splash-pulse { from { opacity: .45; transform: translateY(2px); } to { opacity: 1; transform: translateY(-3px); } }
@keyframes blink { 0%, 91%, 100% { transform: scaleY(0); } 93%, 95.5% { transform: scaleY(1); } 97% { transform: scaleY(0); } }
@keyframes gaze { 0%, 18%, 100% { transform: translateX(0); } 26%, 40% { transform: translateX(-4px); } 48%, 62% { transform: translateX(0); } 70%, 84% { transform: translateX(4px); } }
@keyframes talk { from { transform: scaleY(.45); } to { transform: scaleY(1.1); } }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes status-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes mic-ring { 0% { opacity: .8; transform: scale(.88); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes call-ripple { 0% { opacity: .7; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes bubble-rise { 0% { opacity: 0; transform: translateY(0) translateX(0); } 8% { opacity: .4; } 90% { opacity: .1; } 100% { opacity: 0; transform: translateY(-82vh) translateX(22px); } }
@keyframes glow-drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-3vw, 2vh, 0) scale(1.08); } }
@keyframes rays-sway { from { opacity: .16; transform: skewX(-2deg) translateX(-1%); } to { opacity: .28; transform: skewX(2deg) translateX(2%); } }
@keyframes ocean-breathe { from { transform: scale(1.02); } to { transform: scale(1.06); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

@keyframes speaker-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes hand-wave {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(-7deg); }
  32% { transform: rotate(4deg); }
  48% { transform: rotate(-5deg); }
  64% { transform: rotate(3deg); }
  80% { transform: rotate(0deg); }
}

@keyframes character-idle {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  28% { transform: translateY(-4px) translateX(1px) rotate(.18deg); }
  56% { transform: translateY(-1px) translateX(0) rotate(.04deg); }
  78% { transform: translateY(-3px) translateX(-1px) rotate(-.12deg); }
}
@keyframes mouth-flap {
  0%, 48% { opacity: 0; }
  49%, 100% { opacity: 1; }
}

/* =============================== 响应式 =============================== */
@media (max-width: 1180px) {
  .hero { left: 5.5vw; width: min(560px, 47vw); }
  .chat-panel { left: 4.5vw; width: min(570px, 47vw); }
  .companion { width: min(25vw, 310px); right: 1.6vw; }
  .speech-bubble { left: -85%; width: 250px; }
}

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

@media (max-width: 960px) {
  .topnav__sound { display: none; }
  .status-pill { left: auto; right: 24px; transform: none; }
  .topbar { padding-right: 132px; }
  .hero { top: 24vh; width: 56vw; }
  .chat-panel { width: 57vw; bottom: 190px; }
  .companion { width: min(30vw, 300px); min-width: 240px; right: 1vw; bottom: 150px; opacity: .95; }
  .speech-bubble { display: none; }
  .dock { padding: 0 108px 0 32px; }
  .composer-wrap { width: min(700px, 100%); }
  .media-caption { display: none; }
}

@media (max-width: 760px) {
  .topbar { height: 74px; padding: 0 20px; }
  .brand__mark { width: 36px; height: 36px; border-radius: 12px; }
  .brand__mark svg { width: 23px; height: 23px; }
  .brand__type strong { font-size: 22px; }
  .brand__type span { font-size: 8px; }
  .status-pill { display: none; }
  .topnav { gap: 16px; }
  .topnav__link { font-size: 11px; }
  .topnav__link:first-child { display: none; }
  .hero { left: 22px; top: 17vh; width: calc(100vw - 44px); max-width: 500px; }
  .hero__eyebrow { margin-bottom: 16px; font-size: 8px; letter-spacing: .16em; }
  .hero__title { font-size: clamp(38px, 11vw, 52px); margin-bottom: 18px; }
  .hero__copy { max-width: 320px; margin-bottom: 25px; font-size: 12px; line-height: 1.85; }
  .hero__copy br { display: none; }
  .suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-width: 100%; }
  .suggestion { min-height: 34px; padding: 7px 12px; font-size: 10.5px; min-width: 0; overflow: hidden; }
  .suggestion span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero__meta { margin-top: 24px; font-size: 8px; }
  .companion { width: clamp(145px, 40vw, 165px); min-width: 0; right: 8px; bottom: 124px; opacity: .95; z-index: 1; }
  .companion .speech-bubble { display: none; }
  .character-caption { display: none; }
  .chat-panel {
    left: 12px; right: 12px; top: 82px; bottom: 154px;
    width: auto; max-height: none;
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(4, 28, 42, .78), rgba(2, 20, 32, .62));
  }
  .chat-panel__head { padding: 14px 16px 11px; }
  .messages { padding: 16px 14px 24px; }
  .msg { margin-bottom: 18px; }
  .msg__bubble { font-size: 13px; padding: 10px 12px; }
  .msg__avatar { width: 23px; height: 23px; flex-basis: 23px; }
  .msg__body { max-width: calc(100% - 32px); }
  .dock { bottom: 49px; padding: 0 82px 0 12px; }
  .composer-meta { margin-bottom: 6px; }
  .composer { min-height: 54px; border-radius: 18px; padding: 7px; }
  .composer textarea { font-size: 13px; min-height: 36px; padding-top: 8px; }
  .mic-btn { flex-basis: 38px; width: 38px; height: 38px; border-radius: 12px; }
  .send-btn { flex-basis: 39px; width: 39px; height: 39px; border-radius: 12px; }
  .composer-hint { padding: 6px 5px 0; font-size: 8px; }
  .composer-hint__secure { display: none; }
  .char-count { display: none; }
  .kb-picker__trigger { font-size: 9px; height: 26px; }
  .voice-toggle span { display: none; }
  .voice-toggle i { display: none; }
  .call-btn { width: 56px; height: 56px; right: 14px; bottom: 64px; }
  .call-btn svg { width: 22px; height: 22px; }
  .call-btn__label { display: none; }
  .media-bar { height: 42px; padding: 0 12px; gap: 6px; }
  .media-bar .media-time { width: 28px; font-size: 8px; }
  .media-progress { min-width: 50px; }
  .media-volume { flex-basis: 45px; }
  .media-clock { display: none; }
  .media-divider { display: none; }
  .media-btn { width: 24px; height: 24px; }
  .toast { top: 82px; font-size: 10.5px; }
  .modal__card { padding: 34px 25px 28px; border-radius: 22px; }
  .about-card h2 { font-size: 27px; }
}

@media (max-width: 430px) {
  .hero { top: 15vh; }
  .hero__copy { max-width: 290px; }
  .hero__meta-label { display: none; }
  .dock { padding-right: 74px; }
  .call-btn { width: 52px; height: 52px; right: 12px; bottom: 62px; }
  .media-volume { display: none; }
}

@media (max-height: 820px) and (min-width: 761px) {
  .hero { top: 15vh; width: min(610px, 47vw); }
  .hero__eyebrow { margin-bottom: 16px; }
  .hero__title { font-size: clamp(42px, 4.7vw, 62px); margin-bottom: 18px; }
  .hero__copy { margin-bottom: 21px; font-size: 13px; line-height: 1.85; }
  .suggestion { min-height: 34px; padding: 7px 13px; }
  .hero__meta { margin-top: 18px; }
  .companion { bottom: 138px; width: min(24vw, 250px); right: 2.5vw; }
  .speech-bubble { display: none; }
  .speech-bubble p { font-size: 11.5px; -webkit-line-clamp: 4; }
  .character-caption { display: none; }
  .chat-panel { top: 13.2vh; bottom: 174px; }
  .dock { bottom: 47px; }
}

@media (max-height: 690px) and (min-width: 761px) {
  .hero { top: 13.5vh; }
  .hero__title { font-size: clamp(38px, 4.2vw, 54px); }
  .hero__copy { margin-bottom: 16px; line-height: 1.7; }
  .hero__meta { display: none; }
  .speech-bubble { top: 2%; width: 245px; min-width: 0; }
  .companion { bottom: 130px; width: min(22vw, 230px); }
  .chat-panel { top: 10vh; bottom: 158px; }
  .composer-hint { display: none; }
}

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


/* ==========================================================================
   阳光运动风主题（仅视觉覆盖，不改变交互与布局逻辑）
   ========================================================================== */
:root {
  --ink: #14384c;
  --ink-soft: rgba(20, 56, 76, .72);
  --ink-faint: rgba(20, 56, 76, .46);
  --teal: #ff7a3c;
  --teal-bright: #e85d20;
  --aqua: #238bc0;
  --deep: #f6efe3;
  --green: #20b98b;
  --glass: rgba(255, 252, 244, .68);
  --line: rgba(27, 74, 91, .12);
  --paper: #fffdf8;
  --sans: "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 24px 64px rgba(30, 68, 76, .16);
}

body { background: #f4efe4; color: var(--ink); }
.ocean {
  background:
    radial-gradient(ellipse at 78% 18%, rgba(255, 232, 164, .55), transparent 45%),
    linear-gradient(180deg, #8adcf5 0%, #dff5f0 52%, #83c86b 100%);
}
.ocean__video {
  filter: saturate(1.05) brightness(1.04) contrast(1.02);
}
.ocean__wash {
  background:
    linear-gradient(90deg, rgba(255, 249, 239, .96) 0%, rgba(255, 249, 239, .82) 28%, rgba(255, 249, 239, .36) 54%, rgba(255, 249, 239, .03) 74%, rgba(255, 249, 239, .16) 100%),
    linear-gradient(180deg, rgba(255, 250, 242, .36) 0%, transparent 26%, transparent 58%, rgba(255, 250, 242, .68) 100%);
}
.ocean__glow {
  background: radial-gradient(circle, rgba(255, 228, 150, .34), rgba(255, 178, 92, .12) 38%, transparent 68%);
  opacity: .95;
}
.ocean__rays {
  opacity: .3;
  background:
    linear-gradient(108deg, transparent 28%, rgba(255, 252, 229, .5) 31%, transparent 36%),
    linear-gradient(106deg, transparent 49%, rgba(255, 250, 224, .3) 52%, transparent 58%),
    linear-gradient(114deg, transparent 67%, rgba(255, 250, 224, .4) 70%, transparent 76%);
  mix-blend-mode: screen;
}
.ocean__grain { opacity: .028; }
.bubbles i { border-color: rgba(255, 255, 255, .62); box-shadow: inset 1px 1px 2px rgba(255,255,255,.5); }

.topbar {
  background: linear-gradient(180deg, rgba(255, 251, 242, .9), rgba(255, 251, 242, .38) 62%, transparent);
}
.brand__mark {
  border-color: rgba(49, 101, 111, .14);
  background: rgba(255, 252, 244, .8);
  box-shadow: 0 8px 22px rgba(29, 77, 86, .08), inset 0 1px 0 rgba(255,255,255,.9);
}
.brand__mark svg { filter: drop-shadow(0 2px 6px rgba(255, 122, 60, .25)); }
.brand__type strong { color: #12384c; font-weight: 800; }
.brand__type span { color: #d96b33; }
.status-pill {
  border-color: rgba(26, 77, 92, .13);
  background: rgba(255, 253, 247, .72);
  color: #3b5d69;
  box-shadow: 0 6px 18px rgba(29, 76, 84, .06);
  backdrop-filter: blur(16px);
}
.status-pill__dot { background: #20b98b; box-shadow: 0 0 0 4px rgba(32,185,139,.12), 0 0 10px rgba(32,185,139,.6); }
.status-pill.is-demo .status-pill__dot { background: #f2a13b; box-shadow: 0 0 0 4px rgba(242,161,59,.12); }
.topnav__link { color: #4d6b74; }
.topnav__link:hover { color: #12384c; }
.topnav__link::after { background: #ff7a3c; }
.topnav__sound { color: #68858a; border-left-color: rgba(31, 76, 90, .13); }
.topnav__sound i { background: #ff8b4c; }

.hero__eyebrow { color: #54747d; }
.hero__line { background: #f08b4b; }
.hero__title {
  color: #12384c;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -.045em;
  text-shadow: 0 2px 26px rgba(255, 252, 244, .5);
}
.hero__title em {
  background: linear-gradient(100deg, #f25f27 4%, #ff9a42 54%, #f4b13e 94%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(255, 152, 70, .12));
}
.hero__copy { color: #476875; }
.suggestion {
  border-color: rgba(31, 78, 92, .13);
  background: rgba(255, 253, 247, .64);
  color: #284957;
  box-shadow: 0 6px 18px rgba(28, 73, 82, .05);
}
.suggestion:hover {
  background: #fffdf8;
  border-color: rgba(255, 122, 60, .42);
  color: #12384c;
}
.suggestion svg { opacity: .78; color: #eb7436; }
.hero__meta { color: rgba(26, 71, 84, .5); }

.chat-panel {
  border-color: rgba(31, 81, 94, .12);
  background: linear-gradient(145deg, rgba(255, 253, 247, .93), rgba(255, 249, 239, .86));
  box-shadow: 0 28px 70px rgba(29, 67, 73, .16), inset 0 1px 0 white;
}
.chat-panel__head { border-bottom-color: rgba(30, 77, 92, .09); }
.chat-panel__title { color: #3e626c; }
.chat-panel__signal { background: #ff7a3c; box-shadow: 0 0 8px rgba(255,122,60,.5); }
.mode-chip { border-color: rgba(230, 105, 48, .18); color: #b75a2d; background: rgba(255, 122, 60, .06); }
.text-btn { color: #799196; }
.text-btn:hover { color: #12384c; }
.messages { scrollbar-color: rgba(40, 88, 98, .18) transparent; }
.messages::-webkit-scrollbar-thumb { background: rgba(40, 88, 98, .16); }
.chat-panel__fade { background: linear-gradient(transparent, rgba(255, 251, 243, .9)); }
.msg__avatar {
  background: linear-gradient(145deg, #ffe1c8, #ffd0a5);
  border-color: rgba(231, 116, 54, .2);
  color: #d45a22;
}
.msg__name { color: #789196; }
.msg__bubble {
  border-color: rgba(34, 83, 96, .1);
  background: rgba(255, 255, 255, .88);
  color: #1a3d4d;
  box-shadow: 0 3px 10px rgba(37, 76, 82, .035);
}
.msg--user .msg__bubble {
  border-color: transparent;
  background: linear-gradient(145deg, #ff9a55, #f46c35);
  color: #fffdf9;
  box-shadow: 0 8px 20px rgba(232, 101, 48, .2);
}
.msg__meta { color: #879da0; }
.msg__action { color: #8ba0a4; }
.msg__action:hover { color: #e46629; }
.msg__mode { border-color: rgba(33, 80, 93, .11); }
.typing i { background: #f1894d; }
.citations details { border-color: rgba(33, 82, 94, .1); background: rgba(255, 250, 241, .8); }
.citations summary { color: #728b90; }
.citation { background: rgba(255, 255, 255, .7); }
.citation__head { color: #355765; }
.citation__index { color: #e46b2f; }
.citation__score { color: #9bafb1; }
.citation__kb { color: #91a4a6; }
.citation__excerpt { color: #6d858a; }
.msg-error .msg__bubble { border-color: rgba(222, 96, 67, .25); background: #fff0ed; color: #8b3d30; }

.companion .character-aura {
  background: radial-gradient(circle, rgba(255, 220, 141, .42), rgba(255, 165, 95, .14) 44%, transparent 70%);
}
.character {
  filter: drop-shadow(0 26px 30px rgba(18, 58, 66, .3)) drop-shadow(0 4px 10px rgba(18, 58, 66, .2));
}
.character-stage.is-speaking .speaker-image {
  filter: drop-shadow(0 0 26px rgba(255, 196, 102, .53)) drop-shadow(0 26px 30px rgba(18, 58, 66, .3));
}
.speech-bubble {
  border-color: rgba(255, 255, 255, .9);
  background: linear-gradient(145deg, rgba(255, 254, 249, .98), rgba(255, 245, 230, .95));
  color: #193c4b;
  box-shadow: 0 18px 48px rgba(24, 65, 70, .2);
}
.speech-bubble::after { background: #fff6e8; border-color: rgba(255,255,255,.9); }
.speech-bubble__top { color: #9a6044; }
.speech-bubble__top i { background: #ff7a3c; box-shadow: 0 0 0 3px rgba(255,122,60,.12); }
.speech-bubble__top button { background: rgba(177, 101, 61, .08); color: #8f735f; }

.kb-picker__trigger {
  border-color: rgba(31, 78, 92, .14);
  background: rgba(255, 253, 247, .7);
  color: #3f606b;
  box-shadow: 0 4px 14px rgba(35, 72, 78, .04);
}
.kb-picker__trigger:hover { color: #12384c; border-color: rgba(255,122,60,.35); background: #fffdf8; }
.kb-menu {
  border-color: rgba(32, 82, 93, .15);
  background: rgba(255, 253, 247, .97);
  box-shadow: 0 18px 44px rgba(28, 67, 73, .18);
}
.kb-option { color: #45656e; }
.kb-option:hover { background: #fff3e6; color: #153b4d; }
.kb-option.is-active { background: #fff0e3; color: #cd5e25; }
.kb-option__count { color: #9aacad; }
.voice-toggle { color: #617d84; }
.voice-toggle:hover { color: #153b4d; }
.voice-toggle i { background: #ff8b4c; box-shadow: 0 0 7px rgba(255,139,76,.45); }
.voice-toggle[aria-pressed="false"] { color: #9bacaf; }
.voice-toggle[aria-pressed="false"] i { background: #a8b7b7; }

.composer {
  border-color: rgba(255, 255, 255, .95);
  background: linear-gradient(145deg, #fffefa, #fff9ef);
  box-shadow: 0 20px 52px rgba(25, 64, 70, .22), inset 0 1px 0 white;
}
.composer:focus-within {
  border-color: rgba(255, 135, 73, .68);
  box-shadow: 0 22px 58px rgba(25, 64, 70, .22), 0 0 0 4px rgba(255, 139, 76, .12), inset 0 1px 0 white;
}
.composer textarea { color: #173c4c; }
.composer textarea::placeholder { color: #99abad; }
.mic-btn {
  border-color: rgba(30, 80, 92, .12);
  background: #fff7ec;
  color: #527b82;
}
.mic-btn:hover { color: #d65f23; background: #fff0e2; border-color: rgba(255,122,60,.3); }
.mic-btn.is-listening { color: white; background: #1fbca3; border-color: #1fbca3; }
.send-btn {
  background: linear-gradient(145deg, #ff9c51, #f26532);
  box-shadow: 0 8px 20px rgba(226, 91, 42, .26);
}
.send-btn:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(226, 91, 42, .32); }
.char-count { color: #93a8a9; }
.composer-hint { color: rgba(51, 82, 91, .52); }
.composer-hint__secure svg { opacity: .8; }
.call-btn {
  border-color: rgba(255,255,255,.72);
  background: linear-gradient(150deg, #4bddb0, #1fbd87);
  box-shadow: 0 14px 34px rgba(24, 168, 117, .3), inset 0 1px 0 rgba(255,255,255,.55);
}
.call-btn.is-active { background: linear-gradient(150deg, #3bd49f, #13ab77); box-shadow: 0 0 0 8px rgba(42, 202, 150, .1), 0 14px 34px rgba(24,168,117,.32); }
.call-btn__label { color: rgba(22, 101, 74, .65); }

.media-bar {
  border-top-color: rgba(34, 79, 91, .12);
  background: rgba(255, 252, 245, .9);
  color: #54727a;
  box-shadow: 0 -8px 30px rgba(24, 64, 70, .05);
}
.media-btn { color: #476a73; }
.media-btn:hover { color: #d65f23; background: rgba(255, 132, 71, .08); }
.media-time { color: #627f85; }
.media-time--muted { color: #91a5a7; }
.media-divider { background: rgba(35, 81, 93, .13); }
.media-caption { color: #7b9195; }
.media-caption i { background: #ff8447; }
.media-caption__tip { color: #9aacae; border-left-color: rgba(35, 81, 93, .12); }
.media-clock { color: #7b9195; }
input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, rgba(255, 124, 61, .95) var(--progress, 0%), rgba(34, 79, 91, .14) var(--progress, 0%));
}
input[type="range"]::-moz-range-track { background: rgba(34, 79, 91, .14); }
input[type="range"]::-moz-range-progress { background: rgba(255, 124, 61, .95); }
input[type="range"]::-webkit-slider-thumb { background: #fff8f0; box-shadow: 0 0 0 4px rgba(255, 128, 66, .13), 0 0 10px rgba(255, 128, 66, .4); }
input[type="range"]::-moz-range-thumb { background: #fff8f0; }

.toast {
  border-color: rgba(48, 94, 102, .16);
  background: rgba(255, 253, 248, .96);
  color: #193d4c;
  box-shadow: 0 12px 34px rgba(28, 66, 73, .18);
}
.toast__icon { background: #ff7a3c; box-shadow: 0 0 8px rgba(255,122,60,.5); }
.toast.is-error .toast__icon { background: #e35e48; }
.about-card { background: linear-gradient(150deg, #fffefa, #fff5e8); }
.about-card__eyebrow { color: #c77b51; }
.about-card__link { color: #cf5b22; }
.about-card h2 { color: #12384c; }
.about-facts dt { color: #8a9c9d; }
.about-facts dd { color: #3f606a; }
.modal__close { background: rgba(166, 104, 62, .08); color: #8c7969; }

@media (max-width: 760px) {
  .ocean__wash {
    background:
      linear-gradient(180deg, rgba(255, 249, 239, .9) 0%, rgba(255, 249, 239, .66) 36%, rgba(255, 249, 239, .12) 66%, rgba(255, 249, 239, .7) 100%);
  }
  .chat-panel { background: linear-gradient(155deg, rgba(255, 253, 247, .96), rgba(255, 249, 239, .9)); }
}


/* 阳光主题下的悬浮控件可读性 */
.topnav__sound { color: #476a73; }
.voice-toggle {
  padding: 5px 10px;
  border: 1px solid rgba(37, 82, 91, .12);
  border-radius: 999px;
  background: rgba(255, 253, 247, .7);
  color: #365b65;
  backdrop-filter: blur(12px);
}
.voice-toggle:hover { color: #b95824; background: #fff8ef; }
.voice-toggle[aria-pressed="false"] { color: #6f8589; background: rgba(255, 250, 241, .62); }
.composer-hint { color: rgba(29, 64, 75, .62); }
.media-caption { color: #607b80; }
.media-caption__tip { color: #7b9193; }
.ocean.video-failed { background: #ccefe5 url('/assets/sunny-track-poster.jpg') center / cover no-repeat; }
.ocean.video-failed .ocean__canvas { opacity: 0 !important; }


.msg__bubble strong { font-weight: 650; color: inherit; }
.msg__bubble code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(42, 88, 98, .08);
  color: #b55425;
  font-family: var(--mono);
  font-size: .88em;
}
.msg--user .msg__bubble code { background: rgba(255,255,255,.16); color: #fff; }
