/* 追加样式：分页、工具类、表单错误等（app.css 之后加载） */

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 28px 0 4px;
}

.pager a,
.pager span {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-2);
    box-shadow: var(--shadow-sm);
}

.pager a:hover { border-color: #cfd6e6; color: var(--text); }
.pager .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .disabled { opacity: .45; pointer-events: none; }
.pager .ellipsis { border: 0; background: none; box-shadow: none; color: var(--muted); }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted-text { color: var(--muted); font-size: 12.5px; }

.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

.form .field.has-error input,
.form .field.has-error textarea,
.form .field.has-error select { border-color: #fca5a5; }

.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.auth-wrap { max-width: 420px; margin: 40px auto 0; }
.auth-card { padding: 26px 24px; }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; }
.auth-card .lead { margin: 0 0 18px; color: var(--text-2); font-size: 13.5px; }
.auth-foot { margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--primary); font-weight: 600; }

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    overflow-x: auto;
    line-height: 1.7;
}
.code-block .c { color: #94a3b8; }

/* ---------- 软件源弹层 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-mask.open { display: flex; }

.modal {
  width: min(520px, 100%);
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn .16s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 8px;
}
.modal-head h2 { margin: 0; font-size: 17.5px; letter-spacing: -.2px; }
.modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: #e2e8f0; }

.modal-body { padding: 6px 16px 18px; display: grid; gap: 10px; }

.source-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.source-option:hover {
  transform: translateY(-1px);
  border-color: #d6ddec;
  box-shadow: var(--shadow);
}
.source-option .ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.source-option .ico svg { width: 20px; height: 20px; }
.source-option .txt { min-width: 0; }
.source-option strong { display: block; font-size: 14.5px; font-weight: 650; line-height: 1.4; }
.source-option small { color: var(--muted); font-size: 12.5px; }
.source-option .chev { margin-left: auto; color: var(--muted); flex: 0 0 auto; }

.ico-blue { background: #e0f2fe; color: #0284c7; }
.ico-green { background: #dcfce7; color: #16a34a; }
.ico-purple { background: #ede9fe; color: #7c3aed; }

.modal-hint {
  display: none;
  margin: 2px 4px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
}
.modal-hint.show { display: block; }

/* ---------- 我的：软件源入口 ---------- */
.source-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 120px at 100% 0%, rgba(99, 102, 241, .08), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.source-entry:hover {
  transform: translateY(-1px);
  border-color: #d6ddec;
  box-shadow: var(--shadow);
}

.source-entry .ico {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #eef2ff, #e0e7ff);
  color: var(--primary);
}
.source-entry .ico svg { width: 22px; height: 22px; }

.source-entry .txt { flex: 1; min-width: 0; }
.source-entry .txt strong { display: block; font-size: 15px; letter-spacing: -.1px; }
.source-entry .txt small { display: block; color: var(--text-2); font-size: 12.8px; margin-top: 2px; }

.source-entry .go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .source-entry { align-items: flex-start; }
  .source-entry .go { align-self: center; }
}

/* ---------- 我的：账号头部 ---------- */
.account-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 14px;
}
.account-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(140deg, #6366f1, #4338ca);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .28);
}
.account-meta { min-width: 0; }
.account-meta h1 { margin: 0 0 3px; font-size: 22px; letter-spacing: -.3px; }
.account-meta p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-2);
  font-size: 13.5px;
}

@media (max-width: 560px) {
  .account-avatar { flex-basis: 52px; width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }
  .account-meta h1 { font-size: 19px; }
  .account-head .row { margin-left: 0 !important; width: 100%; }
}

/* ---------- UDID 页面：长地址与窄屏适配 ---------- */
.code-block {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.steps li { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .steps li { padding: 14px 14px 14px 52px; font-size: 13.5px; }
  .steps li::before { left: 12px; top: 12px; width: 26px; height: 26px; font-size: 12px; }
  .install-row .btn { flex: 1 1 100%; }
}

/* ---------- 签名页：两个动作卡 ---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(320px 140px at 100% 0%, rgba(99, 102, 241, .08), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.action-card:hover {
  transform: translateY(-2px);
  border-color: #d6ddec;
  box-shadow: var(--shadow);
}

.action-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e0e7ff;
  color: var(--primary);
}
.action-icon svg { width: 24px; height: 24px; }
.action-icon-violet { background: #ede9fe; color: #7c3aed; }

.action-body { flex: 1; min-width: 0; }
.action-body strong { display: block; font-size: 15.5px; letter-spacing: -.1px; }
.action-body small { display: block; margin-top: 3px; color: var(--text-2); font-size: 12.8px; }

.action-go { flex: 0 0 auto; color: var(--primary); font-size: 13.5px; font-weight: 600; }

@media (max-width: 560px) {
  .action-card { align-items: flex-start; }
  .action-go { align-self: center; }
}

/* ---------- 我的设备：卡片列表 ---------- */
.device-list { display: grid; gap: 12px; }

.device-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.device-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: var(--primary);
}
.device-icon svg { width: 22px; height: 22px; }

.device-main { flex: 1; min-width: 0; }

.device-name-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.device-name-input {
  flex: 1 1 180px;
  max-width: 280px;
  padding: 7px 10px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
}
.device-name-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}

.device-udid-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

.device-udid {
  flex: 1 1 240px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 8px;
  background: #f6f7fb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.device-actions { display: flex; align-items: flex-start; }
.btn.danger { color: #dc2626; }
.btn.danger:hover { background: #fee2e2; border-color: #fecaca; }

@media (max-width: 560px) {
  .device-card { flex-wrap: wrap; }
  .device-actions { width: 100%; justify-content: flex-end; }
  .device-name-input { max-width: none; }
}

.action-icon-amber { background: #fef3c7; color: #b45309; }

/* ---------- 我的签名：卡片列表 ---------- */
.sign-list { display: grid; gap: 10px; }

.sign-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.sign-main { flex: 1; min-width: 0; }

.sign-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sign-name { font-size: 15px; }

.sign-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}

.sign-error {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  word-break: break-all;
}

.sign-actions { flex: 0 0 auto; }

@media (max-width: 560px) {
  .sign-card { flex-wrap: wrap; }
  .sign-actions { width: 100%; }
  .sign-actions .btn { width: 100%; }
}

/* 昵称后面的编辑小按钮 */
.name-edit {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--text-2);
  background: #f1f5f9;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.name-edit svg { width: 15px; height: 15px; }
.name-edit:hover { background: #e0e7ff; color: var(--primary); }

/* 应用卡片：主体点击 + 右侧操作按钮 */
.app-card {
  flex-direction: column;
  gap: 10px;
}
.app-card-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.app-card-actions {
  display: flex;
  gap: 8px;
  padding-left: 66px;
  flex-wrap: wrap;
}
.app-card-actions .btn { padding: 5px 12px; font-size: 12.5px; }

@media (max-width: 560px) {
  .app-card-actions { padding-left: 0; }
}

/* 应用卡片操作按钮：在线安装更显眼 */
.app-card-actions .btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
}
.app-card-actions .btn-primary {
  box-shadow: 0 6px 16px rgba(79, 70, 229, .25);
}
.app-card-actions .btn-primary:hover {
  box-shadow: 0 8px 20px rgba(79, 70, 229, .32);
}

/* 应用卡片：修掉标题/简介撑破卡片（长标题 + emoji 简介） */
.app-card { overflow: hidden; }
.app-card-main { min-width: 0; }
.app-card-body { min-width: 0; overflow: hidden; }
.app-card-name { min-width: 0; }
.app-card-name span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-card-name .badge { flex: 0 0 auto; white-space: nowrap; }
.app-card-sub {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.app-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
}
.app-card-actions { min-width: 0; }

/* 关键修复：.app-card 原来是 align-items:flex-start，改成竖排后子元素按内容宽度撑开才会溢出 */
.app-card {
  align-items: stretch;
}
.app-card-main {
  width: 100%;
}
.app-card-actions {
  width: 100%;
}

/* 最近签名：竖排卡片列表（手机/桌面都好看） */
.sign-list {
  display: grid;
  gap: 10px;
}
.sign-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.sign-item:hover {
  border-color: #c7d2fe;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .10);
  transform: translateY(-1px);
}
.sign-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.sign-name {
  font-size: 14.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sign-sub { color: var(--muted); font-size: 12px; }
.sign-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.sign-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sign-go { color: var(--primary); font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* 手机：状态和时间换到第二行，按钮靠右 */
@media (max-width: 560px) {
  .sign-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "main go"
      "side go";
    gap: 6px 10px;
    padding: 12px 14px;
  }
  .sign-main { grid-area: main; }
  .sign-side { grid-area: side; gap: 8px; }
  .sign-go { grid-area: go; align-self: center; }
  .sign-item .badge { font-size: 11px; }
  .app-shell { padding-bottom: calc(var(--tabbar-h) + 44px); }
}

/* 最近签名：防止窄屏横向溢出 */
.sign-list { min-width: 0; }
.sign-item { min-width: 0; }
@media (max-width: 560px) {
  .sign-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .sign-go { justify-self: end; }
}

/* 我的页：自定义按钮更显眼（置顶显示） */
.source-entry.is-custom {
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 60%);
  box-shadow: 0 6px 18px rgba(79, 70, 229, .10);
}
.source-entry.is-custom .ico {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
}
.source-entry.is-custom .txt strong { color: var(--primary-dark); }
.source-entry.is-custom .go { color: var(--primary); }
.source-entry.is-custom:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(79, 70, 229, .18);
}

/* 我的页：自定义按钮做成「金色 VIP」质感 */
.source-entry.is-custom {
  border: 1px solid #f0cf7a;
  background:
    linear-gradient(135deg, #fffaf0 0%, #fef3c7 45%, #fff8e6 100%);
  box-shadow: 0 6px 18px rgba(217, 164, 21, .16), inset 0 1px 0 rgba(255, 255, 255, .8);
  position: relative;
  overflow: hidden;
}
.source-entry.is-custom::after {
  /* 右上角的一抹金光 */
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, .35) 0%, rgba(251, 191, 36, 0) 70%);
  pointer-events: none;
}
.source-entry.is-custom .ico {
  background: linear-gradient(140deg, #fbbf24 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(217, 119, 6, .35);
}
.source-entry.is-custom .txt strong {
  color: #92400e;
  letter-spacing: .2px;
}
.source-entry.is-custom .txt small { color: #b45309; opacity: .8; }
.source-entry.is-custom .go {
  color: #b45309;
  font-weight: 700;
}
.source-entry.is-custom:hover {
  border-color: #d9a415;
  box-shadow: 0 10px 26px rgba(217, 164, 21, .26), inset 0 1px 0 rgba(255, 255, 255, .9);
}

/* 金色入口左上角的皇冠徽章 */
.source-entry.is-custom .ico { position: relative; overflow: visible; }
.vip-crown {
  position: absolute;
  top: -7px;
  left: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #fde68a 0%, #f59e0b 100%);
  border: 1.5px solid #fff;
  box-shadow: 0 3px 8px rgba(217, 119, 6, .35);
  color: #7c2d12;
  z-index: 2;
}
.vip-crown svg { width: 12px; height: 12px; }

/* 皇冠改成裸图标 + 斜戴；去掉金色圆底 */
.source-entry.is-custom .vip-crown {
  top: -9px;
  left: -7px;
  width: 24px;
  height: 24px;
  border-radius: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #e6a70b;
  transform: rotate(-18deg);
  filter: drop-shadow(0 2px 3px rgba(180, 83, 9, .35));
}
.source-entry.is-custom .vip-crown svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, .85);
  stroke-width: .6px;
  paint-order: stroke;
}

/* 金边加强 + 左右扫光 */
.source-entry.is-custom {
  border-color: #e6b84a;
  position: relative;
  isolation: isolate;
}
.source-entry.is-custom::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 38%;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, .55) 45%,
    rgba(255, 255, 255, .85) 50%,
    rgba(255, 255, 255, .55) 55%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 1;
  animation: vip-sweep 4.2s ease-in-out infinite;
}
@keyframes vip-sweep {
  0%   { left: -60%; }
  45%  { left: 120%; }
  100% { left: 120%; }
}
@media (prefers-reduced-motion: reduce) {
  .source-entry.is-custom::before { animation: none; display: none; }
}

/* 皇冠再调：更大更清楚，去掉圆底，斜戴 */
.source-entry.is-custom .vip-crown {
  top: -11px;
  left: -10px;
  width: 28px;
  height: 28px;
  color: #f59e0b;
  transform: rotate(-16deg);
  filter: drop-shadow(0 2px 3px rgba(120, 53, 15, .35));
}
.source-entry.is-custom .vip-crown svg {
  width: 26px;
  height: 26px;
  stroke: #fff7e0;
  stroke-width: 1px;
  paint-order: stroke fill;
}

/* 皇冠改挂到卡片左上角（露在边框上），去掉旧的金色光斑 */
.source-entry.is-custom { overflow: visible; }
.source-entry.is-custom::after { display: none; }
.source-entry.is-custom .ico { position: static; }
.source-entry.is-custom .vip-crown {
  position: absolute;
  top: -12px;
  left: 16px;
  width: 30px;
  height: 30px;
  transform: rotate(-14deg);
  color: #f59e0b;
  z-index: 3;
  filter: drop-shadow(0 3px 4px rgba(120, 53, 15, .35));
}
.source-entry.is-custom .vip-crown svg {
  width: 28px;
  height: 28px;
  stroke: #fffdf5;
  stroke-width: 1.2px;
  paint-order: stroke fill;
}

/* 皇冠重新贴回图标左上角（别再悬在卡片边框上） */
.source-entry.is-custom .ico {
  position: relative;
  overflow: visible;
}
.source-entry.is-custom .vip-crown {
  top: -9px;
  left: -9px;
  transform: rotate(-14deg);
}

/* 扫光要裁在卡片内，别扫到旁边的卡片上；皇冠还在卡片内所以不受影响 */
.source-entry.is-custom { overflow: hidden; }

/* UDID 结果页 / 获取页 */
.udid-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.udid-cta .btn-lg { padding: 13px 30px; font-size: 15.5px; }

.udid-done {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 70%);
  border: 1px solid #a7f3d0;
  margin-bottom: 16px;
}
.udid-done-head { display: flex; gap: 10px; align-items: flex-start; }
.udid-done-head strong { font-size: 15px; color: #065f46; }
.udid-done-head p { margin: 3px 0 0; color: #047857; font-size: 12.5px; }
.udid-done-icon,
.udid-card-icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #10b981;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.udid-done-value {
  display: block;
  font-size: 12.5px;
  word-break: break-all;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  padding: 10px 12px;
}

.udid-card {
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.udid-card-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.udid-card-heading strong { font-size: 16px; }
.udid-card-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }

.udid-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
}
.udid-hero-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.udid-hero-value {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  word-break: break-all;
  color: var(--text);
}
.udid-copy { flex: 0 0 auto; }

.udid-name-form { margin-top: 16px; }
.udid-name-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.udid-name-row { display: flex; gap: 8px; flex-wrap: wrap; }
.udid-name-row input { flex: 1; min-width: 180px; }

/* UDID 页面：说明文字 + 设备卡片列表 */
.udid-note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  margin: 0 0 18px;
}

.device-list { display: grid; gap: 10px; }
.device-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.device-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #eef2ff, #e0e7ff);
  color: var(--primary);
}
.device-avatar svg { width: 21px; height: 21px; }
.device-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.device-main strong {
  font-size: 14.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-meta { color: var(--muted); font-size: 12px; }
.device-udid-text {
  font-size: 11.5px;
  flex: 0 0 auto;
  color: #64748b;
  word-break: break-all;
  background: #f8fafc;
  border-radius: 7px;
  padding: 3px 7px;
  margin-top: 4px;
  align-self: flex-start;
  max-width: 100%;
}
.device-current { flex: 0 0 auto; }

/* UDID 安装提示弹框 */
.udid-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.udid-modal[hidden] { display: none; }
.udid-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: udidFade .18s ease-out;
}
.udid-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 20px;
  padding: 24px 22px 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  text-align: center;
  animation: udidPop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.udid-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #eef2ff, #e0e7ff);
  color: var(--primary);
}
.udid-modal-icon svg { width: 26px; height: 26px; }
.udid-modal-card h2 { font-size: 18px; margin: 0 0 6px; }
.udid-modal-sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.6; }
.udid-modal-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; text-align: left; }
.udid-modal-steps li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.55;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 11px;
}
.udid-modal-steps li span {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.udid-modal-actions { display: flex; gap: 8px; justify-content: center; }
.udid-modal-actions .btn { min-width: 120px; }
.udid-modal-tip { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); }

@keyframes udidFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes udidPop {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* 空结果里的按钮组 */
.empty-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* 签名详情：分阶段进度 */
.stage-row { margin: 10px 0 0; }
.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  margin-bottom: 6px;
}
.stage-head span { color: var(--text-2); }
.stage-head b { font-size: 13px; color: var(--text); }

/* 页面标题右侧的操作按钮（比如「我是新手」） */
.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.page-head-row .newbie-btn { flex: 0 0 auto; }
@media (max-width: 560px) {
  .page-head-row { align-items: stretch; }
  .page-head-row .newbie-btn { width: 100%; }
}
/* 标题和「我是新手」按钮同一行 */
.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.title-row h1 { margin: 0; }
.newbie-btn {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: var(--primary-dark);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.newbie-btn:hover { background: #e0e7ff; border-color: var(--primary); }

/* 弹框步骤：序号一列、文字一列，文字内部不再被拆成多块 */
.udid-modal-steps li .t {
  flex: 1;
  min-width: 0;
  display: block;
}
.udid-modal-steps li .n {
  flex: 0 0 20px;
}
/* 步骤文字块：覆盖掉「序号圆圈」的样式，不然文字也会变紫底白字 */
.udid-modal-steps li .t {
  background: none;
  color: inherit;
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 13.5px;
  font-weight: 400;
  display: inline;
  padding: 0;
  margin: 0;
}
.udid-modal-steps li .t strong { font-weight: 700; }

/* 弹框里的文字链接（证书 / 获取 UDID） */
.udid-modal-steps a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.udid-modal-steps a:hover { color: var(--primary-dark); border-bottom-style: solid; }
.udid-modal-steps a strong { font-weight: 700; }

/* 弹窗里的表单：左对齐，和站内其他表单一致 */
.udid-modal-card .field {
  text-align: left;
  margin-bottom: 14px;
}
.udid-modal-card .field label {
  display: block;
  text-align: left;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.udid-modal-card .field input,
.udid-modal-card .field select {
  width: 100%;
}

/* ===== 兑换证书：核心业务入口，做得醒目一点 ===== */
.redeem-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 22px 24px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(120deg, #4f46e5 0%, #6366f1 45%, #8b5cf6 100%);
  box-shadow: 0 14px 34px -14px rgba(79, 70, 229, .65);
  color: #fff;
}

/* 右下角的光晕 + 小圆点装饰 */
.redeem-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.redeem-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 320px;
}

.redeem-hero-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.redeem-hero-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.redeem-hero-text h2 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: #fff;
}

.redeem-hero-text p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .88);
  max-width: 620px;
}

.redeem-hero-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  color: #4338ca;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(15, 23, 42, .55);
  transition: transform .12s ease, box-shadow .12s ease;
}

.redeem-hero-btn svg { width: 18px; height: 18px; }

.redeem-hero-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -8px rgba(15, 23, 42, .6);
}

.redeem-hero-btn:active { transform: translateY(0); }

@media (max-width: 640px) {
  .redeem-hero { padding: 18px; border-radius: 16px; }
  .redeem-hero-text h2 { font-size: 17px; }
  .redeem-hero-text p { font-size: 12.5px; }
  .redeem-hero-btn { width: 100%; justify-content: center; }
}

/* 兑换成功弹窗 */
.redeem-success-card {
  text-align: center;
  overflow: hidden;
}

.redeem-success-badge {
  width: 64px;
  height: 64px;
  margin: 2px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 12px 26px -10px rgba(22, 163, 74, .8);
  animation: redeemPop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}

.redeem-success-badge svg { width: 32px; height: 32px; }

@keyframes redeemPop {
  0% { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.redeem-success-rows {
  margin: 16px 0 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.redeem-success-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.redeem-success-rows > div:last-child { border-bottom: 0; }

.redeem-success-rows dt { color: var(--muted); }
.redeem-success-rows dd { margin: 0; font-weight: 700; text-align: right; word-break: break-all; }
/* 成功弹窗里「证书」这种两字标签不要竖排 */
.redeem-success-rows dt {
  flex: 0 0 auto;
  white-space: nowrap;
}
.redeem-success-rows dd {
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
}

/* 兑换卡片右侧按钮组 */
.redeem-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  flex: 0 0 auto;
}

.redeem-hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .65);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(4px);
  transition: background .12s ease, border-color .12s ease;
}

.redeem-hero-btn-ghost:hover {
  background: rgba(255, 255, 255, .22);
  border-color: #fff;
}

.redeem-hero-btn-ghost svg { width: 17px; height: 17px; }

@media (max-width: 640px) {
  .redeem-hero-actions { width: 100%; }
  .redeem-hero-btn-ghost { width: 100%; }
}