/* account-center 页面样式：类名统一 ac- 前缀，零外部依赖
   风格：纸张底色 + 黑色细线 + 大字号标题（编辑排版风） */

:root {
  --ac-paper: #f2f0e9;
  --ac-paper-deep: #e9e6db;
  --ac-card: #fffefb;
  --ac-ink: #121212;
  --ac-ink-soft: #3c3a35;
  --ac-muted: #75726a;
  --ac-line: #dbd7cc;
  --ac-line-strong: #161616;
  --ac-red: #d6402a;
  --ac-accent: #161616;
  --ac-danger: #b3261e;
  --ac-ok: #2f6b4f;
  --ac-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ac-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ac-display: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

.is-hidden { display: none !important; }

html, body { margin: 0; }

body.ac-page {
  background: var(--ac-paper);
  color: var(--ac-ink);
  font: 15px/1.75 var(--ac-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- 骨架 ---------- */

.ac-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 72px;
}

.ac-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ac-ink-soft);
}

.ac-top a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.ac-top a:hover { border-bottom-color: currentColor; }

.ac-top-nav { display: flex; gap: 18px; }

/* 顶部细黑线：参考图的分区语言 */
.ac-hairline { border: 0; border-top: 1px solid var(--ac-line-strong); margin: 0; }
.ac-hairline--soft { border-top-color: var(--ac-line); }

/* ---------- 通用排版 ---------- */

.ac-eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ac-red);
}

.ac-display {
  margin: 0;
  font-family: var(--ac-display);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.ac-lead {
  max-width: 30em;
  margin: 22px 0 0;
  color: var(--ac-ink-soft);
  font-size: 14.5px;
  line-height: 1.9;
}

.ac-muted { color: var(--ac-muted); }

/* ---------- 登录页 ---------- */

.ac-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 72px;
  align-items: start;
  padding: 64px 0 40px;
}

.ac-hero { padding-top: 8px; }

.ac-authcard {
  background: var(--ac-card);
  border: 1px solid var(--ac-line);
  box-shadow: 0 22px 48px rgba(20, 18, 12, 0.08);
  padding: 32px 30px 26px;
}

.ac-authcard h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ac-authsub {
  margin: 0 0 22px;
  color: var(--ac-muted);
  font-size: 12.5px;
  line-height: 1.7;
}

/* 主登录按钮 */
.ac-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ac-ink);
  border: 1px solid var(--ac-ink);
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.ac-oauth:hover { opacity: 0.86; }

.ac-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--ac-ink);
  background: var(--ac-paper-deep);
}

.ac-chip--mail { background: #f0ece2; color: #4b463c; }
.ac-chip--phone { background: #eae7de; color: #3c3a35; }

.ac-switch {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--ac-line);
  color: var(--ac-muted);
  font-size: 12px;
  text-align: center;
}

.ac-switch a {
  color: var(--ac-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ac-line-strong);
  margin: 0 2px;
}

.ac-agree {
  margin: 16px 0 0;
  color: var(--ac-muted);
  font-size: 11.5px;
  text-align: center;
  line-height: 1.8;
}

.ac-agree a {
  color: var(--ac-ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--ac-line);
}

.ac-agree a:hover { border-bottom-color: var(--ac-ink); }

/* 返回上一组方式 */
.ac-back {
  display: inline-block;
  margin: 0 0 18px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--ac-muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ac-line);
  cursor: pointer;
}

.ac-back:hover { color: var(--ac-ink); border-bottom-color: var(--ac-ink); }

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

.ac-panel { display: block; }
.ac-panel.is-hidden { display: none; }

.ac-field { display: block; margin-bottom: 12px; }

.ac-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ac-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.ac-input {
  width: 100%;
  padding: 12px 13px;
  font: inherit;
  font-size: 14px;
  color: inherit;
  background: #fff;
  border: 1px solid #cdc8bc;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ac-input:focus { border-color: var(--ac-ink); box-shadow: 0 0 0 2px rgba(18, 18, 18, 0.08); }
.ac-input::placeholder { color: #a8a49a; }

.ac-inline { display: flex; gap: 8px; }
.ac-inline .ac-input { flex: 1 1 auto; min-width: 0; }
.ac-inline .ac-btn { flex: 0 0 auto; white-space: nowrap; }

.ac-btn {
  appearance: none;
  padding: 12px 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  color: #fff;
  background: var(--ac-ink);
  border: 1px solid var(--ac-ink);
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.ac-btn:hover { opacity: 0.86; }
.ac-btn:disabled { opacity: 0.4; cursor: default; }
.ac-btn-block { display: block; width: 100%; margin-top: 16px; }

.ac-btn-secondary {
  color: var(--ac-ink);
  background: transparent;
  border-color: #c3beb2;
}

.ac-btn-ghost {
  padding: 6px 0;
  color: var(--ac-muted);
  background: transparent;
  border-color: transparent;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.ac-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ac-actions .ac-btn { flex: 0 1 auto; }

.ac-hint {
  margin: 10px 0 0;
  color: var(--ac-muted);
  font-size: 11.5px;
  line-height: 1.75;
}

.ac-hint a { color: var(--ac-ink-soft); text-decoration: none; border-bottom: 1px solid var(--ac-line); }

.ac-msg { min-height: 18px; margin: 12px 0 0; font-size: 12.5px; }
.ac-msg.is-error { color: var(--ac-danger); }
.ac-msg.is-ok { color: var(--ac-ok); }

/* ---------- 我的账户 ---------- */

.ac-account { padding-top: 44px; }

.ac-account-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ac-account-head .ac-display { max-width: 12em; }

.ac-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 22px;
  margin-top: 24px;
  border-top: 1px solid var(--ac-line-strong);
  border-bottom: 1px solid var(--ac-line);
}

.ac-avatar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--ac-ink);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.ac-identity-main { flex: 1 1 auto; min-width: 0; }
.ac-identity-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.ac-identity-meta { color: var(--ac-muted); font-size: 12px; word-break: break-all; }

.ac-textlink {
  flex: 0 0 auto;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--ac-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ac-ink);
  cursor: pointer;
}

/* 两栏：账户状态 / 登录方式 */
.ac-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}

.ac-card {
  background: var(--ac-card);
  border: 1px solid var(--ac-line);
  padding: 28px 30px;
}

.ac-card + .ac-card { margin-top: 24px; }

.ac-section-title {
  margin: 0 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ac-line-strong);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ac-section-sub {
  margin: -10px 0 16px;
  color: var(--ac-muted);
  font-size: 12px;
}

.ac-status-label { color: var(--ac-muted); font-size: 12px; }
.ac-status-value {
  margin: 6px 0 8px;
  font-family: var(--ac-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.ac-status-meta { margin: 0 0 22px; color: var(--ac-muted); font-size: 12px; }

.ac-uid {
  font-family: var(--ac-mono);
  font-size: 11px;
  color: var(--ac-muted);
  word-break: break-all;
}

/* 登录钥匙 */
.ac-keylist { margin: 0; }

.ac-key {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--ac-line);
}

.ac-key:last-child { border-bottom: 0; }
.ac-key-main { flex: 1 1 auto; min-width: 0; }
.ac-key-name { font-size: 13.5px; font-weight: 650; line-height: 1.4; }
.ac-key-sub { color: var(--ac-muted); font-size: 11.5px; word-break: break-all; }
.ac-key-state { flex: 0 0 auto; color: var(--ac-muted); font-size: 11.5px; }
.ac-key-state.is-on { color: var(--ac-ink); }

/* ---------- 我的装置 ---------- */

.ac-works { margin-top: 28px; }

.ac-works-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.ac-work {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.ac-work-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ece8dd;
  border: 1px solid var(--ac-line);
}

.ac-work-name {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-work-meta {
  margin-top: 2px;
  color: var(--ac-muted);
  font-size: 11px;
  line-height: 1.6;
}

/* 封面图形：纯 CSS 生成，不依赖外部图片 */
.ac-art { position: absolute; inset: 0; }

.ac-art--1 { background: #f3ead9; }
.ac-art--1::before {
  content: "";
  position: absolute;
  width: 62%;
  height: 62%;
  left: 8%;
  top: 12%;
  border-radius: 50%;
  background: #d3402a;
}
.ac-art--1::after {
  content: "";
  position: absolute;
  width: 52%;
  height: 52%;
  right: 6%;
  bottom: 8%;
  border-radius: 50%;
  background: #5b3e8e;
  mix-blend-mode: multiply;
}

.ac-art--2 { background: #f1ece0; }
.ac-art--2::before {
  content: "";
  position: absolute;
  width: 72%;
  height: 72%;
  left: 14%;
  top: 14%;
  border-radius: 50%;
  background: #d6402a;
}
.ac-art--2::after {
  content: "";
  position: absolute;
  left: 18%;
  bottom: 14%;
  width: 64%;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.ac-art--3 { background: #111; }
.ac-art--3::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 20%;
  width: 58%;
  height: 58%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  transform: translateX(-50%);
}
.ac-art--3::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 22%;
  height: 22%;
  background: #d6402a;
  border-radius: 50%;
  transform: translateX(-50%);
}

.ac-art--4 { background: #efe7d6; }
.ac-art--4::before {
  content: "";
  position: absolute;
  left: 26%;
  top: 16%;
  width: 48%;
  height: 68%;
  background: #2f2b28;
  border-radius: 50% 50% 46% 46%;
}
.ac-art--4::after {
  content: "";
  position: absolute;
  left: 30%;
  top: 20%;
  width: 40%;
  height: 60%;
  border: 1px dashed rgba(240, 233, 217, 0.65);
  border-radius: 50%;
}

.ac-art--5 { background: #f3eee1; }
.ac-art--5::before {
  content: "";
  position: absolute;
  left: 16%;
  top: 12%;
  width: 68%;
  height: 34%;
  background: #d6a44c;
  border-radius: 50% 50% 0 0;
}
.ac-art--5::after {
  content: "";
  position: absolute;
  left: 18%;
  bottom: 14%;
  width: 64%;
  height: 34%;
  background: repeating-linear-gradient(90deg, #161616 0 6px, transparent 6px 12px);
}

.ac-art--6 { background: #111; }
.ac-art--6::before {
  content: "";
  position: absolute;
  left: 16%;
  top: 22%;
  width: 28%;
  height: 56%;
  background: #f2f0e9;
  transform: skewY(-14deg);
}
.ac-art--6::after {
  content: "";
  position: absolute;
  right: 16%;
  top: 22%;
  width: 28%;
  height: 56%;
  background: #f2f0e9;
  transform: skewY(14deg);
}

.ac-more {
  display: inline-block;
  margin-top: 20px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--ac-ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ac-line);
  cursor: pointer;
}

.ac-more:hover { border-bottom-color: var(--ac-ink); }

/* ---------- 跨设备 / 安全 / 注销 ---------- */

.ac-code-box {
  margin-top: 16px;
  padding: 20px;
  text-align: center;
  background: #f7f4ea;
  border: 1px dashed #c9c4b6;
}

.ac-code {
  font-family: var(--ac-mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 9px;
  padding-left: 9px;
}

.ac-code-time { margin-top: 6px; color: var(--ac-muted); font-size: 11.5px; }

.ac-links { margin: 0; padding: 0; list-style: none; }

.ac-links li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--ac-line);
  font-size: 12.5px;
}

.ac-links li:last-child { border-bottom: 0; }
.ac-links a { text-decoration: none; border-bottom: 1px solid var(--ac-line); }
.ac-links a:hover { border-bottom-color: var(--ac-ink); }
.ac-links span { color: var(--ac-muted); font-size: 11.5px; }

.ac-dangerzone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ac-line);
}

.ac-empty { color: var(--ac-muted); font-size: 12.5px; padding: 8px 0; }

.ac-foot {
  margin: 40px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--ac-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--ac-muted);
  font-size: 11.5px;
}

.ac-foot a { color: var(--ac-ink-soft); text-decoration: none; border-bottom: 1px solid var(--ac-line); }
.ac-foot a:hover { border-bottom-color: var(--ac-ink); }

/* ---------- 协议 / 隐私页 ---------- */

.ac-doc { max-width: 780px; padding: 56px 0 40px; }

.ac-doc-title {
  margin: 0;
  font-family: var(--ac-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.ac-doc-lead {
  margin: 20px 0 0;
  color: var(--ac-ink-soft);
  font-size: 14.5px;
  line-height: 1.9;
}

.ac-doc section {
  padding: 26px 0;
  border-top: 1px solid var(--ac-line);
}

.ac-doc section:first-of-type { margin-top: 44px; border-top-color: var(--ac-line-strong); }

.ac-doc h2 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.ac-doc p {
  margin: 0;
  color: var(--ac-ink-soft);
  font-size: 13.5px;
  line-height: 1.95;
}

.ac-doc p + p { margin-top: 8px; }

.ac-doc ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ac-ink-soft);
  font-size: 13.5px;
  line-height: 1.95;
}

.ac-doc li + li { margin-top: 4px; }

.ac-doc a { color: var(--ac-ink); text-decoration: underline; text-underline-offset: 3px; }

.ac-doc-meta { margin: 10px 0 0; color: var(--ac-muted); font-size: 11.5px; }

/* ---------- 账户凭证弹层 ---------- */

.ac-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 18, 18, 0.55);
}

.ac-modal-box {
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  background: var(--ac-card);
  border: 1px solid var(--ac-line-strong);
}

.ac-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.ac-modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ac-muted);
  font-size: 24px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.ac-credential-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ac-line);
}

.ac-modal .ac-actions { margin-top: 12px; }
.ac-modal .ac-btn { flex: 1 1 auto; text-align: center; text-decoration: none; }

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .ac-login { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 36px; }
  .ac-hero { padding-top: 0; }
  .ac-authcard { max-width: 480px; }
  .ac-works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .ac-shell { padding: 0 18px 56px; }
  .ac-columns { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ac-card { padding: 22px 20px; }
  .ac-identity { flex-wrap: wrap; }
  .ac-works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ac-code { font-size: 28px; letter-spacing: 6px; padding-left: 6px; }
  .ac-doc { padding-top: 36px; }
}

@media (max-width: 380px) {
  .ac-oauth { font-size: 13px; }
}
