/* 默认主题精修层。所有规则显式排除 Frutiger Aero，避免两套视觉系统相互污染。 */
html:not([data-theme="aero"]) {
  --ui-ink: #242530;
  --ui-muted: #69707d;
  --ui-line: rgba(45, 49, 61, .11);
  --ui-pink: #df78a6;
  --ui-pink-strong: #c85d8c;
  --ui-blue: #86b9e6;
  --ui-surface: rgba(255, 255, 255, .92);
  --ui-shadow-sm: 0 8px 24px rgba(48, 53, 67, .06);
  --ui-shadow-md: 0 22px 60px rgba(48, 53, 67, .1);
  --ui-ring: 0 0 0 4px rgba(223, 120, 166, .16);
  color-scheme: light;
}

html:not([data-theme="aero"]) ::selection {
  color: #6f2348;
  background: rgba(237, 138, 180, .3);
}

html:not([data-theme="aero"]) :focus-visible {
  outline: 3px solid rgba(207, 100, 145, .28);
  outline-offset: 3px;
}

html:not([data-theme="aero"]) * {
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 131, 145, .35) transparent;
}

html:not([data-theme="aero"]) *::-webkit-scrollbar { width: 9px; height: 9px; }
html:not([data-theme="aero"]) *::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(122, 131, 145, .32);
  background-clip: padding-box;
}

/* 公开首页 */
html:not([data-theme="aero"]) body:has(.site-header) {
  background:
    radial-gradient(circle at 8% 4%, rgba(250, 207, 225, .48), transparent 31rem),
    radial-gradient(circle at 94% 7%, rgba(194, 223, 249, .55), transparent 32rem),
    linear-gradient(180deg, #fbfbfd 0%, #f7f8fb 56%, #fbfbfd 100%);
}

html:not([data-theme="aero"]) .top-attribution {
  margin-top: 7px;
  font-size: 9px;
}

html:not([data-theme="aero"]) .site-header {
  height: 68px;
  margin-top: 12px;
  padding-inline: 18px;
  border-color: rgba(255, 255, 255, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 12px 34px rgba(50, 56, 70, .07);
}

html:not([data-theme="aero"]) .site-header .brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

html:not([data-theme="aero"]) .site-header nav { gap: 6px; }
html:not([data-theme="aero"]) .site-header .nav-link,
html:not([data-theme="aero"]) .site-header .nav-history {
  padding: 8px 10px;
  border-radius: 9px;
}

html:not([data-theme="aero"]) .site-header .nav-link:hover,
html:not([data-theme="aero"]) .site-header .nav-history:hover {
  color: var(--ui-ink);
  background: rgba(238, 240, 245, .8);
}

html:not([data-theme="aero"]) .site-header .nav-login {
  margin-left: 6px;
  padding: 9px 16px;
  border-color: rgba(202, 98, 144, .18);
  color: #9f456d;
  background: rgba(255, 245, 249, .94);
}

html:not([data-theme="aero"]) .hero {
  min-height: 640px;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  gap: clamp(38px, 5vw, 74px);
  padding: 76px 18px 54px;
}

html:not([data-theme="aero"]) .hero-copy .eyebrow { letter-spacing: .19em; }

html:not([data-theme="aero"]) .hero-copy h1 {
  max-width: 700px;
  margin: 17px 0 18px;
  font-size: clamp(48px, 5.2vw, 70px);
  line-height: 1.04;
  letter-spacing: -.055em;
}

html:not([data-theme="aero"]) .hero-copy h1 .copy-default {
  display: block;
}

html:not([data-theme="aero"]) .hero-copy h1 em {
  display: block;
  max-width: none;
  margin-top: 8px;
  font-size: .55em;
  line-height: 1.12;
  letter-spacing: -.045em;
  white-space: nowrap;
}

html:not([data-theme="aero"]) .hero-age-note {
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 11px;
  border: 1px solid rgba(207, 100, 145, .14);
  border-radius: 999px;
  color: #a0476f;
  background: rgba(255, 246, 250, .88);
  font-size: 11px;
  font-weight: 760;
}

html:not([data-theme="aero"]) .hero-copy > p:not(.hero-age-note) {
  max-width: 620px;
  color: #626a77;
  font-size: 16px;
  line-height: 1.82;
}

html:not([data-theme="aero"]) .hero-actions { margin-top: 28px; }
html:not([data-theme="aero"]) .button {
  min-height: 46px;
  border-radius: 12px;
}

html:not([data-theme="aero"]) .button.primary {
  background: linear-gradient(135deg, #e283ae, #c95f8f);
  box-shadow: 0 12px 28px rgba(199, 91, 138, .22);
}

html:not([data-theme="aero"]) .button.primary:hover {
  box-shadow: 0 16px 34px rgba(199, 91, 138, .27);
}

html:not([data-theme="aero"]) .button.secondary {
  border-color: rgba(54, 59, 72, .1);
  background: rgba(255, 255, 255, .9);
}

html:not([data-theme="aero"]) .hero-visual { min-height: 470px; }
html:not([data-theme="aero"]) .hero-visual::before {
  content: "";
  position: absolute;
  inset: 42px 14px 24px 20px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 40% 60% 52% 48% / 48% 38% 62% 52%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .42), rgba(238, 245, 252, .14));
  transform: rotate(-3deg);
}

html:not([data-theme="aero"]) .companion-card {
  top: 70px;
  left: 4%;
  width: 92%;
  padding: 23px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 25px 70px rgba(50, 56, 70, .13);
  transform: rotate(-1deg);
}

html:not([data-theme="aero"]) .message-card {
  border-color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 40px rgba(50, 56, 70, .1);
}

html:not([data-theme="aero"]) .capability-row {
  bottom: 42px;
  padding: 12px;
  border-color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 20px 52px rgba(50, 56, 70, .1);
}

html:not([data-theme="aero"]) .capability-row span {
  padding-block: 11px;
  background: transparent;
}

html:not([data-theme="aero"]) .capability-row span + span {
  border-left: 1px solid rgba(45, 49, 61, .08);
  border-radius: 0;
}

html:not([data-theme="aero"]) .persona-showcase,
html:not([data-theme="aero"]) .developer-api,
html:not([data-theme="aero"]) .device-showcase,
html:not([data-theme="aero"]) .cta {
  border-color: rgba(45, 49, 61, .09);
  box-shadow: 0 18px 54px rgba(48, 53, 67, .075);
}

html:not([data-theme="aero"]) .persona-showcase {
  padding: clamp(34px, 4vw, 52px);
  border-radius: 26px;
}

html:not([data-theme="aero"]) .persona-option {
  min-height: 140px;
  border-color: rgba(45, 49, 61, .08);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 30px rgba(50, 57, 69, .055);
}

html:not([data-theme="aero"]) .feature-grid { gap: 12px; }
html:not([data-theme="aero"]) .feature-grid article {
  min-height: 204px;
  border-color: rgba(45, 49, 61, .09);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
}

html:not([data-theme="aero"]) .feature-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(40, 44, 54, .07);
}

html:not([data-theme="aero"]) .developer-api,
html:not([data-theme="aero"]) .device-showcase { border-radius: 26px; }

html:not([data-theme="aero"]) .api-doc-grid details,
html:not([data-theme="aero"]) .device-capabilities article {
  border-color: rgba(45, 49, 61, .09);
  background: rgba(250, 251, 253, .92);
}

html:not([data-theme="aero"]) .api-doc-grid summary:hover { background: rgba(241, 244, 248, .8); }
html:not([data-theme="aero"]) .api-doc-grid summary:focus-visible { outline-offset: -3px; }

/* 登录页、控制台和协议页 */
html:not([data-theme="aero"]) .auth-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 14%, rgba(248, 200, 220, .68), transparent 33rem),
    radial-gradient(circle at 86% 12%, rgba(185, 218, 247, .72), transparent 34rem),
    linear-gradient(145deg, #fff 0%, #f9f7fa 50%, #eef4f9 100%);
}

html:not([data-theme="aero"]) .auth-shell::before,
html:not([data-theme="aero"]) .auth-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
}

html:not([data-theme="aero"]) .auth-shell::before {
  width: 360px;
  height: 360px;
  left: -130px;
  bottom: -170px;
}

html:not([data-theme="aero"]) .auth-shell::after {
  width: 240px;
  height: 240px;
  right: -70px;
  top: -90px;
}

html:not([data-theme="aero"]) .auth-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 40px;
  border-color: rgba(255, 255, 255, .88);
  border-radius: 24px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 28px 80px rgba(46, 52, 65, .13);
}

html:not([data-theme="aero"]) .auth-logo {
  width: 64px;
  height: 58px;
  border-radius: 16px;
}

html:not([data-theme="aero"]) .auth-card h1 {
  margin: 22px 0 25px;
  font-size: 26px;
  letter-spacing: -.025em;
}

html:not([data-theme="aero"]) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html:not([data-theme="aero"]) textarea,
html:not([data-theme="aero"]) select {
  min-height: 42px;
  border-color: rgba(74, 80, 93, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
}

html:not([data-theme="aero"]) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
html:not([data-theme="aero"]) textarea:hover,
html:not([data-theme="aero"]) select:hover { border-color: rgba(74, 80, 93, .3); }

html:not([data-theme="aero"]) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
html:not([data-theme="aero"]) textarea:focus,
html:not([data-theme="aero"]) select:focus {
  border-color: var(--ui-pink);
  box-shadow: var(--ui-ring);
}

html:not([data-theme="aero"]) .auth-switch {
  width: auto;
  margin-inline: 5px;
  text-underline-offset: 3px;
}

html:not([data-theme="aero"]) .app-header {
  height: 68px;
  padding-inline: 30px;
  border-bottom-color: rgba(45, 49, 61, .09);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 10px 30px rgba(47, 53, 65, .035);
}

html:not([data-theme="aero"]) .workspace {
  max-width: 1480px;
  grid-template-columns: 198px minmax(0, 1fr);
}

html:not([data-theme="aero"]) .sidebar {
  top: 68px;
  height: calc(100vh - 68px);
  padding: 28px 17px;
  border-right-color: rgba(45, 49, 61, .08);
  background: rgba(249, 250, 252, .62);
}

html:not([data-theme="aero"]) .sidebar a {
  margin-bottom: 4px;
  padding: 11px 13px;
  border-radius: 10px;
}

html:not([data-theme="aero"]) .sidebar a:hover {
  background: rgba(235, 238, 243, .82);
  transform: none;
}

html:not([data-theme="aero"]) .sidebar a.active {
  color: #a64873;
  background: linear-gradient(90deg, rgba(237, 138, 180, .16), rgba(138, 188, 233, .08));
  box-shadow: inset 3px 0 #df78a6;
}

html:not([data-theme="aero"]) .workspace > main { padding: 32px; }

html:not([data-theme="aero"]) .panel {
  margin-bottom: 18px;
  padding: 27px;
  border-color: rgba(45, 49, 61, .095);
  border-radius: 17px;
  box-shadow: 0 5px 20px rgba(30, 36, 44, .035);
}

html:not([data-theme="aero"]) .panel:hover {
  border-color: rgba(45, 49, 61, .13);
  box-shadow: 0 8px 25px rgba(30, 36, 44, .045);
}

html:not([data-theme="aero"]) .panel-heading { margin-bottom: 24px; }
html:not([data-theme="aero"]) .panel-heading h2 {
  font-size: 20px;
  letter-spacing: -.02em;
}

html:not([data-theme="aero"]) .runtime-panel h2 { font-size: 29px; }

html:not([data-theme="aero"]) .status-list,
html:not([data-theme="aero"]) .billing-summary {
  overflow: hidden;
  gap: 0;
  border: 1px solid rgba(45, 49, 61, .09);
  border-radius: 13px;
  background: #fafbfc;
}

html:not([data-theme="aero"]) .status-list div,
html:not([data-theme="aero"]) .billing-summary div {
  border: 0;
  border-radius: 0;
  background: transparent;
}

html:not([data-theme="aero"]) .status-list div + div,
html:not([data-theme="aero"]) .billing-summary div + div { border-left: 1px solid rgba(45, 49, 61, .08); }

html:not([data-theme="aero"]) .button {
  min-height: 40px;
  border-radius: 10px;
}

html:not([data-theme="aero"]) .button.primary { background: linear-gradient(135deg, #e180ac, #cc638f); }
html:not([data-theme="aero"]) .button.ghost { border-color: rgba(45, 49, 61, .12); }

html:not([data-theme="aero"]) .config-card,
html:not([data-theme="aero"]) .persona-manager,
html:not([data-theme="aero"]) .wechat-security,
html:not([data-theme="aero"]) .conversation-review {
  border-color: rgba(45, 49, 61, .09);
  border-radius: 13px;
  background: #fafbfc;
}

html:not([data-theme="aero"]) .table-wrap {
  border-color: rgba(45, 49, 61, .09);
  border-radius: 12px;
}

html:not([data-theme="aero"]) th {
  position: sticky;
  top: 0;
  color: #68707d;
  background: #f5f7f9;
}

html:not([data-theme="aero"]) tbody tr { transition: background 150ms ease; }
html:not([data-theme="aero"]) tbody tr:hover { background: #fafbfc; }

html:not([data-theme="aero"]) .announcement-card,
html:not([data-theme="aero"]) .history-dialog {
  border-color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 30px 90px rgba(28, 34, 45, .22);
}

html:not([data-theme="aero"]) .legal-card { border-radius: 20px; }

/* 申诉和设备管理 */
html:not([data-theme="aero"]) .appeal-page,
html:not([data-theme="aero"]) .device-page { max-width: 1160px; }

html:not([data-theme="aero"]) .appeal-card,
html:not([data-theme="aero"]) .privacy-card,
html:not([data-theme="aero"]) .device-card {
  border-color: rgba(45, 49, 61, .1);
  border-radius: 19px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 44px rgba(56, 60, 73, .075);
}

html:not([data-theme="aero"]) .device-item {
  border-color: rgba(45, 49, 61, .1);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(46, 50, 62, .035);
}

html:not([data-theme="aero"]) .device-map-panel { border-color: rgba(45, 49, 61, .1); }

/* 克制而明确的动效 */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-theme="aero"]) .site-header { animation: default-fade-down 420ms cubic-bezier(.2, .8, .2, 1) both; }
  html:not([data-theme="aero"]) .hero-copy { animation: default-rise 540ms cubic-bezier(.2, .8, .2, 1) both; }
  html:not([data-theme="aero"]) .hero-visual { animation: default-rise 620ms 70ms cubic-bezier(.2, .8, .2, 1) both; }
  html:not([data-theme="aero"]) .message-card { animation: default-float 5.4s ease-in-out infinite; }
  html:not([data-theme="aero"]) .message-two { animation-delay: -2.7s; }
}

@keyframes default-fade-down { from { opacity: 0; transform: translateY(-8px); } }
@keyframes default-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes default-float { 50% { translate: 0 -4px; } }

@media (max-width: 900px) {
  html:not([data-theme="aero"]) .site-header { width: min(100% - 24px, 720px); }
  html:not([data-theme="aero"]) .hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 56px;
  }
  html:not([data-theme="aero"]) .hero-copy { max-width: 720px; }
  html:not([data-theme="aero"]) .hero-visual { min-height: 450px; }
  html:not([data-theme="aero"]) .workspace { grid-template-columns: 1fr; }
  html:not([data-theme="aero"]) .sidebar { top: 68px; height: auto; }
}

@media (max-width: 640px) {
  html:not([data-theme="aero"]) .top-attribution { width: calc(100% - 28px); }
  html:not([data-theme="aero"]) .site-header {
    height: 62px;
    margin-top: 10px;
    padding-inline: 12px;
    border-radius: 16px;
  }
  html:not([data-theme="aero"]) .site-header .brand { gap: 8px; }
  html:not([data-theme="aero"]) .site-header .brand img { width: 36px; height: 36px; }
  html:not([data-theme="aero"]) .site-header nav { gap: 4px; }
  html:not([data-theme="aero"]) .site-header .nav-history { padding-inline: 7px; }
  html:not([data-theme="aero"]) .site-header .nav-login { margin-left: 0; padding: 8px 10px; }
  html:not([data-theme="aero"]) .hero { padding-top: 52px; }
  html:not([data-theme="aero"]) .hero-copy h1 {
    margin-top: 14px;
    font-size: clamp(42px, 14vw, 56px);
    line-height: 1;
  }
  html:not([data-theme="aero"]) .hero-copy h1 em {
    margin-top: 10px;
    font-size: .53em;
    line-height: 1.16;
  }
  html:not([data-theme="aero"]) .hero-copy > p:not(.hero-age-note) { font-size: 14px; }
  html:not([data-theme="aero"]) .hero-actions { gap: 9px; }
  html:not([data-theme="aero"]) .hero-actions .button { flex-basis: 100%; }
  html:not([data-theme="aero"]) .download-note { gap: 9px 14px; }
  html:not([data-theme="aero"]) .hero-visual { min-height: 420px; }
  html:not([data-theme="aero"]) .companion-card { top: 45px; left: 0; width: 100%; }
  html:not([data-theme="aero"]) .capability-row { left: 0; width: 100%; }
  html:not([data-theme="aero"]) .persona-showcase,
  html:not([data-theme="aero"]) .developer-api,
  html:not([data-theme="aero"]) .device-showcase { border-radius: 22px; }
  html:not([data-theme="aero"]) .privacy-showcase { border-radius: 22px; }
  html:not([data-theme="aero"]) .auth-card { padding: 28px 23px; border-radius: 20px; }
  html:not([data-theme="aero"]) .app-header { padding-inline: 15px; }
  html:not([data-theme="aero"]) .workspace > main { padding: 14px; }
  html:not([data-theme="aero"]) .panel { padding: 19px; border-radius: 14px; }
  html:not([data-theme="aero"]) .status-list,
  html:not([data-theme="aero"]) .billing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:not([data-theme="aero"]) .status-list div + div,
  html:not([data-theme="aero"]) .billing-summary div + div { border-left: 0; }
  html:not([data-theme="aero"]) .status-list div:nth-child(even),
  html:not([data-theme="aero"]) .billing-summary div:nth-child(even) { border-left: 1px solid rgba(45, 49, 61, .08); }
  html:not([data-theme="aero"]) .status-list div:nth-child(n+3),
  html:not([data-theme="aero"]) .billing-summary div:nth-child(n+3) { border-top: 1px solid rgba(45, 49, 61, .08); }
  html:not([data-theme="aero"]) .appeal-header,
  html:not([data-theme="aero"]) .page-header { padding-inline: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-theme="aero"]) *,
  html:not([data-theme="aero"]) *::before,
  html:not([data-theme="aero"]) *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
