:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --line: #e6e8f0;
  --ink: #16182b;
  --ink-2: #5b6076;
  --ink-3: #8b90a6;
  --brand: #4c5fff;
  --brand-2: #7a5cff;
  --ok: #12a06a;
  --warn: #d97706;
  --bad: #dc2f43;
  --r: 16px;
  --shadow: 0 1px 2px rgba(20, 24, 48, .04), 0 12px 32px -12px rgba(20, 24, 48, .14);
}

* { box-sizing: border-box; }

/* hidden 属性要能压住 display:flex/grid（否则 .code-modal-row 这类元素隐藏不掉） */
[hidden] { display: none !important; }

html { height: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 页面自己当滚动容器（而不是依赖浏览器/iframe 的窗口滚动）：
   IDE 的右侧预览面板、嵌入式 iframe 经常把外层滚动关掉，
   这时只有「面板内部有 overflow:auto 的元素」才滚得动。 */
body {
  height: 100%;
  overflow: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(76, 95, 255, .10), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(122, 92, 255, .08), transparent 40%),
    linear-gradient(to right, rgba(20, 24, 48, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 24, 48, .035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 95%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  height: 100%;
  overflow-y: auto;          /* ← 真正的滚动容器，见 body 注释 */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* ---------- header ---------- */
.head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .5px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px -8px rgba(76, 95, 255, .8);
  flex: none;
}

.head-txt { flex: 1; min-width: 0; }
.head h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.4px;
  font-weight: 700;
}
.head p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  flex: none;
}
.live .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3);
}
.live.on .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(18, 160, 106, .15); }
.live.off .dot { background: var(--bad); box-shadow: 0 0 0 3px rgba(220, 47, 67, .13); }

/* ---------- 执行机离线横幅 ---------- */
/* 离线时买家提交了也没人接单（任务排队 10 分钟就作废），所以直接拦住并告知 */
.offline-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  padding: 12px 15px;
  border-radius: 12px;
  background: #fdecee;
  border: 1px solid #f6c3cb;
  color: #a01a2c;
  font-size: 14px;
  line-height: 1.5;
}
.offline-banner svg { flex: 0 0 auto; }
.offline-banner strong { font-weight: 600; }

/* ---------- 账号输入框 + 忘记账号入口 ---------- */
.field-row { display: flex; align-items: center; gap: 8px; }
.field-row input { flex: 1 1 auto; min-width: 0; }
.forget-btn {
  flex: none;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cfd3ea;
  border-radius: 11px;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.forget-btn:hover { background: #f3f4fd; border-color: #b9bfef; }
.forget-btn:active { background: #e9ebfb; }

/* ---------- 忘记账号指引弹窗 ---------- */
/* 指引图是 1444×345 的长图，窄弹窗会缩到看不清红框，所以放宽到 760 */
.acct-box { width: min(760px, 100%); text-align: left; }
.acct-sub {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}
.acct-fig { margin: 0 0 10px; }
.acct-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.acct-tip { margin: 0 0 14px; font-size: 12px; color: var(--ink-3); }

/* ---------- card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -.1px;
}

/* ---------- form ---------- */
label { display: block; margin-bottom: 14px; }
label > span {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}

input[type="email"], input[type="password"], input[type="url"], input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfbfe;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(76, 95, 255, .12);
}
input::placeholder { color: #b4b8c9; }

.pw { position: relative; }
.pw input { padding-right: 62px; }
.pw button {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pw button:hover { background: #f0f1f7; color: var(--ink); }

.adv {
  border: 1px dashed var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: #fcfcff;
}
.adv summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2);
  user-select: none;
}
.adv[open] summary { margin-bottom: 10px; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }

.btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font: inherit;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .12s, box-shadow .2s, opacity .2s;
  box-shadow: 0 10px 24px -12px rgba(76, 95, 255, .9);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 1; background: #c3c7d6; color: #fff; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 95, 255, .28);
}
.btn.ghost:focus-visible {
  box-shadow: 0 0 0 3px rgba(76, 95, 255, .18);
}
.btn.ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
  height: 42px;
}
.btn.ghost:hover { color: var(--ink); border-color: #d3d6e4; }

.err {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdf2f3;
  color: var(--bad);
  font-size: 13px;
  border: 1px solid #f7d7db;
}

.notes {
  margin: 18px 0 0;
  padding: 14px 0 0 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12.5px;
}
.notes li { margin-bottom: 5px; }
.notes b { color: var(--ink-2); }

/* ---------- task ---------- */
.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.task-head h2 { margin: 0; }

.pill {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #eef0fb;
  color: var(--brand);
  font-weight: 600;
}
.pill.ok { background: #e8f7f0; color: var(--ok); }
.pill.warn { background: #fdf4e6; color: var(--warn); }
.pill.bad { background: #fdeef0; color: var(--bad); }

/* 横向流程条：4 个胶囊一行放下，窄屏可横向滑 */
.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.steps::-webkit-scrollbar { display: none; }

.step {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fbfbfd;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.step i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ccd0de;
  flex: none;
  transition: all .2s;
}
.step.active {
  color: #0d6b4f;
  border-color: #8fcbb4;
  background: #ecf7f2;
  font-weight: 500;
}
.step.active i { background: var(--ok); box-shadow: 0 0 0 3px rgba(18, 160, 106, .16); }
.step.done { color: var(--ink-2); border-color: #d7e6e0; background: #f4faf7; }
.step.done i { background: var(--ok); }
.step.fail { color: #a01a2c; border-color: #f0b4bc; background: #fdecee; }
.step.fail i { background: var(--bad); }

.msg {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--ink-2);
  min-height: 21px;
}

.codebox {
  margin: 14px 0 4px;
  padding: 14px 14px 6px;
  border: 1px solid #f3ddb8;
  background: linear-gradient(180deg, #fffdf8, #fffaf0);
  border-radius: 12px;
  animation: pop .25s ease-out;
}
.codebox label { margin-bottom: 8px; }
.codebox .hint { margin: 2px 0 8px; }
.codebox input { background: #fff; border-color: #f0e2c8; }
.codebox .pw button { background: rgba(217, 119, 6, .10); color: #b45309; font-weight: 600; }
.codebox .pw button:hover { background: rgba(217, 119, 6, .18); }

@keyframes pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.meta { margin: 0; font-size: 12px; color: var(--ink-3); }

.result { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }.result h3 {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 600;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.result h3:first-child { margin-top: 0; }

.platforms { display: flex; flex-direction: column; gap: 7px; }

/* ---------- 关联平台列表（已绑定 + ID / 未绑定） ---------- */
.plist { display: flex; flex-direction: column; gap: 8px; }

.prow {
  display: grid;
  grid-template-columns: 26px 106px 62px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fcfcff;
  font-size: 13.5px;
}
.prow.bound { background: #fbfefc; border-color: #e3f1e9; }

.pname { font-weight: 650; letter-spacing: -.1px; }

.pstate {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}
.pstate.on { background: #e8f7f0; color: var(--ok); }
.pstate.off { background: #f1f2f8; color: var(--ink-3); }

.pid {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plist-extra {
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.plist-extra[hidden] { display: none; }
.extra-label { color: var(--ink-3); }
.extra-item {
  background: #f4f5fa;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--ink-2);
}

/* ---------- Xbox 自动绑定结果 ---------- */
.bindinfo {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  border: 1px solid var(--line);
  background: #fafbfe;
  color: var(--ink-2);
}
.bindinfo.ok { background: #f4fbf7; border-color: #d9efe3; color: #107a52; }
.bindinfo.bad { background: #fff9f5; border-color: #f6e2d5; color: #a4552f; }
.bindinfo.warn { background: #fdecec; border-color: #f6cfcf; color: #c22a2a; font-weight: 600; }

/* ---------- EA ID 卡片 ---------- */
.idcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7f8ff 0%, #fbfaff 60%, #ffffff 100%);
  border: 1px solid #e6e8f7;
  margin-bottom: 14px;
}
.id-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .5px;
  flex: none;
  box-shadow: 0 8px 18px -8px rgba(76, 95, 255, .75);
}
.id-main { min-width: 0; flex: 1; }
.id-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1px;
}
.id-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  word-break: break-all;
}
.id-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.id-chip {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef0fb;
  color: var(--brand);
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip-ico { display: inline-grid; place-items: center; }
.chip-ico svg { width: 12px; height: 12px; fill: currentColor; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 绑定提醒 ---------- */
.alerts { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fbfbfe;
  border-left-width: 4px;
}
.alert-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-logo { display: inline-grid; place-items: center; flex: none; }
.alert-logo svg { width: 18px; height: 18px; fill: currentColor; }
.alert-title { font-size: 14px; font-weight: 650; letter-spacing: -.1px; }
.alert-desc { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.alert-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: #ffe6e0;
  color: #d1341a;
  letter-spacing: .3px;
  animation: blink 1.6s ease-in-out infinite;
}

.alert.xbox {
  background: linear-gradient(180deg, #fff6f2, #fffaf7);
  border-color: #ffd9cd;
  border-left-color: #ff5c35;
}
.alert.xbox .alert-title { color: #b83a1c; }
.alert.xbox .alert-desc { color: #a4482e; font-weight: 500; }

.alert.ok {
  background: linear-gradient(180deg, #f4fbf7, #fbfefc);
  border-color: #d5eede;
  border-left-color: var(--ok);
}
.alert.ok .alert-title { color: #107a52; }

.alert.none {
  background: #fafbfe;
  border-color: #e6e8f2;
  border-left-color: #9aa2bd;
}
.alert.none .alert-title { color: var(--ink); }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.pf {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  background: #fcfcff;
}
.pf .name { font-weight: 600; text-transform: capitalize; flex: none; width: 96px; }

.pf-ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f2f3f9;
  display: grid;
  place-items: center;
  flex: none;
}
.pf-ico svg { width: 15px; height: 15px; fill: currentColor; }
/* 没有 SVG 的平台：文字徽标（Twitch 紫底白 T） */
.pf-ico.ico-text,
.alert-logo.ico-text {
  color: #fff;
  font-weight: 800;
  line-height: 1;
  border-radius: 6px;
}
.pf-ico.ico-text { width: 26px; height: 26px; font-size: 14px; border-radius: 8px; }
.alert-logo.ico-text { width: 18px; height: 18px; font-size: 11px; border-radius: 5px; }
.pf .txt { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf .tag {
  margin-left: auto;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  flex: none;
}
.pf .tag.linked { background: #e8f7f0; color: var(--ok); }
.pf .tag.unlinked { background: #f1f2f8; color: var(--ink-3); }
.pf .tag.unknown { background: #f1f2f8; color: var(--ink-3); }

.shots { display: flex; gap: 8px; flex-wrap: wrap; }
.shots figure { margin: 0; width: 152px; }
.shots img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: top;
  border-radius: 9px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: #f3f4f9;
  transition: transform .15s;
}
.shots img:hover { transform: translateY(-2px); }
.shots figcaption { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

.raw { margin-top: 16px; }
.raw summary { cursor: pointer; font-size: 12.5px; color: var(--ink-3); }
.raw pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
  color: var(--ink-2);
  max-height: 320px;
  overflow: auto;
  margin: 10px 0 0;
}

.foot { margin-top: 18px; }

.foot-note {
  text-align: center;
  font-size: 11.5px;
  color: #a7abbd;
  margin-top: 8px;
  word-break: break-all;
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 28, .55);
  display: grid;
  place-items: center;
  z-index: 60;
  padding: 24px;
  overflow-y: auto;
  animation: fade .16s ease-out;
  backdrop-filter: blur(2px);
}
.modal[hidden] { display: none; }

.modal-box {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px 18px;
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 30px 70px -20px rgba(12, 14, 28, .45);
  text-align: center;
  animation: pop .22s ease-out;
}
.modal-ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 22px;
  font-weight: 800;
  background: #fdeef0;
  color: var(--bad);
}
.modal-ico.warn { background: #fdf4e6; color: var(--warn); }
.modal-ico.ok { background: #e9f8ef; color: #16a34a; }
.modal-strong { margin-top: 10px; font-weight: 700; color: var(--ink); font-size: 14px; }
#modalMsg .modal-strong { color: var(--brand); }
/* 结果弹窗正文允许后端用 \n 分行（例如「登录成功，但…未完成。」/「原因：…」），
   不分行的话两句会挤成一大段，买家扫一眼看不出"哪句是结果、哪句是原因"。 */
#modalMsg { white-space: pre-line; }
.modal-box h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.2px; }
.modal-box p {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.65;
}
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { height: 42px; width: auto; flex: 1 1 0; min-width: 0; }
/* 完结弹窗只剩「复制结果告知客服」一个按钮时，让它成为主按钮（蓝色），别看着像禁用 */
#modal.result-only .modal-actions .btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px -10px rgba(76, 95, 255, .8);
}

/* 底部轻提示（复制成功等） */
#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 12px);
  max-width: min(420px, calc(100% - 40px));
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(20, 24, 38, .92);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 12px 30px -10px rgba(10, 14, 28, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 90;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 通用「处理中」弹窗（Steam 账号密码核实中） */
#waitModal .modal-box { width: min(360px, 100%); padding: 30px 24px 26px; }
#waitModal .spinner {
  display: block;             /* span 默认 inline，宽高不生效，会变成一根细条 */
  width: 42px; height: 42px;
  margin: 4px auto 16px;
  border-width: 3px;
}
#waitModal h3 { margin-bottom: 6px; }
#waitModal p { margin: 0; font-size: 13px; }
#waitModal .wait-tip { margin-top: 12px; font-size: 12px; color: var(--ink-3); }

/* 验证码弹窗 */
.modal-ico.mail { background: #eaf3ff; color: var(--brand); }
.code-modal-row { display: flex; gap: 8px; margin: 0 0 12px; align-items: center; }
body.modal-open { overflow: hidden; }
body.modal-open .wrap { overflow: hidden; }   /* 弹窗打开时锁住面板内滚动 */
.code-modal-row input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 52px;
  font-size: 22px;
  letter-spacing: 5px;
  text-align: center;
  font-weight: 600;
}
.code-modal-row .btn { height: 46px; width: auto; flex: 0 0 auto; padding: 0 18px; }
/* 重新输入密码：不要验证码那套 22px + 5px 字距 */
#pwd2 { font-size: 16px; letter-spacing: 1px; text-align: left; font-weight: 500; padding: 0 14px; }
#pwd2::placeholder { font-size: 14px; letter-spacing: 0; }

/* 占位文案别跟着验证码的大字号 + 字距走，否则「输入 5 位验证码」会撑出框 */
.code-modal-row input::placeholder {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
}
#codeModal .modal-box p { margin-bottom: 10px; }
#codeModal .hint { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
/* 「EA 官方提示」这块要显眼：里面有收码邮箱，是买家判断去哪个邮箱查收的唯一依据。
   后端文案用 \n 分行（第一行 EA 原话，第二行中文说明），所以用 pre-line。 */
#codeModalMsg {
  white-space: pre-line;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
  word-break: break-word;
}
#codeModalMsg:empty { display: none; }

/* 提交验证码后的「核验中」状态：转圈 + 禁止操作 */
.code-busy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f3f5ff;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 600;
}
.code-busy[hidden] { display: none; }
.spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2.5px solid #d9dff7;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.code-err {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fdeef0;
  color: var(--bad);
  font-size: 13px;
  font-weight: 600;
}
.code-err[hidden] { display: none; }

/* 核验中：弹窗内一切交互都锁死（关闭按钮也失效） */
#codeModal.busy .code-modal-row,
#codeModal.busy .hint,
#codeModal.busy .hold-x { opacity: .45; pointer-events: none; }
#codeModal.busy .modal-box { cursor: progress; }

/* 长按 2 秒关闭（右上角 ×）：外圈是转满的进度环 */
.hold-x {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eef0f6;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  padding: 0;
}
.hold-x:active { background: #e3e6ef; }
.hold-x .hold-ring {
  position: absolute;
  inset: 0;
  width: 32px; height: 32px;
  transform: rotate(-90deg);      /* 从 12 点方向开始转 */
  pointer-events: none;
}
.hold-x .ring-bg {
  fill: none;
  stroke: rgba(15, 23, 42, .12);
  stroke-width: 2.5;
}
.hold-x .ring-fg {
  fill: none;
  stroke: var(--brand, #5b5bd6);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 81.68;        /* 2πr, r=13 */
  stroke-dashoffset: 81.68;       /* 未开始时整圈隐藏 */
  transition: stroke-dashoffset .08s linear;
}
.hold-x .hold-txt { position: relative; font-weight: 700; }

/* 只能长按关闭的弹窗（比如 EA 的 365 天换绑限制）：底部一行小字提示 */
.modal-hold-tip {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: center;
}
.modal-hold-tip[hidden] { display: none; }

/* 验证码弹窗里的「看教程」入口（Steam：连续输错 2 次后出现） */
.tut-link {
  display: block;
  margin: 4px auto 0;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.tut-link[hidden] { display: none; }

/* 图文教程弹窗：叠在验证码弹窗之上，图片区独立滚动 */
.modal.help { z-index: 70; }
.help-box {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px 20px 16px;
  text-align: left;
}
.help-box h3 { text-align: center; margin-bottom: 6px; }
.help-box p { margin: 0 0 10px; }
.help-sub { text-align: center; font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.help-tip { text-align: center; font-size: 11.5px; color: var(--ink-3); margin: 8px 0 0; }
.help-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: #f6f7fb;
  padding: 10px;
}
.help-scroll figure { margin: 0 0 12px; }
.help-scroll figure:last-child { margin-bottom: 0; }
.help-scroll img {
  display: block;
  max-width: 100%;
  max-height: 60vh;      /* 整张图一次看全，不裁掉关键的那句提示 */
  width: auto;
  margin: 0 auto;
  height: auto;
  border-radius: 10px;
  background: #fff;
}
.help-scroll figcaption {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
  text-align: center;
}

/* 接收验证码方式选择（复刻 EA「验证您的身份」） */
.modal-ico.ea {
  background: #eef1ff;
  color: #2f4bd8;
  font-size: 15px;
  letter-spacing: .5px;
  font-weight: 800;
}
.veri-list { display: grid; gap: 10px; margin: 0 0 12px; }
.veri-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid #dfe3ef;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.veri-opt:hover { border-color: #9aa8ea; background: #f7f8ff; }
.veri-opt:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(76, 95, 255, .16); }
.veri-opt:focus:not(:focus-visible) { box-shadow: none; border-color: #dfe3ef; }
.veri-opt:active { transform: scale(.995); }
.veri-opt[disabled] { opacity: .6; cursor: default; }
.veri-opt .veri-ico {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef1ff;
  color: #2f4bd8;
}
.veri-opt .veri-ico svg { width: 18px; height: 18px; fill: currentColor; }
.veri-opt .veri-label { flex: 1 1 auto; min-width: 0; word-break: break-all; line-height: 1.45; }
.veri-opt .veri-go { color: var(--ink-3); font-size: 12px; flex: 0 0 auto; }
#choiceModal .modal-box p { margin-bottom: 14px; }
#choiceModal .hint { font-size: 12px; color: var(--ink-3); line-height: 1.6; margin: 0; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 28, .82);
  display: grid;
  place-items: center;
  z-index: 70;   /* 要能盖在 .modal(60) 上面：指引图是在弹窗里再点开放的 */
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox button {
  position: absolute;
  top: 18px; right: 18px;
  height: 34px; padding: 0 14px;
  border-radius: 9px;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 560px) {
  .wrap { padding: 24px 14px 48px; }
  .card { padding: 18px; }
  .head h1 { font-size: 19px; }
  .live { display: none; }
  .shots figure { width: calc(50% - 4px); }
  .prow { grid-template-columns: 26px 1fr 62px; row-gap: 3px; }
  .pid { grid-column: 1 / -1; padding-left: 36px; }
}

/* ---------- 登录方式切换 ---------- */
.mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  background: #f2f3fa;
  border-radius: 13px;
  margin-bottom: 16px;
}
.mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.mode-btn:hover { color: var(--ink); }
.mode-btn.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 24, 48, .06), 0 6px 16px -10px rgba(20, 24, 48, .3);
}
.mode-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3px;
  flex: none;
}
.mode-svg { width: 20px; height: 20px; fill: #1b2838; flex: none; }

/* 第二栏：业务类型（Apex 充值 / Apex 箱子） */
.mode.biz { margin-top: -6px; margin-bottom: 18px; }
.mode.biz .mode-btn { height: 38px; font-size: 13px; }
.mode-badge.box {
  background: linear-gradient(140deg, #f59e0b, #ef4444);
  font-size: 11px;
}

/* ---------- Steam 结果卡 ---------- */
.steamcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f8fb 0%, #fbfcfe 60%, #fff 100%);
  border: 1px solid #e3e9f0;
  margin-bottom: 14px;
}
.steamcard[hidden] { display: none; }
.sc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #e9eef5;
  border: 1px solid #e0e6ef;
  flex: none;
}
.sc-main { min-width: 0; flex: 1; }
.sc-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1px;
}
.sc-name {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  word-break: break-all;
}
.sc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.sc-item b { color: var(--ink-2); font-weight: 600; word-break: break-all; }
.modal-line { display: block; }
.modal-line + .modal-line { margin-top: 2px; }
#modalMsg .modal-strong { display: block; }
/* 红字提醒：例如「检测到绑定了第三方 Xbox」 */
#modalMsg .modal-warn {
  display: block;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fdecec;
  color: #d92d2d;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
}
