/* ==========================================================================
   DCAI 授权中心 · 用户端原型样式
   设计语言：票券 / 通行证。日场纸感，夜场墨色。
   页面：activate-login.html（登录/注册） · activate.html（我的设备）
   ========================================================================== */

/* ---------- 1. 令牌 ---------- */
:root {
  --bg: #f2ecdf;
  --surface: #fbf7ec;
  --surface-2: #efe6d4;
  --surface-3: #e7dcc7;

  --ink: #1d1913;
  --ink-2: #4e4536;
  --ink-3: #736552;

  --line: #ded3bd;
  --line-2: #c6b79a;

  --seal: #b23a2b;
  --seal-2: #8e2b1e;
  --seal-soft: #f2dcd4;
  --on-seal: #fff8ed;

  --jade: #2e6350;
  --jade-soft: #dde9e1;
  --amber: #855a1a;
  --amber-soft: #f2e3c6;

  --shadow: 0 1px 0 rgba(50, 38, 20, .04), 0 26px 54px -36px rgba(50, 38, 20, .5);
  --shadow-sm: 0 12px 26px -20px rgba(50, 38, 20, .45);

  --r-xl: 24px;
  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  --r-xs: 7px;

  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-kai: "Kaiti SC", "KaiTi", "STKaiti", "楷体", serif;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

  --ease-out: cubic-bezier(.25, 1, .5, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --toast-bg: #1d1913;
  --toast-fg: #fbf7ec;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");

  color-scheme: light;
}

[data-theme="night"] {
  --bg: #100d08;
  --surface: #1a1510;
  --surface-2: #221c14;
  --surface-3: #2a2219;

  --ink: #f3e9d6;
  --ink-2: #c8b9a0;
  --ink-3: #9b8a71;

  --line: #31291e;
  --line-2: #4a3d2c;

  --seal: #dc6e55;
  --seal-2: #e9836a;
  --seal-soft: #34201a;
  --on-seal: #181009;

  --jade: #8ab9a3;
  --jade-soft: #1a2c24;
  --amber: #daa45f;
  --amber-soft: #2e2415;

  --shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 30px 60px -40px #000;
  --shadow-sm: 0 16px 32px -24px #000;

  --toast-bg: #f3e9d6;
  --toast-fg: #17120c;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");

  color-scheme: dark;
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    var(--grain),
    radial-gradient(900px 520px at 6% -10%, color-mix(in srgb, var(--seal) 8%, transparent), transparent 68%),
    radial-gradient(820px 480px at 102% 2%, color-mix(in srgb, var(--jade) 6%, transparent), transparent 66%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; }
img, svg { display: block; }

::selection { background: var(--seal); color: var(--on-seal); }

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
  border-radius: 4px;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  line-height: 1;
}

.brand-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--seal);
  border-radius: 3px;
  color: var(--seal);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-3deg);
  flex: 0 0 auto;
}

.brand-seal::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: .5px solid var(--seal);
  border-radius: 1px;
  opacity: .55;
}

.brand-word {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.brand-word b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .22em;
}

.brand-word span {
  padding-left: 9px;
  border-left: 1px solid var(--line-2);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
}

/* ---------- 4. 控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform .18s var(--ease-out),
    background-color .18s,
    border-color .18s,
    color .18s,
    box-shadow .18s;
}

.btn-primary {
  background: var(--seal);
  color: var(--on-seal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 12px 22px -16px var(--seal);
}

.btn-primary:hover {
  background: var(--seal-2);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 16px 28px -18px var(--seal);
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink-2);
  font-weight: 500;
}

.btn-ghost:hover {
  border-color: var(--ink-2);
  background: var(--surface);
  color: var(--ink);
}

.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.btn-xs {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s, border-color .16s, color .16s;
}

.btn-xs:hover {
  border-color: var(--ink-2);
  background: var(--surface);
  color: var(--ink);
}

.btn-xs.solid {
  border-color: var(--seal);
  background: var(--seal);
  color: var(--on-seal);
  font-weight: 600;
}

.btn-xs.solid:hover {
  border-color: var(--seal-2);
  background: var(--seal-2);
  color: var(--on-seal);
}

.btn-xs.danger:hover {
  border-color: var(--seal);
  background: var(--seal-soft);
  color: var(--seal);
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field > label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink-3);
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: .01em;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.input::placeholder { color: var(--ink-3); opacity: .92; }
.input:hover { border-bottom-color: var(--ink-3); }

.input:focus {
  border-bottom-color: var(--seal);
  box-shadow: 0 1px 0 0 var(--seal);
}

.input-box {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}

.input-box::placeholder { color: var(--ink-3); opacity: .92; }
.input-box:hover { border-color: var(--line-2); }

.input-box:focus {
  border-color: var(--seal);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--seal) 13%, transparent);
}

.input-box.is-code {
  font-family: var(--font-mono);
  letter-spacing: .12em;
}

.peek {
  position: absolute;
  right: -8px;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 46px;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .16s;
}

.peek:hover { color: var(--seal); }
.peek.is-on { color: var(--seal); }
.peek svg { width: 18px; height: 18px; }

.input:-webkit-autofill,
.input-box:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  transition: background-color 99999s ease-in-out 0s;
}

.form-msg {
  display: none;
  padding: 9px 12px;
  border-left: 2px solid var(--seal);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  background: var(--seal-soft);
  color: var(--seal);
  font-size: 13px;
  line-height: 1.65;
}

.form-msg.is-on { display: block; animation: msg-in .22s var(--ease-out); }
.form-msg.ok { border-color: var(--jade); background: var(--jade-soft); color: var(--jade); }

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.7;
  white-space: nowrap;
}

.stamp::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.stamp.ok { background: var(--jade-soft); color: var(--jade); }
.stamp.wait { background: var(--amber-soft); color: var(--amber); }
.stamp.bad { background: var(--seal-soft); color: var(--seal); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s;
}

.theme-toggle:hover {
  border-color: var(--ink-2);
  background: var(--surface);
  color: var(--ink);
}

.theme-toggle svg { width: 14px; height: 14px; }

/* ---------- 5. 登录 / 注册 ---------- */
.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(0px, 3.4vw, 44px);
}

.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  width: min(1120px, 100%);
  min-height: min(740px, calc(100vh - clamp(0px, 6.8vw, 88px)));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* 票册中缝的两个缺口 */
.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  left: 53%;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  transform: translateX(-50%);
}

.auth-shell::before { top: -10px; }
.auth-shell::after { bottom: -10px; }

.auth-poster {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 30px);
  padding: clamp(26px, 3.2vw, 44px);
  overflow: hidden;
  border-right: 1px dashed var(--line-2);
  background: var(--surface-2);
}

.auth-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 320px at 0% 0%, color-mix(in srgb, var(--seal) 10%, transparent), transparent 66%),
    radial-gradient(460px 300px at 100% 100%, color-mix(in srgb, var(--jade) 7%, transparent), transparent 68%);
  pointer-events: none;
}

.poster-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.poster-copy { position: relative; z-index: 1; }

.poster-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3.35rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.poster-title em {
  font-family: var(--font-kai);
  font-style: normal;
  color: var(--seal);
  letter-spacing: .02em;
}

.poster-lede {
  max-width: 32ch;
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.95;
}

/* 票样 */
.pass {
  position: relative;
  z-index: 1;
  width: min(100%, 350px);
  margin-top: clamp(2px, 1.2vw, 12px);
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transform: rotate(-2.4deg);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}

.pass:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 24px 40px -32px rgba(0, 0, 0, .5);
}

.pass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pass-kicker {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  color: var(--ink-3);
}

.pass-flag {
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ink-2);
}

.pass-title {
  margin: 14px 0 12px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: .96;
  letter-spacing: .05em;
}

.pass-title span {
  display: block;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .3em;
  color: var(--ink-3);
}

.pass-grid {
  display: grid;
  grid-template-columns: 1.15fr .8fr .95fr;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

.pass-grid span {
  display: block;
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--ink-3);
}

.pass-grid b {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.pass-tear {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px -20px 0;
  color: var(--ink-3);
}

.pass-tear::before,
.pass-tear::after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--line-2);
}

.pass-tear span {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .18em;
  white-space: nowrap;
}

.pass-stub {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}

.pass-no {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--ink-2);
}

.barcode {
  width: 102px;
  height: 28px;
  opacity: .7;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 1px, transparent 1px 3px,
    var(--ink) 3px 5px, transparent 5px 6px,
    var(--ink) 6px 8px, transparent 8px 11px,
    var(--ink) 11px 12px, transparent 12px 15px);
}

.pass-seal {
  position: absolute;
  top: 46px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid var(--seal);
  border-radius: 4px;
  color: var(--seal);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  opacity: .82;
  transform: rotate(-9deg);
}

.pass-seal::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--seal);
  border-radius: 1px;
  opacity: .5;
}

.poster-bottom {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.poster-facts {
  display: grid;
  border-top: 1px solid var(--line);
  list-style: none;
}

.poster-facts li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
}

.poster-facts b {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--seal);
}

.poster-foot {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--ink-3);
  opacity: .92;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 3.6vw, 52px) clamp(24px, 3.4vw, 52px);
}

.auth-box { width: 100%; max-width: 392px; }

.auth-eyebrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-eyebrow strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .01em;
}

.auth-eyebrow span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
}

.tabs {
  display: flex;
  gap: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 0 0 12px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .18s;
}

.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }

.tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--seal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease-out);
}

.tab[aria-selected="true"]::after { transform: scaleX(1); }

.auth-form {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.auth-form.is-on { display: flex; }

.code-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.code-row .field { flex: 1; min-width: 0; }

.code-row .btn {
  height: 46px;
  padding: 0 15px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
}

.auth-submit { margin-top: 4px; }

.auth-forgot {
  margin-top: -4px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}

.auth-help {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.auth-help h2 {
  margin-bottom: 11px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
}

.steps {
  display: grid;
  gap: 8px;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.steps b {
  padding-top: 2px;
  color: var(--seal);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
}

.demo-note {
  margin-top: 20px;
  padding: 8px 10px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-xs);
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.75;
}

.demo-note code {
  padding: 0 3px;
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

/* ---------- 6. 应用页头 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1160px;
  height: 66px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 28px);
}

.head-brand { margin-right: auto; }

.head-acct {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink-2);
  font-size: 13px;
}

.head-mail {
  max-width: 220px;
  overflow: hidden;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.head-div {
  width: 1px;
  height: 15px;
  background: var(--line-2);
}

.text-btn {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: color .16s, border-color .16s;
}

.text-btn:hover {
  border-bottom-color: var(--ink-3);
  color: var(--ink);
}

.acct-menu { display: none; position: relative; }

.acct-menu summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  transition: border-color .16s, color .16s;
}

.acct-menu summary::-webkit-details-marker { display: none; }
.acct-menu summary:hover { border-color: var(--ink-2); color: var(--ink); }

.acct-pop {
  position: absolute;
  top: 44px;
  right: 0;
  width: 236px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.acct-pop .who {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  word-break: break-all;
}

.acct-pop button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.acct-pop button:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- 7. 主页 ---------- */
.site-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(30px, 4.4vw, 58px) clamp(18px, 4vw, 28px) 0;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.page-lede {
  margin-top: 11px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.85;
}

.page-lede b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}

.page-lede i {
  margin: 0 8px;
  color: var(--line-2);
  font-style: normal;
}

.page-act {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
}

.btn-short {
  height: 38px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
}

/* 额度票根 */
.quota {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  margin-top: clamp(24px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.quota::before,
.quota::after {
  content: "";
  position: absolute;
  right: 280px;
  z-index: 2;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}

.quota::before { top: -9px; }
.quota::after { bottom: -9px; }

.quota-main { padding: clamp(20px, 2.6vw, 30px) clamp(20px, 3vw, 34px); }

.quota-figure {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 16px;
}

.quota-figure b {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.6vw, 4.35rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums lining-nums;
}

.quota-figure span {
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: .08em;
}

.quota-figure.is-low b { color: var(--seal); }

.meter {
  position: relative;
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface-3);
}

.meter-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--jade);
  transition: width .6s var(--ease-out), background-color .3s;
}

.meter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg,
    transparent 0 calc(5% - 1px),
    var(--surface) calc(5% - 1px) 5%);
  opacity: .9;
}

.meter.is-low .meter-fill { background: var(--amber); }
.meter.is-empty .meter-fill { background: var(--seal); }

.quota-legend {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .03em;
}

.quota-legend b { color: var(--ink-2); font-weight: 600; }

.quota-note {
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.7;
}

.quota-note.is-low { color: var(--amber); }
.quota-note.is-empty { color: var(--seal); }

.quota-stub {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px 24px;
  border-left: 1px dashed var(--line-2);
  background: var(--surface-2);
}

.quota-stub div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-3);
  font-size: 11px;
}

.quota-stub div + div {
  padding-top: 11px;
  border-top: 1px dotted var(--line-2);
}

.quota-stub b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

/* 区块 */
.block { margin-top: clamp(44px, 6vw, 70px); }

.block-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 13px;
  align-items: baseline;
  margin-bottom: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.block-no {
  color: var(--seal);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
}

.block-head h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.block-note {
  grid-column: 2;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.7;
}

.block-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.block-title-row h2 { min-width: 0; }

/* 激活 */
.activate {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.activate-form {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .72fr) minmax(0, .9fr) auto;
  gap: 14px;
  align-items: end;
}

.activate-form .btn { height: 46px; padding: 0 28px; }

.activate-hint {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.75;
}

.selected {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 10px 8px 13px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
}

.selected.is-on { display: flex; animation: msg-in .22s var(--ease-out); }

.selected .pair-no {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
}

.selected button {
  margin-left: auto;
  padding: 2px 6px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 11.5px;
  cursor: pointer;
}

.selected button:hover { color: var(--seal); }

/* 设备清单 */
.dev-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dev-count {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s, color .16s, transform .3s var(--ease-out);
}

.icon-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.icon-btn.is-spin { transform: rotate(-180deg); }
.icon-btn svg { width: 14px; height: 14px; }

.dev-wrap { border-top: 1px solid var(--line); }

.dev-wrap.is-empty { border-top: 0; }
.dev-wrap.is-empty .dev-head { display: none; }
.dev-wrap.is-empty + .dev-foot { display: none; }

.dev-head,
.dev-row {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.45fr) 78px 82px 84px 104px 92px 118px 196px;
  gap: 12px;
  align-items: center;
}

.dev-head {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
}

.dev-row {
  position: relative;
  padding: 16px 6px;
  border-bottom: 1px solid var(--line);
  transition: background-color .16s;
}

.dev-row:hover { background: color-mix(in srgb, var(--surface) 62%, transparent); }

.dev-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.dev-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 4px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .01em;
}

.dev-spec span + span::before {
  content: "·";
  margin-right: 8px;
  opacity: .55;
}

.pair-btn {
  padding: 2px 0 3px;
  border: 0;
  border-bottom: 1px dotted var(--line-2);
  background: none;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .16em;
  cursor: pointer;
  transition: color .16s, border-color .16s;
}

.pair-btn:hover { border-bottom-color: var(--seal); color: var(--seal); }

.dev-num {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.dev-num b {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.dev-meta {
  overflow: hidden;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-wrap { position: relative; }

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 11px;
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
  transform: translateY(-72%) rotate(45deg);
  pointer-events: none;
}

.q-select {
  width: 100%;
  height: 30px;
  padding: 0 24px 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11.5px;
  cursor: pointer;
  outline: none;
  appearance: none;
  transition: border-color .16s;
}

.q-select:hover { border-color: var(--line-2); }
.q-select:focus { border-color: var(--seal); }

.dev-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.dev-foot {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.75;
}

/* 空状态 */
.empty {
  display: grid;
  place-items: center;
  padding: clamp(30px, 5vw, 50px) 22px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}

.empty svg {
  width: 190px;
  height: auto;
  margin-bottom: 16px;
  color: var(--ink-3);
}

.empty h3 {
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.empty p {
  max-width: 38ch;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.empty-actions .btn { height: 38px; padding: 0 16px; font-size: 12.5px; letter-spacing: .02em; }

/* 桌面端把空状态做成左右两栏，避免大片空白 */
@media (min-width: 761px) {
  .empty {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 0 42px;
    align-items: center;
    justify-items: start;
    padding: 34px 48px;
    text-align: left;
  }

  .empty svg {
    grid-row: 1 / span 3;
    width: 100%;
    max-width: 220px;
    margin: 0;
    justify-self: center;
  }

  .empty h3,
  .empty p,
  .empty-actions { grid-column: 2; }

  .empty h3 { font-size: 1.5rem; }
  .empty p { max-width: 46ch; }
  .empty-actions { justify-content: flex-start; margin-top: 16px; }
}

/* 下载 */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.dl-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: transform .22s var(--ease-out), border-color .22s, box-shadow .22s;
}

.dl-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

/* R28.30：已配置下载地址的卡片。管理员在后台填了链接后，卡片可点击，
   加一点视觉区分（左侧封条 + 图标变红）让用户知道"这张能下"；
   未配置的卡片保持原样，点按只提示「下载地址待接入」。 */
.dl-card.is-available {
  border-color: color-mix(in srgb, var(--seal) 22%, var(--line));
}

.dl-card.is-available .dl-icon {
  border-color: color-mix(in srgb, var(--seal) 25%, transparent);
  background: var(--seal-soft);
  color: var(--seal);
}

.dl-card[aria-disabled="true"] {
  cursor: default;
}

.dl-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  transition: background-color .2s, border-color .2s, color .2s;
}

.dl-icon svg { width: 23px; height: 23px; }

.dl-card:hover .dl-icon {
  border-color: color-mix(in srgb, var(--seal) 25%, transparent);
  background: var(--seal-soft);
  color: var(--seal);
}

.dl-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

.dl-tag {
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .08em;
  white-space: nowrap;
}

.dl-desc {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.6;
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-top: 4px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  opacity: .92;
}

.dl-meta span + span::before {
  content: "·";
  margin-right: 6px;
  opacity: .6;
}

.dl-go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink-2);
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease-out);
}

.dl-go svg { width: 14px; height: 14px; }

.dl-card:hover .dl-go {
  border-color: var(--seal);
  background: var(--seal);
  color: var(--on-seal);
  transform: translateY(1px);
}

/* 第 6 格：安装帮助，不是下载项，刻意做得更轻 */
.dl-help {
  border-style: dashed;
  background: transparent;
}

.dl-help:hover { background: var(--surface); }

.dl-help .dl-icon {
  border-style: dashed;
  background: transparent;
  color: var(--ink-3);
}

.dl-help:hover .dl-icon {
  border-color: var(--seal);
  background: var(--seal-soft);
  color: var(--seal);
}

.dl-help .dl-go {
  border-color: transparent;
  background: transparent;
  color: var(--ink-3);
}

.dl-help:hover .dl-go {
  border-color: transparent;
  background: transparent;
  color: var(--seal);
  transform: translateX(2px);
}

.tips {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.8;
}

.tips h3 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
}

.tips ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  list-style: none;
}

.tips li { position: relative; padding-left: 13px; }

.tips li::before {
  content: "";
  position: absolute;
  top: .78em;
  left: 0;
  width: 5px;
  height: 1px;
  background: var(--seal);
}

/* 指引 */
.guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.guide-step { padding-top: 14px; border-top: 1px solid var(--line-2); }

.guide-no {
  color: var(--seal);
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
}

.guide-step h3 { margin: 9px 0 5px; font-size: 14.5px; font-weight: 600; }

.guide-step p { color: var(--ink-3); font-size: 12px; line-height: 1.8; }

/* 页脚 */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  max-width: 1160px;
  margin: clamp(46px, 6vw, 76px) auto 0;
  padding: 18px clamp(18px, 4vw, 28px) 34px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  line-height: 1.8;
}

/* ---------- 8. 浮层 ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 200;
  max-width: min(90vw, 460px);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--toast-bg);
  color: var(--toast-fg);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .55);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .22s, transform .3s var(--ease-out);
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.sheet {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
}

.sheet::backdrop {
  background: rgba(24, 17, 9, .5);
  backdrop-filter: blur(2px);
}

.sheet-body { padding: 26px 26px 22px; }

.sheet h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.sheet-desc {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.75;
}

.sheet-body .field { margin-top: 18px; }

.sheet-msg {
  display: none;
  margin-top: 12px;
  color: var(--seal);
  font-size: 12px;
}

.sheet-msg.is-on { display: block; }

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.sheet-actions .btn { height: 40px; padding: 0 18px; font-size: 13px; }

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}

.sheet-close:hover { background: var(--surface-2); color: var(--ink); }
.sheet-close svg { width: 15px; height: 15px; }

/* 激活成功印章 */
.stamp-fx {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.seal-mark {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: 3px double var(--seal);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, .38);
  color: var(--seal);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.25;
  opacity: 0;
  transform: rotate(-9deg) scale(1.7);
}

.seal-mark small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .18em;
  text-align: center;
}

.stamp-fx.is-on .seal-mark { animation: stamp-press .5s var(--ease-out) forwards; }

/* ---------- 9. 动效 ---------- */
@keyframes msg-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

@keyframes stamp-press {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.8); }
  60% { opacity: 1; transform: rotate(-8deg) scale(.97); }
  100% { opacity: 1; transform: rotate(-9deg) scale(1); }
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1120px) {
  .dev-head { display: none; }

  .dev-row {
    grid-template-columns: 1fr 1fr;
    gap: 13px 12px;
    margin-bottom: 12px;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
  }

  .dev-row:hover { background: var(--surface); }

  .dev-id { grid-column: 1 / -1; padding-right: 82px; }

  .dev-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .12em;
  }

  .dev-cell.dev-status {
    position: absolute;
    top: 17px;
    right: 18px;
  }

  .dev-status::before { display: none; }

  .dev-cell.dev-quality { grid-column: 1 / -1; }
  .dev-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 3px; }
  .dev-wrap { border-top: 0; }

  /* 移动端加大触控目标 */
  .btn-xs { height: 36px; padding: 0 13px; font-size: 12px; border-radius: 8px; }
  .dev-actions { gap: 8px; }
  .q-select { height: 40px; font-size: 12.5px; }
  .pair-btn { padding: 6px 0 7px; }
}

@media (min-width: 761px) and (max-width: 1120px) {
  #devList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .dev-row { margin-bottom: 0; height: 100%; }
  #devList > .dev-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dev-wrap.is-empty #devList { display: block; }
}

@media (max-width: 980px) {
  .auth-page { display: block; padding: 0; }

  .auth-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: start;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-shell::before,
  .auth-shell::after { display: none; }

  .auth-poster {
    gap: 16px;
    padding: 20px 20px 24px;
    border-right: 0;
    border-bottom: 1px dashed var(--line-2);
  }

  .poster-title { margin-top: 2px; font-size: clamp(2rem, 7.4vw, 2.6rem); }
  .poster-lede { margin-top: 9px; font-size: 13px; line-height: 1.8; }
  .pass { display: none; }
  .poster-bottom { display: none; }

  .auth-main {
    align-items: flex-start;
    padding: 24px 20px 44px;
  }

  .auth-box { max-width: 460px; margin: 0 auto; }
  .auth-eyebrow { margin-bottom: 12px; }
  .tabs { margin-bottom: 22px; }
}

/* 笔记本等较矮的桌面视口：压缩留白，让票册完整落在首屏 */
@media (min-width: 981px) and (max-height: 880px) {
  .auth-page { padding: 18px; }
  .auth-shell { min-height: calc(100vh - 36px); }
  .auth-poster { gap: 18px; padding: 28px 34px; }
  .auth-main { padding: 30px 44px; }
  .poster-title { font-size: 2.7rem; }
  .poster-lede { margin-top: 10px; font-size: 13.5px; line-height: 1.85; }
  .pass { margin-top: 0; padding: 15px 18px 13px; }
  .pass-title { margin: 10px 0 9px; font-size: 29px; }
  .pass-grid { padding-top: 9px; }
  .pass-tear { margin-top: 11px; }
  .pass-stub { margin-top: 9px; }
  .poster-facts li { padding: 6px 0; }
  .poster-foot { margin-top: 11px; }
}

@media (max-width: 900px) {
  .quota { grid-template-columns: 1fr; }  .quota::before,
  .quota::after { display: none; }

  .quota-stub {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 14px 20px;
    border-top: 1px dashed var(--line-2);
    border-left: 0;
  }

  .quota-stub div { display: block; }
  .quota-stub div + div {
    padding-top: 0;
    padding-left: 14px;
    border-top: 0;
    border-left: 1px dotted var(--line-2);
  }

  .quota-stub b { display: block; margin-top: 2px; }
  .quota-stub span { font-size: 10px; }
}

@media (max-width: 760px) {
  .head-acct { display: none; }
  .acct-menu { display: block; }
  .head-inner { height: 60px; }
  .site-main { padding-top: 26px; }

  .activate-form { grid-template-columns: 1fr; gap: 12px; }
  .activate-form .btn { width: 100%; }

  .dl-grid { grid-template-columns: 1fr; }

  .tips ul { grid-template-columns: 1fr; }

  .guide { grid-template-columns: 1fr; gap: 16px; }

  .page-act { width: 100%; padding: 0; }
}

@media (max-width: 560px) {
  .theme-toggle span { display: none; }
  .theme-toggle { width: 32px; padding: 0; justify-content: center; }

  .poster-title { font-size: clamp(1.9rem, 8vw, 2.3rem); }
  .auth-main { padding: 22px 18px 40px; }

  .code-row .btn { padding: 0 12px; font-size: 12px; }

  .quota-figure b { font-size: 3.1rem; }
  .quota-stub { padding: 12px 16px; }
  .quota-stub b { font-size: 12px; }

  .dev-row { padding: 16px 14px; }
  .dev-cell.dev-status { top: 15px; right: 14px; }
  .dev-id { padding-right: 76px; }

  .dl-card { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
  .dl-icon { width: 42px; height: 42px; }
  .dl-icon svg { width: 21px; height: 21px; }

  .block-head h2 { font-size: 1.25rem; }

  .site-foot { font-size: 9.5px; }

  .empty-actions { flex-direction: column; width: 100%; }
  .empty-actions .btn { width: 100%; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .pass { transform: none; }
}

/* ==========================================================================
   11. 游客页（/activate/guest，R28.35）
   --------------------------------------------------------------------------
   为什么要追加这一段而不是复用 dev-* 类：
     `.dev-head` / `.dev-row` 的列宽是按「已登录设备表」的 8 列
     （设备/状态/额度/默认清晰度/最近播放/操作…）定死的。游客页只有 5 列
     且**没有**任何操作类控件（游客不能改名/改清晰度/删除），
     直接复用会留出一大片空列，手机上还会横向溢出。
   本段所有颜色/圆角/字体都取现有令牌（--seal / --surface / --r 等），
   两个主题（日场 / 夜场）自动跟随，不新增任何色值。
   ========================================================================== */

/* ── 11.1 页头里的游客身份条 ───────────────────────────────────────── */
.head-net {
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

.head-net b {
  margin-left: 4px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
}

/* 游客身份胶囊：明确告诉用户"你现在没有登录"，避免误以为看到的是自己的设备 */
.guest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px 0 9px;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.guest-chip svg { width: 13px; height: 13px; }

/* 窄屏专用工具区：与 .head-acct 互斥显示（见 11.6） */
.guest-tools {
  display: none;
  align-items: center;
  gap: 10px;
}

/* ── 11.2 网络说明条 ───────────────────────────────────────────────── */
.guest-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto)) minmax(0, 1fr);
  gap: 14px 26px;
  align-items: center;
  margin-top: clamp(20px, 2.6vw, 28px);
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.guest-bar-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.guest-bar-cell > span {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.guest-bar-cell > b {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-bar-cell > b.mono {
  font-size: 12px;
  letter-spacing: .02em;
}

.guest-bar-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding-left: 22px;
  border-left: 1px dashed var(--line-2);
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.75;
}

.guest-bar-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--amber);
}

/* ── 11.3 设备清单（5 列）────────────────────────────────────────── */
/* 列宽：设备名自适应 / 设备码 / 发现于 / 网络 / 操作 */
.g-head,
.g-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) 116px 92px minmax(96px, 1fr) 112px;
  gap: 12px;
  align-items: center;
}

.g-head {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
}

.g-row {
  position: relative;
  padding: 15px 6px;
  border-bottom: 1px solid var(--line);
  transition: background-color .16s;
}

.g-row:last-child { border-bottom: 0; }

.g-row:hover { background: color-mix(in srgb, var(--surface) 62%, transparent); }

.g-id { min-width: 0; }

.g-name {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-spec { margin-top: 3px; }

.g-cell { min-width: 0; }

.g-seen,
.g-net {
  overflow: hidden;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-actions {
  display: flex;
  justify-content: flex-end;
}

/* 设备码按钮：整块可点，比单纯的下划线数字更好按（尤其手机） */
.code-btn {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
  max-width: 100%;
  padding: 5px 11px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-xs);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .16s, background-color .16s, color .16s, transform .12s;
}

.code-btn b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.2;
}

.code-btn small {
  color: var(--ink-3);
  font-size: 9px;
  letter-spacing: .06em;
  line-height: 1.2;
}

.code-btn:hover {
  border-color: var(--seal);
  background: var(--seal-soft);
}

.code-btn:hover b,
.code-btn:hover small { color: var(--seal); }

.code-btn:active { transform: scale(.97); }

/* 复制成功态：由 guest.js 加在 .g-row 上，1600ms 后自动移除 */
.g-row.is-copied .code-btn {
  border-style: solid;
  border-color: var(--jade);
  background: var(--jade-soft);
}

.g-row.is-copied .code-btn b,
.g-row.is-copied .code-btn small { color: var(--jade); }

/* 刷新按钮的禁用态（请求进行中防连点） */
.icon-btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

/* 骨架屏：首次加载时给"正在找设备"的反馈，避免空列表一 flash 就被当成"没有设备" */
.g-skeleton {
  display: grid;
  gap: 10px;
  padding: 18px 6px;
}

.g-skeleton span {
  display: block;
  height: 13px;
  border-radius: 99px;
  background: linear-gradient(90deg,
    var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%);
  background-size: 240% 100%;
  animation: g-shimmer 1.25s linear infinite;
}

.g-skeleton span:nth-child(2) { width: 72%; }
.g-skeleton span:nth-child(3) { width: 86%; }

@keyframes g-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -60% 0; }
}

/* ── 11.4 「拿到设备码之后」引导 ──────────────────────────────────── */
/* 纯静态文案，复用 .guide / .guide-step / .guide-no，此处无需额外样式 */

/* ── 11.5 加载失败的提示条（独立于空状态，便于区分「没有」和「出错」）── */
.g-error {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--seal) 32%, var(--line));
  border-radius: var(--r-sm);
  background: var(--seal-soft);
  color: var(--seal);
  font-size: 12px;
  line-height: 1.7;
}

.g-error button {
  margin-left: auto;
  padding: 3px 12px;
  border: 1px solid currentColor;
  border-radius: var(--r-xs);
  background: transparent;
  color: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.g-error[hidden] { display: none; }

/* ── 11.6 响应式 ──────────────────────────────────────────────────── */
@media (max-width: 980px) {
  /* 说明条在窄屏折成两行：三个数据格 + 提示文案各占一行 */
  .guest-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guest-bar-note {
    grid-column: 1 / -1;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px dashed var(--line-2);
    border-left: 0;
  }
}

@media (max-width: 860px) {
  /* 设备表转卡片（与用户端 .dev-row 的断点策略一致，但更早触发：
     游客表少 3 列，760 之前就已经挤了） */
  .g-head { display: none; }

  .g-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
  }

  .g-row:last-child { margin-bottom: 0; }
  .g-row:hover { background: var(--surface); }

  .g-id { grid-column: 1 / -1; }

  .g-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .12em;
  }

  .g-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .g-skeleton { padding: 14px 2px; }
}

@media (max-width: 760px) {
  /* 页头的账号区（.head-acct）在这个断点被隐藏了，游客页改用
     .guest-tools 顶上：只留「登录 / 注册」和主题切换，避免换个屏就迷路 */
  .guest-tools { display: flex; }
  .guest-bar { padding: 13px 15px; gap: 12px 18px; }
  .guest-bar-cell > b { font-size: 12.5px; }
}

@media (max-width: 560px) {
  .code-btn { width: 100%; align-items: center; }
  .code-btn b { font-size: 14px; }
  .g-row { padding: 14px 13px; }
  .guest-chip { display: none; }
}

