/* ==========================================================================
   凹3镜像网 ao3ao3.com — 主样式表
   Material Design 3 主题 · 偏女性玫瑰配色 · 纯 CSS（无任何库）
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌（Design Tokens）
   -------------------------------------------------------------------------- */
:root {
  /* 颜色 — 主色（玫瑰 Rose） */
  --md-primary: #98405f;
  --md-on-primary: #ffffff;
  --md-primary-container: #ffd9e2;
  --md-on-primary-container: #3e001d;
  --md-inverse-primary: #ffb1c6;

  /* 颜色 — 次色（紫红 Mauve） */
  --md-secondary: #785366;
  --md-on-secondary: #ffffff;
  --md-secondary-container: #ffd9e8;
  --md-on-secondary-container: #2e1121;

  /* 颜色 — 第三色（鼠尾草 Sage，清新点缀） */
  --md-tertiary: #536358;
  --md-on-tertiary: #ffffff;
  --md-tertiary-container: #d6e8d9;
  --md-on-tertiary-container: #0f1f15;

  /* 颜色 — 错误 */
  --md-error: #ba1a1a;
  --md-on-error: #ffffff;
  --md-error-container: #ffdad6;
  --md-on-error-container: #410002;

  /* 颜色 — 中性色（带暖粉底） */
  --md-background: #fff8f8;
  --md-on-background: #201a1b;
  --md-surface: #fff8f8;
  --md-on-surface: #201a1b;
  --md-surface-variant: #f2dde2;
  --md-on-surface-variant: #514346;
  --md-outline: #837377;
  --md-outline-variant: #d5c2c7;
  --md-inverse-surface: #352f30;
  --md-inverse-on-surface: #fbeded;

  /* 表面容器（elevation 层次） */
  --md-surface-dim: #ded8d8;
  --md-surface-bright: #fff8f8;
  --md-surface-container-lowest: #ffffff;
  --md-surface-container-low: #fff1f1;
  --md-surface-container: #fbebec;
  --md-surface-container-high: #f5e5e6;
  --md-surface-container-highest: #efe0e1;

  /* 状态层 */
  --md-state-hover: rgba(32, 26, 27, 0.08);
  --md-state-pressed: rgba(32, 26, 27, 0.12);
  --md-state-focus: rgba(32, 26, 27, 0.12);

  /* 阴影（elevation） */
  --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.28), 0 1px 3px 1px rgba(0, 0, 0, 0.14);
  --md-elevation-2: 0 1px 2px rgba(0, 0, 0, 0.28), 0 2px 6px 2px rgba(0, 0, 0, 0.14);
  --md-elevation-3: 0 1px 3px rgba(0, 0, 0, 0.28), 0 4px 8px 3px rgba(0, 0, 0, 0.14);
  --md-elevation-4: 0 2px 3px rgba(0, 0, 0, 0.28), 0 6px 10px 4px rgba(0, 0, 0, 0.14);

  /* 形状（Shape） */
  --md-shape-xs: 4px;
  --md-shape-sm: 8px;
  --md-shape-md: 12px;
  --md-shape-lg: 16px;
  --md-shape-xl: 28px;
  --md-shape-full: 999px;

  /* 排版（Type Scale，Roboto / 系统中文字体栈） */
  --md-font: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue",
    Arial, sans-serif;

  /* 间距与布局 */
  --app-bar-height: 64px;
  --content-max: 1200px;
  --gutter: clamp(16px, 3vw, 32px);
  --section-gap: clamp(48px, 7vw, 88px);
  --card-gap: 16px;
}

:root[data-theme="dark"] {
  --md-primary: #ffb1c6;
  --md-on-primary: #5f1134;
  --md-primary-container: #7c2948;
  --md-on-primary-container: #ffd9e2;
  --md-inverse-primary: #98405f;

  --md-secondary: #e8b9ce;
  --md-on-secondary: #462637;
  --md-secondary-container: #5f3c4e;
  --md-on-secondary-container: #ffd9e8;

  --md-tertiary: #baccbe;
  --md-on-tertiary: #25342a;
  --md-tertiary-container: #3b4b40;
  --md-on-tertiary-container: #d6e8d9;

  --md-error: #ffb4ab;
  --md-on-error: #690005;
  --md-error-container: #93000a;
  --md-on-error-container: #ffdad6;

  --md-background: #171213;
  --md-on-background: #ede0e2;
  --md-surface: #171213;
  --md-on-surface: #ede0e2;
  --md-surface-variant: #514346;
  --md-on-surface-variant: #d5c2c7;
  --md-outline: #9f8c91;
  --md-outline-variant: #514346;
  --md-inverse-surface: #ede0e2;
  --md-inverse-on-surface: #352f30;

  --md-surface-dim: #171213;
  --md-surface-bright: #3e383a;
  --md-surface-container-lowest: #120d0f;
  --md-surface-container-low: #201a1b;
  --md-surface-container: #241e1f;
  --md-surface-container-high: #2f2829;
  --md-surface-container-highest: #3a3334;

  --md-state-hover: rgba(237, 224, 226, 0.08);
  --md-state-pressed: rgba(237, 224, 226, 0.12);
  --md-state-focus: rgba(237, 224, 226, 0.12);
}

/* --------------------------------------------------------------------------
   2. 基础与重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--md-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--md-on-surface);
  background: var(--md-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--md-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--md-primary);
  outline-offset: 2px;
  border-radius: var(--md-shape-sm);
}

::selection {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

/* 无障碍：跳转到正文 */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--md-primary);
  color: var(--md-on-primary);
  padding: 10px 16px;
  border-radius: var(--md-shape-sm);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   3. 排版工具类（MD3 Type Scale）
   -------------------------------------------------------------------------- */
.display-large  { font-size: clamp(40px, 6vw, 57px); line-height: 1.12; letter-spacing: -0.25px; font-weight: 400; }
.display-medium { font-size: clamp(32px, 5vw, 45px); line-height: 1.16; font-weight: 400; }
.display-small  { font-size: 36px; line-height: 1.22; font-weight: 400; }
.headline-large { font-size: 32px; line-height: 1.25; font-weight: 400; }
.headline-medium{ font-size: 28px; line-height: 1.29; font-weight: 400; }
.headline-small { font-size: 24px; line-height: 1.33; font-weight: 400; }
.title-large    { font-size: 22px; line-height: 1.27; font-weight: 400; }
.title-medium   { font-size: 16px; line-height: 1.5; letter-spacing: 0.15px; font-weight: 500; }
.title-small    { font-size: 14px; line-height: 1.43; letter-spacing: 0.1px; font-weight: 500; }
.body-large     { font-size: 16px; line-height: 1.5; letter-spacing: 0.5px; }
.body-medium    { font-size: 14px; line-height: 1.43; letter-spacing: 0.25px; }
.body-small     { font-size: 12px; line-height: 1.33; letter-spacing: 0.4px; }
.label-large    { font-size: 14px; line-height: 1.43; letter-spacing: 0.1px; font-weight: 500; }
.label-medium   { font-size: 12px; line-height: 1.33; letter-spacing: 0.5px; font-weight: 500; }
.label-small    { font-size: 11px; line-height: 1.45; letter-spacing: 0.5px; font-weight: 500; }

/* --------------------------------------------------------------------------
   4. 布局
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-gap);
}

/* 锚点平滑滚动：为所有带 id 的锚点预留固定顶栏高度，避免被 header 遮挡 */
[id] {
  scroll-margin-top: calc(var(--app-bar-height) + 16px);
}

.section--tint {
  background: var(--md-surface-container-low);
}

.section--tint-strong {
  background: var(--md-primary-container);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.section__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--md-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.section__title {
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.25;
  font-weight: 500;
  margin-bottom: 12px;
}

.section__desc {
  color: var(--md-on-surface-variant);
  font-size: 16px;
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: var(--card-gap);
}

.grid--cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prose {
  max-width: 800px;
}

.prose p,
.prose li {
  color: var(--md-on-surface-variant);
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 14px;
}

.prose h2 {
  font-size: 24px;
  font-weight: 500;
  margin: 36px 0 14px;
  color: var(--md-on-surface);
}

.prose h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 28px 0 10px;
  color: var(--md-on-surface);
}

.prose strong {
  color: var(--md-on-surface);
}

.prose ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 14px;
}

.prose ol {
  list-style: decimal;
  padding-left: 24px;
  margin-bottom: 14px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 图文配图 */
.figure {
  margin: 24px 0;
}
.figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--md-shape-md);
  border: 1px solid var(--md-outline-variant);
}
.figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--md-on-surface-variant);
  text-align: center;
}

/* --------------------------------------------------------------------------
   5. 顶部应用栏（Top App Bar）
   -------------------------------------------------------------------------- */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--app-bar-height);
  display: flex;
  align-items: center;
  background: var(--md-surface);
  color: var(--md-on-surface);
  border-bottom: 1px solid var(--md-outline-variant);
}

.app-bar__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-bar .app-bar__menu {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand__logo svg {
  width: 40px;
  height: 40px;
  display: block;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.brand__sub {
  font-size: 11px;
  color: var(--md-on-surface-variant);
  letter-spacing: 0.2px;
}

.top-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.top-nav__link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--md-shape-full);
  color: var(--md-on-surface-variant);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.top-nav__link:hover {
  background: var(--md-state-hover);
  text-decoration: none;
}

.top-nav__link.is-active {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}

.app-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.app-bar__cta {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   6. 图标按钮 / 按钮（Buttons）
   -------------------------------------------------------------------------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--md-shape-full);
  background: transparent;
  color: var(--md-on-surface-variant);
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--md-state-hover); }
.icon-btn:active { background: var(--md-state-pressed); }
.icon-btn svg { width: 24px; height: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: var(--md-shape-full);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; }

.btn--filled {
  background: var(--md-primary);
  color: var(--md-on-primary);
  box-shadow: var(--md-elevation-1);
}
.btn--filled:hover { background: var(--md-primary); box-shadow: var(--md-elevation-2); }

.btn--tonal {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}
.btn--tonal:hover { box-shadow: var(--md-elevation-1); }

.btn--outlined {
  background: transparent;
  color: var(--md-primary);
  border: 1px solid var(--md-outline);
}
.btn--outlined:hover { background: var(--md-state-hover); }

.btn--text {
  background: transparent;
  color: var(--md-primary);
  padding: 0 12px;
}
.btn--text:hover { background: var(--md-state-hover); }

.btn--elevated {
  background: var(--md-surface-container-low);
  color: var(--md-primary);
  box-shadow: var(--md-elevation-1);
}
.btn--elevated:hover { box-shadow: var(--md-elevation-2); }

.btn--error {
  background: var(--md-error);
  color: var(--md-on-error);
}

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--lg {
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

/* FAB */
.fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: var(--md-shape-lg);
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  box-shadow: var(--md-elevation-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.fab svg { width: 24px; height: 24px; }

/* --------------------------------------------------------------------------
   7. 卡片（Cards）
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--md-surface-container-low);
  border-radius: var(--md-shape-md);
  box-shadow: var(--md-elevation-1);
  overflow: hidden;
}

.card--filled {
  background: var(--md-surface-container-highest);
  box-shadow: none;
}

.card--outlined {
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  box-shadow: none;
}

.card__media {
  aspect-ratio: 16 / 9;
  background: var(--md-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-on-secondary-container);
}
.card__media svg { width: 48px; height: 48px; }

.card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--md-on-surface);
}

.card__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--md-on-surface-variant);
  flex: 1;
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

/* --------------------------------------------------------------------------
   8. 徽章 / 状态点（Badge / Status）
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--md-shape-sm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.badge--primary   { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.badge--secondary { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.badge--tertiary  { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.badge--success   { background: #c8ead0; color: #0b3d1f; }
.badge--warn      { background: #ffe2c8; color: #5c3800; }
.badge--error     { background: var(--md-error-container); color: var(--md-on-error-container); }
.badge--neutral   { background: var(--md-surface-variant); color: var(--md-on-surface-variant); }

:root[data-theme="dark"] .badge--success { background: #1f4d2b; color: #b6f2c6; }
:root[data-theme="dark"] .badge--warn    { background: #4a3300; color: #ffd9a6; }

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--md-outline);
}
.status-dot--ok     { background: #2e9e4f; }
.status-dot--warn   { background: #e08a00; }
.status-dot--info   { background: #3b82d6; }
.status-dot--off    { background: var(--md-error); }

/* --------------------------------------------------------------------------
   9. 芯片（Chips）
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-shape-sm);
  background: transparent;
  color: var(--md-on-surface-variant);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
}
.chip:hover { background: var(--md-state-hover); }
.chip--selected {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  border-color: transparent;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   10. 列表 / 分隔线
   -------------------------------------------------------------------------- */
.list {
  display: flex;
  flex-direction: column;
}

.list__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--md-shape-md);
  color: inherit;
}
.list__item:hover {
  background: var(--md-state-hover);
  text-decoration: none;
}

.list__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-full);
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.list__icon svg { width: 22px; height: 22px; }

.list__body { flex: 1; min-width: 0; }
.list__title { font-size: 15px; font-weight: 500; color: var(--md-on-surface); }
.list__sub { font-size: 13px; color: var(--md-on-surface-variant); margin-top: 2px; }

.divider {
  height: 1px;
  background: var(--md-outline-variant);
  border: none;
  margin-block: 16px;
}

/* --------------------------------------------------------------------------
   11. 面包屑（Breadcrumb）
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding-block: 14px 4px;
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--md-on-surface-variant);
}
.breadcrumb__list a { color: var(--md-primary); }
.breadcrumb__sep { color: var(--md-outline); }

/* --------------------------------------------------------------------------
   12. 英雄区（Hero）
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--md-primary-container), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, var(--md-secondary-container), transparent 55%),
    var(--md-surface);
  border-bottom: 1px solid var(--md-outline-variant);
}

.hero__inner {
  padding-block: clamp(48px, 8vw, 96px);
}

.hero__title {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.hero__title .accent {
  color: var(--md-primary);
}

.hero__desc {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
  color: var(--md-on-surface-variant);
  margin-bottom: 28px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   13. 统计条（Stats）
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat {
  background: var(--md-surface-container-low);
  border-radius: var(--md-shape-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--md-elevation-1);
}

.stat__num {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  color: var(--md-primary);
  line-height: 1.1;
}

.stat__label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--md-on-surface-variant);
}

/* 工具：禁止选中复制（用于镜像域名标识，符合「禁止直接复制网址」要求） */
.no-select {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* --------------------------------------------------------------------------
   14. 镜像卡片（Mirror Card）
   -------------------------------------------------------------------------- */
.mirror-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--md-surface-container-low);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-md);
  padding: 18px;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.mirror-card:hover {
  box-shadow: var(--md-elevation-2);
  transform: translateY(-2px);
}

.mirror-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mirror-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--md-shape-md);
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mirror-card__icon svg { width: 24px; height: 24px; }

.mirror-card__name {
  font-size: 17px;
  font-weight: 500;
  color: var(--md-on-surface);
  word-break: break-all;
}

.mirror-card__domain {
  font-size: 12px;
  color: var(--md-on-surface-variant);
  letter-spacing: 0.2px;
  word-break: break-all;
  opacity: 0.85;
}

.mirror-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--md-on-surface-variant);
  flex: 1;
}

.mirror-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mirror-card__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   15. 提示卡片（Notice / Alert）
   -------------------------------------------------------------------------- */
.notice {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--md-shape-md);
  border: 1px solid var(--md-outline-variant);
  background: var(--md-surface-container-low);
}

.notice__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--md-primary);
}
.notice__icon svg { width: 24px; height: 24px; }

.notice__title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--md-on-surface);
}
.notice__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--md-on-surface-variant);
}

.notice--info    { background: var(--md-primary-container); border-color: transparent; }
.notice--info .notice__icon { color: var(--md-on-primary-container); }
.notice--info .notice__title { color: var(--md-on-primary-container); }
.notice--info .notice__text  { color: var(--md-on-primary-container); }

.notice--warn    { background: #fff3e0; border-color: transparent; }
.notice--warn .notice__icon { color: #8a5300; }
.notice--warn .notice__title { color: #6d4200; }
.notice--warn .notice__text  { color: #6d4200; }

.notice--error   { background: var(--md-error-container); border-color: transparent; }
.notice--error .notice__icon { color: var(--md-on-error-container); }
.notice--error .notice__title { color: var(--md-on-error-container); }
.notice--error .notice__text  { color: var(--md-on-error-container); }

.notice--success { background: #e2f5e6; border-color: transparent; }
.notice--success .notice__icon { color: #14532d; }
.notice--success .notice__title { color: #14532d; }
.notice--success .notice__text  { color: #14532d; }

:root[data-theme="dark"] .notice--warn    { background: #3a2a00; }
:root[data-theme="dark"] .notice--warn .notice__icon,
:root[data-theme="dark"] .notice--warn .notice__title,
:root[data-theme="dark"] .notice--warn .notice__text { color: #ffd9a6; }
:root[data-theme="dark"] .notice--success { background: #12301c; }
:root[data-theme="dark"] .notice--success .notice__icon,
:root[data-theme="dark"] .notice--success .notice__title,
:root[data-theme="dark"] .notice--success .notice__text { color: #b6f2c6; }

/* --------------------------------------------------------------------------
   16. 折叠面板（Accordion，使用 details）
   -------------------------------------------------------------------------- */
.accordion { border-radius: var(--md-shape-md); overflow: hidden; background: var(--md-surface-container-low); box-shadow: var(--md-elevation-1); }
.accordion details { border-bottom: 1px solid var(--md-outline-variant); }
.accordion details:last-child { border-bottom: none; }
.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--md-on-surface);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--md-on-surface-variant);
  border-bottom: 2px solid var(--md-on-surface-variant);
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-bottom: 4px;
}
.accordion details[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.accordion details:hover summary { background: var(--md-state-hover); }
.accordion .accordion__body { padding: 0 20px 18px; color: var(--md-on-surface-variant); font-size: 14.5px; line-height: 1.8; }

/* --------------------------------------------------------------------------
   17. 表格
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--md-shape-md); box-shadow: var(--md-elevation-1); background: var(--md-surface-container-low); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--md-outline-variant); vertical-align: top; }
.table thead th { font-weight: 500; color: var(--md-on-surface); background: var(--md-surface-container); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--md-state-hover); }
.table td { color: var(--md-on-surface-variant); }
.table .nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   18. 表单（Text Field）
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field__label { font-size: 14px; font-weight: 500; color: var(--md-on-surface); }
.field__input,
.field__textarea,
.field__select {
  font-family: inherit;
  font-size: 15px;
  color: var(--md-on-surface);
  background: var(--md-surface-container-high);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-shape-sm);
  padding: 13px 14px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field__textarea { resize: vertical; min-height: 140px; }
.field__input:focus,
.field__textarea:focus,
.field__select:focus {
  outline: none;
  border-color: var(--md-primary);
  box-shadow: 0 0 0 2px var(--md-primary-container);
}
.field__hint { font-size: 12px; color: var(--md-on-surface-variant); }

/* --------------------------------------------------------------------------
   19. 抽屉导航（Navigation Drawer）
   -------------------------------------------------------------------------- */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: min(320px, 84vw);
  background: var(--md-surface-container-low);
  color: var(--md-on-surface);
  box-shadow: var(--md-elevation-4);
  padding: 16px 12px;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }

.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 12px; }
.drawer__nav { display: flex; flex-direction: column; gap: 2px; }
.drawer__link {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--md-shape-full);
  color: var(--md-on-surface-variant);
  font-size: 15px;
  font-weight: 500;
}
.drawer__link:hover { background: var(--md-state-hover); text-decoration: none; }
.drawer__link.is-active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.drawer__link svg { width: 22px; height: 22px; flex-shrink: 0; }

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   20. 页脚（Footer）
   -------------------------------------------------------------------------- */
.footer {
  background: var(--md-surface-container);
  color: var(--md-on-surface);
  border-top: 1px solid var(--md-outline-variant);
  margin-top: var(--section-gap);
  padding-top: clamp(40px, 6vw, 64px);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer__brand .brand__name { color: var(--md-primary); }

.footer__about {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--md-on-surface-variant);
  max-width: 360px;
}

.footer__col h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 14px;
  color: var(--md-on-surface);
}

.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 13.5px; color: var(--md-on-surface-variant); }
.footer__col a:hover { color: var(--md-primary); }

.footer__bottom {
  border-top: 1px solid var(--md-outline-variant);
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--md-on-surface-variant);
  line-height: 1.7;
}

.footer__bottom a { color: var(--md-on-surface-variant); }
.footer__bottom a:hover { color: var(--md-primary); }

/* --------------------------------------------------------------------------
   21. 快讯 / 时间线（News）
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--md-outline-variant);
}
.timeline__item { position: relative; padding: 0 0 28px 12px; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--md-primary);
  border: 3px solid var(--md-background);
  box-shadow: 0 0 0 2px var(--md-primary-container);
}
.timeline__date { font-size: 12px; font-weight: 600; color: var(--md-primary); letter-spacing: 0.3px; margin-bottom: 4px; }
.timeline__title { font-size: 16px; font-weight: 500; color: var(--md-on-surface); margin-bottom: 6px; }
.timeline__text { font-size: 14px; line-height: 1.75; color: var(--md-on-surface-variant); }

/* --------------------------------------------------------------------------
   22. 步骤（Steps）
   -------------------------------------------------------------------------- */
.step-card { display: flex; gap: 16px; height: 100%; padding: 20px; background: var(--md-surface-container-low); border-radius: var(--md-shape-md); box-shadow: var(--md-elevation-1); }
.step-card__num {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--md-shape-full);
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px;
}
.step-card__title { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.step-card__text { font-size: 14px; line-height: 1.7; color: var(--md-on-surface-variant); }

/* --------------------------------------------------------------------------
   23. 提示条（Snackbar / Toast）
   -------------------------------------------------------------------------- */
.snackbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 95;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--md-inverse-surface);
  color: var(--md-inverse-on-surface);
  padding: 12px 16px;
  border-radius: var(--md-shape-xs);
  box-shadow: var(--md-elevation-3);
  font-size: 14px;
  max-width: min(560px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.snackbar.is-show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.snackbar__action { color: var(--md-inverse-primary); background: none; border: none; font-weight: 600; font-size: 14px; padding: 4px 8px; }

/* --------------------------------------------------------------------------
   24. 响应式（Responsive）
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .top-nav { display: none; }
  .app-bar .app-bar__menu { display: inline-flex; order: 20; }
  .app-bar__actions { margin-left: auto; }
  .app-bar__cta { display: none; }
}

@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .grid--4, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .brand__sub-prefix { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   25. 动效偏好 / 打印
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .app-bar, .footer, .fab, .drawer, .drawer-scrim, .snackbar, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}
