/* 漓江路亚志 — 账号 / 云存档样式
 * 与主线一致：深墨绿底 + 纸色 + 朱印红 + 等宽小字
 */

/* ---------- 封面账号条 ---------- */
.menu-foot {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.menu-foot .menu-note { grid-column: auto; }

.menu-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(9, 32, 32, 0.56);
  border: 1px solid rgba(217, 195, 139, 0.26);
  min-width: 0;
}
.menu-account.is-in { border-color: rgba(217, 195, 139, 0.44); }
.ma-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 15px;
  color: #FFF3DE;
  background: var(--seal);
  box-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, 0.35);
}
.ma-avatar.is-guest {
  color: rgba(237, 228, 206, 0.72);
  background: rgba(237, 228, 206, 0.1);
  border: 1px dashed rgba(217, 195, 139, 0.4);
  box-shadow: none;
}
.ma-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ma-main b {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #EFE5C8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-main em {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(180, 198, 184, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-state.is-cloud { color: rgba(150, 205, 175, 0.85); }
.ma-state.is-local { color: rgba(217, 195, 139, 0.8); }
.ma-btn {
  flex: none;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #C9B98F;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.1s, box-shadow 0.1s;
}
.ma-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35); }
.ma-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35); }
.ma-btn.is-ghost {
  color: #D9D3BC;
  background: rgba(9, 32, 32, 0.5);
  border-color: rgba(217, 195, 139, 0.34);
  box-shadow: none;
}
.ma-btn.is-ghost:hover { background: rgba(30, 66, 60, 0.8); border-color: rgba(217, 195, 139, 0.6); }

/* ---------- 顶栏账号入口 ---------- */
.chip-btn.chip-account { max-width: 140px; }
.chip-btn.chip-account span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: rgba(226, 233, 214, 0.3);
}
.acc-dot.is-guest { background: rgba(226, 233, 214, 0.34); }
.acc-dot.is-cloud {
  background: #7FD3A2;
  box-shadow: 0 0 0 2px rgba(127, 211, 162, 0.18);
}
.acc-dot.is-local { background: #D9A441; box-shadow: 0 0 0 2px rgba(217, 164, 65, 0.16); }
.acc-dot.is-warn { background: #E2705A; box-shadow: 0 0 0 2px rgba(226, 112, 90, 0.2); }

/* ---------- 面板 ---------- */
.sheet.sheet-account { max-width: 560px; }

.acc-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1.5px solid rgba(35, 48, 44, 0.28);
}
.acc-tab {
  position: relative;
  padding: 8px 16px 9px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #6D786C;
  transition: color 0.14s;
}
.acc-tab::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1.5px;
  height: 2.5px;
  background: var(--seal);
  transform: scaleX(0);
  transition: transform 0.16s ease;
}
.acc-tab.on { color: var(--ink); }
.acc-tab.on::after { transform: scaleX(1); }
.acc-tab:hover { color: var(--ink); }

.acc-mode {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 9px 11px;
  margin-bottom: 16px;
  background: rgba(255, 252, 240, 0.5);
  border-left: 3px solid var(--jade-2);
}
.acc-mode.is-local { border-left-color: var(--gold); }
.acc-mode-dot {
  align-self: center;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade-2);
}
.acc-mode.is-local .acc-mode-dot { background: var(--gold); }
.acc-mode b {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.acc-mode em {
  flex: 1 1 100%;
  font-style: normal;
  font-size: 11px;
  line-height: 1.6;
  color: #5E6A5E;
}

/* 表单 */
.acc-form { display: flex; flex-direction: column; gap: 14px; }
.acc-field { display: flex; flex-direction: column; gap: 5px; }
.acc-field > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #6D786C;
}
.acc-field > span::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(35, 48, 44, 0.14);
}
.acc-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(255, 253, 245, 0.92);
  border: 1.5px solid rgba(35, 48, 44, 0.34);
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}
.acc-field input::placeholder { color: rgba(93, 106, 94, 0.5); }
.acc-field input:focus {
  background: #FFFDF6;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink), 3px 3px 0 rgba(35, 48, 44, 0.12);
}
.acc-field em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(93, 106, 94, 0.72);
}

.acc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #4B5A52;
  cursor: pointer;
}
.acc-check input { width: 15px; height: 15px; accent-color: var(--seal); flex: none; }

.acc-error {
  min-height: 16px;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #A6371F;
}
.acc-error:empty { min-height: 0; }

.acc-submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.acc-submit {
  flex: 1 1 180px;
  height: 46px;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}
.acc-submit:disabled { opacity: 0.55; }
.acc-switch {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #5E6A5E;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(94, 106, 94, 0.4);
}
.acc-switch:hover { color: var(--ink); text-decoration-color: var(--ink); }

.acc-note {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(35, 48, 44, 0.22);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: rgba(75, 90, 82, 0.82);
}

/* 已登录 */
.acc-id {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(35, 48, 44, 0.18);
}
.acc-id-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  color: #FFF3DE;
  background: var(--seal);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.24);
}
.acc-id-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.acc-id-main b {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-id-main em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(93, 106, 94, 0.8);
}
.acc-sync {
  flex: none;
  padding: 5px 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: #2F6152;
  background: rgba(110, 149, 135, 0.16);
  border: 1px solid rgba(62, 106, 96, 0.3);
}
.acc-sync.is-busy { color: #7C6D4E; background: rgba(217, 164, 65, 0.14); border-color: rgba(217, 164, 65, 0.4); }
.acc-sync.is-warn { color: #A6371F; background: rgba(201, 79, 54, 0.1); border-color: rgba(201, 79, 54, 0.35); }

.acc-facts {
  display: flex;
  margin: 14px 0;
  border: 1px solid rgba(35, 48, 44, 0.18);
}
.acc-facts > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border-right: 1px solid rgba(35, 48, 44, 0.14);
  min-width: 0;
}
.acc-facts > div:last-child { border-right: 0; }
.acc-facts span { font-size: 9.5px; letter-spacing: 0.1em; color: rgba(93, 106, 94, 0.8); }
.acc-facts b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.acc-act { flex: 1 1 130px; }
.acc-out {
  flex: none;
  padding: 9px 15px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #8E3523;
  background: transparent;
  border: 1.5px dashed rgba(142, 53, 35, 0.45);
  transition: background 0.14s;
}
.acc-out:hover { background: rgba(201, 79, 54, 0.08); border-style: solid; }

/* 存档码 */
.acc-code {
  margin-top: 14px;
  padding: 12px;
  background: rgba(255, 252, 240, 0.55);
  border: 1px dashed rgba(35, 48, 44, 0.3);
}
.acc-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #6D786C;
}
.acc-code-head.is-import { margin-top: 12px; }
.acc-mini {
  padding: 3px 9px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(35, 48, 44, 0.4);
}
.acc-mini:hover { background: #FFFDF4; }
.acc-code-box {
  width: 100%;
  resize: vertical;
  padding: 8px 9px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  color: #3A463E;
  background: rgba(255, 255, 250, 0.9);
  border: 1px solid rgba(35, 48, 44, 0.28);
  outline: none;
  word-break: break-all;
}
.acc-code-box:focus { border-color: var(--ink); }
.acc-code-tip {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.6;
  color: rgba(93, 106, 94, 0.85);
}
.acc-code-tip.is-bad { color: #A6371F; }

/* 小屏 */
@media (max-width: 720px) {
  /* 小屏菜单是单列网格，账号条必须跟回第一列，否则会挤出第二列变成细长竖条 */
  .menu-foot { grid-column: 1; }
  .menu-account { flex-wrap: nowrap; }
  .ma-main em { white-space: nowrap; }
  .sheet.sheet-account { max-width: none; }
  .acc-facts { flex-wrap: wrap; }
  .acc-facts > div { flex: 1 1 50%; }
  .acc-facts > div:nth-child(2) { border-right: 0; }
  .acc-facts > div:last-child { flex: 1 1 100%; border-top: 1px solid rgba(35, 48, 44, 0.14); }
  .acc-id-main b { font-size: 19px; }
  .acc-submit { flex: 1 1 100%; }
  .acc-switch { width: 100%; text-align: center; }
}
@media (max-width: 560px) {
  /* 顶栏本来就满、会横向溢出，账号入口改为悬浮在鱼饵球左侧，保证随时能点开 */
  .chip-btn.chip-account {
    position: absolute;
    right: calc(var(--orb-size) + 22px);
    top: calc(var(--orb-top) + var(--orb-size) / 2 - 15px);
    width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    gap: 0;
    z-index: 6;
  }
  .chip-btn.chip-account span:last-child { display: none; }
  .chip-btn.chip-account .acc-dot { display: none; }
  .chip-btn.chip-account::after {
    content: '登';
    font-size: 12px;
    letter-spacing: 0;
    color: #D9D3BC;
  }
  .chip-btn.chip-account.is-in::after {
    content: '帐';
    color: #EFE5C8;
  }
  .chip-btn.chip-account.is-in { border-color: rgba(127, 211, 162, 0.4); }
}


/* ---------- 重新开始（清档） ----------
   全部走 .acc-reset-* 前缀，不重定义任何通用类，避免影响既有面板。
   低频危险操作：入口用细虚线幽灵按钮，不抢视线。 */

.acc-reset-entry {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(142, 53, 35, 0.16);
}

.acc-reset-open {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--serif);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(142, 53, 35, 0.78);
  background: transparent;
  border: 1px dashed rgba(142, 53, 35, 0.3);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.acc-reset-open:hover {
  color: #8E3523;
  border-color: rgba(142, 53, 35, 0.52);
  background: rgba(201, 79, 54, 0.05);
}

.acc-reset { padding: 4px 0 8px; }

.acc-reset-title {
  margin: 6px 0 14px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* 代价说明：红调强调，但不做成整块血红的冲击样式 */
.acc-reset-warn {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-left: 3px solid #B0432B;
  background: rgba(201, 79, 54, 0.06);
  border-radius: 2px;
}
.acc-reset-warn b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 12.5px;
  color: #8E3523;
}
.acc-reset-warn p {
  margin: 0 0 6px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #7A4632;
}
.acc-reset-warn p:last-child { margin-bottom: 0; }
.acc-reset-warn.is-plain p {
  font-size: 12px;
  font-weight: 600;
  color: #8E3523;
}

/* 云端二选一 */
.acc-reset-choice {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(28, 58, 54, 0.14);
  border-radius: 3px;
  background: rgba(28, 58, 54, 0.02);
}

.acc-reset-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 4px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.12s;
}
.acc-reset-opt:hover { background: rgba(28, 58, 54, 0.04); }
.acc-reset-opt input {
  margin-top: 2px;
  accent-color: #2F6F5E;
  flex: none;
}
.acc-reset-opt span { display: block; }
.acc-reset-opt b {
  display: block;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.acc-reset-opt em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11px;
  color: rgba(28, 58, 54, 0.62);
}

.acc-reset-hint {
  margin: 8px 0 0;
  padding-left: 25px;
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(28, 58, 54, 0.55);
}

.acc-reset-btns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.acc-reset-back,
.acc-reset-danger {
  padding: 10px 16px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, opacity 0.14s;
}

.acc-reset-back {
  flex: none;
  color: rgba(28, 58, 54, 0.72);
  background: transparent;
  border: 1px solid rgba(28, 58, 54, 0.22);
}
.acc-reset-back:hover {
  color: var(--ink);
  border-color: rgba(28, 58, 54, 0.4);
}

/* 第二次确认：实心危险色，和第一次的虚线幽灵按钮在视觉上明确区分 */
.acc-reset-danger {
  flex: 1 1 auto;
  color: #FFF6F0;
  background: #A8402A;
  border: 1px solid #8E3523;
  font-weight: 700;
}
.acc-reset-danger:hover { background: #94351F; }
.acc-reset-danger:disabled {
  opacity: 0.62;
  cursor: default;
}

@media (max-width: 420px) {
  .acc-reset-btns { flex-direction: column-reverse; }
  .acc-reset-back,
  .acc-reset-danger { width: 100%; text-align: center; }
}
