:root {
  --bg: #02070d;
  --surface: #071725;
  --surface-2: rgba(9, 30, 47, 0.88);
  --surface-3: rgba(10, 37, 58, 0.76);
  --ink: #f1f8ff;
  --muted: #8faec2;
  --faint: #5f7f92;
  --cyan: #18d8ff;
  --cyan-soft: #67ebff;
  --gold: #d7b16a;
  --gold-soft: #ffe4a5;
  --green: #38e49a;
  --line: rgba(102, 232, 255, 0.24);
  --line-strong: rgba(102, 232, 255, 0.44);
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 10%, rgba(24, 216, 255, 0.18), transparent 31%),
    radial-gradient(circle at 15% 88%, rgba(24, 216, 255, 0.2), transparent 28%),
    linear-gradient(145deg, #02070d 0%, #061421 52%, #02070d 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 30%;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(24, 216, 255, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 80px rgba(24, 216, 255, 0.12),
    inset 0 0 80px rgba(24, 216, 255, 0.08);
}

.ambient::after {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -10%;
  width: 70%;
  height: 34%;
  border: 2px solid rgba(24, 216, 255, 0.18);
  border-radius: 50%;
  transform: rotate(-15deg);
  filter: drop-shadow(0 0 24px rgba(24, 216, 255, 0.28));
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 4px;
}

.phone-shell {
  position: relative;
  width: min(430px, 100%);
  height: min(932px, calc(100vh - 8px));
  min-height: 760px;
  overflow: hidden;
  border: 1px solid rgba(215, 177, 106, 0.56);
  border-radius: 38px;
  background:
    radial-gradient(circle at 52% 23%, rgba(24, 216, 255, 0.22), transparent 29%),
    linear-gradient(180deg, #071623 0%, #06131f 58%, #02070d 100%);
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.52),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.phone-shell::before {
  display: none;
}

.build-badge {
  position: fixed;
  right: 8px;
  bottom: 4px;
  z-index: 30;
  color: rgba(184, 223, 236, 0.34);
  font-size: 8px;
  letter-spacing: 0;
  pointer-events: none;
}

.app {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 38px 0;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 18px;
}

.signal-bars {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  height: 12px;
}

.signal-bars i {
  width: 3px;
  border-radius: 2px 2px 0 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.25);
}

.signal-bars i:nth-child(1) {
  height: 4px;
}

.signal-bars i:nth-child(2) {
  height: 6px;
}

.signal-bars i:nth-child(3) {
  height: 8px;
}

.signal-bars i:nth-child(4) {
  height: 11px;
}

.wifi-mark {
  width: 13px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9) transparent transparent transparent;
  border-radius: 50%;
  position: relative;
}

.wifi-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  transform: translateX(-50%);
}

.battery-mark {
  position: relative;
  width: 20px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 2px;
}

.battery-mark::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.92);
}

.battery-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: rgba(255, 255, 255, 0.78);
}

.topbar {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: start;
  min-height: 66px;
  padding: 14px 24px 0;
}

.brand-title {
  padding-top: 28px;
  text-align: center;
}

.home-brand-title {
  position: relative;
  min-height: 96px;
  padding-top: 36px;
}

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

.brand-title h1 {
  color: var(--gold-soft);
  font-family: "STKaiti", "KaiTi", "FangSong", "Songti SC", serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-title .brand-main {
  display: inline-block;
  color: transparent;
  background:
    linear-gradient(180deg, #fff3bf 0%, #e4b86b 46%, #8e5b21 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "STKaiti", "KaiTi", "FangSong", "Songti SC", serif;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.05;
  text-shadow:
    0 0 1px rgba(255, 246, 200, 0.82),
    0 0 10px rgba(215, 177, 106, 0.28),
    0 1px 0 rgba(46, 27, 5, 0.65);
}

.brand-tech-lockup {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 70px;
}

.brand-circuit {
  position: absolute;
  top: 23px;
  width: 286px;
  height: 18px;
  pointer-events: none;
  opacity: 0.68;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(103, 235, 255, 0.36) 9% 11%, transparent 11% 27%, rgba(103, 235, 255, 0.28) 27% 29%, transparent 29% 71%, rgba(103, 235, 255, 0.28) 71% 73%, transparent 73% 89%, rgba(103, 235, 255, 0.36) 89% 91%, transparent 91%),
    radial-gradient(circle at 14% 50%, rgba(103, 235, 255, 0.75) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 50%, rgba(103, 235, 255, 0.75) 0 2px, transparent 3px);
  filter: drop-shadow(0 0 9px rgba(103, 235, 255, 0.26));
}

.brand-circuit::before,
.brand-circuit::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 235, 255, 0.75), transparent);
}

.brand-circuit::before {
  left: 0;
}

.brand-circuit::after {
  right: 0;
}

.brand-vector {
  position: relative;
  z-index: 1;
  width: 286px;
  height: 54px;
  transform: translateY(-8px);
  display: block;
  filter: drop-shadow(0 1px 1px rgba(12, 7, 1, 0.65));
  text-rendering: geometricPrecision;
}

.brand-wordmark {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: transparent;
  background:
    linear-gradient(180deg, #f7feff 0%, #bdf7ff 34%, #68dfff 58%, #eafcff 60%, #3aa8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0 1px rgba(245, 254, 255, 0.9),
    0 0 10px rgba(103, 235, 255, 0.46),
    0 0 22px rgba(30, 132, 255, 0.24);
  filter: drop-shadow(0 1px 0 rgba(0, 10, 16, 0.75));
}

.brand-wordmark::before,
.brand-wordmark::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(103, 235, 255, 0.72), transparent);
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(103, 235, 255, 0.34);
}

.brand-wordmark::before {
  left: -44px;
}

.brand-wordmark::after {
  right: -44px;
}

.brand-vector text {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-vector-glow {
  fill: url("#brandGold");
  stroke: rgba(65, 234, 255, 0.42);
  stroke-width: 0.8;
  paint-order: stroke fill;
  opacity: 0.55;
}

.brand-vector-main {
  fill: url("#brandGold");
  stroke: rgba(2, 18, 28, 0.8);
  stroke-width: 0.5;
  paint-order: stroke fill;
  filter:
    drop-shadow(0 -0.6px 0 rgba(255, 250, 218, 0.7))
    drop-shadow(0 0 1.2px rgba(103, 235, 255, 0.28));
}

.brand-vector-line {
  fill: none;
  stroke: url("#brandCyan");
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.brand-vector-dot {
  fill: #6df6ff;
  filter: drop-shadow(0 0 4px rgba(109, 246, 255, 0.75));
}

.brand-scanline {
  fill: url("#brandCyan");
  opacity: 0.7;
  animation: brand-scanline 3s ease-in-out infinite;
}

.brand-tech-lockup::after {
  content: "";
  position: absolute;
  left: 17%;
  right: 17%;
  top: 41px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 235, 255, 0.68), rgba(198, 249, 255, 0.52), rgba(103, 235, 255, 0.68), transparent);
  box-shadow: 0 0 10px rgba(103, 235, 255, 0.28);
  animation: brand-scan 3.4s ease-in-out infinite;
}

.brand-title .brand-sub {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: rgba(191, 246, 255, 0.9);
  font-size: 11px;
  font-weight: 700;
  text-shadow:
    0 0 6px rgba(103, 235, 255, 0.3),
    0 0 12px rgba(30, 132, 255, 0.16);
}

.brand-title p {
  margin-top: 0;
  color: var(--gold);
  font-size: 12px;
}

.icon-btn {
  min-width: 42px;
  min-height: 34px;
  padding: 0 8px;
  margin-top: 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.2);
  border-radius: 12px;
  background: rgba(6, 20, 34, 0.56);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

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

.home-topbar .icon-btn {
  border: 0;
  background: transparent;
}

.home-topbar {
  min-height: 116px;
}

.home-topbar .icon-btn {
  margin-top: 48px;
  color: rgba(241, 248, 255, 0.9);
  filter: drop-shadow(0 0 4px rgba(103, 235, 255, 0.18));
}

.home-topbar .icon-btn svg {
  width: 24px;
  height: 24px;
}

.screen {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 18px 18px;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.hero {
  position: relative;
  min-height: 222px;
  display: grid;
  place-items: center;
}

.home-screen .hero {
  min-height: 260px;
}

.home-hero {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.ai-stage {
  --voice-level: 0.52;
  --voice-hue: 204;
  --voice-scale: 1;
  position: relative;
  width: min(388px, calc(100% + 6px));
  height: 250px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 42%, hsla(var(--voice-hue), 100%, 64%, calc(0.18 + var(--voice-level) * 0.13)), transparent 28%),
    radial-gradient(circle at 50% 86%, rgba(24, 216, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(5, 20, 33, 0.16), rgba(4, 13, 23, 0.66));
}

.particle-stage {
  height: 252px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.particle-stage::before,
.particle-stage::after,
.particle-stage-stars,
.particle-sphere-canvas,
.particle-sphere-halo,
.particle-sphere-floor {
  position: absolute;
  pointer-events: none;
}

.particle-stage::before {
  content: "";
  inset: 8px 16px 2px;
  background:
    radial-gradient(circle at 50% 44%, rgba(39, 210, 92, calc(0.04 + var(--voice-level) * 0.06)), transparent 31%),
    radial-gradient(circle at 30% 47%, rgba(0, 86, 255, 0.1), transparent 26%),
    radial-gradient(circle at 70% 48%, rgba(246, 236, 93, 0.08), transparent 25%);
  mix-blend-mode: screen;
}

.particle-stage::after {
  content: "";
  inset: 10px 18px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at 50% 74%, rgba(103, 235, 255, calc(0.035 + var(--voice-level) * 0.06)) 0 1px, transparent 1px 12px);
  transform: perspective(360px) rotateX(66deg) scaleX(calc(0.72 + var(--voice-level) * 0.08));
  transform-origin: 50% 78%;
  opacity: 0.48;
  filter: blur(0.2px);
}

.particle-stage-stars {
  inset: 0;
  background:
    radial-gradient(circle at 17% 30%, rgba(103, 235, 255, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 73% 21%, rgba(246, 236, 93, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 64%, rgba(103, 235, 255, 0.3) 0 1px, transparent 2px),
    radial-gradient(circle at 41% 75%, rgba(39, 210, 92, 0.24) 0 1px, transparent 2px);
  opacity: 0.62;
  animation: star-drift 11s linear infinite;
}

.particle-sphere-canvas {
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  filter: saturate(1.1) contrast(1.06) drop-shadow(0 0 calc(8px + var(--voice-level) * 10px) rgba(103, 235, 255, 0.22));
}

.particle-sphere-halo {
  z-index: 1;
  left: 50%;
  top: 49%;
  width: calc(230px + var(--voice-level) * 40px);
  height: calc(230px + var(--voice-level) * 40px);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(0, 207, 255, 0.08) 18%, rgba(18, 210, 67, 0.055) 43%, transparent 67%);
  transform: translate(-50%, -50%) scale(var(--voice-scale));
  filter: blur(6px);
  opacity: 0.82;
}

.particle-sphere-floor {
  z-index: 1;
  left: 50%;
  bottom: 19px;
  width: calc(150px + var(--voice-level) * 80px);
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(103, 235, 255, 0.28), rgba(31, 219, 78, 0.1) 42%, transparent 72%);
  transform: translateX(-50%);
  filter: blur(8px);
  opacity: 0.62;
}

.particle-stage .voice-spectrum {
  z-index: 3;
  bottom: 9px;
  width: 170px;
  height: 18px;
  opacity: calc(0.24 + var(--voice-level) * 0.22);
  filter: drop-shadow(0 0 10px rgba(103, 235, 255, 0.28));
}

.particle-stage .voice-spectrum i {
  width: 2px;
  min-height: 2px;
  background: linear-gradient(180deg, rgba(246, 236, 93, 0.72), rgba(24, 218, 66, 0.5), rgba(0, 72, 255, 0.34));
}

.ai-stars,
.ai-grid,
.ai-floor,
.voice-orbit,
.ai-ring,
.ai-liquid-orb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.ai-stars {
  inset: 0;
  left: 0;
  transform: none;
  background:
    radial-gradient(circle at 18% 34%, rgba(103, 235, 255, 0.74) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 22%, rgba(103, 235, 255, 0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 62%, rgba(103, 235, 255, 0.52) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 70%, rgba(103, 235, 255, 0.48) 0 1px, transparent 2px),
    radial-gradient(circle at 56% 18%, rgba(255, 228, 165, 0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 46% 54%, rgba(103, 235, 255, 0.48) 0 1px, transparent 2px);
  opacity: 0.9;
  animation: star-drift 9s linear infinite;
}

.ai-grid {
  bottom: 18px;
  width: 92%;
  height: 62px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at center, hsla(var(--voice-hue), 100%, 68%, calc(0.12 + var(--voice-level) * 0.24)) 0 1px, transparent 1px calc(12px + var(--voice-level) * 6px)),
    linear-gradient(90deg, transparent, rgba(103, 235, 255, 0.16), transparent);
  filter: blur(0.2px);
  opacity: 0.72;
  animation: grid-ripple 2.1s ease-in-out infinite;
}

.ai-floor {
  bottom: 24px;
  width: 220px;
  height: 45px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(164, 248, 255, 0.52), rgba(24, 216, 255, 0.2) 36%, transparent 70%);
  filter: blur(4px);
  animation: floor-pulse 2.4s ease-in-out infinite;
}

.voice-orbit {
  bottom: 32px;
  width: calc(220px + var(--voice-level) * 86px);
  height: calc(28px + var(--voice-level) * 16px);
  border: 1px solid hsla(var(--voice-hue), 100%, 70%, calc(0.2 + var(--voice-level) * 0.24));
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: calc(0.42 + var(--voice-level) * 0.38);
  filter: drop-shadow(0 0 calc(6px + var(--voice-level) * 12px) hsla(var(--voice-hue), 100%, 60%, 0.28));
  animation: voice-wave 1.4s ease-in-out infinite;
}

.voice-orbit-two {
  bottom: 22px;
  width: calc(270px + var(--voice-level) * 96px);
  animation-duration: 1.9s;
  animation-delay: -0.35s;
}

.voice-orbit-three {
  bottom: 11px;
  width: calc(316px + var(--voice-level) * 108px);
  animation-duration: 2.5s;
  animation-delay: -0.7s;
}

.ai-ring {
  top: 92px;
  width: 320px;
  height: 70px;
  border: 2px solid rgba(103, 235, 255, 0.56);
  border-left-color: rgba(103, 235, 255, 0.14);
  border-right-color: rgba(103, 235, 255, 0.28);
  border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(24, 216, 255, 0.28));
  animation: orbit-spin 7.5s linear infinite;
}

.ai-ring-two {
  top: 108px;
  width: 352px;
  height: 54px;
  border-color: rgba(215, 177, 106, 0.34);
  animation-duration: 10s;
  animation-direction: reverse;
}

.ai-liquid-orb {
  top: 34px;
  width: 184px;
  height: 184px;
  overflow: visible;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 calc(20px + var(--voice-level) * 16px) hsla(var(--voice-hue), 100%, 66%, 0.36),
    0 0 calc(58px + var(--voice-level) * 48px) hsla(var(--voice-hue), 100%, 58%, 0.24);
  animation: fluid-orb-bob 4.8s ease-in-out infinite;
  filter: saturate(calc(1.06 + var(--voice-level) * 0.22)) brightness(calc(1 + var(--voice-level) * 0.08));
}

.fluid-orb-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orb-svg-float {
  transform-origin: 120px 112px;
  animation: orb-svg-pulse 3.6s ease-in-out infinite;
}

.orb-aura {
  fill: rgba(24, 216, 255, 0.04);
  stroke: rgba(103, 235, 255, 0.16);
  stroke-width: 1;
}

.orb-shell {
  opacity: calc(0.84 + var(--voice-level) * 0.12);
  mix-blend-mode: screen;
}

.orb-glass {
  fill: none;
  stroke: rgba(224, 254, 255, 0.16);
  stroke-width: 5;
  stroke-dasharray: 46 220;
  stroke-linecap: round;
  mix-blend-mode: screen;
  transform-origin: 120px 112px;
  animation: orbit-spin 9s linear infinite reverse;
}

.orb-rim {
  fill: none;
  stroke: rgba(199, 252, 255, 0.46);
  stroke-width: 1.25;
  filter: drop-shadow(0 0 5px rgba(103, 235, 255, 0.38));
}

.orb-flow {
  opacity: calc(0.5 + var(--voice-level) * 0.32);
  mix-blend-mode: screen;
  animation: orb-flow-drift 5.2s ease-in-out infinite;
}

.orb-flow.cyan {
  fill: rgba(69, 238, 255, 0.62);
}

.orb-flow.gold {
  fill: rgba(255, 210, 106, 0.48);
  animation-delay: -1.2s;
}

.orb-flow.deep {
  fill: rgba(30, 92, 196, 0.46);
  animation-delay: -2s;
}

.orb-latitude,
.orb-longitude,
.orb-edge-light {
  fill: none;
  stroke: rgba(208, 252, 255, 0.18);
  stroke-width: 1;
  stroke-linecap: round;
  mix-blend-mode: screen;
  transform-origin: 120px 112px;
}

.orb-latitude.one {
  animation: wave-line 3.8s ease-in-out infinite;
}

.orb-latitude.two {
  stroke: rgba(255, 218, 130, 0.16);
  animation: wave-line 4.4s ease-in-out infinite reverse;
}

.orb-longitude {
  stroke: rgba(103, 235, 255, 0.13);
  animation: wave-line 5.2s ease-in-out infinite;
}

.orb-edge-light {
  stroke: rgba(245, 254, 255, 0.28);
  stroke-width: 1.2;
  stroke-dasharray: 92 280;
  animation: orbit-spin 12s linear infinite;
}

.orb-highlight {
  fill: rgba(255, 255, 255, 0.72);
  filter: blur(0.4px);
  opacity: calc(0.55 + var(--voice-level) * 0.32);
}

.orb-spark {
  fill: #c9fbff;
  filter: drop-shadow(0 0 6px rgba(103, 235, 255, 0.8));
  animation: spark-pulse 2.8s ease-in-out infinite;
}

.orb-spark.two {
  animation-delay: -0.8s;
}

.orb-spark.three {
  animation-delay: -1.5s;
}

.voice-spectrum {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 238px;
  height: 28px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  transform: translateX(-50%) perspective(260px) rotateX(58deg);
  opacity: calc(0.46 + var(--voice-level) * 0.36);
  filter: drop-shadow(0 0 9px hsla(var(--voice-hue), 100%, 62%, 0.34));
}

.voice-spectrum i {
  width: 3px;
  height: calc((var(--h) * 1px) * (0.5 + var(--voice-level)));
  min-height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(201, 252, 255, 0.92), hsla(var(--voice-hue), 100%, 56%, 0.38));
  animation: spectrum-rise 1.1s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.045s);
}

.hero-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(103, 235, 255, 0.1) 0 13%, transparent 33%),
    repeating-radial-gradient(circle at 50% 46%, rgba(103, 235, 255, 0.15) 0 1px, transparent 1px 16px);
  opacity: 0.78;
}

.orb {
  position: relative;
  width: 176px;
  height: 176px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 5%, rgba(103, 235, 255, 0.9) 9% 28%, rgba(24, 216, 255, 0.28) 58%, transparent 70%),
    conic-gradient(from 180deg, transparent, rgba(103, 235, 255, 0.98), transparent, rgba(215, 177, 106, 0.6), transparent);
  box-shadow:
    0 0 40px rgba(24, 216, 255, 0.78),
    0 0 105px rgba(24, 216, 255, 0.28);
  font-size: 40px;
  font-weight: 800;
}

.orb::before,
.orb::after {
  content: "";
  position: absolute;
  width: 146%;
  height: 34%;
  border: 1px solid rgba(103, 235, 255, 0.48);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.orb::after {
  width: 116%;
  transform: rotate(15deg);
  border-color: rgba(215, 177, 106, 0.38);
}

.home-orb {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 70%, rgba(24, 216, 255, 0.12) 71%, transparent 72%),
    url("./assets/home-ai-core.png") center / cover no-repeat;
  box-shadow:
    0 0 42px rgba(24, 216, 255, 0.76),
    0 0 108px rgba(24, 216, 255, 0.28);
  font-size: 0;
  mix-blend-mode: normal;
}

.home-orb::before,
.home-orb::after {
  display: block;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: -6px;
}

.home-screen .entry-grid {
  gap: 8px;
  margin-top: 8px;
}

.entry {
  min-height: 74px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(10, 34, 52, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-screen .entry {
  min-height: 112px;
  gap: 4px;
  border-radius: 9px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-screen .entry-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(103, 235, 255, 0.28);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 30%, rgba(103, 235, 255, 0.22), transparent 54%),
    rgba(7, 30, 47, 0.66);
  animation: icon-float 4.8s ease-in-out infinite;
}

.home-screen .entry-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px currentColor);
}

.icon-agent {
  color: #5beaff;
}

.icon-resource,
.icon-learning {
  color: #ffd889;
}

.icon-activity {
  color: #ff8d76;
}

.icon-map {
  color: #77efcd;
}

.entry-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.entry-subtitle {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  transform: scale(0.92);
}

.entry-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  border: 1px solid rgba(215, 177, 106, 0.42);
  border-radius: 8px;
  background: rgba(215, 177, 106, 0.12);
  font-size: 15px;
}

.entry-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  mix-blend-mode: screen;
}

.entry-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry span:last-child {
  font-size: 11px;
}

.learning-card {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(102, 232, 255, 0.2);
  border-radius: 10px;
  background: rgba(9, 30, 47, 0.82);
}

.home-screen .learning-card {
  min-height: 66px;
}

.learning-tail {
  color: var(--gold);
  font-size: 12px;
  white-space: nowrap;
}

.learning-card h3 {
  color: var(--ink);
  font-size: 14px;
}

.learning-card p,
.section-head button,
.resource-card p,
.toast,
.notice-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.home-screen .section-head {
  margin-top: 40px;
}

.section-head h2 {
  color: var(--ink);
  font-size: 15px;
}

.section-head button {
  border: 0;
  background: transparent;
}

.resource-list {
  display: grid;
  gap: 10px;
}

.resource-card {
  display: grid;
  grid-template-columns: 94px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 78px;
  padding: 10px;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.2);
  border-radius: 10px;
  background: rgba(9, 30, 47, 0.86);
  text-align: left;
}

.home-screen .resource-card {
  grid-template-columns: 154px 1fr auto;
  min-height: 130px;
  margin-top: 2px;
}

.home-screen .resource-image {
  height: 96px;
}

.home-screen .resource-card h3 {
  font-size: 15px;
  line-height: 1.3;
}

.home-screen .resource-card p {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.view-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: end;
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.view-count svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transform: translateY(-1px);
}

.resource-image {
  height: 58px;
  border: 1px solid rgba(215, 177, 106, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.48)),
    linear-gradient(135deg, rgba(215, 177, 106, 0.52), rgba(24, 216, 255, 0.22));
  background-position: center;
  background-size: cover;
}

.resource-image.canal {
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.48)),
    linear-gradient(135deg, rgba(24, 216, 255, 0.32), rgba(215, 177, 106, 0.42));
}

.resource-image,
.resource-image.canal {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.resource-card h3 {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
}

.resource-card small {
  color: var(--faint);
  font-size: 11px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: var(--green);
  border-radius: 999px;
  background: rgba(56, 228, 154, 0.1);
  font-size: 11px;
  white-space: nowrap;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 106px;
  border-top: 1px solid rgba(102, 232, 255, 0.14);
  background: rgba(2, 8, 15, 0.88);
  overflow: visible;
}

.nav-btn {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 10px 0 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 11px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.nav-icon {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.nav-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
  filter: drop-shadow(0 0 4px rgba(103, 235, 255, 0.08));
}

.nav-btn.active {
  color: var(--cyan-soft);
}

.nav-btn.active .nav-icon {
  background: transparent;
}

.nav-btn.active .nav-icon svg {
  opacity: 1;
  filter: brightness(1.08) saturate(1.12) drop-shadow(0 0 5px rgba(103, 235, 255, 0.34));
  animation: nav-pulse 3.6s ease-in-out infinite;
}

.voice-nav {
  position: relative;
  z-index: 2;
  color: rgba(222, 252, 255, 0.96);
  font-weight: 700;
}

.voice-nav .nav-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(103, 235, 255, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.34), transparent 18%),
    radial-gradient(circle, rgba(103, 235, 255, 0.28), rgba(24, 216, 255, 0.12) 54%, rgba(8, 26, 44, 0.92) 72%);
  box-shadow:
    0 0 18px rgba(103, 235, 255, 0.26),
    inset 0 0 18px rgba(103, 235, 255, 0.16);
}

.voice-nav .nav-icon::before,
.voice-nav .nav-icon::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(103, 235, 255, 0.22);
  border-radius: 50%;
  opacity: 0;
}

.voice-nav .nav-icon svg {
  width: 25px;
  height: 25px;
  color: #eaffff;
  filter: drop-shadow(0 0 8px rgba(103, 235, 255, 0.58));
}

.voice-nav .voice-label {
  transform: none;
}

.voice-nav.listening {
  color: var(--cyan-soft);
}

.voice-nav.listening .nav-icon {
  border-color: rgba(117, 255, 218, 0.7);
  box-shadow:
    0 0 28px rgba(103, 235, 255, 0.48),
    0 0 48px rgba(56, 228, 154, 0.18),
    inset 0 0 22px rgba(103, 235, 255, 0.24);
  animation: voice-button-breathe 0.9s ease-in-out infinite;
}

.voice-nav.listening .nav-icon::before {
  animation: voice-button-ring 1.1s ease-out infinite;
}

.voice-nav.listening .nav-icon::after {
  animation: voice-button-ring 1.1s ease-out infinite 0.32s;
}

.voice-listening .particle-sphere-canvas {
  filter: saturate(1.22) contrast(1.1) drop-shadow(0 0 calc(12px + var(--voice-level) * 18px) rgba(103, 235, 255, 0.34));
}

.page-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(102, 232, 255, 0.2);
  border-radius: 14px;
  background: rgba(9, 30, 47, 0.82);
}

.page-title {
  margin: 8px 0 12px;
  color: var(--gold-soft);
  font-size: 22px;
}

.agent-directory-screen {
  padding-top: 0;
}

.agent-directory-hero {
  min-height: 132px;
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(102, 232, 255, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 23% 50%, rgba(24, 216, 255, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(10, 34, 52, 0.9), rgba(5, 19, 31, 0.76));
}

.agent-hero-orb {
  --voice-level: 0.58;
  --voice-hue: 196;
  --voice-scale: 1;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 0 18px rgba(24, 216, 255, 0.28));
}

.agent-hero-copy {
  min-width: 0;
}

.agent-hero-copy span,
.agent-kicker {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.agent-hero-copy h3 {
  margin: 6px 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.agent-hero-copy p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.agent-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.agent-stat-strip span {
  min-width: 0;
  min-height: 48px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  color: var(--muted);
  border: 1px solid rgba(102, 232, 255, 0.18);
  border-radius: 9px;
  background: rgba(9, 30, 47, 0.58);
  font-size: 11px;
  text-align: center;
}

.agent-stat-strip strong {
  color: var(--cyan-soft);
  font-size: 17px;
}

.agent-list {
  display: grid;
  gap: 10px;
  padding-bottom: 8px;
}

.agent-card {
  --agent-color: var(--cyan);
  width: 100%;
  min-height: 108px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.2);
  border-radius: 11px;
  background:
    radial-gradient(circle at 13% 45%, color-mix(in srgb, var(--agent-color) 26%, transparent), transparent 34%),
    rgba(9, 30, 47, 0.86);
  text-align: left;
}

.agent-card.active {
  border-color: rgba(255, 228, 165, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 18px rgba(24, 216, 255, 0.1);
}

.agent-card-orb {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--agent-color) 72%, white 10%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.86), transparent 12%),
    radial-gradient(circle, color-mix(in srgb, var(--agent-color) 72%, transparent), rgba(4, 17, 29, 0.94) 68%);
  box-shadow:
    0 0 22px color-mix(in srgb, var(--agent-color) 36%, transparent),
    inset 0 0 18px rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.agent-card-orb::before,
.agent-card-orb::after {
  content: "";
  position: absolute;
  width: 132%;
  height: 34%;
  border: 1px solid color-mix(in srgb, var(--agent-color) 52%, transparent);
  border-radius: 50%;
  transform: rotate(-13deg);
}

.agent-card-orb::after {
  width: 104%;
  transform: rotate(18deg);
  border-color: rgba(255, 228, 165, 0.38);
}

.agent-card-orb span {
  position: relative;
  z-index: 1;
  color: #effcff;
  font-size: 21px;
  font-weight: 800;
  text-shadow: 0 0 10px color-mix(in srgb, var(--agent-color) 70%, transparent);
}

.agent-card-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.agent-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.agent-desc {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.agent-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-meta-row span,
.agent-identity-row span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  color: rgba(234, 252, 255, 0.84);
  border: 1px solid rgba(102, 232, 255, 0.14);
  border-radius: 999px;
  background: rgba(2, 9, 17, 0.32);
  font-size: 10px;
  white-space: nowrap;
}

.agent-status {
  align-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--gold-soft);
  border-radius: 999px;
  background: rgba(215, 177, 106, 0.12);
  font-size: 11px;
  white-space: nowrap;
}

.agent-status.online {
  color: var(--green);
  background: rgba(56, 228, 154, 0.1);
}

.chat-screen {
  padding-top: 0;
}

.voice-only-screen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.agent-mode-screen {
  padding-bottom: 92px;
}

.agent-session-stage {
  height: 260px;
  margin-top: -2px;
  margin-bottom: 2px;
}

.agent-mode-screen .agent-session-stage {
  height: 282px;
}

.voice-mode-screen .agent-session-stage {
  height: clamp(300px, 44vh, 370px);
  margin-top: 2px;
}

.text-mode-screen .agent-session-stage {
  height: 184px;
}

.agent-session-stage .particle-sphere-canvas {
  transform: translateY(4px);
}

.text-mode-screen .agent-session-stage .particle-sphere-canvas {
  transform: translateY(-18px) scale(0.78);
}

.agent-session-stage .voice-spectrum {
  bottom: 18px;
}

.agent-voice-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 28px;
  margin: -8px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.agent-voice-summary strong {
  color: var(--gold-soft);
  font-weight: 800;
}

.agent-identity-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 10px;
}

.agent-mode-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.agent-mode-card {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.2);
  border-radius: 8px;
  background: rgba(9, 30, 47, 0.84);
  text-align: left;
}

.voice-mode-card {
  border-color: rgba(255, 228, 165, 0.36);
  background:
    radial-gradient(circle at 13% 44%, rgba(255, 218, 121, 0.16), transparent 34%),
    rgba(9, 30, 47, 0.86);
}

.text-mode-card {
  background:
    radial-gradient(circle at 13% 44%, rgba(102, 232, 255, 0.14), transparent 34%),
    rgba(9, 30, 47, 0.82);
}

.agent-mode-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--cyan-soft);
  border: 1px solid rgba(102, 232, 255, 0.22);
  border-radius: 50%;
  background: rgba(2, 9, 17, 0.46);
}

.voice-mode-card .agent-mode-icon {
  color: var(--gold-soft);
  border-color: rgba(255, 228, 165, 0.34);
}

.agent-mode-icon svg {
  width: 25px;
  height: 25px;
}

.agent-mode-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.agent-mode-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.agent-mode-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.voice-mode-panel {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(102, 232, 255, 0.16);
  border-radius: 8px;
  background: rgba(2, 9, 17, 0.36);
}

.voice-agent-label {
  color: var(--muted);
  font-size: 11px;
}

.voice-mode-panel strong {
  color: var(--ink);
  font-size: 17px;
}

.voice-mode-panel .voice-status {
  width: 100%;
  justify-content: center;
}

.chat-panel {
  display: grid;
  gap: 10px;
  padding-bottom: 92px;
}

.voice-status {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--gold-soft);
  border: 1px solid rgba(215, 177, 106, 0.22);
  border-radius: 999px;
  background: rgba(2, 9, 17, 0.36);
  font-size: 12px;
}

.agent-archive-sheet {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 228, 165, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(215, 177, 106, 0.12), rgba(9, 30, 47, 0.84)),
    rgba(9, 30, 47, 0.86);
}

.agent-archive-sheet h3 {
  color: var(--gold-soft);
  font-size: 15px;
}

.archive-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.archive-metrics span {
  min-width: 0;
  min-height: 48px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px solid rgba(102, 232, 255, 0.16);
  border-radius: 9px;
  background: rgba(2, 9, 17, 0.34);
}

.archive-metrics strong {
  color: var(--cyan-soft);
  font-size: 14px;
}

.archive-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.chat-list {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.bubble {
  max-width: 86%;
  padding: 12px;
  border: 1px solid rgba(102, 232, 255, 0.18);
  border-radius: 12px;
  background: rgba(9, 30, 47, 0.86);
  color: var(--ink);
  line-height: 1.5;
  font-size: 13px;
}

.bubble.user {
  justify-self: end;
  background: rgba(24, 216, 255, 0.16);
}

.quick-question-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 0;
}

.quick-question {
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.22);
  border-radius: 9px;
  background: rgba(10, 34, 52, 0.78);
  font-size: 12px;
  line-height: 1.15;
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(102, 232, 255, 0.14);
  border-radius: 16px;
  background: rgba(2, 9, 17, 0.46);
}

.chat-input input {
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.24);
  border-radius: 999px;
  background: rgba(2, 9, 17, 0.84);
}

.chat-send {
  min-height: 40px;
  border-radius: 999px;
  font-size: 12px;
}

.primary {
  min-height: 42px;
  color: #06111d;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  font-weight: 700;
}

.map-screen {
  padding-bottom: 20px;
}

.map-summary {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
  margin: 2px 0 10px;
}

.map-summary .page-title {
  margin: 0 0 4px;
  font-size: 21px;
  line-height: 1.15;
}

.map-summary p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.map-reset {
  min-width: 52px;
  min-height: 32px;
  color: var(--gold-soft);
  border: 1px solid rgba(215, 177, 106, 0.4);
  border-radius: 9px;
  background: rgba(215, 177, 106, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.culture-filter-row {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.culture-filter-row button {
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  color: var(--muted);
  border: 1px solid rgba(102, 232, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 27, 43, 0.76);
  font-size: 11px;
  font-weight: 700;
}

.culture-filter-row button.active {
  color: #04111b;
  border-color: rgba(191, 247, 255, 0.82);
  background: linear-gradient(135deg, var(--cyan-soft), #ffe2a3);
  box-shadow: 0 0 20px rgba(103, 235, 255, 0.2);
}

.culture-graph-card {
  position: relative;
  z-index: 1;
  height: clamp(372px, 50vh, 456px);
  min-height: 372px;
  margin: 4px -2px 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.culture-graph-card::before {
  content: "";
  position: absolute;
  inset: 0 -18px -26px;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(103, 235, 255, 0.14), rgba(103, 235, 255, 0.045) 36%, transparent 65%),
    radial-gradient(circle at 24% 22%, rgba(215, 177, 106, 0.12), transparent 26%),
    linear-gradient(90deg, transparent 0 24%, rgba(103, 235, 255, 0.045) 25%, transparent 26% 49%, rgba(103, 235, 255, 0.035) 50%, transparent 51% 74%, rgba(103, 235, 255, 0.04) 75%, transparent 76%),
    linear-gradient(0deg, transparent 0 24%, rgba(103, 235, 255, 0.04) 25%, transparent 26% 49%, rgba(103, 235, 255, 0.035) 50%, transparent 51% 74%, rgba(103, 235, 255, 0.04) 75%, transparent 76%);
  opacity: 0.48;
  pointer-events: none;
}

.culture-graph-card::after {
  display: none;
}

.culture-graph {
  position: absolute;
  inset: 0 -24px -32px;
  z-index: 1;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0 58%, rgba(0, 0, 0, 0.88) 68%, rgba(0, 0, 0, 0.34) 82%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 0 58%, rgba(0, 0, 0, 0.88) 68%, rgba(0, 0, 0, 0.34) 82%, transparent 100%);
}

.culture-graph canvas {
  touch-action: none;
}

.culture-graph-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  min-width: 46px;
  padding: 5px 8px;
  color: var(--cyan-soft);
  border: 1px solid rgba(103, 235, 255, 0.28);
  border-radius: 999px;
  background: rgba(2, 10, 18, 0.66);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.culture-detail {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  border-radius: 12px;
}

.culture-detail-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
}

.culture-level {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #05111c;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-soft), var(--cyan-soft));
  font-size: 14px;
  font-weight: 900;
}

.culture-detail h3 {
  color: var(--gold-soft);
  font-size: 17px;
  line-height: 1.2;
}

.culture-detail-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.culture-summary {
  color: rgba(229, 247, 255, 0.9);
  font-size: 13px;
  line-height: 1.55;
}

.culture-tags,
.culture-sources,
.culture-related {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.culture-tags span,
.culture-sources a,
.culture-related button {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
}

.culture-tags span {
  color: var(--gold-soft);
  border: 1px solid rgba(215, 177, 106, 0.26);
  background: rgba(215, 177, 106, 0.08);
}

.culture-sources a {
  color: var(--cyan-soft);
  border: 1px solid rgba(103, 235, 255, 0.22);
  background: rgba(103, 235, 255, 0.08);
}

.culture-related button {
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.2);
  background: rgba(10, 34, 52, 0.78);
}

.graph-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

body.culture-map-embed {
  overflow: hidden;
  background: transparent;
}

body.culture-map-embed .ambient {
  display: none;
}

body.culture-map-embed .public-board {
  min-height: 100vh;
}

.embedded-culture-map {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 52% 35%, rgba(24, 216, 255, 0.16), transparent 32%),
    radial-gradient(circle at 18% 78%, rgba(215, 177, 106, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(5, 18, 30, 0.92), rgba(2, 8, 15, 0.96));
}

.embedded-culture-map .embedded-map-screen {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  padding: 13px 14px 12px;
}

.embedded-culture-map .map-summary {
  align-items: center;
  margin: 0;
}

.embedded-culture-map .map-summary .page-title {
  color: var(--gold-soft);
  font-size: 19px;
}

.embedded-culture-map .map-summary p {
  font-size: 11px;
}

.embedded-culture-map .map-reset {
  min-height: 30px;
  border-radius: 7px;
}

.embedded-culture-map .culture-filter-row {
  grid-template-columns: repeat(5, minmax(0, 118px));
  justify-content: start;
  margin: 0;
}

.embedded-culture-map .culture-filter-row button {
  min-height: 28px;
  border-radius: 7px;
}

.embedded-culture-map .culture-graph-card {
  height: auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.embedded-culture-map .culture-graph-card::before {
  inset: -4px -18px -18px;
  opacity: 0.62;
}

.embedded-culture-map .culture-graph {
  inset: 0;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0 70%, rgba(0, 0, 0, 0.9) 82%, rgba(0, 0, 0, 0.36) 94%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 0 70%, rgba(0, 0, 0, 0.9) 82%, rgba(0, 0, 0, 0.36) 94%, transparent 100%);
}

.embedded-culture-map .culture-graph-badge {
  top: 8px;
  right: 8px;
}

.embedded-culture-map .culture-detail {
  min-height: 104px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 8px 14px;
  align-items: start;
  margin-top: 0;
  padding: 10px;
  border-radius: 8px;
}

.embedded-culture-map .culture-detail-head {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.embedded-culture-map .culture-detail h3 {
  font-size: 15px;
}

.embedded-culture-map .culture-summary,
.embedded-culture-map .culture-tags,
.embedded-culture-map .culture-sources,
.embedded-culture-map .culture-related {
  grid-column: 2;
}

.embedded-culture-map .culture-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12px;
  line-height: 1.45;
}

.embedded-culture-map .culture-tags span,
.embedded-culture-map .culture-sources a,
.embedded-culture-map .culture-related button {
  min-height: 23px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 10px;
}

.profile-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  border: 1px solid rgba(215, 177, 106, 0.5);
  border-radius: 50%;
  background: rgba(215, 177, 106, 0.12);
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 28px));
  padding: 10px 14px;
  color: var(--ink);
  border: 1px solid rgba(102, 232, 255, 0.28);
  border-radius: 10px;
  background: rgba(3, 12, 22, 0.94);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

@keyframes ai-breathe {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1.24) saturate(1.1) contrast(1.04) drop-shadow(0 0 0 rgba(24, 216, 255, 0));
  }

  50% {
    transform: scale(1.014);
    filter: brightness(1.34) saturate(1.16) contrast(1.06) drop-shadow(0 0 16px rgba(24, 216, 255, 0.2));
  }
}

@keyframes brand-scan {
  0%,
  100% {
    opacity: 0.45;
    transform: scaleX(0.82);
  }

  50% {
    opacity: 1;
    transform: scaleX(1.05);
  }
}

@keyframes brand-scanline {
  0%,
  100% {
    opacity: 0.42;
    transform: scaleX(0.72);
  }

  50% {
    opacity: 0.95;
    transform: scaleX(1.05);
  }
}

@keyframes star-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-24px, 12px, 0);
  }
}

@keyframes orbit-spin {
  0% {
    transform: translateX(-50%) rotateX(62deg) rotateZ(0deg);
  }

  100% {
    transform: translateX(-50%) rotateX(62deg) rotateZ(360deg);
  }
}

@keyframes grid-ripple {
  0%,
  100% {
    transform: translateX(-50%) scaleX(0.96);
    opacity: 0.54;
  }

  50% {
    transform: translateX(-50%) scaleX(calc(1.04 * var(--voice-scale)));
    opacity: 0.88;
  }
}

@keyframes voice-wave {
  0%,
  100% {
    transform: translateX(-50%) scaleX(0.92) scaleY(0.82);
  }

  50% {
    transform: translateX(-50%) scaleX(calc(1.02 * var(--voice-scale))) scaleY(calc(0.88 + var(--voice-level) * 0.26));
  }
}

@keyframes fluid-orb-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(calc(0.98 + var(--voice-level) * 0.035));
  }

  50% {
    transform: translateX(-50%) translateY(-4px) scale(calc(1 + var(--voice-level) * 0.055));
  }
}

@keyframes orb-svg-pulse {
  0%,
  100% {
    transform: scale(0.98);
  }

  50% {
    transform: scale(calc(1 + var(--voice-level) * 0.08));
  }
}

@keyframes orb-flow-drift {
  0%,
  100% {
    transform: translate3d(-2px, 1px, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(5px, -4px, 0) rotate(2deg);
  }
}

@keyframes wave-line {
  0%,
  100% {
    opacity: 0.16;
    transform: scaleX(0.94) translateY(1px);
  }

  50% {
    opacity: calc(0.3 + var(--voice-level) * 0.22);
    transform: scaleX(calc(1 + var(--voice-level) * 0.1)) translateY(-2px);
  }
}

@keyframes spark-pulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.22);
  }
}

@keyframes spectrum-rise {
  0%,
  100% {
    transform: scaleY(calc(0.62 + var(--voice-level) * 0.32));
    opacity: 0.42;
  }

  50% {
    transform: scaleY(calc(0.92 + var(--voice-level) * 0.62));
    opacity: 1;
  }
}

@keyframes sphere-breathe {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow:
      inset 0 0 22px rgba(255, 255, 255, 0.32),
      inset 0 -26px 48px rgba(1, 43, 82, 0.52),
      0 0 26px rgba(103, 235, 255, 0.78),
      0 0 74px rgba(24, 216, 255, 0.4);
  }

  50% {
    transform: translateX(-50%) scale(1.035);
    box-shadow:
      inset 0 0 26px rgba(255, 255, 255, 0.38),
      inset 0 -28px 52px rgba(1, 43, 82, 0.58),
      0 0 34px rgba(103, 235, 255, 0.92),
      0 0 96px rgba(24, 216, 255, 0.52);
  }
}

@keyframes liquid-orb-morph {
  0%,
  100% {
    transform: translateX(-50%) scale(calc(0.98 + var(--voice-level) * 0.04));
    border-radius: 48% 52% 50% 50% / 54% 46% 52% 48%;
  }

  25% {
    border-radius: 53% 47% 45% 55% / 45% 55% 48% 52%;
  }

  50% {
    transform: translateX(-50%) scale(calc(1 + var(--voice-level) * 0.08));
    border-radius: 43% 57% 54% 46% / 56% 44% 58% 42%;
  }

  75% {
    border-radius: 56% 44% 50% 50% / 48% 52% 42% 58%;
  }
}

@keyframes liquid-inner {
  0%,
  100% {
    transform: rotate(0deg) scale(0.96);
  }

  50% {
    transform: rotate(18deg) scale(calc(1 + var(--voice-level) * 0.12));
  }
}

@keyframes liquid-drift {
  0%,
  100% {
    transform: translate3d(-6px, 4px, 0) scale(1);
  }

  50% {
    transform: translate3d(7px, -8px, 0) scale(calc(1.04 + var(--voice-level) * 0.08));
  }
}

@keyframes liquid-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  100% {
    transform: rotate(360deg) scale(1.08);
  }
}

@keyframes liquid-grid {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

@keyframes highlight-breathe {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(calc(1 + var(--voice-level) * 0.12));
  }
}

@keyframes globe-drift {
  0% {
    transform: rotate(0deg) scale(1);
  }

  100% {
    transform: rotate(360deg) scale(1.04);
  }
}

@keyframes floor-pulse {
  0%,
  100% {
    opacity: 0.65;
    transform: translateX(-50%) scaleX(1);
  }

  50% {
    opacity: 0.95;
    transform: translateX(-50%) scaleX(1.15);
  }
}

@keyframes icon-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes nav-pulse {
  0%,
  100% {
    filter: brightness(1.08) saturate(1.12) drop-shadow(0 0 5px rgba(103, 235, 255, 0.34));
  }

  50% {
    filter: brightness(1.28) saturate(1.2) drop-shadow(0 0 12px rgba(103, 235, 255, 0.5));
  }
}

@keyframes voice-button-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

@keyframes voice-button-ring {
  0% {
    opacity: 0.5;
    transform: scale(0.82);
  }

  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@media (hover: hover) {
  .home-screen .entry:hover,
  .learning-card:hover,
  .resource-card:hover {
    border-color: rgba(103, 235, 255, 0.44);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 18px rgba(24, 216, 255, 0.12);
    transform: translateY(-1px);
  }
}

@media (max-width: 520px) {
  .page {
    padding: 0;
  }

  .phone-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .phone-shell::before {
    display: none;
  }
}
