:root {
  --green-900: #113d2b;
  --green-700: #1f8a55;
  --green-600: #24a05f;
  --green-100: #e8f6ee;
  --blue-700: #2166d5;
  --blue-100: #eaf2ff;
  --ink: #14211b;
  --muted: #66756d;
  --line: #dbe6df;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-soft: rgba(246, 250, 248, 0.45);
  --danger: #c63f3f;
  --danger-soft: #fff0f0;
  --shadow: 0 18px 48px rgba(17, 61, 43, 0.12);
  --radius: 8px;
  --max: 1120px;
  --app-header-height: 68px;
  --mobile-nav-height: 76px;
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #ffffff;
  color: var(--ink);
}

body,
button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

.site-header,
.site-footer,
.section-shell {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand.compact {
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(31, 138, 85, 0.16);
  box-shadow: 0 8px 20px rgba(31, 138, 85, 0.22);
}

.brand-mark img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--green-900);
  font-weight: 700;
  white-space: nowrap;
}

.home-hero {
  min-height: calc(100svh - 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 40px;
  padding: 36px 0 56px;
}

.eyebrow {
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy {
  --hero-copy-width: 815px;
  max-width: var(--hero-copy-width);
}

.maintenance-banner {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(167, 72, 25, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 246, 235, 0.98), rgba(255, 238, 214, 0.94));
  color: #8c3d12;
}

.maintenance-banner strong {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.maintenance-banner span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.hero-brand-lockup {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: clamp(118px, 9.2vw, 136px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 1.6vw, 22px);
  margin-top: 12px;
  padding: 18px 0 20px;
}

.hero-brand-logo {
  width: 100%;
  height: auto;
  display: block;
}

.hero-brand-text {
  min-width: 0;
  width: 100%;
}

.hero-brand-text h1 {
  margin: 0;
  color: var(--green-900);
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(27px, 2.18vw, 35px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.068em;
  white-space: nowrap;
}

.hero-brand-text p {
  margin: 9px 0 0;
  color: var(--green-700);
  font-family: "Arial Narrow", "Roboto Condensed", "Noto Sans", sans-serif;
  font-size: clamp(12px, 0.92vw, 13.5px);
  font-weight: 900;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-seo-summary {
  max-width: 100%;
  margin: 14px 0 0;
  color: #45665a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.75;
}

.hero-kicker {
  margin-top: 14px;
  color: var(--green-900);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
}

.hero-value-list {
  max-width: 100%;
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.hero-value-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 138, 85, 0.16);
  border-radius: var(--radius);
  background: rgba(246, 250, 248, 0.96);
}

.hero-value-item strong {
  color: var(--green-900);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.hero-value-item p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.2;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:active,
.icon-button:active,
.nav-item:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--green-700);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-600);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--green-900);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(198, 63, 63, 0.22);
}

.btn-large {
  min-height: 52px;
  padding-inline: 24px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-row span,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 13px;
  font-weight: 800;
}

.phone-preview {
  width: min(100%, 370px);
  justify-self: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(243,250,246,0.5) 100%);
  box-shadow: var(--shadow);
}

.preview-top {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue-700);
}

.preview-card,
.preview-answer {
  margin-top: 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.preview-card {
  padding: 18px;
}

.preview-card p {
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 800;
  color: var(--green-900);
}

.preview-answer {
  display: flex;
  gap: 12px;
  padding: 16px;
}

.answer-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 900;
}

.preview-answer p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 24px 0 58px;
}

.feature-tile {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tile-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-100);
  color: var(--green-700);
  font-weight: 900;
}

.tile-icon.blue {
  background: var(--blue-100);
  color: var(--blue-700);
}

.feature-tile h2 {
  margin-top: 16px;
  font-size: 19px;
  color: var(--green-900);
}

.feature-tile p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.agent-section {
  padding: 38px 0 64px;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-top: 8px;
  color: var(--green-900);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
}

.section-heading p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.agent-card {
  min-width: 0;
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(31, 138, 85, 0.18);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(17, 61, 43, 0.06);
}

.agent-card::before,
.agent-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.agent-card::before {
  top: -24px;
  right: -26px;
  z-index: 1;
  width: 128px;
  height: 118px;
  background:
    radial-gradient(circle at 45% 48%, rgba(232, 246, 238, 0.82), transparent 62%);
  border-radius: 42% 0 0 58%;
}

.agent-card::after {
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  box-shadow: inset 0 -10px 18px rgba(232, 246, 238, 0.5);
}

.agent-card img {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  filter: saturate(1.05) contrast(1.04) drop-shadow(0 8px 14px rgba(31, 138, 85, 0.08));
  mix-blend-mode: multiply;
}

.agent-body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
}

.agent-code {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 900;
}

.agent-body h3 {
  padding-right: 56px;
  color: var(--green-900);
  font-size: 24px;
  line-height: 1;
}

.agent-body p {
  min-height: 58px;
  padding-right: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.agent-cases {
  display: grid;
  gap: 8px;
}

.app-maintenance-banner {
  margin: 0 0 14px;
}

.agent-cases a {
  min-width: 0;
  min-height: 64px;
  display: grid;
  gap: 7px;
  align-content: center;
  padding: 10px;
  border: 1px solid rgba(31, 138, 85, 0.16);
  border-radius: var(--radius);
  background: rgba(232, 246, 238, 0.62);
  color: var(--green-900);
  line-height: 1.35;
}

.agent-cases a:hover {
  border-color: rgba(33, 102, 213, 0.35);
  background: var(--surface);
  color: var(--blue-700);
}

.case-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 900;
}

.case-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.case-meta span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.case-meta .case-badge {
  color: var(--green-900);
  background: rgba(31, 138, 85, 0.12);
}

.case-meta .case-badge.is-multimodal {
  color: var(--blue-700);
  background: rgba(33, 102, 213, 0.12);
}

.agent-card-cta {
  min-height: 76px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(33, 102, 213, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 18%, rgba(33, 102, 213, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(232, 246, 238, 0.85), rgba(236, 246, 255, 0.86));
  color: var(--green-900);
}

.agent-card-cta span {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 950;
}

.agent-card-cta strong {
  font-size: 15px;
  line-height: 1.35;
}

.agent-card-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 138, 85, 0.36);
  background: var(--surface);
  color: var(--green-900);
}

.agent-detail-page {
  padding: 24px 0 68px;
  background:
    radial-gradient(circle at 12% 6%, rgba(31, 138, 85, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(33, 102, 213, 0.12), transparent 30%),
    linear-gradient(180deg, #f6fbf8 0%, #eef7f2 48%, #f7faf8 100%);
}

.agent-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  align-items: stretch;
}

.agent-detail-copy,
.agent-detail-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(31, 138, 85, 0.16);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(18, 53, 42, 0.1);
}

.agent-detail-copy {
  padding: clamp(24px, 4vw, 42px);
}

.agent-detail-copy::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 138, 85, 0.16), transparent 68%);
  pointer-events: none;
}

.agent-detail-copy h1 {
  max-width: 820px;
  margin: 8px 0 14px;
  color: var(--green-900);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.agent-detail-copy p {
  max-width: 760px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

.agent-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.agent-detail-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 32%, rgba(84, 171, 62, 0.24), transparent 34%),
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.96), transparent 32%),
    linear-gradient(145deg, rgba(248, 254, 249, 0.96), rgba(230, 244, 234, 0.9));
  color: var(--green-900);
  min-height: 320px;
}

.agent-detail-panel::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(67, 144, 49, 0.16);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 74% 28%, rgba(33, 102, 213, 0.08), transparent 32%);
  pointer-events: none;
}

.agent-detail-panel > * {
  position: relative;
  z-index: 1;
}

.agent-detail-emblem {
  width: min(248px, 82%);
  aspect-ratio: 1;
  place-self: center;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 62%, #edf8ef 63% 100%);
  box-shadow:
    0 22px 52px rgba(42, 106, 47, 0.16),
    0 0 0 1px rgba(31, 138, 85, 0.1);
}

.agent-detail-emblem::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 24px solid rgba(248, 254, 249, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(31, 138, 85, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.88);
  pointer-events: none;
}

.agent-detail-emblem img {
  width: 118%;
  height: 118%;
  display: block;
  object-fit: cover;
  filter: saturate(1.28) contrast(1.06) brightness(1.08);
}

.agent-detail-panel-copy {
  display: grid;
  gap: 12px;
  padding: 22px 24px 24px;
  border: 1px solid rgba(31, 138, 85, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 34px rgba(18, 53, 42, 0.08);
  backdrop-filter: blur(8px);
}

.agent-detail-panel span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 138, 85, 0.12);
  color: var(--green-900);
  font-size: 12px;
  font-weight: 950;
}

.agent-detail-panel strong {
  display: block;
  color: var(--green-900);
  font-size: 22px;
  line-height: 1.22;
}

.agent-detail-panel p {
  margin: 0;
  color: var(--text);
  line-height: 1.78;
}

.guanbian-case-section {
  margin-top: 18px;
}

.guanbian-case-group {
  display: grid;
  gap: 16px;
}

.guanbian-case-group + .guanbian-case-group {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid rgba(31, 138, 85, 0.14);
}

.case-group-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 860px;
  padding: 16px 18px;
  border: 1px solid rgba(31, 138, 85, 0.12);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(135deg, rgba(239, 249, 241, 0.95), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 10% 0%, rgba(255, 193, 84, 0.16), transparent 34%);
}

.case-group-heading > span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--green-900);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.case-group-heading h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 22px;
}

.case-group-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading.compact {
  max-width: 760px;
  margin-bottom: 18px;
}

.guanbian-case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.guanbian-case-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(31, 138, 85, 0.14);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(18, 53, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.guanbian-case-card:hover {
  transform: translateY(-3px);
  border-color: rgba(33, 102, 213, 0.28);
  box-shadow: 0 24px 62px rgba(18, 53, 42, 0.13);
}

.guanbian-case-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: #eaf4ee;
}

.guanbian-case-body {
  display: grid;
  gap: 10px;
  flex: 1;
  padding: 14px;
}

.case-index {
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.guanbian-case-body h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 18px;
  line-height: 1.25;
}

.guanbian-case-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.case-load-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 999px;
  background: var(--green-600);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.case-load-link:hover {
  background: var(--blue-700);
  color: #fff;
}

.partner-section {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  padding: 34px 0 54px;
  border-top: 1px solid var(--line);
}

.partner-section h2 {
  margin-top: 8px;
  color: var(--green-900);
  font-size: clamp(24px, 4vw, 34px);
}

.partner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.partner-links a {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(31, 138, 85, 0.18);
  border-radius: var(--radius);
  background: rgba(236, 247, 241, 0.72);
  color: var(--green-900);
}

.partner-links a:hover {
  border-color: rgba(31, 138, 85, 0.42);
  background: var(--surface);
}

.partner-links span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.auth-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 0.58fr);
  gap: 28px;
  align-items: start;
  padding: 48px 0 74px;
  border-top: 1px solid var(--line);
}

.auth-copy h2,
.view-heading h1 {
  margin-top: 8px;
  color: var(--green-900);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.08;
}

.auth-copy p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(17, 61, 43, 0.08);
}

.field {
  display: grid;
  gap: 8px;
  color: var(--green-900);
  font-size: 14px;
  font-weight: 800;
}

.field + .field,
.code-row,
.checkline,
.auth-card .btn-full {
  margin-top: 14px;
}

.field input,
.composer textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.field input {
  padding: 0 14px;
}

.field input:focus,
.composer textarea:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(33, 102, 213, 0.12);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.code-button {
  width: 100%;
}

.checkline {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.checkline input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--green-700);
}

.form-status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-status.is-error {
  color: var(--danger);
}

.form-status.is-success {
  color: var(--green-700);
}

.site-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.app-shell {
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--surface-soft);
  overflow: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: var(--app-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.user-pill {
  max-width: 46vw;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  width: min(100%, 960px);
  min-width: 0;
  height: calc(100vh - var(--app-header-height) - var(--mobile-nav-height));
  height: calc(100svh - var(--app-header-height) - var(--mobile-nav-height));
  height: calc(100dvh - var(--app-header-height) - var(--mobile-nav-height));
  overflow: hidden;
  margin: 0 auto;
  padding: 12px;
}

.view {
  display: none;
}

.view.is-active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 8px;
}

#view-chat.is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.icon-button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--green-900);
  font-weight: 900;
  font-size: 22px;
}

.icon-button.subtle {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 24px;
}

.chat-panel {
  flex: 1 1 0;
  min-height: 0;
  width: min(100%, 1080px);
  margin-inline: auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 10px;
  scroll-padding-bottom: 10px;
}

.case-package {
  width: min(100%, 980px);
  margin: 0 auto 8px;
  padding: 16px;
  border: 1px solid rgba(31, 138, 85, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(243, 250, 246, 0.45) 100%);
  box-shadow: 0 18px 44px rgba(19, 72, 47, 0.08);
}

.case-package-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.case-package-kicker {
  margin-bottom: 6px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 900;
}

.case-package h3 {
  margin: 0;
  color: var(--green-900);
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.2;
}

.case-package-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.case-package-meta span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(31, 138, 85, 0.14);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.case-package-meta .is-mode {
  color: var(--blue-700);
  border-color: rgba(33, 102, 213, 0.18);
  background: rgba(236, 246, 255, 0.9);
}

.case-package-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.case-package-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(31, 138, 85, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.case-package-section strong {
  display: block;
  margin-bottom: 7px;
  color: var(--green-900);
  font-size: 13px;
}

.case-package-section p,
.case-package-section li {
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.case-package-section ul {
  margin: 0;
  padding-left: 18px;
}

.case-package-section li + li {
  margin-top: 5px;
}

.case-package-assets {
  display: grid;
  gap: 10px;
}

.case-asset {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.case-asset img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.case-asset figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.case-package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.case-package-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(31, 138, 85, 0.2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--green-900);
  font-weight: 900;
}

.case-package-actions .primary {
  border-color: rgba(31, 138, 85, 0.38);
  background: var(--green-600);
  color: #fff;
}

.message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}

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

.message.user .avatar {
  display: none;
}

.avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(31, 138, 85, 0.16);
  font-weight: 900;
}

.avatar img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.bubble {
  max-width: min(86vw, 860px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.message.assistant .bubble {
  width: min(100%, 860px);
}

.message.user .bubble {
  max-width: min(78vw, 680px);
}

.message.user .bubble {
  border-color: rgba(31, 138, 85, 0.24);
  background: rgba(232, 246, 238, 0.78);
  color: var(--green-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.bubble p + p {
  margin-top: 8px;
}

.bubble.markdown {
  font-size: 15.5px;
}

.bubble.markdown h2,
.bubble.markdown h3,
.bubble.markdown h4 {
  margin: 12px 0 6px;
  color: var(--green-900);
  line-height: 1.28;
}

.bubble.markdown h2 {
  font-size: 20px;
}

.bubble.markdown h3 {
  font-size: 17px;
}

.bubble.markdown h4 {
  font-size: 16px;
}

.bubble.markdown ul,
.bubble.markdown ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

.bubble.markdown li + li {
  margin-top: 6px;
}

.bubble.markdown hr {
  height: 1px;
  margin: 14px 0;
  border: 0;
  background: var(--line);
}

.bubble.markdown code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--green-900);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.bubble.markdown pre {
  margin: 10px 0 0;
  padding: 12px;
  overflow-x: auto;
  border-radius: var(--radius);
  background: #10231a;
  color: #e9fff3;
}

.bubble.markdown pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.bubble.markdown .table-wrap {
  width: 100%;
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bubble.markdown table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
}

.bubble.markdown th,
.bubble.markdown td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.bubble.markdown .source-ref {
  color: var(--blue-700);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bubble.markdown .source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.bubble.markdown .source-chip {
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-700);
  background: #f8fbff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubble.markdown .source-chip:hover {
  border-color: rgba(35, 119, 210, 0.35);
  background: #eef6ff;
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.copy-message,
.regenerate-message {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.copy-message:hover,
.regenerate-message:hover {
  color: var(--blue-700);
  border-color: rgba(33, 102, 213, 0.26);
  background: #f8fbff;
}

.copy-message:disabled,
.regenerate-message:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.bubble.markdown th:last-child,
.bubble.markdown td:last-child {
  border-right: 0;
}

.bubble.markdown th {
  background: var(--surface-soft);
  color: var(--green-900);
  font-weight: 800;
  white-space: nowrap;
}

.bubble.markdown tbody tr:last-child td {
  border-bottom: 0;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.attachment-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: min(300px, 100%);
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid rgba(33, 128, 205, 0.24);
  border-radius: 8px;
  background: #eaf5ff;
  color: #1464b3;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.attachment-card:hover {
  border-color: rgba(33, 128, 205, 0.42);
  background: #dff0ff;
}

.attachment-card.is-disabled {
  pointer-events: none;
  opacity: 0.78;
}

.attachment-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #1b83d8;
  font-size: 22px;
  line-height: 1;
}

.attachment-name {
  min-width: 0;
  overflow: hidden;
  color: #1168bd;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-card span:nth-child(3) {
  display: none;
}

.attachment-card strong {
  min-width: 42px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #1f86df;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.message.user .attachment-list {
  justify-items: end;
}

.message.user .attachment-card {
  background: #e7f4ff;
}

.bubble img {
  width: min(260px, 68vw);
  margin-top: 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.composer {
  position: relative;
  z-index: 4;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  flex-shrink: 0;
}

.composer .form-status {
  min-height: 0;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  width: fit-content;
  transition: opacity 0.3s ease;
}

.composer .form-status:empty {
  display: none;
}

.composer .form-status:not(:empty) {
  background: var(--surface-soft);
}

.composer .form-status.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.composer .form-status.is-success {
  background: var(--green-100);
  color: var(--green-700);
}

.composer textarea {
  min-height: 44px;
  max-height: 104px;
  resize: none;
  padding: 10px 12px;
  line-height: 1.45;
}

.composer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-input {
  flex: 1 1 auto;
  min-width: min(220px, 100%);
}

.attach-wrap {
  position: relative;
  flex: 0 0 auto;
}

.attach-button {
  border-radius: 999px;
  background: var(--surface-soft);
}

.composer-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-toggle {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tool-toggle:hover {
  border-color: rgba(33, 102, 213, 0.26);
  color: var(--green-900);
}

.tool-toggle.is-active {
  border-color: rgba(31, 138, 85, 0.34);
  background: var(--green-100);
  color: var(--green-900);
  box-shadow: inset 0 0 0 1px rgba(31, 138, 85, 0.08);
}

.attach-menu {
  position: absolute;
  right: auto;
  bottom: calc(100% + 10px);
  left: 0;
  width: min(280px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(17, 61, 43, 0.16);
}

.attach-menu.is-hidden {
  display: none;
}

.attach-option {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 9px 10px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--green-900);
  cursor: pointer;
}

.attach-option:hover {
  background: var(--green-100);
}

.attach-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attach-option span {
  font-weight: 900;
}

.attach-option small {
  color: var(--muted);
  font-size: 12px;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.send-button {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 44px;
  padding-inline: 14px;
}

.upload-preview {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.upload-preview.is-hidden {
  display: none;
}

.upload-preview img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.upload-preview.is-text-file img {
  display: none;
}

.upload-preview.is-text-file {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.upload-preview strong,
.upload-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview strong {
  color: var(--green-900);
  font-size: 14px;
}

.upload-preview span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-card,
.empty-state,
.profile-panel,
.profile-actions {
  border: none;
  border-radius: var(--glass-radius);
  background: var(--surface-soft);
  box-shadow: none;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.history-card button {
  justify-self: end;
}

.history-main {
  min-width: 0;
  display: block;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.history-title {
  color: var(--green-900);
  font-weight: 900;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.history-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.history-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.profile-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.profile-avatar {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 24px;
  font-weight: 900;
}

.profile-panel h2 {
  color: var(--green-900);
  font-size: 22px;
}

.profile-panel p {
  margin-top: 4px;
  color: var(--muted);
}

.profile-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 18px;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.nav-item {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.nav-item span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}

.nav-item strong {
  font-size: 12px;
}

.nav-item.is-active {
  background: var(--green-100);
  color: var(--green-900);
  position: relative;
}

.nav-item.is-active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green-700);
  box-shadow: 0 0 6px rgba(31, 138, 85, 0.5);
}

.nav-item.is-active span {
  background: var(--green-700);
  color: #fff;
}

.nav-new-chat {
  border: 1px solid rgba(31, 138, 85, 0.26);
  background: var(--green-600);
  color: #fff;
}

.nav-new-chat:hover {
  background: var(--green-700);
}

@media (min-width: 760px) {
  :root {
    --mobile-nav-height: 0px;
  }

  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .app-header {
    grid-column: 1 / -1;
    padding-inline: 24px;
  }

  .app-main {
    grid-column: 2;
    height: calc(100svh - var(--app-header-height));
    overflow: hidden;
    padding: 28px 28px 42px;
  }

  .bottom-nav {
    position: sticky;
    top: 69px;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 69px);
    padding: 18px;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
  }

  .nav-new-chat {
    margin-bottom: 8px;
    justify-content: flex-start;
  }

  .nav-item {
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 12px;
  }

  .nav-item strong {
    justify-self: start;
    font-size: 14px;
  }

  .composer {
    max-width: 984px;
  }
}

@media (min-width: 1180px) {
  .app-main {
    width: min(100%, 1040px);
  }
}

@media (max-width: 1040px) {
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-detail-hero,
  .guanbian-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --app-header-height: 48px;
    --mobile-nav-height: 56px;
  }

  html, body {
    height: 100%;
    overflow: hidden;
  }

  body[data-page="home"],
  body[data-page="guanbian-agent"] {
    overflow: auto;
    position: static;
  }

  body[data-page="app"] {
    position: fixed;
    width: 100%;
  }

  .app-shell {
    height: 100vh;
    height: 100dvh;
    grid-template-rows: var(--app-header-height) minmax(0, 1fr) var(--mobile-nav-height);
    overflow: hidden;
  }

  .agent-detail-page {
    padding-top: 14px;
  }

  .agent-detail-hero,
  .guanbian-case-grid {
    grid-template-columns: 1fr;
  }

  .agent-detail-panel {
    min-height: 260px;
  }

  .case-group-heading {
    padding: 14px;
  }

  .case-group-heading h3 {
    font-size: 19px;
  }

  .app-header {
    min-height: var(--app-header-height);
    max-height: var(--app-header-height);
    padding: 6px 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand small {
    display: none;
  }

  .user-pill {
    font-size: 11px;
    min-height: 28px;
    padding: 0 8px;
  }

  .bottom-nav {
    position: relative;
    min-height: var(--mobile-nav-height);
    max-height: var(--mobile-nav-height);
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
    gap: 4px;
  }

  .nav-item {
    min-height: 40px;
  }

  .nav-item strong {
    font-size: 11px;
  }

  .app-main {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  .view.is-active {
    flex: 1 1 0;
    min-height: 0;
    padding: 12px 10px;
    padding-bottom: 12px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .view-heading {
    margin-bottom: 8px;
  }

  .view-heading h1 {
    font-size: 22px;
  }

  #view-chat.is-active {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }

  #view-chat .view-heading {
    display: none;
  }

  .chat-panel {
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    padding: 10px 10px 8px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .composer {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    max-height: none;
    padding: 8px 10px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid var(--line);
    overflow: visible;
    flex-shrink: 0;
  }

  .composer-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .composer-tools {
    order: -1;
    width: 100%;
    gap: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
  }

  .composer textarea {
    min-height: 36px;
    max-height: 80px;
    padding: 8px 10px;
    font-size: 15px;
    line-height: 1.4;
    border-radius: 18px;
  }

  .composer-input {
    min-width: 0;
    flex: 1 1 0;
  }

  .send-button {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 36px;
    padding-inline: 12px;
    font-size: 14px;
    border-radius: 18px;
  }

  .attach-button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .bubble,
  .message.assistant .bubble,
  .message.user .bubble {
    width: auto;
    max-width: calc(100vw - 34px);
  }

  .bubble.markdown table {
    min-width: 640px;
  }

  .history-list {
    padding-bottom: 12px;
  }

  .case-package {
    padding: 13px;
  }

  .case-package-header,
  .case-package-grid {
    grid-template-columns: 1fr;
  }

  .case-package-header {
    display: grid;
  }

  .home-hero,
  .auth-section,
  .partner-section,
  .home-grid {
    grid-template-columns: 1fr;
  }

  .agent-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
    gap: 28px;
    padding-top: 18px;
  }

  .phone-preview {
    justify-self: stretch;
    width: 100%;
  }

  .hero-brand-lockup {
    grid-template-columns: clamp(82px, 19vw, 108px) minmax(0, 1fr);
    gap: 14px;
  }

  .hero-brand-text h1 {
    font-size: clamp(22px, 6.8vw, 34px);
    letter-spacing: -0.05em;
    white-space: normal;
  }

  .hero-brand-text p {
    margin-top: 7px;
    font-size: clamp(9px, 2.5vw, 12px);
    white-space: normal;
  }

  .hero-kicker {
    font-size: 18px;
  }

  .hero-value-item {
    padding: 13px 14px;
  }

  .hero-value-item p {
    font-size: 14px;
  }

  .auth-section {
    padding-top: 36px;
  }

  .partner-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .site-header,
  .site-footer,
  .section-shell {
    width: min(100% - 24px, var(--max));
  }

  .site-header {
    min-height: 64px;
  }

  .brand small {
    display: none;
  }

  .header-link {
    padding-inline: 10px;
    font-size: 13px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn-large {
    width: 100%;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    align-content: center;
  }

  .app-header {
    padding-inline: 12px;
  }

  .brand.compact small {
    display: none;
  }

  .user-pill {
    max-width: 42vw;
  }

  .app-main {
    padding: 12px 12px 0;
  }

  .view-heading h1 {
    font-size: 30px;
  }

  .history-card {
    grid-template-columns: 1fr;
  }

  .history-actions {
    width: 100%;
  }

  .history-actions .btn,
  .history-actions .icon-button {
    flex: 1;
  }
}

/* =========================================================
   主题：玻璃拟态 (Glassmorphism)
   - 半透明卡片 + 毛玻璃模糊
   - 柔和渐变背景（青绿到天蓝）
   - 边框微光，圆角放大
   - 不改动 HTML / JS，仅覆盖视觉层
   ========================================================= */

:root {
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-bg-soft: rgba(255, 255, 255, 0.36);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-strong: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 18px 48px rgba(31, 138, 85, 0.14), 0 2px 8px rgba(33, 102, 213, 0.06);
  --glass-shadow-lg: 0 28px 70px rgba(31, 138, 85, 0.18), 0 4px 12px rgba(33, 102, 213, 0.08);
  --glass-radius: 18px;
  --glass-radius-sm: 14px;
  --glass-radius-lg: 24px;
}

body {
  background: #ffffff;
}

/* ---------- 通用按钮 ---------- */
.btn {
  border-radius: var(--glass-radius-sm);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--green-700);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--green-600);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--green-900);
}

.btn-secondary:hover {
  background: var(--green-100);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
}

/* ---------- 顶部 / 底部导航 ---------- */
.site-header,
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.bottom-nav {
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.nav-item {
  border-radius: var(--glass-radius-sm);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-item.is-active {
  background: var(--green-100);
  color: var(--green-900);
}

.nav-new-chat {
  background: var(--green-700);
  border: none;
}

/* ---------- App Shell ---------- */
.app-shell {
  background: #ffffff;
}

@media (min-width: 760px) {
  .bottom-nav {
    background: #ffffff;
    border-right: 1px solid var(--line);
  }
}

/* ---------- 品牌图标 ---------- */
.brand-mark {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.user-pill {
  background: var(--blue-100);
  border: none;
}

/* ---------- 卡片：通用玻璃化 ---------- */
.feature-tile,
.agent-card,
.auth-card,
.preview-card,
.preview-answer,
.case-package,
.case-package-section,
.attachment-card,
.case-asset {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--glass-shadow);
}

.history-card,
.profile-panel {
  background: var(--surface-soft);
  border: none;
  border-radius: var(--glass-radius);
  box-shadow: none;
}

.feature-tile:hover,
.agent-card:hover,
.attachment-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-lg);
  border-color: var(--glass-border-strong);
}

.history-card:hover {
  background: var(--green-100);
}

.tile-icon {
  background: linear-gradient(135deg, rgba(43, 182, 115, 0.85), rgba(31, 138, 85, 0.95));
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 138, 85, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-radius: 14px;
}

.tile-icon.blue {
  background: linear-gradient(135deg, rgba(74, 130, 232, 0.9), rgba(33, 102, 213, 0.95));
  color: #fff;
  box-shadow: 0 8px 20px rgba(33, 102, 213, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---------- 聊天气泡 ---------- */
.message.assistant .bubble {
  background: var(--surface-soft);
  border: none;
  border-radius: 18px 18px 18px 4px;
  box-shadow: none;
}

.message.user .bubble {
  background: var(--green-700);
  border: none;
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: none;
}

.avatar {
  background: var(--surface-soft);
  border: none;
  border-radius: 12px;
  box-shadow: none;
}

/* ---------- 输入区 ---------- */
.composer {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.composer textarea,
.field input {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer textarea:focus,
.field input:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(31, 138, 85, 0.12);
}

.tool-toggle,
.attach-button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tool-toggle:hover {
  background: var(--green-100);
}

.tool-toggle.is-active {
  background: var(--green-100);
  border-color: var(--green-700);
  color: var(--green-900);
}

.send-button {
  background: var(--green-700);
  border: none;
  border-radius: 999px;
}

.attach-menu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--glass-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.attach-option {
  background: var(--surface-soft);
  border-radius: var(--glass-radius-sm);
  border: none;
  transition: background 0.2s ease;
}

.attach-option:hover {
  background: var(--green-100);
}

.upload-preview {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--glass-radius);
}

/* ---------- 标签 / Chip ---------- */
.chip,
.trust-row span,
.case-meta span,
.case-package-meta span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.case-meta .case-badge {
  background: linear-gradient(135deg, rgba(43, 182, 115, 0.2), rgba(31, 138, 85, 0.18));
  border-color: rgba(43, 182, 115, 0.3);
}

.case-meta .case-badge.is-multimodal {
  background: linear-gradient(135deg, rgba(74, 130, 232, 0.2), rgba(33, 102, 213, 0.18));
  border-color: rgba(33, 102, 213, 0.3);
}

.agent-code {
  background: var(--green-100);
  border: none;
  color: var(--green-900);
}

/* ---------- 图标按钮 ---------- */
.icon-button {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.icon-button:hover {
  background: var(--green-100);
}

/* ---------- 个人中心头像 ---------- */
.profile-avatar {
  background: var(--green-700);
  color: #fff;
  border: none;
  box-shadow: none;
}

/* ---------- 案例卡片渐变背景修正 ---------- */
.case-package {
  background: var(--surface-soft);
}

/* ---------- 思考中脉冲动画 ---------- */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.bubble .thinking-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 4px 0;
}

.bubble .thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green-700);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.bubble .thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.bubble .thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* ---------- Hero 手机预览浮动动画 ---------- */
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.phone-preview {
  animation: float-gentle 4s ease-in-out infinite;
}

/* ---------- 页脚增强 ---------- */
.site-footer {
  position: relative;
  padding-top: 24px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(31, 138, 85, 0.4), rgba(33, 102, 213, 0.3), transparent);
}

/* ---------- 消息出现动画 ---------- */
@keyframes glass-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: glass-fade-up 0.32s ease both;
}

/* ---------- 注意事项 ---------- */
.notice-section {
  padding: 38px 0 54px;
  border-top: 1px solid var(--line);
}

.notice-card {
  padding: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--glass-shadow);
}

.notice-card h2 {
  margin-bottom: 16px;
  color: var(--green-900);
  font-size: 20px;
  font-weight: 900;
}

.notice-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
}

.notice-list li {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ---------- 滚动条美化 ---------- */
.chat-panel::-webkit-scrollbar,
.view::-webkit-scrollbar {
  width: 8px;
}

.chat-panel::-webkit-scrollbar-thumb,
.view::-webkit-scrollbar-thumb {
  background: rgba(31, 138, 85, 0.25);
  border-radius: 999px;
}

.chat-panel::-webkit-scrollbar-thumb:hover,
.view::-webkit-scrollbar-thumb:hover {
  background: rgba(31, 138, 85, 0.45);
}



/* ---------- API access pages ---------- */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.api-page {
  padding: 32px 0 64px;
}

.api-hero-card {
  display: grid;
  gap: 12px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(31, 138, 85, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 12%, rgba(36, 160, 95, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(246, 250, 248, 0.98), rgba(234, 242, 255, 0.82));
  box-shadow: var(--shadow);
}

.api-hero-card.compact {
  padding: 26px;
}

.api-hero-card h1 {
  color: var(--green-900);
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 950;
}

.api-hero-card p {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.api-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 20px;
  margin-top: 20px;
}

.api-form-card,
.api-info-card,
.admin-toolbar,
.admin-application-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 36px rgba(17, 61, 43, 0.08);
}

.api-form-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--green-900);
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field textarea,
.field select,
.quota-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field input,
.field select,
.quota-input {
  min-height: 44px;
  padding: 0 12px;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
  padding: 12px;
  line-height: 1.65;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.quota-input:focus {
  border-color: rgba(31, 138, 85, 0.72);
  box-shadow: 0 0 0 3px rgba(31, 138, 85, 0.12);
}

.check-stack {
  display: grid;
  gap: 10px;
}

.api-info-card {
  align-self: start;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.api-info-card h2 {
  color: var(--green-900);
  font-size: 20px;
}

.api-info-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.api-code-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: #f4f8f6;
}

.api-code-box span {
  color: var(--green-900);
  font-weight: 900;
}

.api-code-box code,
.api-key-result {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #153f2d;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) auto;
  align-items: end;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
}

.admin-application-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.admin-application-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-card-head,
.admin-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-card-head strong {
  color: var(--green-900);
  font-size: 18px;
}

.admin-card-head p,
.review-reason {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.6;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 900;
  font-size: 12px;
}

.status-pill.is-approved {
  background: var(--green-100);
  color: var(--green-700);
}

.status-pill.is-rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-card-grid p {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.admin-card-grid b {
  color: var(--green-900);
}

.admin-use-case {
  padding: 12px;
  border-left: 4px solid rgba(31, 138, 85, 0.28);
  border-radius: 10px;
  background: #fbfdfc;
  color: var(--ink);
}

.quota-input {
  max-width: 120px;
}

.api-key-result {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #f2fbf6;
  border: 1px solid rgba(31, 138, 85, 0.18);
}

.api-submit-result {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2fbf6, #eef7ff);
  border: 1px solid rgba(31, 138, 85, 0.22);
}

.api-submit-result strong {
  color: var(--green-900);
  font-size: 18px;
  font-weight: 950;
}

.api-submit-result code {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--green-900);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
  letter-spacing: 0.06em;
}

.api-submit-result p {
  color: var(--muted);
  line-height: 1.65;
}

.api-key-result strong {
  display: block;
  margin-bottom: 10px;
  color: var(--green-900);
}

.api-key-result code {
  display: block;
  padding: 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(31, 138, 85, 0.16);
  color: #0f3b28;
  font-weight: 800;
}

.api-key-result p,
.api-code-box p,
.muted-text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .api-layout,
  .admin-toolbar,
  .form-grid.two,
  .admin-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    align-items: stretch;
  }

  .site-header {
    align-items: flex-start;
  }
}
