/* ==========================================================================
   组件层：按钮 / 输入 / 卡片 / 太阳弧 / 时间轴 / 表格 / 地图 / 折叠面板
   ========================================================================== */

/* ---------------------------------------------------------------- 按钮 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--md-radius-full);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .01em;
  cursor: pointer;
  overflow: hidden;              /* 让水波纹不溢出圆角 */
  transition: box-shadow var(--dur-short) var(--ease-standard),
              background var(--dur-short) var(--ease-standard),
              color var(--dur-short) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* filled —— 页面主操作（定位、查询） */
.btn--filled {
  background: var(--md-primary);
  color: var(--md-on-primary);
  box-shadow: var(--md-elev-1);
}
.btn--filled:hover:not(:disabled) {
  background: var(--md-primary-hover);
  box-shadow: var(--md-elev-2);
}

/* tonal —— 次要操作，保留色彩关联但不抢主操作 */
.btn--tonal {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}
.btn--tonal:hover:not(:disabled) { box-shadow: var(--md-elev-1); }

/* outlined —— 第三层级 */
.btn--outlined {
  background: transparent;
  color: var(--md-primary);
  border: 1px solid var(--md-outline-strong);
}
.btn--outlined:hover:not(:disabled) { background: var(--md-surface-2); }

/* text —— 行内操作 */
.btn--text {
  padding: 0 12px;
  min-height: 36px;
  background: transparent;
  color: var(--md-primary);
}
.btn--text:hover:not(:disabled) { background: var(--md-surface-2); }

/* 图标按钮：正方形触达区，满足 44px 移动端点按目标 */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--md-radius-full);
  background: transparent;
  color: var(--md-on-surface-variant);
  cursor: pointer;
  transition: background var(--dur-short) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--md-surface-2); }
.icon-btn svg { width: 20px; height: 20px; }

/* 悬浮“回到顶部” */
.fab {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: var(--z-fab);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--md-radius-lg);
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  box-shadow: var(--md-elev-3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-medium) var(--ease-standard),
              transform var(--dur-medium) var(--ease-emphasized),
              visibility var(--dur-medium);
}
.fab[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.fab svg { width: 22px; height: 22px; }

/* 水波纹：由 ui.js 在 pointerdown 时插入 span 并自行移除 */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: .22;
  pointer-events: none;
  animation: ripple-expand 520ms var(--ease-standard) forwards;
}
@keyframes ripple-expand {
  to { transform: scale(2.4); opacity: 0; }
}

/* ---------------------------------------------------------------- 文本输入 */
/* Material 轮廓式输入框：label 常驻顶部（不用浮动动画，中文标签浮动时更容易糊） */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--md-on-surface-variant);
  letter-spacing: .02em;
}
.field__control {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-3);
  background: var(--md-surface);
  border: 1px solid var(--md-outline-strong);
  border-radius: var(--md-radius-sm);
  transition: border-color var(--dur-short) var(--ease-standard),
              box-shadow var(--dur-short) var(--ease-standard);
}
.field__control:focus-within {
  border-color: var(--md-primary);
  box-shadow: inset 0 0 0 1px var(--md-primary);
}
.field__control svg { width: 20px; height: 20px; color: var(--md-on-surface-faint); flex: none; }
.field__control input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--md-on-surface);
}
.field__control input::placeholder { color: var(--md-on-surface-faint); }
.field__hint { font-size: var(--fs-xs); color: var(--md-on-surface-faint); }

/* ---------------------------------------------------------------- 卡片 */
.card {
  background: var(--md-surface);
  border-radius: var(--md-radius-lg);
  padding: var(--sp-4);
  border: 1px solid var(--md-outline-variant);
}
.card--elev { border-color: transparent; box-shadow: var(--md-elev-1); }
.card--tint { background: var(--md-surface-1); }
.card__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--md-on-surface-variant);
  margin: 0 0 var(--sp-3);
  letter-spacing: .02em;
}
.card__title svg { width: 18px; height: 18px; color: var(--md-primary); }

/* ---------------------------------------------------------------- 胶囊标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--md-outline-strong);
  border-radius: var(--md-radius-sm);
  background: var(--md-surface);
  color: var(--md-on-surface-variant);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-short) var(--ease-standard),
              border-color var(--dur-short) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { background: var(--md-surface-2); }
.chip[aria-pressed="true"] {
  background: var(--md-primary-container);
  border-color: transparent;
  color: var(--md-on-primary-container);
  font-weight: 500;
}
.chip__sub { font-size: var(--fs-xs); opacity: .7; }

/* 只读徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--md-radius-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .02em;
  background: var(--md-surface-3);
  color: var(--md-on-surface-variant);
}
.badge--sun { background: rgba(249, 171, 0, .18); color: var(--sun-rise-deep); }
.badge--night { background: rgba(26, 58, 143, .14); color: var(--night); }
.badge--ok { background: rgba(30, 142, 62, .14); color: var(--md-success); }
.badge--warn { background: rgba(242, 153, 0, .18); color: #b06000; }

/* 横向可滚动的一排chip（城市快捷选择），窄屏不换行挤压 */
.chip-row {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-1);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.chip-row::-webkit-scrollbar { height: 4px; }
.chip-row::-webkit-scrollbar-thumb { background: var(--md-outline); border-radius: 2px; }

/* ---------------------------------------------------------------- 首屏主结果卡 */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--md-radius-xl);
  padding: var(--sp-5);
  color: #fff;
  /* 随时间变化的天空渐变。三个 stop 让它在“晨昏”时段也有颜色层次，
     纯双色线性渐变在日出前后会显得很平。 */
  background: linear-gradient(160deg, #1a3a8f 0%, #4f5bd5 38%, #f9ab00 100%);
  box-shadow: var(--md-elev-3);
}
.hero[data-phase="day"] { background: linear-gradient(160deg, #1a73e8 0%, #4fa3f7 55%, #fbbc04 100%); }
.hero[data-phase="night"] { background: linear-gradient(160deg, #0b1a3f 0%, #1a3a8f 60%, #3b5bdb 100%); }
.hero[data-phase="twilight"] { background: linear-gradient(160deg, #2b2a5e 0%, #e8710a 70%, #f9ab00 100%); }

/* 卡片上的装饰性光晕，纯 CSS，不额外请求图片 */
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .38), transparent 68%);
  pointer-events: none;
}

.hero__place {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
}
.hero__place-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-h3);
  font-weight: 500;
}
.hero__place-name svg { width: 18px; height: 18px; }
.hero__coords {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  opacity: .82;
}
.hero .badge {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  backdrop-filter: blur(2px);
}

/* 日出 / 日落 两个大数字 */
.hero__times {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.hero__time { text-align: center; }
.hero__time-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--fs-sm);
  opacity: .92;
  margin-bottom: 2px;
}
.hero__time-label svg { width: 16px; height: 16px; }
.hero__time-value {
  font-family: var(--font-mono);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.hero__time-meta { font-size: var(--fs-xs); opacity: .85; font-variant-numeric: tabular-nums; }

.hero__divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, .28);
}

/* 倒计时 */
.hero__countdown {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--md-radius-md);
  background: rgba(255, 255, 255, .16);
}
.hero__countdown-label { font-size: var(--fs-sm); opacity: .92; }
.hero__countdown-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* 昼长进度条：直观显示“今天已经过去多少白昼” */
.hero__bar {
  position: relative;
  height: 6px;
  border-radius: var(--md-radius-full);
  background: rgba(255, 255, 255, .26);
  margin: var(--sp-4) 0 var(--sp-2);
  overflow: hidden;
}
.hero__bar-fill {
  height: 100%;
  border-radius: var(--md-radius-full);
  background: #fff;
  transition: width var(--dur-long) var(--ease-standard);
}
.hero__bar-meta {
  position: relative;
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  opacity: .9;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .hero { border-radius: var(--md-radius-lg); padding: var(--sp-4); }
  /* 窄屏把日出/日落改成上下堆叠，分隔线转成横向 */
  .hero__times { grid-template-columns: 1fr; gap: var(--sp-3); }
  .hero__divider { width: 100%; height: 1px; }
  .hero__time-value { font-size: clamp(38px, 13vw, 52px); }
}

/* ---------------------------------------------------------------- 搜索 / 定位面板 */
.locate {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: end;
  padding: var(--sp-4);
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-lg);
  box-shadow: var(--md-elev-1);
}
@media (max-width: 780px) {
  .locate { grid-template-columns: minmax(0, 1fr); }
  .locate .btn { width: 100%; }
}

/* 搜索建议下拉 */
.combo { position: relative; min-width: 0; }
.combo__list {
  position: absolute;
  z-index: var(--z-dropdown);
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
  padding: var(--sp-1) 0;
  list-style: none;
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-md);
  box-shadow: var(--md-elev-3);
}
.combo__list li { margin: 0; }
.combo__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 10px var(--sp-4);
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--md-on-surface);
  text-align: left;
  cursor: pointer;
}
.combo__item:hover,
.combo__item[data-active="true"] { background: var(--md-surface-2); }
.combo__item svg { width: 18px; height: 18px; color: var(--md-on-surface-faint); flex: none; }
.combo__item-main { min-width: 0; }
.combo__item-name { font-weight: 500; }
.combo__item-sub {
  font-size: var(--fs-xs);
  color: var(--md-on-surface-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo__empty { padding: 12px var(--sp-4); font-size: var(--fs-sm); color: var(--md-on-surface-faint); }

/* ---------------------------------------------------------------- 太阳弧图形 */
.sunpath { padding: var(--sp-4); }
.sunpath__svg { width: 100%; height: auto; overflow: visible; }
.sunpath__arc { fill: none; stroke-width: 8; stroke-linecap: round; }
/* 地平线以下的一段用虚线，表示太阳在地平线之下 */
.sunpath__arc--below { stroke-dasharray: 4 8; opacity: .45; }
.sunpath__horizon { stroke: var(--md-outline-strong); stroke-width: 1.5; stroke-dasharray: 2 4; }
.sunpath__marker { transition: transform var(--dur-medium) var(--ease-standard); }
.sunpath__glow { filter: blur(6px); opacity: .55; }
.sunpath__caption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--md-on-surface-faint);
}
.sunpath__caption span { display: inline-flex; align-items: center; gap: 6px; }
.sunpath__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------------------------------------------------------------- 光照阶段时间轴 */
.phases { display: flex; flex-direction: column; gap: 2px; }
.phase {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: 9px var(--sp-3);
  border-radius: var(--md-radius-sm);
  font-size: var(--fs-sm);
}
.phase:nth-child(odd) { background: var(--md-surface-1); }
.phase__swatch {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--md-on-surface-variant);
}
.phase__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px var(--md-surface);
}
.phase__range {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--md-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phase__len {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--md-on-surface-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 当前所处的阶段高亮 */
.phase[data-now="true"] {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}
.phase[data-now="true"] .phase__swatch,
.phase[data-now="true"] .phase__len { color: var(--md-on-primary-container); }
@media (max-width: 560px) {
  .phase { grid-template-columns: 78px 1fr; font-size: var(--fs-xs); }
  .phase__len { grid-column: 2; justify-self: start; }
}

/* ---------------------------------------------------------------- 统计小格 */
.stat {
  padding: var(--sp-3);
  border-radius: var(--md-radius-md);
  background: var(--md-surface-1);
  border: 1px solid var(--md-outline-variant);
}
.stat__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  color: var(--md-on-surface-faint);
  margin-bottom: 4px;
}
.stat__label svg { width: 14px; height: 14px; }
.stat__value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--md-on-surface);
  line-height: 1.3;
}
.stat__value small { font-size: var(--fs-xs); font-weight: 400; color: var(--md-on-surface-faint); margin-left: 3px; }
.stat__delta { font-size: var(--fs-xs); margin-top: 2px; }
.stat__delta--up { color: var(--md-success); }
.stat__delta--down { color: var(--sun-set-deep); }

/* ---------------------------------------------------------------- 表格 */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-md);
  background: var(--md-surface);
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  white-space: nowrap;
}
table.data th,
table.data td {
  padding: 10px var(--sp-3);
  text-align: right;
  border-bottom: 1px solid var(--md-outline-variant);
  font-variant-numeric: tabular-nums;
}
table.data th:first-child,
table.data td:first-child { text-align: left; position: sticky; left: 0; background: inherit; }
table.data thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--md-surface-2);
  color: var(--md-on-surface-variant);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: .02em;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--md-surface-1); }
table.data tbody tr[data-today="true"] td {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  font-weight: 500;
}
table.data td.num { font-family: var(--font-mono); }

/* 昼长条：表格内联的迷你可视化 */
.mini-bar {
  display: inline-block;
  width: 64px;
  height: 6px;
  border-radius: var(--md-radius-full);
  background: var(--md-surface-3);
  overflow: hidden;
  vertical-align: middle;
}
.mini-bar > i {
  display: block;
  height: 100%;
  border-radius: var(--md-radius-full);
  background: linear-gradient(90deg, var(--sun-rise), var(--sun-set));
}

/* ---------------------------------------------------------------- 分段控件 / 标签页 */
.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-full);
  background: var(--md-surface);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--md-radius-full);
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--md-on-surface-variant);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-short) var(--ease-standard);
}
.segmented button[aria-selected="true"] {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  font-weight: 500;
}
.segmented button svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- 地图 */
.map-panel { position: relative; }
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.map-stage {
  position: relative;
  min-height: 340px;
  border-radius: var(--md-radius-md);
  overflow: hidden;
  background: var(--md-surface-2);
  border: 1px solid var(--md-outline-variant);
  z-index: var(--z-map);
}
.map-stage__view { width: 100%; height: 100%; }

/* 离线世界地图（SVG，零外部请求） */
.worldmap { position: relative; }
.worldmap svg { width: 100%; height: auto; cursor: crosshair; touch-action: none; }
.worldmap__sea { fill: #dbe7f6; }
.worldmap__land { fill: #eef1f4; stroke: #c9d2db; stroke-width: .5; }
.worldmap__grid { stroke: #c3d2e4; stroke-width: .4; fill: none; }
.worldmap__equator { stroke: #b3c5dc; stroke-width: .7; }
.worldmap__night { fill: var(--night); opacity: .26; pointer-events: none; }
.worldmap__pin { fill: var(--sun-set-deep); stroke: #fff; stroke-width: 1.2; }
.worldmap__pin-halo { fill: var(--sun-set-deep); opacity: .25; }

@media (prefers-color-scheme: dark) {
  .worldmap__sea { fill: #16202e; }
  .worldmap__land { fill: #2a2f36; stroke: #3c444d; }
  .worldmap__grid { stroke: #2c3949; }
  .worldmap__equator { stroke: #35455a; }
}

/* Amap 容器由高德自行注入 DOM，这里只负责尺寸与层级 */
#amap-host { width: 100%; height: 100%; min-height: 340px; }
.amap-logo, .amap-copyright { opacity: .75; }

/* 地图右下角的“当前点”浮层 */
.map-readout {
  position: absolute;
  left: var(--sp-3);
  bottom: var(--sp-3);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 7px var(--sp-3);
  border-radius: var(--md-radius-full);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--md-elev-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: #1f1f1f;
}
@media (prefers-color-scheme: dark) {
  .map-readout { background: rgba(32, 33, 36, .94); color: #e3e3e3; }
}

/* ---------------------------------------------------------------- 折叠面板（FAQ） */
.faq { display: flex; flex-direction: column; gap: var(--sp-2); }
.faq details {
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-md);
  overflow: hidden;
}
.faq details[open] { box-shadow: var(--md-elev-1); }
.faq summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-weight: 500;
  font-size: var(--fs-body);
  cursor: pointer;
  list-style: none;
  color: var(--md-on-surface);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 8px; height: 8px;
  border-right: 2px solid var(--md-on-surface-faint);
  border-bottom: 2px solid var(--md-on-surface-faint);
  transform: rotate(45deg);
  transition: transform var(--dur-medium) var(--ease-emphasized);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { background: var(--md-surface-1); }
.faq__body {
  padding: 0 var(--sp-4) var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--md-on-surface-variant);
  line-height: var(--lh-body);
}
.faq__body p { margin-bottom: var(--sp-2); }

/* ---------------------------------------------------------------- 术语表 */
.terms { display: grid; gap: 0; }
.terms__row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--md-outline-variant);
}
.terms__row:last-child { border-bottom: 0; }
.terms__key {
  font-weight: 600;
  color: var(--md-on-surface);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.terms__key i {
  width: 10px; height: 10px; border-radius: 3px; flex: none;
}
.terms__val { font-size: var(--fs-sm); color: var(--md-on-surface-variant); margin: 0; }
@media (max-width: 560px) {
  .terms__row { grid-template-columns: 1fr; gap: 4px; }
}

/* 通用图文列表（使用指南 / 相关工具） */
.steplist { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steplist li {
  position: relative;
  padding-left: 38px;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--md-on-surface-variant);
}
.steplist li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* 内链卡片网格 */
.linkcard {
  display: block;
  padding: var(--sp-3);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-md);
  background: var(--md-surface);
  color: var(--md-on-surface);
  transition: box-shadow var(--dur-short) var(--ease-standard),
              border-color var(--dur-short) var(--ease-standard);
}
.linkcard:hover {
  text-decoration: none;
  border-color: var(--md-primary-fixed-dim);
  box-shadow: var(--md-elev-2);
}
.linkcard strong { display: block; font-size: var(--fs-sm); margin-bottom: 2px; }
.linkcard span { font-size: var(--fs-xs); color: var(--md-on-surface-faint); }

/* ---------------------------------------------------------------- 状态：骨架 / 空 / 错误 */
.skeleton {
  border-radius: var(--md-radius-sm);
  background: linear-gradient(90deg, var(--md-surface-2) 25%, var(--md-surface-3) 37%, var(--md-surface-2) 63%);
  background-size: 400% 100%;
  animation: skeleton-sweep 1.4s ease-in-out infinite;
}
@keyframes skeleton-sweep {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.skeleton--text { height: 14px; margin-bottom: 8px; }
.skeleton--lg { height: 52px; }

.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--md-radius-md);
  font-size: var(--fs-sm);
  background: var(--md-surface-2);
  color: var(--md-on-surface-variant);
}
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice--error { background: var(--md-error-container); color: var(--md-error); }
.notice--warn { background: rgba(242, 153, 0, .14); color: #9a5b00; }
@media (prefers-color-scheme: dark) {
  .notice--warn { color: #fdd663; }
}

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sp-5) + 48px);
  z-index: var(--z-toast);
  transform: translate(-50%, 12px);
  padding: 12px 20px;
  border-radius: var(--md-radius-sm);
  background: var(--md-surface-inverse);
  color: var(--md-surface);
  font-size: var(--fs-sm);
  box-shadow: var(--md-elev-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-medium) var(--ease-standard),
              transform var(--dur-medium) var(--ease-emphasized),
              visibility var(--dur-medium);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast[data-visible="true"] { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* 数据来源脚注 */
.srcline {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--md-on-surface-faint);
}
.srcline a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- 广告位 */
/* 由 assets/js/site-common.js 管理。
   没有配置广告代码时，容器保持 hidden —— 页面上不会留下一块空白，
   也不会改变任何现有布局。只有在 ads.enabled 打开、且该槽位填了代码之后，
   容器才会被取消隐藏并注入内容。 */
.ad-slot { margin: var(--sp-5) 0; }

/* 广告标识：按《互联网广告管理办法》，互联网广告应当具有可识别性。
   由脚本在广告位有内容时自动插入。 */
.ad-slot__label {
  margin-bottom: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--md-on-surface-faint);
  letter-spacing: .12em;
  text-align: center;
}

/* 广告内容居中；广告代码的宽度不受本站栅格约束，这里只做上限保护 */
.ad-slot__body {
  display: flex;
  justify-content: center;
}
.ad-slot__body > * { max-width: 100%; }
.ad-slot__body ins { display: block; }
