/* ============================================================
   TodayWaifu Gallery — 终端视觉系统
   纸 / 墨 / 信号色。全直角，细线，等宽数字。
   ============================================================ */

:root {
  --paper: #f1efe4;
  --paper-deep: #e4e1d1;
  --panel: #fbfaf2;
  --panel-2: #f5f3e7;
  --ink: #242c1d;
  --ink-2: #414a37;
  --ink-3: #6d755c;
  --ink-4: #9aa188;
  --line: #d9d7c4;
  --line-2: #c1c3aa;
  --accent: #41603a;
  --accent-2: #4f7347;
  --signal: #d8ec7a;
  --signal-2: #c6dd5e;
  --wash: #e9efd9;
  --moss: #5d8a4d;
  --moss-deep: #37522f;
  --acid: #d8ec7a;
  --danger: #a4402c;
  --danger-wash: #f6e6df;
  --warn: #8a5f12;
  --warn-wash: #f6eeda;
  --ok: #3d6733;
  --ok-wash: #e3efd9;
  --rail: 238px;
  --top: 64px;
  --max: 1320px;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --font-mono: "Space Grotesk", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--ink-3) var(--paper);
  scrollbar-width: thin;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--signal); color: var(--ink); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--moss-deep); }

button, input, select, textarea { font-family: inherit; }
button { color: inherit; }

img { max-width: 100%; }

[v-cloak] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--moss-deep);
  outline-offset: 2px;
}

/* 表单控件只保留自身的单层描边，不要额外外框 */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
}

/* ---------- 背景舞台：整页铺满 ---------- */

.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: var(--paper-deep);
  pointer-events: none;
}

.bg-stage__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  opacity: 1;
  animation: scene-in 1.2s var(--ease) both;
}

@keyframes scene-in {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

/* 整页遮罩：左侧略重保证文字可读，右侧通透，图片仍然整页铺满 */
.bg-veil {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(240, 239, 230, .86) 0%,
      rgba(240, 239, 230, .74) 16%,
      rgba(240, 239, 230, .48) 34%,
      rgba(240, 239, 230, .22) 50%,
      rgba(240, 239, 230, .04) 66%,
      rgba(240, 239, 230, 0) 78%),
    linear-gradient(180deg,
      rgba(240, 239, 230, .20) 0%,
      rgba(240, 239, 230, .02) 26%,
      rgba(240, 239, 230, .10) 68%,
      rgba(240, 239, 230, .40) 100%);
}

/* 细网格 */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(17, 19, 9, .05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 19, 9, .03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .06) 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .06) 70%, transparent);
}

/* 数据页：背景做柔焦，保留色与形，不抢文字 */
body.data-page .bg-stage__img { opacity: 1; }
body.data-page .bg-veil {
  background: linear-gradient(180deg,
    rgba(241, 239, 228, .50) 0%,
    rgba(241, 239, 228, .38) 40%,
    rgba(241, 239, 228, .58) 100%);
}

/* 纸张颗粒 */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 结构 ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(16px, 3.4vw, 40px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 顶栏背景用渐隐层，不画分隔线、不做模糊，避免和背景图产生割裂 */
.topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 -34px 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(240, 239, 230, .88) 0%,
    rgba(240, 239, 230, .58) 46%,
    rgba(240, 239, 230, .18) 74%,
    rgba(240, 239, 230, 0) 100%);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 0;
  background: var(--paper-deep);
}

.brand__text { min-width: 0; display: block; }
.brand__name {
  display: block;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .04em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand__en {
  display: block;
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: .24em;
  color: var(--ink-3);
  line-height: 1.3;
  white-space: nowrap;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.topnav a,
.topnav button {
  appearance: none;
  border: 1px solid transparent;
  background: none;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s;
}
.topnav a:hover,
.topnav button:hover {
  background: rgba(240, 239, 230, .86);
  color: var(--ink);
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--ink);
}
.topnav .is-active {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--ink);
}

.topmeta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--ink-3);
  white-space: nowrap;
}
.topmeta .dot {
  width: 5px;
  height: 5px;
  background: var(--moss);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(93,138,77,.16);
}

/* ---------- 标题 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink);
}

.hero {
  padding: clamp(30px, 5vw, 62px) 0 clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--ink);
}

.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hero h1,
.display {
  margin: 8px 0 0;
  font-size: clamp(34px, 5.4vw, 68px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.03em;
}

.hero__en {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.hero__side {
  font-size: 12.5px;
  color: var(--ink-2);
  max-width: 430px;
  line-height: 1.75;
  padding-bottom: 4px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.section-head__idx {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-3);
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
}
.section-head__en {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--ink-4);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- 卡片 ---------- */

.card {
  position: relative;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line-2);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.card__idx {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--ink-4);
}
.card__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  margin: 0;
}
.card__en {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: .18em;
  color: var(--ink-4);
  text-transform: uppercase;
  white-space: nowrap;
}
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  pointer-events: none;
}

.grid { display: grid; gap: 14px; }
.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)); }

@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 指标 ---------- */

.stat {
  position: relative;
  min-width: 0;
  padding: 15px 16px 14px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: var(--signal);
}
.stat__k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat__v {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat__s {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ---------- 按钮 ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 17px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: var(--panel);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s, transform .08s;
  user-select: none;
}
.btn:hover { background: var(--signal); border-color: var(--accent); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn svg { flex: none; }

.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn--ghost:hover { background: var(--wash); border-color: var(--accent); color: var(--accent); }

.btn--signal { background: var(--signal); border-color: var(--accent); color: var(--ink); }
.btn--signal:hover { background: var(--accent); color: var(--panel); }

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

.btn--sm { height: 30px; padding: 0 10px; font-size: 11px; }
.btn--xs { height: 25px; padding: 0 8px; font-size: 10px; letter-spacing: .06em; }
.btn--block { width: 100%; }

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

/* ---------- 表单 ---------- */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label,
.field-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.field > label .opt,
.opt {
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-4);
  text-transform: none;
}
.field > label .req,
.req {
  color: var(--moss-deep);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: none;
}

.input,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  height: 42px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: #fffdf7;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

textarea {
  height: auto;
  min-height: 104px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.7;
}

.input:hover,
input:hover,
select:hover,
textarea:hover { border-color: var(--ink-3); }

.input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(217, 242, 110, .42);
}

input::placeholder,
textarea::placeholder { color: var(--ink-4); opacity: 1; }

select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111309' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  margin: 0;
  flex: none;
}

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

@media (max-width: 760px) {
  .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
}

.form-note {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-3);
}

/* ---------- 标签 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--ok { background: var(--ok-wash); border-color: #b6cdaa; color: var(--ok); }
.tag--warn { background: var(--warn-wash); border-color: #ddc99a; color: var(--warn); }
.tag--bad { background: var(--danger-wash); border-color: #e0b7aa; color: var(--danger); }
.tag--moss { background: var(--wash); border-color: #b9cba3; color: var(--moss-deep); }
.tag--solid { background: var(--accent); border-color: var(--accent); color: var(--panel); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  background: #fffdf7;
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

/* ---------- 表格 ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table.data {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data thead th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .13em;
  color: var(--ink-3);
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink-2);
}

.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover td { background: var(--wash); }
.data tbody tr { transition: background .12s; }

.data .num,
.data .right { text-align: right; }
.data .num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data .mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.data .nowrap { white-space: nowrap; }
.data .muted { color: var(--ink-4); }
.data .strong { color: var(--ink); font-weight: 700; }

@media (max-width: 860px) {
  .hide-sm { display: none !important; }
}

.table-scroll-hint {
  display: none;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: .06em;
}
@media (max-width: 860px) {
  .table-scroll-hint { display: block; }
}

/* ---------- 空状态 / 提示 ---------- */

.empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.empty__mark {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-4);
  margin-bottom: 8px;
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.banner svg { flex: none; margin-top: 2px; }
.banner--err { border-color: #d9a99b; background: var(--danger-wash); color: #7d2b1b; }
.banner--ok { border-color: #b6cdaa; background: var(--ok-wash); color: var(--ok); }
.banner--warn { border-color: #ddc99a; background: var(--warn-wash); color: var(--warn); }

/* ---------- 图表 ---------- */

.chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 148px;
  padding-top: 10px;
  border-bottom: 1px solid var(--line-2);
}

.chart__col {
  position: relative;
  flex: 1 1 0;
  min-width: 2px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.chart__bar {
  width: 100%;
  min-height: 2px;
  background: var(--ink-2);
  transition: background .16s, height .35s var(--ease);
}

.chart__col:hover .chart__bar { background: var(--moss); }

.chart__tip {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 7px;
  background: var(--panel);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: .06em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s;
  z-index: 3;
}
.chart__col:hover .chart__tip { opacity: 1; }

.chart__axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--ink-4);
}

/* ---------- 进度 ---------- */

.progress {
  height: 8px;
  background: var(--paper-deep);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: var(--ink);
  transition: width .25s var(--ease);
}

/* ---------- 开关 ---------- */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row__title { font-weight: 700; font-size: 13px; }
.switch-row__sub { margin-top: 3px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }

.switch {
  position: relative;
  display: inline-block;
  flex: none;
  width: 40px;
  height: 21px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch__track {
  position: absolute;
  inset: 0;
  background: var(--paper-deep);
  border: 1px solid var(--line-2);
  transition: background .2s, border-color .2s;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  background: var(--ink-4);
  transition: transform .2s var(--ease), background .2s;
}
.switch input:checked + .switch__track { background: var(--ink); border-color: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(19px); background: var(--signal); }

/* ---------- 弹窗 ---------- */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 19, 9, .58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal {
  width: min(540px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--ink);
  animation: modal-in .18s var(--ease) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ink);
}
.modal__title { font-weight: 800; font-size: 14px; }
.modal__x {
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal__x:hover { border-color: var(--ink); background: var(--ink); color: var(--signal); }
.modal__body { padding: 16px; }
.modal__foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 16px 16px;
  flex-wrap: wrap;
}

/* ---------- 提示条 ---------- */

.toasts {
  position: fixed;
  top: calc(var(--top) + 12px);
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 10px 13px;
  background: var(--ink);
  color: var(--paper);
  border-left: 3px solid var(--signal);
  font-size: 12.5px;
  line-height: 1.55;
  box-shadow: 0 10px 30px rgba(17,19,9,.18);
  animation: toast-in .2s var(--ease) both;
  overflow-wrap: anywhere;
}
.toast--err { border-left-color: #e07b62; }
.toast--ok { border-left-color: var(--signal); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- 页脚 ---------- */

.footer {
  margin-top: clamp(32px, 6vw, 64px);
  border-top: 1px solid var(--ink);
  padding: 18px 0 26px;
}
.footer .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-3);
}
.footer__meta {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 头像 ---------- */

.avatar {
  display: block;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-deep);
}
.avatar--sm { width: 30px; height: 30px; }
.avatar--lg { width: 72px; height: 72px; }
.avatar--xl { width: clamp(96px, 12vw, 140px); height: clamp(96px, 12vw, 140px); }

/* ---------- 通用 ---------- */

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-4); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.hr { height: 1px; background: var(--line); border: 0; margin: 14px 0; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* 竖排小字 */
.vtext {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .32em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* 信号色块 */
.signal-bar {
  display: flex;
  height: 4px;
  width: 100%;
}
.signal-bar span { height: 100%; }
.signal-bar span:nth-child(1) { width: 18%; background: var(--ink); }
.signal-bar span:nth-child(2) { width: 30%; background: var(--signal); }
.signal-bar span:nth-child(3) { width: 8%; background: var(--moss); }
.signal-bar span:nth-child(4) { width: 44%; background: var(--paper-deep); }

/* 移动端抽屉遮罩 */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(17, 19, 9, .45);
  backdrop-filter: blur(2px);
}

/* 移动端底部操作条 */
.mobile-only { display: none; }
@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
}

@media (max-width: 640px) {
  :root { --top: 58px; }
  body { font-size: 13.5px; }
  .topbar { gap: 10px; }
  .topbar .wrap { gap: 10px; }
  .brand__name { font-size: 13.5px; }
  .brand__en { display: none; }
  .brand__mark { width: 30px; height: 30px; font-size: 19px; }
  .topmeta { display: none; }
  .topnav a, .topnav button { padding: 6px 8px; font-size: 11px; }
  .hero { padding-top: 24px; }
  .hero__side { max-width: none; }
  .card__body { padding: 13px; }
  .modal { width: 100%; }
  .toasts { top: calc(var(--top) + 8px); right: 8px; width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
