/* Ru · 夜间任务台。仅覆盖表现层，保留全部业务 DOM 与协议钩子。 */
:root {
  /* primitive */
  --luna-ink-950: oklch(0.145 0.025 285);
  --luna-ink-900: oklch(0.195 0.035 285);
  --luna-ink-850: oklch(0.235 0.04 285);
  --luna-line: oklch(0.38 0.055 300 / 0.72);
  --luna-paper: oklch(0.96 0.018 320);
  --luna-muted: oklch(0.77 0.025 300);
  --luna-pink: #ef2d5e;
  --luna-blue: #4f5af0;
  --luna-mint: #34d399;
  --luna-amber: #fbbf24;
  --luna-red: #f87171;
  --luna-yellow: #ffe71e;

  /* semantic */
  --bg: var(--luna-ink-950);
  --card: oklch(0.205 0.035 285 / 0.9);
  --card-strong: var(--luna-ink-900);
  --border: var(--luna-line);
  --text: var(--luna-paper);
  --dim: var(--luna-muted);
  --accent: var(--luna-pink);
  --accent2: oklch(0.68 0.2 350);
  --danger: var(--luna-red);
  --ok: var(--luna-mint);
  --warn: var(--luna-amber);
  --shadow: 0 24px 70px oklch(0.08 0.02 285 / 0.46);
  --glow: 0 0 0 1px oklch(0.66 0.23 350 / 0.35), 0 10px 28px oklch(0.55 0.24 350 / 0.18);
  --radius: 16px;
  --bar: linear-gradient(90deg, var(--luna-pink), var(--luna-blue));
  --veil: linear-gradient(90deg, oklch(0.13 0.025 285 / 0.98) 0%, oklch(0.14 0.025 285 / 0.9) 42%, oklch(0.12 0.03 300 / 0.52) 100%);
  --hero-op: 0.78;

  /* component */
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-data: "Cascadia Mono", "JetBrains Mono", "Microsoft YaHei", monospace;
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { background: var(--bg); color-scheme: dark; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
body::before {
  inset: 0;
  z-index: 1;
  background: var(--veil);
  animation: none;
}
body::after {
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, oklch(0.9 0.02 320 / 0.018) 3px 4px),
    radial-gradient(circle at 50% 45%, transparent 35%, oklch(0.08 0.02 285 / 0.5) 100%);
  animation: none;
}
.auth-hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  opacity: var(--hero-op);
}
#view-auth, #view-console, #boot-skeleton { position: relative; z-index: 2; }
#view-auth, #view-console { animation: none; }
::selection { background: var(--luna-pink); color: var(--luna-paper); }
:focus-visible { outline: 2px solid var(--luna-yellow) !important; outline-offset: 3px; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, .btn, .auth-tab, .mode-tab, .seg-btn, .map-pick, .row-menu-btn { touch-action: manipulation; }

.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}
.small { font-size: 12px; }
.dim { color: var(--dim); }

/* 通用控件：切角来自任务终端语言，交互仍保持原生语义。 */
.btn {
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid var(--border);
  border-radius: 7px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  background: oklch(0.255 0.04 285 / 0.94);
  color: var(--text);
  font-family: var(--font);
  font-weight: 650;
  transition: transform 160ms var(--ease-out), background-color 160ms ease-out, border-color 160ms ease-out, opacity 160ms ease-out;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); background: oklch(0.31 0.055 300); box-shadow: none; border-color: var(--accent2); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn.primary, .mode-tab.active, .seg-btn.active, .mode-chip.active {
  border: 1px solid oklch(0.75 0.18 350);
  background: var(--luna-pink);
  color: oklch(0.985 0.005 350);
  box-shadow: none;
}
.btn.primary:hover:not(:disabled) { background: oklch(0.64 0.235 355); }
.btn.ghost { background: transparent; color: var(--dim); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: oklch(0.28 0.04 285 / 0.72); }
.btn.danger { color: var(--danger); border-color: oklch(0.65 0.19 20 / 0.75); background: transparent; }
.btn.tiny { min-height: 32px; }
.btn:disabled { opacity: 0.48; }
.inp, select, textarea {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: oklch(0.155 0.025 285 / 0.94);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
}
.inp::placeholder { color: oklch(0.68 0.025 300); }
.inp:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.6 0.22 350 / 0.18); }
.fld-label, .fld-hint { color: var(--dim); }
.chk input, .sess-check, input[type="checkbox"], input[type="radio"] { accent-color: var(--luna-pink); }
.fs { border-color: var(--border); border-radius: 10px; }

/* 门禁：全屏任务授权台，而不是居中的云朵卡片。 */
.license-gate {
  justify-items: stretch;
  align-content: center;
  gap: 24px;
  padding: clamp(76px, 10vh, 112px) clamp(20px, 6vw, 96px) 40px;
  background: linear-gradient(90deg, oklch(0.13 0.025 285 / 0.36), transparent);
}
.license-gate::before {
  content: "";
  position: fixed;
  top: 28px;
  right: clamp(20px, 6vw, 96px);
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: radial-gradient(circle at 68% 34%, transparent 0 48%, oklch(0.74 0.18 350 / 0.24) 50% 52%, transparent 54%);
  box-shadow: inset 0 0 0 8px oklch(0.2 0.03 285 / 0.48);
  pointer-events: none;
}
.license-brand {
  position: fixed;
  top: 26px;
  left: clamp(20px, 6vw, 96px);
  z-index: 2;
  justify-content: flex-start;
  color: var(--text);
  font-family: var(--font-data);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.license-brand::after { content: "// ACCESS 01"; margin-left: 12px; color: var(--dim); font-size: 10px; letter-spacing: 0.18em; }
.license-brand img { width: 44px; height: 44px; object-fit: contain; }
.license-card {
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 0.94fr);
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  background: oklch(0.18 0.03 285 / 0.88);
  box-shadow: 0 32px 100px oklch(0.06 0.02 285 / 0.7);
}
.license-content { position: relative; padding: clamp(32px, 5vw, 64px); }
.license-content::before { content: "ENCRYPTED CHANNEL / SINGLE DEVICE"; display: block; margin-bottom: 38px; color: var(--dim); font-family: var(--font-data); font-size: 10px; letter-spacing: 0.14em; }
.license-kicker { color: var(--luna-pink); font-family: var(--font-data); font-size: 12px; letter-spacing: 0.22em; }
.license-content h1 { max-width: 12ch; margin-top: 10px; color: var(--text); font-size: clamp(32px, 4.2vw, 54px); line-height: 1.16; letter-spacing: -0.035em; }
.license-intro { max-width: 34rem; color: var(--dim); font-size: 16px; line-height: 1.75; }
.license-label { color: var(--text); font-family: var(--font-data); font-size: 13px; letter-spacing: 0.08em; }
.license-input { font-family: var(--font-data); letter-spacing: 0.08em; }
.license-hint { color: var(--dim); }
.license-submit { min-height: 52px; }
.license-message { color: var(--dim); }
.license-message.is-error { color: var(--danger); }
.license-message.is-success { color: var(--ok); }
.license-message.is-info { color: var(--luna-yellow); }
.license-art {
  overflow: hidden;
  border-left: 1px solid var(--border);
  background:
    linear-gradient(0deg, oklch(0.15 0.03 285 / 0.9), transparent 58%),
    radial-gradient(circle at 50% 38%, oklch(0.62 0.21 350 / 0.3), transparent 46%),
    oklch(0.16 0.03 285 / 0.68);
}
.license-art::before {
  top: 9%;
  right: auto;
  width: min(32vw, 360px);
  height: min(32vw, 360px);
  border: 1px solid oklch(0.65 0.19 350 / 0.38);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 34px, oklch(0.7 0.16 350 / 0.09) 35px 36px);
}
.license-art::after { display: none; }
.license-art img { width: min(390px, 92%); filter: drop-shadow(0 20px 30px oklch(0.08 0.04 350 / 0.5)); }
.license-art p { max-width: 28ch; color: var(--dim); font-family: var(--font-data); font-size: 12px; letter-spacing: 0.04em; }

/* 登录：左叙事、右操作，页签是横向频段而不是侧栏。 */
.auth-wrap {
  max-width: 1440px;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  gap: clamp(36px, 6vw, 96px);
  padding: clamp(36px, 6vw, 88px);
}
.auth-brand { grid-column: 1; grid-row: 1; position: relative; text-align: left; align-self: center; padding: 32px 0 160px; }
.auth-brand .brand-line { justify-content: flex-start; }
.brand-logo-lg { width: 66px; height: 66px; object-fit: contain; }
.auth-kicker { color: var(--luna-pink); font-family: var(--font-data); font-size: 11px; letter-spacing: 0.24em; }
.auth-brand h1 {
  margin: 4px 0 0;
  background: none;
  color: var(--text);
  font-size: clamp(58px, 8vw, 112px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.07em;
  animation: none;
}
.auth-brand h1::after { content: "CONTROL"; display: block; margin-top: 14px; color: var(--dim); font-family: var(--font-data); font-size: 12px; font-weight: 500; letter-spacing: 0.55em; }
.auth-brand .slogan { max-width: 35rem; margin: 28px 0 0; color: var(--dim); font-size: 16px; line-height: 1.8; }
.auth-mascot { position: absolute; right: 0; bottom: -36px; width: min(300px, 46%); margin: 0; filter: drop-shadow(0 22px 32px oklch(0.08 0.03 285 / 0.5)); animation: none; }
.auth-orbits { position: absolute; left: 0; bottom: 18px; max-width: 52%; margin: 0; justify-content: flex-start; gap: 0; border-top: 1px solid var(--border); }
.orbit-chip { padding: 10px 14px 0 0; border: 0; border-radius: 0; color: var(--dim); font-family: var(--font-data); font-size: 11px; animation: none; }
.orbit-chip::before { content: "+"; margin-right: 6px; color: var(--luna-pink); }
.auth-card {
  grid-column: 2;
  grid-row: 1;
  display: block;
  align-self: center;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  clip-path: var(--cut);
  background: oklch(0.185 0.032 285 / 0.94);
}
.auth-top { padding: 26px 28px 20px; margin: 0; border-bottom: 1px solid var(--border); }
.auth-welcome { font-size: 18px; }
.auth-subtitle { display: block; margin-top: 3px; }
.auth-cloud { width: 30px; height: 30px; border: 1px solid var(--luna-pink); border-radius: 50%; background: transparent; box-shadow: inset -8px -3px 0 oklch(0.2 0.03 285); }
.auth-cloud::before, .auth-cloud::after { display: none; }
.auth-tabs { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0; margin: 0; padding: 0 18px; border-bottom: 1px solid var(--border); border-radius: 0; background: oklch(0.15 0.025 285 / 0.66); }
.auth-tab { position: relative; width: auto; min-height: 50px; padding: 10px 12px; border: 0; color: var(--dim); font-family: var(--font); text-align: center; white-space: nowrap; }
.auth-tab::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; background: var(--luna-pink); transform: scaleX(0); transition: transform 180ms var(--ease-out); }
.auth-tab.active { color: var(--text); border: 0; box-shadow: none; }
.auth-tab.active::after { transform: scaleX(1); }
.auth-pane { padding: 26px 28px 30px; }
.ts-demo { border-color: var(--border); border-radius: 7px; background: oklch(0.16 0.025 285); color: var(--dim); }
.form-msg { color: var(--danger); }
.form-msg.ok { color: var(--ok); }

/* 控制台：顶部指挥栏 + 非对称任务区。 */
#view-console:not(.hidden-view) { display: block; }
.topbar {
  position: sticky;
  inset: 0 0 auto;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 12px clamp(16px, 3vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: oklch(0.145 0.025 285 / 0.92);
  box-shadow: none;
}
.topbar-row { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; width: auto; }
.topbar-row:first-child { flex: initial; }
.topbar .brand { margin: 0 14px 0 0; text-align: left; }
.topbar .brand > span { display: block; line-height: 1.25; }
.topbar .brand > span::after { content: "RU // OPERATIONS"; display: block; margin-top: 3px; color: var(--dim); font-family: var(--font-data); font-size: 9px; letter-spacing: 0.16em; }
.brand-logo { width: 44px; height: 44px; margin: 0 8px 0 0; object-fit: contain; }
.topbar .user-email { max-width: 220px; padding: 4px 8px; font-family: var(--font-data); font-size: 12px; }
.topbar .token-chip { display: inline-flex; flex-direction: row; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 7px; background: oklch(0.21 0.035 285); font-family: var(--font-data); text-align: left; }
.topbar .token-chip b { display: inline; color: var(--luna-yellow); font-size: 18px; font-variant-numeric: tabular-nums; }
.topbar-row .spacer { display: none; }
.topbar #conn-state { font-family: var(--font-data); font-size: 11px; }
.topbar-row #btn-refresh-balance { width: auto; }
.topbar-row2 { position: static; display: flex; flex-direction: row; justify-content: flex-end; gap: 8px; margin: 0; }
.topbar-row2 .theme-anchor, .topbar-row2 .theme-anchor .btn, .topbar-row2 .btn { width: auto; }
.topbar::after { display: none; }
.topbar .more-menu { top: calc(100% + 8px); bottom: auto; }

.console-wrap {
  max-width: 1560px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 44px) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.5fr);
  grid-template-areas:
    "notice notice"
    "desk stats"
    "accounts accounts"
    "spark add";
  gap: 20px;
  align-items: stretch;
}
#notice-stack { grid-area: notice; gap: 10px; }
#space-notice, #announcement { border: 1px solid var(--border); border-radius: 8px; background: oklch(0.2 0.04 285 / 0.94); color: var(--text); }
.console-hero {
  grid-area: desk;
  min-height: 236px;
  padding: 38px 240px 34px 34px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0;
  clip-path: var(--cut);
  background:
    linear-gradient(100deg, oklch(0.2 0.04 285 / 0.96), oklch(0.22 0.07 330 / 0.74)),
    oklch(0.18 0.03 285);
  box-shadow: var(--shadow);
}
.console-hero::before { content: "MISSION / TODAY"; display: block; margin-bottom: 22px; color: var(--luna-pink); font-family: var(--font-data); font-size: 10px; letter-spacing: 0.18em; }
.console-hero h2 { max-width: 16ch; margin: 0; color: var(--text); font-size: clamp(28px, 3vw, 42px); line-height: 1.22; letter-spacing: -0.035em; }
.console-hero p { max-width: 38rem; margin-top: 14px; color: var(--dim); font-size: 15px; }
.console-hero img { right: 10px; bottom: -46px; width: 230px; filter: drop-shadow(0 16px 30px oklch(0.08 0.03 285 / 0.48)); }
.hero-note { margin-top: 20px; padding: 0; background: none; color: var(--dim); font-family: var(--font-data); font-size: 11px; }
.hero-note::before { content: "●"; margin-right: 8px; color: var(--luna-mint); }
.stat-grid { grid-area: stats; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-card { position: relative; min-height: 112px; padding: 17px; border-radius: 0; clip-path: var(--cut); background: oklch(0.2 0.035 285 / 0.92); }
.stat-card:nth-child(1), .stat-card:nth-child(2), .stat-card:nth-child(3), .stat-card:nth-child(4) { background: oklch(0.2 0.035 285 / 0.92); }
.stat-card::after { content: ""; position: absolute; top: 10px; right: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--luna-pink); box-shadow: 0 0 10px var(--luna-pink); }
.stat-card .stat-k { color: var(--dim); font-family: var(--font-data); font-size: 11px; letter-spacing: 0.08em; }
.stat-card .stat-v { margin-top: 8px; color: var(--text); font-family: var(--font-data); font-size: clamp(23px, 2.4vw, 32px); font-variant-numeric: tabular-nums; }
.stat-card .stat-io { color: var(--dim); font-size: 12px; }
.tok-spark { grid-area: spark; margin: 0; background: var(--card); }
.acc-sec { grid-area: accounts; min-width: 0; border-radius: 0; clip-path: var(--cut); }
.card { padding: 24px; border-radius: 0; }
.acc-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; }
.acc-title { font-size: 19px; white-space: nowrap; }
.mode-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 5px; border: 1px solid var(--border); border-radius: 9px; background: oklch(0.15 0.025 285 / 0.75); }
.mode-tab { justify-content: center; min-height: 46px; padding: 8px; border: 1px solid transparent; border-radius: 6px; color: var(--dim); }
.mode-tab.active { color: var(--text); }
.mode-icon { width: 24px; height: 24px; }
.ops-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.ops-row .spacer { display: block; }
#fish-ops, #mode-ops { display: contents; }
.sel-line { color: var(--dim); font-family: var(--font-data); font-size: 12px; }
.acc-table-wrap { border-top: 1px solid var(--border); }
.acc-table { min-width: 760px; color: var(--text); font-size: 13px; }
.acc-table th { border-bottom: 1px solid var(--border); background: oklch(0.16 0.025 285 / 0.9); color: var(--dim); font-family: var(--font-data); font-size: 11px; letter-spacing: 0.05em; }
.acc-table td { border-bottom-color: var(--border); }
.acc-row { background: transparent; }
.acc-row:hover { background: oklch(0.28 0.055 315 / 0.4); }
.badge, .chip, .rate-chip { border-color: var(--border); background: oklch(0.25 0.04 285); color: var(--text); }
.receipt-entry { min-height: 34px; border: 1px solid oklch(0.72 0.17 350 / 0.68); border-radius: 6px; background: oklch(0.3 0.09 345); color: var(--text); box-shadow: none; }
.receipt-entry:hover { background: var(--luna-pink); }
.receipt-arrow { color: var(--luna-yellow); }
#add-sec { grid-area: add; margin: 0; background: var(--card); }
#add-sec .add-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.empty-art { width: 150px; }
.back-top { border-color: var(--border); background: var(--card-strong); color: var(--text); }

/* 动态浮层保持同一夜间材质；小票仍为触发点旁紧凑浮层。 */
.modal, .receipt-popover .modal {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: oklch(0.185 0.032 285 / 0.985);
  color: var(--text);
  box-shadow: 0 28px 90px oklch(0.06 0.02 285 / 0.72);
}
.modal-mask { background: oklch(0.08 0.02 285 / 0.76); }
.modal-title, .modal-body, .room-lead, .op-group-name, .optional-sec summary { color: var(--text); }
.modal-head, .op-group + .op-group, .row-menu-note, .mojin-item-target { border-color: var(--border); }
.receipt-popover .modal-mask { background: transparent; }
.wan-hint { border-radius: 5px; background: oklch(0.27 0.07 330); color: var(--text); }
.amount-link { color: var(--luna-yellow); text-decoration-color: var(--luna-pink); }
.amount-link:hover { color: var(--text); }
.receipt-choice, .stats-record { border-color: var(--border); border-radius: 8px; background: oklch(0.22 0.035 285); color: var(--text); }
.receipt-choice:hover { background: oklch(0.28 0.06 320); }
.receipt-choice small, .stats-retention, .stats-record-line, .stats-record-head span, .receipt-filter-note, .op-group-note, .row-menu-note { color: var(--dim); }
.receipt-choice strong, .stats-record-bigs { color: var(--luna-yellow); }
.theme-menu, .more-menu, .row-menu { border-color: var(--border); background: var(--card-strong); color: var(--text); }
.theme-item, .more-item, .row-menu-item { color: var(--text); }
.theme-item:hover, .more-item:hover, .row-menu-item:hover { background: oklch(0.29 0.05 310); }

@media (max-width: 1100px) {
  .topbar { position: sticky; width: 100%; margin: 0; padding: 12px 18px; border-radius: 0; grid-template-columns: 1fr; }
  .topbar-row2 { justify-content: flex-start; }
  .console-wrap { padding: 20px 18px 52px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "notice" "desk" "stats" "accounts" "spark" "add"; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .console-hero { min-height: 210px; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr); gap: 30px; padding: 36px 28px; }
  .auth-brand h1 { font-size: 68px; }
  .auth-mascot { width: 210px; }
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 20px; padding: 30px 20px 42px; }
  .auth-brand { grid-column: 1; grid-row: 1; min-height: 280px; padding: 18px 0 100px; text-align: left; }
  .auth-brand .brand-line { justify-content: flex-start; }
  .auth-brand h1 { font-size: 64px; }
  .auth-brand .slogan { margin: 20px 0 0; max-width: 60%; }
  .auth-mascot { right: 0; bottom: -12px; width: 190px; }
  .auth-orbits { bottom: 0; max-width: 100%; }
  .auth-card { grid-column: 1; grid-row: 2; display: block; padding: 0; border-radius: 0; }
  .auth-tabs { display: flex; flex-direction: row; flex-wrap: wrap; margin: 0; padding: 0 14px; border-radius: 0; }
  .auth-tab { width: auto; min-height: 48px; }
  .auth-pane { padding: 24px; }
  .acc-head { display: flex; }
  .mode-tabs { display: none; }
  .ops-row { display: flex; }
  .acc-table { min-width: 0; }
  .card { padding: 18px; }
  .license-card { grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr); }
  .license-content { padding: 34px 28px; }
  .license-art img { width: 280px; }
}

@media (max-width: 680px) {
  .license-gate { align-content: start; gap: 18px; padding: 88px 16px 24px; }
  .license-brand { left: 16px; }
  .license-brand::after { display: none; }
  .license-gate::before { right: 16px; }
  .license-card { grid-template-columns: 1fr; border-radius: 0; }
  .license-content { grid-row: 2; padding: 26px 22px 28px; }
  .license-content::before { margin-bottom: 20px; }
  .license-content h1 { max-width: none; font-size: 32px; }
  .license-art { grid-row: 1; min-height: 180px; padding: 10px 20px 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .license-art img { width: 170px; }
  .license-art::before { width: 210px; height: 210px; top: -28px; }
  .license-art p { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .btn, .auth-tab, .mode-select, .row-menu-btn { min-height: 44px; }
  .topbar { width: 100%; margin: 0; padding: 10px 12px; gap: 8px; }
  .topbar-row { gap: 8px; }
  .topbar .brand { width: 100%; margin: 0; }
  .topbar .brand > span { font-size: 14px; }
  .brand-logo { width: 38px; height: 38px; }
  .topbar .user-email { order: initial; max-width: 100%; }
  .topbar .token-chip { flex: 1 1 150px; }
  .topbar #conn-state { display: none; }
  .topbar-row2 { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .topbar-row2 .theme-anchor, .topbar-row2 .theme-anchor .btn, .topbar-row2 .btn { width: 100%; }
  .console-wrap { gap: 12px; padding: 14px 10px 42px; }
  .console-hero { min-height: 238px; padding: 24px 112px 24px 20px; }
  .console-hero::before { margin-bottom: 16px; }
  .console-hero h2 { font-size: 25px; }
  .console-hero p { font-size: 14px; line-height: 1.65; }
  .console-hero img { right: -14px; bottom: -8px; width: 142px; }
  .hero-note { font-size: 10px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { min-height: 104px; padding: 14px; }
  .stat-card .stat-v { font-size: 23px; }
  .stat-card .stat-io { font-size: 12px; }
  .card { padding: 14px; }
  .ops-row .btn { font-size: 13px; }
  #add-sec .add-form { grid-template-columns: 1fr; }
  .acc-table .acc-row { padding: 14px 4px; border-bottom-color: var(--border); }
  .acc-table .acc-row > .col-map > .sub-inner { border-top-color: var(--border); }
  .acc-table .col-amount::before, .acc-table .col-map::before { color: var(--dim); }
  .auth-wrap { padding: 20px 12px 30px; }
  .auth-brand { min-height: 270px; padding-bottom: 96px; }
  .auth-brand h1 { font-size: 54px; }
  .auth-brand h1::after { font-size: 10px; }
  .auth-brand .slogan { max-width: 64%; font-size: 14px; }
  .auth-mascot { width: 140px; bottom: 0; }
  .brand-logo-lg { width: 50px; height: 50px; }
  .orbit-chip { padding-right: 8px; font-size: 10px; }
  .auth-card { padding: 0; }
  .auth-top { padding: 20px 18px 16px; }
  .auth-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 8px; }
  .auth-tab { width: 100%; padding: 8px 4px; font-size: 13px; }
  .auth-tab::after { right: 6px; left: 6px; }
  .auth-pane { padding: 20px 18px 24px; }
  .modal { max-height: calc(100dvh - 24px); background: oklch(0.185 0.032 285 / 0.99); }
  .modal .grid2, .modal .grid3 { gap: 8px; }
  .stats-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  .console-hero { padding-right: 92px; }
  .console-hero img { width: 120px; }
  .auth-brand .slogan { max-width: 62%; }
  .auth-mascot { width: 126px; }
  .license-gate { padding-right: 10px; padding-left: 10px; }
  .license-content { padding-right: 18px; padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .auth-hero { display: none; }
  body { background: var(--bg) url("custom/background-poster.jpg") center / cover fixed; }
}

/* 浏览器实测覆盖：清除旧主题更高优先级的浅色残留。 */
.auth-top .auth-welcome { color: var(--text); }
.auth-card .auth-tab,
.auth-card .auth-tab.active { border-radius: 0; background: transparent; box-shadow: none; }
.auth-card .auth-tab.active { color: var(--text); }
.auth-brand .orbit-chip { background: transparent; box-shadow: none; }

/* 截图复核：展开行、顶栏与问候区统一夜间对比度。 */
.topbar .brand, .topbar .brand b { color: var(--text); -webkit-text-fill-color: var(--text); }
.topbar .user-email { border-radius: 6px; background: oklch(0.2 0.035 285 / 0.72); }
.acc-title, #add-sec .row > b { color: var(--text); }
.acc-table .acc-row.open { background: oklch(0.24 0.045 295 / 0.72); }
.acc-table .acc-row:hover { background: oklch(0.28 0.055 315 / 0.56); }
.console-hero { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.console-hero::before { flex: 0 0 auto; margin-bottom: 14px; }
.console-hero > div { width: 100%; }
.console-hero h2, .console-hero p, .hero-note { color: var(--text); }
.console-hero p, .hero-note { color: var(--dim); }
@media (max-width: 520px) {
  .console-hero { min-height: 258px; }
}


/* Ru 功能素材与渐进式信息层级：装饰服务于辨识，不增加业务入口。 */
.mode-tab { display: flex; align-items: center; gap: 7px; }
.mode-icon, .mode-select-icon, .mode-menu-icon {
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  background: oklch(0.15 0.025 285);
}
.mode-icon { width: 32px; height: 32px; }
.mode-tab.active .mode-icon { outline: 2px solid var(--luna-yellow); outline-offset: 2px; }
.mode-select { align-items: center; justify-content: flex-start; gap: 9px; }
.mode-select-icon { width: 32px; height: 32px; }
.mode-chevron { margin-left: auto; color: var(--dim); }
.mode-menu-icon { width: 30px; height: 30px; margin-right: 8px; vertical-align: middle; }
.ops-more-toggle { display: none; }
.ops-secondary { display: contents; }
.detail-toggle { display: none; }
.auth-assists {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 28px;
  border-bottom: 1px solid var(--border);
  background: oklch(0.15 0.025 285 / 0.42);
}
.auth-assists > span { margin-right: auto; color: var(--dim); font-size: 11px; white-space: nowrap; }
.auth-card .auth-tab.auth-assist {
  width: auto;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 4px 8px;
  color: var(--dim);
  font-size: 12px;
}
.auth-card .auth-tab.auth-assist::after { display: none; }
.auth-card .auth-tab.auth-assist.active { color: var(--luna-yellow); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 520px) {
  /* 登录先呈现唯一主任务，品牌叙事与低频账号帮助退到第二层。 */
  .auth-wrap { gap: 14px; padding: 16px 12px 24px; }
  .auth-brand {
    min-height: 72px;
    padding: 0 86px 0 0;
    align-self: center;
  }
  .auth-brand .brand-line { gap: 10px; }
  .auth-brand h1 { margin: 0; font-size: 34px; letter-spacing: -0.035em; }
  .auth-brand h1::after, .auth-brand .slogan, .auth-orbits { display: none; }
  .auth-kicker { font-size: 9px; }
  .brand-logo-lg { width: 42px; height: 42px; }
  .auth-mascot { right: 0; bottom: -4px; width: 78px; }
  .auth-top { padding: 14px 18px 12px; }
  .auth-welcome { font-size: 16px; }
  .auth-subtitle { display: none; }
  .auth-cloud { width: 24px; height: 24px; }
  .auth-tabs { margin: 0; }
  .auth-assists { padding: 5px 14px; }
  .auth-card .auth-tab.auth-assist { min-height: 36px; }
  .auth-pane { padding: 18px 18px 22px; }

  .console-hero { min-height: 190px; padding: 20px 100px 20px 18px; }
  .console-hero::before { margin-bottom: 10px; }
  .console-hero h2 { font-size: 23px; }
  .console-hero p { margin-top: 10px; font-size: 13px; }
  .console-hero img { right: -12px; bottom: -2px; width: 112px; }
  .hero-note { display: none; }
  .topbar .brand > span::after { display: none; }

  /* 账号首屏只保留玩法和主操作，其余批量动作按需展开。 */
  .acc-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  .mode-select { width: 100%; min-width: 0; }
  .ops-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #btn-login-all, #btn-ops-more { width: 100%; min-width: 0; padding-inline: 8px; }
  .ops-more-toggle { display: inline-flex; }
  .ops-secondary {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .ops-secondary.open { display: grid; }
  .ops-secondary .btn { width: 100%; min-width: 0; }
  .ops-secondary .spacer { display: none; }
  .ops-secondary #fish-ops, .ops-secondary #mode-ops { display: contents; }
  .sel-line { line-height: 1.55; }

  /* 手机账号先显示摘要；实时节点仍唯一，展开后继续接收原 WebSocket 更新。 */
  .acc-table .acc-row { padding: 12px 2px; }
  .detail-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 32px;
    margin-top: 5px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--dim);
    font-size: 12px;
  }
  .detail-toggle span { transition: transform 160ms var(--ease-out); }
  .acc-row.open .detail-toggle { color: var(--text); }
  .acc-row.open .detail-toggle span { transform: rotate(180deg); }
  .acc-table .acc-row > .col-map > .sub-inner { display: none; }
  .acc-table .acc-row.open > .col-map > .sub-inner { display: block; }
  .acc-table .acc-row.open { background: oklch(0.24 0.045 295 / 0.48); }
  #add-sec > .dim.small { display: none; }
  #add-sec #btn-toggle-add { width: 100%; }
}

@media (max-width: 360px) {
  .auth-brand h1 { font-size: 32px; }
  .console-hero { min-height: 184px; padding-right: 90px; }
  .console-hero img { width: 102px; }
}

/* 新 Logo 使用透明月亮人物素材，不再叠加白底、圆形边框或投影。 */
.brand-logo, .brand-logo-lg {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}
