/* 账号中心：沿用宣传站的暖土色 / 石板 / 木纹 */
.acct-main { max-width: 1080px; margin: 0 auto; padding: 36px 20px 72px; min-height: 60vh; }
.acct .footer { padding-bottom: 48px; }
.view[hidden], .tabpanel[hidden] { display: none !important; }

.card {
  position: relative; background: var(--bone); background-image: var(--noise); background-size: 160px;
  border: 2px solid #d8bf91; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px 22px;
}
.card h1 { font-size: clamp(28px, 4vw, 38px); color: var(--bark); margin-bottom: 8px; }
.card h2 { font-size: 22px; color: var(--bark); margin-bottom: 6px; }
.card--form { max-width: 460px; margin: 18px auto 0; }
.card__pet { position: absolute; right: 18px; top: -34px; width: auto; height: 64px; filter: drop-shadow(0 4px 3px rgba(0,0,0,.3)); }
.lead { color: var(--ink-2); margin-bottom: 18px; }
.note { font-size: 13.5px; color: var(--ink-2); margin-top: 14px; padding: 10px 12px; background: var(--sand); border-radius: 10px; }
.muted { color: #8a7356; font-size: 14px; }
.links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 15px; }

form label { display: block; font-weight: 700; font-size: 15px; color: var(--bark); margin-bottom: 14px; }
form label small { display: block; font-weight: 400; font-size: 12.5px; color: #8a7356; margin-top: 4px; }
form input {
  display: block; width: 100%; margin-top: 6px; font: 500 16px/1.4 var(--body); color: var(--ink);
  background: #fff; border: 2px solid #c9ac78; border-radius: 12px; padding: 11px 14px; min-height: 46px;
  box-shadow: inset 0 2px 0 rgba(0,0,0,.05); transition: border-color .15s, box-shadow .15s;
}
form input:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(242,163,58,.35); }
form input[aria-invalid="true"] { border-color: #c0392b; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.err { color: #b02a1a; background: #fde6df; border: 1px solid #f0b4a6; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 14px; }
.ok { color: #2f5d12; background: #e6f3d6; border: 1px solid #b8d897; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn--moss { --b1: var(--moss-2); --b2: var(--moss); }
.btn--ghost-dark { --b1: #fff8e8; --b2: #ead6ad; color: var(--bark); text-shadow: none; }
.btn--ghost-dark:hover { color: var(--bark); }

.toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 80; max-width: calc(100% - 32px);
  background: var(--bark); color: var(--bone); border: 2px solid #24150b; border-radius: 12px; padding: 10px 18px; box-shadow: var(--shadow); font-weight: 500;
}

/* 账号中心头部 */
.me-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.me-head h1 { font-size: clamp(28px, 4vw, 40px); color: var(--bark); }
.me-head h1 span { color: var(--clay); }
.me-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.me-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.banner { background: #fff3d6; border: 2px dashed #e0a24a; border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; color: var(--ink); font-size: 15px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: var(--moss); color: #fff; vertical-align: middle; margin-left: 6px; letter-spacing: .04em; }
.badge--warn { background: #d27b2a; }
.badge--off { background: #8f897d; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 3px solid #d4b98a; }
.tabs button {
  font: 400 18px/1 var(--display); letter-spacing: .06em; color: var(--ink-2); background: transparent; border: 0; cursor: pointer;
  padding: 12px 18px 10px; border-radius: 12px 12px 0 0; margin-bottom: -3px; border-bottom: 3px solid transparent;
}
.tabs button[aria-selected="true"] { color: var(--bark); background: var(--bone); border: 3px solid #d4b98a; border-bottom-color: var(--bone); }

/* 角色卡 */
.chars { display: grid; gap: 22px; }
.char { background: var(--bone); border: 3px solid var(--bark); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.char__top { display: grid; grid-template-columns: 180px 1fr; }
.char__stage {
  display: flex; align-items: flex-end; justify-content: center; min-height: 200px; padding: 10px;
  background: radial-gradient(circle at 50% 62%, rgba(255,215,154,.6), rgba(242,163,58,.1) 55%, transparent 72%), linear-gradient(180deg, #6b4428, #3b2416);
}
.char__stage img { image-rendering: pixelated; width: auto; height: auto; max-width: 80px; max-height: 90px; transform: scale(2); transform-origin: bottom center; }
.char__info { min-width: 0; }
.char__head { background: var(--bark); padding: 12px 18px; color: #f3e2c2; }
.char__name { font: 900 26px/1.25 var(--body); text-shadow: 0 2px 0 #000; word-break: break-all; }
.char__meta { font-size: 13.5px; margin-top: 2px; }
.char__body { padding: 14px 18px; }
.nc0 { color: #fff; } .nc1 { color: #5ff0f0; } .nc2 { color: #f070f0; } .nc3 { color: #8aa6ff; } .nc4 { color: #ffe14a; }
.nc5 { color: #6cf06c; } .nc6 { color: #ff6f5f; } .nc7 { color: #c0c0c4; } .nc8 { color: #a6caf0; } .nc9 { color: #c0dcc0; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.stat { background: var(--sand); border: 2px solid #d8bf91; border-radius: 10px; padding: 5px 8px; text-align: center; }
.stat b { display: block; font: 700 19px/1.25 var(--body); color: var(--clay); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-2); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.elem { display: inline-flex; width: 140px; height: 10px; border-radius: 6px; overflow: hidden; border: 1px solid var(--bark); background: #ddd; }
.elem i { display: block; height: 100%; }
.e0 { background: #a0703c; } .e1 { background: #3a8fd8; } .e2 { background: #e0533a; } .e3 { background: #4caf50; }
.elem-t { font-size: 13px; color: var(--ink-2); }

.sect { padding: 4px 18px 16px; }
.sect h3 { font: 400 19px/1.3 var(--display); color: var(--bark); margin: 12px 0 8px; letter-spacing: .04em; }
.equip { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.equip li { display: flex; align-items: center; gap: 6px; background: #fff; border: 2px solid #e2cfa6; border-radius: 10px; padding: 3px 10px 3px 3px; font-size: 14px; }
.equip img { width: 32px; height: 32px; object-fit: contain; }
.equip small { color: #8a7356; }
details.bag summary { cursor: pointer; font-weight: 700; color: var(--bark); margin: 10px 0 6px; }

.pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pet { background: #fff; border: 2px solid #e2cfa6; border-radius: 14px; padding: 10px; display: grid; grid-template-columns: 72px 1fr; gap: 10px; }
.pet__img { display: flex; align-items: flex-end; justify-content: center; background: rgba(95,138,53,.12); border-radius: 10px; height: 80px; align-self: start; padding-bottom: 4px; }
.pet__img img { image-rendering: pixelated; max-width: 68px; max-height: 68px; width: auto; height: auto; }
.pet h4 { margin: 0; font-size: 15.5px; color: var(--bark); line-height: 1.3; word-break: break-all; }
.pet small { color: var(--ink-2); font-size: 12.5px; }
.pet dl { display: grid; grid-template-columns: repeat(4, auto); gap: 0 8px; margin: 4px 0 0; font-size: 12.5px; }
.pet dt { color: #8a7356; } .pet dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chips span { font-size: 11.5px; background: #ead6ad; border-radius: 6px; padding: 0 6px; }
.tag { font-size: 11px; font-weight: 700; color: #fff; background: var(--clay); border-radius: 6px; padding: 0 6px; margin-left: 4px; vertical-align: middle; }
.tag--moss { background: var(--moss); }

/* 分享 */
.share { border-top: 2px dashed #d4b98a; padding: 14px 18px 18px; background: var(--sand); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; color: var(--bark); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__ui { width: 50px; height: 28px; border-radius: 99px; background: #b8b2a6; border: 2px solid var(--bark); position: relative; transition: background .15s; flex-shrink: 0; }
.switch__ui::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .switch__ui { background: var(--moss); }
.switch input:checked + .switch__ui::after { transform: translateX(22px); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--ember); outline-offset: 2px; }
.share__box { margin-top: 12px; }
.share__url { display: flex; gap: 8px; }
.share__url input { flex: 1; min-width: 0; font: 500 14px/1.4 ui-monospace, Consolas, monospace; border: 2px solid #c9ac78; border-radius: 10px; padding: 8px 10px; background: #fff; }
.share__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share__btns a, .share__btns button { font-size: 14px; }
.btn--tiny { padding: 6px 12px; min-height: 34px; font: 700 14px/1 var(--body); border-width: 2px; letter-spacing: 0; box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 3px 0 var(--bark); }

/* 账号安全 */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card--wide { grid-column: 1 / -1; }
.sessions { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 8px; }
.sessions li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 2px solid #e2cfa6; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.sessions li small { color: #8a7356; display: block; word-break: break-all; }

.empty { text-align: center; padding: 30px 16px; }
.empty img { margin: 0 auto 10px; height: 80px; width: auto; }

@media (max-width: 760px) {
  .acct-main { padding: 26px 16px 56px; }
  .char__top { grid-template-columns: 1fr; }
  .char__stage { min-height: 170px; }
  .sec-grid { grid-template-columns: 1fr; }
  .card { padding: 22px 16px 18px; }
  .card__pet { height: 52px; top: -26px; }
  .tabs button { font-size: 16px; padding: 10px 12px 8px; }
  .pets { grid-template-columns: 1fr; }
}
