/* Chrome 扩展页 — 三语共用 (依赖 /site-theme.css 的设计变量) */

.ext-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 34px;
  align-items: center;
  margin: 6px 0 10px;
}
.ext-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--red-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ext-kicker span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(187, 73, 57, .1);
  padding: 4px 10px;
}
.ext-hero h1 { margin: 0 0 14px; font-size: clamp(29px, 3.4vw, 42px); line-height: 1.16; }
.ext-hero .sub { margin: 0 0 22px; font-size: 15px; }
.ext-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9px;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
  background: #efeee7; color: var(--faint); border-color: var(--line);
  cursor: default; transform: none;
}
.btn-ghost {
  border-color: rgba(41, 74, 58, .16);
  background: var(--surface);
  color: var(--green);
}
.btn-ghost:hover { background: var(--brand-soft); color: var(--green); }
.ext-actions .note { color: var(--faint); font-size: 12px; }

.ext-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.ext-shot-cap { margin: 9px 0 0; color: var(--faint); font-size: 11.5px; text-align: center; }

.ext-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.ext-facts li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 5px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

/* ---- 额度 / 账号 ---- */
.account-card { border-color: rgba(41, 74, 58, .18); }
.account-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.account-head h2 { margin: 0; font-size: 22px; }
.account-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
.account-state i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3f7d58;
  box-shadow: 0 0 0 3px rgba(63, 125, 88, .14);
}
.account-state.is-off { color: var(--faint); }
.account-state.is-off i { background: #b9b6a9; box-shadow: 0 0 0 3px rgba(185, 182, 169, .18); }

.account-who {
  margin: 14px 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  word-break: break-all;
}
.quota-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12.5px;
}
.quota-line b { color: var(--ink); }
.quota-bar {
  height: 8px;
  border-radius: 999px;
  background: #e6e6dc;
  overflow: hidden;
}
.quota-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--red);
  transition: width .4s ease;
}
.account-hint { margin: 10px 0 0; color: var(--faint); font-size: 12px; }

.login-form { display: grid; gap: 10px; max-width: 380px; margin: 14px 0 0; }
.login-form label { font-size: 12px; font-weight: 650; color: var(--muted); }
.login-form input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
}
.login-form .btn-primary { justify-content: center; }
.form-msg { margin: 2px 0 0; font-size: 12.5px; min-height: 18px; }
.form-msg.is-error { color: var(--red-dark); }
.form-msg.is-ok { color: #315b3d; }

.connect-box {
  margin-top: 16px;
  border: 1px dashed rgba(187, 73, 57, .35);
  border-radius: 10px;
  background: #fbf7ee;
  padding: 16px 18px;
}
.connect-box h3 { margin: 0 0 6px; font-size: 16px; }
.connect-box p { margin: 0 0 12px; font-size: 13px; }
.connect-done { border-color: rgba(41, 74, 58, .3); background: #f1f6ef; }

/* ---- 三步 / 网格 ---- */
.ext-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.ext-steps li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px 18px 16px 52px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.ext-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.ext-steps b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 13.5px; }

.install-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f1f0e9;
  padding: 14px 16px;
}
.install-box summary { font-size: 13px; }
.install-box ol { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.install-box code {
  padding: 1px 5px;
  font-size: 12px;
}

.ext-note {
  border-left: 3px solid rgba(187, 73, 57, .5);
  padding: 2px 0 2px 14px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

@media (max-width: 860px) {
  .ext-hero { grid-template-columns: 1fr; gap: 24px; }
  .ext-steps { grid-template-columns: 1fr; }
}

.ext-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.ext-cards li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
}
.ext-cards b { display: block; margin-bottom: 6px; color: var(--ink); font-size: 13.5px; }
.ext-cards .big {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
  line-height: 1.2;
}
.ext-cards span { color: var(--muted); font-size: 12.5px; line-height: 1.7; }

@media (max-width: 860px) {
  .ext-cards { grid-template-columns: 1fr; }
}

/* 首屏: 图片预载, ?state= 时连接卡先占位, 避免脚本到位后才出现导致跳动 */
html.wants-connect #connectBox { display: block; }
