/* Akile MC 认证站 —— 设计系统
   主题：玩家的游戏角色。深色「舞台」里是角色和名牌，周围的界面安静、方正。
   游戏里出现的文字（角色名、名牌、地址）用像素字体，网站自己的文字用系统黑体。 */

@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/pixelify-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/pixelify-sans-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue: #165dff;
  --blue-ink: #0f4bd6;
  --blue-wash: #e8f0ff;
  --blue-hi: #5d8dff;
  --blue-lo: #0c3fc4;
  --blue-edge: #0a2f8f;

  --ink: #172033;
  --ink-2: #475467;
  --ink-3: #667085;
  --line: #e5e7ef;
  --line-2: #cfd6e4;
  --page: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --bevel-hi: #ffffff;
  --bevel-lo: #c5ccda;
  --edge: #172033;

  --stage: #0d1220;
  --stage-hi: #2b3552;
  --stage-lo: #05070d;

  --ok: #1a7f45;
  --ok-wash: #e6f6ec;
  --warn: #9a5b00;
  --warn-wash: #fff3dc;
  --bad: #c22f2a;
  --bad-wash: #fdecea;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mc: "Pixelify Sans", var(--font-ui);
  --r: 2px;
  --wrap: 1120px;
}

:root[data-theme="dark"] {
  --blue-wash: #16244a;
  --ink: #e8ebf2;
  --ink-2: #b6bfce;
  --ink-3: #8d97aa;
  --line: #262d3d;
  --line-2: #3a445b;
  --page: #0f131c;
  --panel: #171c28;
  --panel-2: #1c2231;
  --bevel-hi: #2b3447;
  --bevel-lo: #0d1017;
  --edge: #05070d;
  --ok: #58c486;
  --ok-wash: #11301f;
  --warn: #e7b04a;
  --warn-wash: #33260b;
  --bad: #f0807a;
  --bad-wash: #3a1614;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue-wash: #16244a;
    --ink: #e8ebf2;
    --ink-2: #b6bfce;
    --ink-3: #8d97aa;
    --line: #262d3d;
    --line-2: #3a445b;
    --page: #0f131c;
    --panel: #171c28;
    --panel-2: #1c2231;
    --bevel-hi: #2b3447;
    --bevel-lo: #0d1017;
    --edge: #05070d;
    --ok: #58c486;
    --ok-wash: #11301f;
    --warn: #e7b04a;
    --warn-wash: #33260b;
    --bad: #f0807a;
    --bad-wash: #3a1614;
  }
}

/* —— 基础 —— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.6 var(--font-ui);
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: 34px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 20px; line-height: 1.35; font-weight: 700; }
h3 { font-size: 17px; line-height: 1.4; font-weight: 600; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-ink); }
:root[data-theme="dark"] a { color: #8db0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: #8db0ff; } }
img, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue); color: #fff; }

.mc { font-family: var(--font-mc); letter-spacing: 0.01em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 32px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.icon { flex: none; }
.pix { image-rendering: pixelated; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 12px; background: var(--panel); border: 2px solid var(--edge); }
.skip:focus { left: 8px; top: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.main { flex: 1; padding-top: 40px; padding-bottom: 72px; }

/* —— 顶栏 —— */
.devbar { background: #7a4b00; color: #fff; text-align: center; font-size: 13px; padding: 4px 12px; }
.topbar { background: var(--panel); border-bottom: 2px solid var(--line-2); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { image-rendering: pixelated; }
.nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 4px solid transparent; border-top: 4px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }
.topbar-end { display: flex; align-items: center; gap: 12px; }
.who { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 17px; }
.who img { image-rendering: pixelated; border: 2px solid var(--edge); }
.iconbtn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: none; border: 2px solid transparent; border-radius: var(--r); color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { border-color: var(--line-2); color: var(--ink); }

/* —— 按钮：游戏界面那种凸起的方块 —— */
.btn {
  --bg: var(--panel);
  --fg: var(--ink);
  --hi: var(--bevel-hi);
  --lo: var(--bevel-lo);
  --bd: var(--edge);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  color: var(--fg); background: var(--bg);
  border: 2px solid var(--bd); border-radius: var(--r);
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo);
  cursor: pointer; user-select: none;
}
.btn:hover { color: var(--fg); filter: brightness(1.05); }
.btn:active { box-shadow: inset 2px 2px 0 var(--lo), inset -2px -2px 0 var(--hi); transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; filter: none; transform: none; }
.btn-primary { --bg: var(--blue); --fg: #fff; --hi: var(--blue-hi); --lo: var(--blue-lo); --bd: var(--blue-edge); }
.btn-danger { --bg: #d63b36; --fg: #fff; --hi: #f0716c; --lo: #a3231f; --bd: #6f1512; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.is-busy { pointer-events: none; opacity: 0.7; }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-danger { color: #fff; }

.chip { min-height: 30px; padding: 0 10px; font-size: 13px; font-weight: 500; color: #dfe5f3; background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.18); border-radius: var(--r); cursor: pointer; }
.chip:hover { background: rgba(255, 255, 255, 0.16); }
.chip[aria-pressed="true"] { background: #dfe5f3; color: #0d1220; border-color: #dfe5f3; }

/* —— 面板与提示 —— */
.panel { background: var(--panel); border: 2px solid var(--line-2); border-radius: var(--r); padding: 24px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.panel > h2 + p, .panel-head + p { color: var(--ink-2); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border: 2px solid; border-radius: var(--r); margin-bottom: 24px; }
.notice-info { background: var(--blue-wash); border-color: var(--blue); }
.notice-success { background: var(--ok-wash); border-color: var(--ok); }
.notice-warning { background: var(--warn-wash); border-color: var(--warn); }
.notice-danger { background: var(--bad-wash); border-color: var(--bad); }
.notice .icon { margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; font-size: 13px; font-weight: 600; border: 2px solid; border-radius: var(--r); white-space: nowrap; }
.badge-ok { color: var(--ok); background: var(--ok-wash); }
.badge-warn { color: var(--warn); background: var(--warn-wash); }
.badge-bad { color: var(--bad); background: var(--bad-wash); }
.badge-muted { color: var(--ink-3); background: var(--panel-2); }

/* —— 表单 —— */
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 600; }
.input {
  width: 100%; min-height: 46px; padding: 0 14px;
  background: var(--panel); color: var(--ink);
  border: 2px solid var(--edge); border-radius: var(--r);
  box-shadow: inset 2px 2px 0 var(--bevel-lo);
}
.input:focus-visible { outline-offset: 0; }
.input-mc { font-family: var(--font-mc); font-size: 22px; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.hint { font-size: 13px; color: var(--ink-3); min-height: 21px; }
.hint.is-ok { color: var(--ok); }
.hint.is-bad { color: var(--bad); }

.searchbar { display: flex; gap: 8px; flex: 1; max-width: 460px; }
.searchbar .input { min-height: 42px; }

/* 复制行：标签 + 值 + 复制按钮 */
.copyrow { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 2px solid var(--line); }
.copyrow:first-child { border-top: 0; }
.copyrow-label { color: var(--ink-2); font-weight: 600; }
.copyrow-value { overflow-wrap: anywhere; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.copyrow-value.small { font-size: 13px; font-weight: 500; }
.addr { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.copyrow-value > span { font-weight: 400; }
.copyrow-value.mc { font-size: 20px; }
@media (max-width: 560px) {
  .copyrow { grid-template-columns: minmax(0, 1fr) auto; }
  .copyrow-label { grid-column: 1 / -1; }
}

/* 分段选择（宽臂 / 细臂） */
.seg { display: inline-flex; border: 2px solid var(--edge); border-radius: var(--r); background: var(--panel); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 16px; font-weight: 600; color: var(--ink-2); }
.seg label + label span { border-left: 2px solid var(--edge); }
.seg input:checked + span { background: var(--blue); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

/* —— 角色舞台 —— */
.stage {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; width: 100%;
  background:
    radial-gradient(120% 70% at 50% 100%, #1b2742 0%, rgba(27, 39, 66, 0) 62%),
    var(--stage);
  border: 2px solid var(--stage-lo); border-radius: var(--r);
  box-shadow: inset 3px 3px 0 var(--stage-lo), inset -3px -3px 0 var(--stage-hi);
}
.stage::before { /* 透视地面的方格 */
  content: ""; position: absolute; left: -50%; right: -50%; bottom: -8%; height: 46%;
  background-image:
    linear-gradient(rgba(124, 150, 214, 0.22) 2px, transparent 2px),
    linear-gradient(90deg, rgba(124, 150, 214, 0.22) 2px, transparent 2px);
  background-size: 44px 44px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 92%);
  mask-image: linear-gradient(to top, #000 10%, transparent 92%);
}
.stage-canvas, .stage-flat { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-canvas { cursor: grab; touch-action: pan-y; }
.stage-canvas:active { cursor: grabbing; }
.stage-flat { object-fit: contain; image-rendering: pixelated; padding: 14% 22% 10%; }
.nametag {
  position: absolute; z-index: 2; top: 5%; left: 50%; transform: translateX(-50%);
  max-width: 88%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 1px 10px 3px; font-size: 22px; line-height: 1.25; color: #fff;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.nametag:empty { display: none; }
.nametag.is-placeholder { color: rgba(255, 255, 255, 0.55); }
.stage-tools { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 8px; justify-content: center; }
.stage.is-drop { box-shadow: inset 0 0 0 4px var(--blue-hi); }
.stage-note { margin-top: 10px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* 舞台在左、内容在右 */
.duo { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 48px; align-items: start; }
.duo-stage { position: sticky; top: 92px; }
@media (max-width: 860px) {
  .duo { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .duo-stage { position: static; max-width: 320px; margin: 0 auto; width: 100%; }
  h1 { font-size: 28px; }
}

/* —— 有先后顺序的步骤 —— */
.steps { counter-reset: step; display: grid; gap: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 24px 56px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; display: grid; place-items: center;
  font: 700 20px/1 var(--font-mc); color: var(--ink);
  background: var(--panel); border: 2px solid var(--edge); border-radius: var(--r);
  box-shadow: inset 2px 2px 0 var(--bevel-hi), inset -2px -2px 0 var(--bevel-lo);
}
.steps > li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--line-2); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps > li.is-done::before { content: "✓"; font-family: var(--font-ui); color: #fff; background: var(--ok); border-color: #0f5a30; box-shadow: none; }
:root[data-theme="dark"] .steps > li.is-done::before { background: #1f8a4c; }
.steps h3 { padding-top: 5px; }
.steps p { color: var(--ink-2); margin-top: 4px; }
.steps .row { margin-top: 12px; }

/* —— 最近用过的皮肤 —— */
.wardrobe { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.wardrobe-item { position: relative; background: var(--stage); border: 2px solid var(--stage-lo); border-radius: var(--r); box-shadow: inset 2px 2px 0 var(--stage-lo), inset -2px -2px 0 var(--stage-hi); }
.wardrobe-item canvas { width: 100%; aspect-ratio: 1 / 1; image-rendering: pixelated; padding: 10px; }
.wardrobe-item.is-current { outline: 3px solid var(--blue); outline-offset: 2px; }
.wardrobe-pick { position: absolute; inset: 0; width: 100%; background: none; border: 0; cursor: pointer; }
.wardrobe-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; color: #fff; background: rgba(0, 0, 0, 0.55); border: 0; border-radius: var(--r); cursor: pointer; opacity: 0; }
.wardrobe-item:hover .wardrobe-del, .wardrobe-del:focus-visible { opacity: 1; }
.wardrobe-tag { position: absolute; left: 4px; bottom: 4px; padding: 0 6px; font-size: 12px; color: #fff; background: var(--blue); }

.dropzone { display: grid; place-items: center; gap: 8px; padding: 28px 16px; text-align: center; color: var(--ink-2); background: var(--panel-2); border: 2px dashed var(--line-2); border-radius: var(--r); }
.dropzone.is-drop { border-color: var(--blue); background: var(--blue-wash); }

/* —— 表格、记录 —— */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table th { font-weight: 600; color: var(--ink-2); }
.log > li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-top: 2px solid var(--line); }
.log > li:first-child { border-top: 0; }
.log time, .log .meta { color: var(--ink-3); font-size: 13px; }
.empty { color: var(--ink-3); padding: 12px 0; }

/* —— 问答 —— */
.faq { border-top: 2px solid var(--line); }
.faq:last-of-type { border-bottom: 2px solid var(--line); }
.faq > summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 600; list-style: none; position: relative; }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font: 700 20px/1.4 var(--font-mc); color: var(--ink-3); }
.faq[open] > summary::after { content: "−"; }
.faq > div { padding: 0 0 16px; color: var(--ink-2); max-width: 68ch; }
.faq > div > * + * { margin-top: 8px; }
.prose > * + * { margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose ol { list-style: decimal; padding-left: 22px; }
.prose li + li { margin-top: 6px; }
kbd, .ui { padding: 1px 6px; font: 600 14px/1.5 var(--font-ui); background: var(--panel-2); border: 2px solid var(--line-2); border-radius: var(--r); white-space: nowrap; }

/* —— 弹窗与提示条 —— */
.modal { width: min(460px, calc(100vw - 32px)); padding: 24px; color: var(--ink); background: var(--panel); border: 2px solid var(--edge); border-radius: var(--r); box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.35); }
.modal::backdrop { background: rgba(9, 13, 24, 0.6); }
.modal h2 { margin-bottom: 8px; }
.modal p { color: var(--ink-2); }
.modal .row { margin-top: 20px; justify-content: flex-end; }
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 12px 14px; color: #fff; background: #172033; border: 2px solid #05070d; border-radius: var(--r); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3); pointer-events: auto; }
.toast-success { background: #176c3c; }
.toast-danger { background: #a82722; }

/* —— 页脚 —— */
.foot { border-top: 2px solid var(--line-2); background: var(--panel); font-size: 13px; color: var(--ink-3); }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 16px; padding-bottom: 16px; }
.foot a { color: var(--ink-3); }

/* —— 首页 —— */
.hero { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: 44px; }
.hero-lead { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 30em; }
.hero-cta { margin-top: 28px; }
.hero-steps { margin-top: 40px; max-width: 30em; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero .stage { max-width: 320px; margin: 0 auto; }
  .hero h1 { font-size: 32px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-in { flex-wrap: wrap; gap: 0 12px; padding-top: 8px; }
  .brand { order: 1; }
  .topbar-end { order: 2; margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; min-height: 44px; margin: 0 -4px; }
  .who span { display: none; }
  .main { padding-top: 24px; }
  .panel { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
