/* ============================================================================
   public-card.css — 卡密链接公开页样式
   对齐原站 UserHome (chunk 348) 的 class 命名，深色渐变 + 居中卡片

   ★★★★★ 2026-10-10：按需求方从**原站卡密页**抓到的真实计算样式逐条对齐。
   数据来源（全部是实测，不是猜的）：
     ① 需求方在原站卡密页 Console 执行 getComputedStyle 得到的结果
     ② 原站 /static/css/app.b35af852.css 的 :root 变量表

   原站实测值（逐字）：
     .user-root  backgroundImage: linear-gradient(135deg,
                    rgb(15,23,42), rgb(30,41,59) 50%, rgb(15,52,96))
                 position: relative
     .bg         backgroundImage: radial-gradient(circle at 25% 25%,
                    rgba(16,185,129,.18) 0px, rgba(0,0,0,0) 45%),
                  radial-gradient(circle at 75% 75%,
                    rgba(99,102,241,.18) 0px, rgba(0,0,0,0) 45%)
                 position: absolute; inset: 0
     .container  width: 520px; position: relative; z-index: 1
     .card       background: rgba(255,255,255,.06); border-radius: 24px;
                 box-shadow: none; padding: 32px 28px
     .plat-btn   background: rgba(255,255,255,.08);
                 border: 1px solid rgba(255,255,255,.15);
                 border-radius: 12px; padding: 16px 8px;
                 color: #fff; font-size: 14px
     .info-row   background: transparent; border-bottom: none;
                 padding: 6px 0; color: #fff
     body        background: #f0f2f5; color: #303133
                 font-family: "Helvetica Neue", Helvetica, "PingFang SC",
                   "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif

   ★ 只改**样貌**，功能与 DOM 结构一律不动。
   ========================================================================== */

.user-root {
  /* ★ 品牌色改用原站 :root 的真实值（原来是 #22c55e/#16a34a，偏亮） */
  --pc-brand: #10b981;          /* 原站 --primary-light */
  --pc-brand-deep: #059669;     /* 原站 --primary      */
  --pc-brand-darker: #047857;   /* 原站 --primary-dark */
  --pc-card: #ffffff;           /* 保留：用于浅色内嵌块（如取码面板） */
  --pc-ink: #303133;            /* 原站 --text-primary  */
  --pc-sub: #606266;            /* 原站 --text-regular  */
  --pc-line: #e4e7ed;           /* 原站 --border-color  */
  --pc-err: #ef4444;
  /* ★ 深色主题下的玻璃层（原站实测） */
  --pc-glass: rgba(255, 255, 255, .06);
  --pc-glass-strong: rgba(255, 255, 255, .08);
  --pc-glass-line: rgba(255, 255, 255, .15);
  min-height: 100vh;
  position: relative;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', Arial, sans-serif;
  color: var(--pc-ink);
  padding: 24px 16px 48px;
  box-sizing: border-box;
  /* ★ 原站 .user-root 的深蓝渐变（逐字）：
   *   linear-gradient(135deg, rgb(15,23,42), rgb(30,41,59) 50%, rgb(15,52,96)) */
  background-image: linear-gradient(135deg, #0f172a, #1e293b 50%, #0f3460);
}

/* ★ 原站 .bg 是 absolute + inset:0 的**两层光晕**（不是整块渐变）。
 *   整块渐变在原站的 .user-root 上 —— 见上面。
 *   这里保持 .bg 作光晕层，值逐字对齐原站。 */
.user-root .bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(16, 185, 129, .18) 0px, rgba(0, 0, 0, 0) 45%),
    radial-gradient(circle at 75% 75%, rgba(99, 102, 241, .18) 0px, rgba(0, 0, 0, 0) 45%);
}
/* ★ 原站没有这个 ::after —— 去掉，避免多一层光晕与原站不符 */
.user-root .bg::after { content: none; }

.user-root .container {
  position: relative;
  z-index: 1;
  max-width: 520px;   /* ★ 原站 width:520px */
  margin: 0 auto;
}

/* ---------------------------------------------------------------- 品牌头 */
.user-root .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 0 26px;
  color: #fff;
}
.user-root .brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  /* ★ 原站 logo 用主色渐变（app.css: --primary-gradient） */
  background: linear-gradient(135deg, #059669, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(5, 150, 105, .4);
}
.user-root .brand-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .5px;
}

/* ---------------------------------------------------------------- 卡片
 * ★ 原站实测：background rgba(255,255,255,.06) / radius 24px /
 *   box-shadow none / padding 32px 28px
 *   —— 玻璃拟态卡片，**不是**实心白卡。 */
.user-root .card {
  background: var(--pc-glass);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: none;
  color: #fff;   /* 深色主题下卡片内文字为白（原站 .info-row color:#fff） */
}
.user-root .card-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: #fff;
}

/* 信息行 */
.user-root .info-panel {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.user-root .info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* ★ 原站实测：padding 6px 0；border-bottom none */
  padding: 6px 0;
  font-size: 14px;
  border-bottom: none;
}
.user-root .info-row:last-child { border-bottom: none; }
/* ★ 原站 .info-row color:#fff（深色主题下白字） */
.user-root .info-row > span { color: rgba(255, 255, 255, .62); flex: none; }
.user-root .info-row > b {
  font-weight: 600;
  color: #fff;
  text-align: right;
  word-break: break-all;
}

/* ---------------------------------------------------------------- 平台选择 */
.user-root .platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}
/* ★ 原站实测 .plat-btn：
 *   background rgba(255,255,255,.08)
 *   border     1px solid rgba(255,255,255,.15)
 *   radius     12px
 *   padding    16px 8px
 *   color      #fff
 *   font-size  14px */
.user-root .plat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 8px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background: var(--pc-glass-strong);
  border: 1px solid var(--pc-glass-line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .18s;
}
.user-root .plat-btn i { font-size: 22px; color: var(--pc-brand); }
.user-root .plat-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .3);
  transform: translateY(-1px);
}
.user-root .plat-btn:disabled,
.user-root .plat-btn.plat-muted {
  opacity: .45;
  cursor: not-allowed;
}

.user-root .platform-bind-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: #fbbf24;
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 8px;
  padding: 9px 12px;
  line-height: 1.5;
}
.user-root .platform-bind-hint--error {
  color: #fca5a5;
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .3);
}

/* ---------------------------------------------------------------- 接码面板
 * ★ 深色主题：改用玻璃层，与 .card / .plat-btn 同一套语言 */
.user-root .sms-login-panel {
  margin-top: 18px;
  border: 1px solid var(--pc-glass-line);
  border-radius: 12px;
  padding: 16px 14px;
  background: rgba(255, 255, 255, .04);
}
.user-root .sms-login-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
}
.user-root .sms-login-header i { color: var(--pc-brand); }
.user-root .sms-login-info { margin-bottom: 12px; }
.user-root .sms-copy-row {
  border-bottom: 1px dashed rgba(255, 255, 255, .12);
  background: transparent;
}
.user-root .sms-copy-row:last-child { border-bottom: none; }
.user-root .sms-copy-row > span,
.user-root .sms-copy-label { color: rgba(255, 255, 255, .62); }
.user-root .sms-copy-row > b,
.user-root .sms-copy-value b { color: #fff; font-weight: 600; }
.user-root .sms-copy-value { display: flex; align-items: center; gap: 8px; }
.user-root .sms-copy-icon {
  cursor: pointer;
  color: rgba(255, 255, 255, .55);
  font-size: 15px;
  transition: color .15s;
}
.user-root .sms-copy-icon:hover { color: var(--pc-brand); }
.user-root .sms-login-hint {
  margin: 0 0 12px; font-size: 13px;
  color: rgba(255, 255, 255, .62); line-height: 1.6;
}

.user-root .sms-fetch-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #fff;
  /* ★ 原站主按钮用 --primary-gradient（app.css 逐字） */
  background: linear-gradient(135deg, #059669, #10b981);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .18s;
}
.user-root .sms-fetch-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857, #059669);
}
.user-root .sms-fetch-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ★ 深色主题：验证码框改玻璃层 */
.user-root .sms-code-box {
  margin-top: 14px;
  text-align: center;
  background: rgba(16, 185, 129, .10);
  border: 1px solid rgba(16, 185, 129, .32);
  border-radius: 10px;
  padding: 14px;
}
.user-root .sms-code {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #34d399;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.user-root .sms-code-time {
  margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .55);
}
.user-root .sms-copy-btn {
  margin-top: 12px;
  padding: 8px 20px;
  font-size: 13px;
  font-family: inherit;
  color: #34d399;
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .32);
  border-radius: 8px;
  cursor: pointer;
}
.user-root .sms-copy-btn:hover { background: rgba(16, 185, 129, .22); }
.user-root .sms-code-msg {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
  text-align: center;
}

/* ---------------------------------------------------------------- 查询区 */
.user-root .actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.user-root .card-input { flex: 1; }
.user-root .activate-btn { flex: none; }

/* ★★★★★ 2026-10-10：深色主题下的 Element Plus 输入框
 *   Element Plus 默认是浅色（白底 + #dcdfe6 边框），
 *   直接放在深蓝渐变上会是一块突兀的白条。
 *   原站卡密页同样用了 el-input，其输入框也是深色玻璃风格，
 *   这里按其 .plat-btn 的同一套值（rgba(255,255,255,.08) +
 *   1px solid rgba(255,255,255,.15) + radius 12px）对齐。
 *   ★ 只改外观，不改任何交互。 */
.user-root .card-input .el-input__wrapper {
  background: var(--pc-glass-strong);
  box-shadow: 0 0 0 1px var(--pc-glass-line) inset;
  border-radius: 12px;
  padding: 4px 14px;
}
.user-root .card-input .el-input__wrapper:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .3) inset;
}
.user-root .card-input .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px var(--pc-brand) inset;
}
.user-root .card-input .el-input__inner {
  color: #fff;
  height: 38px;
}
.user-root .card-input .el-input__inner::placeholder {
  color: rgba(255, 255, 255, .4);
}

.user-root .tip {
  margin: 14px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
  text-align: center;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- 指引 / 教程 */
.user-root .guide-block {
  margin-top: 18px;
  border: 1px solid var(--pc-glass-line);
  border-radius: 12px;
  overflow: hidden;
}
.user-root .guide-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, .06);
  border-bottom: 1px solid var(--pc-glass-line);
  color: #fff;
}
.user-root .guide-head i { color: var(--pc-brand); }
.user-root .guide-body {
  padding: 14px;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, .82);
}
.user-root .guide-body .prompt-link { color: #60a5fa; text-decoration: underline; word-break: break-all; }

.user-root .tutorial-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
  flex-wrap: wrap;
}
.user-root .tutorial-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .08);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.user-root .tutorial-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
  font-weight: 600;
}
.user-root .tutorial-single-title {
  padding: 12px 14px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.user-root .tutorial-body { padding: 12px 14px 14px; }
.user-root .tutorial-video video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  display: block;
}
.user-root .tutorial-text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, .82);
}
.user-root .tutorial-empty {
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
}

/* ---------------------------------------------------------------- 过期页 */
.user-root .expired-page { text-align: center; padding: 8px 0; }
.user-root .expired-icon { font-size: 56px; color: #f87171; }
.user-root .expired-title {
  margin: 14px 0 8px; font-size: 20px; font-weight: 600; color: #fff;
}
.user-root .expired-desc {
  margin: 0; font-size: 14px; color: rgba(255, 255, 255, .62); line-height: 1.7;
}
.user-root .expired-link-wrap { margin: 12px 0 0; }
.user-root .expired-link {
  color: #60a5fa; text-decoration: underline; word-break: break-all; font-size: 13px;
}
.user-root .expired-meta {
  margin-top: 20px;
  border: 1px solid var(--pc-glass-line);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}

/* ---------------------------------------------------------------- 特性条 */
.user-root .features {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.user-root .feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
}
.user-root .feature i { color: var(--pc-brand); font-size: 16px; }

.user-root .guide-bar {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, .45);
  padding: 18px 0 0;
}

/* ---------------------------------------------------------------- 扫码弹窗 */
.scan-dialog .el-dialog__header { padding: 18px 20px 0; margin: 0; }
.scan-dialog .el-dialog__body { padding: 16px 20px 22px; }
.scan-dialog-head { display: flex; align-items: center; gap: 12px; }
.scan-dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: #6366f1;
  flex: none;
}
.scan-dialog-icon--pc { background: #6366f1; }
.scan-dialog-icon--mobile { background: #22c55e; }
.scan-dialog-icon--tv { background: #f59e0b; }
.scan-dialog-title { font-size: 16px; font-weight: 600; color: #1e293b; }
.scan-dialog-sub { font-size: 13px; color: #64748b; margin-top: 3px; }

.scan-body { min-height: 180px; }
.scan-options { display: flex; flex-direction: column; gap: 12px; }
.scan-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  font-family: inherit;
  text-align: left;
  background: var(--pc-glass-strong);
  border: 1px solid var(--pc-glass-line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .18s;
  color: #fff;
}
.scan-opt:hover:not(:disabled) {
  border-color: rgba(16, 185, 129, .55);
  background: rgba(16, 185, 129, .12);
}
.scan-opt:disabled { opacity: .55; cursor: not-allowed; }
.scan-opt--primary .scan-opt-icon { background: rgba(16, 185, 129, .18); color: #34d399; }
.scan-opt--secondary .scan-opt-icon { background: rgba(99, 102, 241, .18); color: #a5b4fc; }
.scan-opt-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex: none;
}
.scan-opt-text { display: flex; flex-direction: column; gap: 3px; }
.scan-opt-text b { font-size: 15px; color: #fff; }
.scan-opt-text small { font-size: 12.5px; color: rgba(255, 255, 255, .58); }

.scan-upload-panel { text-align: center; padding: 10px 0; }
.scan-upload-icon { font-size: 46px; color: rgba(255, 255, 255, .4); }
.scan-upload-title { margin-top: 12px; font-size: 15px; font-weight: 600; color: #fff; }
.scan-upload-desc {
  margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .58); line-height: 1.6;
}
.hidden-file { display: none; }

.scan-camera-wrap { text-align: center; }
.scan-camera-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}
.scan-box { width: 100%; height: 100%; }
.scan-camera-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid #10b981;
}
.scan-camera-corner--tl { top: 12px; left: 12px; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.scan-camera-corner--tr { top: 12px; right: 12px; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.scan-camera-corner--bl { bottom: 12px; left: 12px; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.scan-camera-corner--br { bottom: 12px; right: 12px; border-left: none; border-top: none; border-radius: 0 0 6px 0; }
.scan-camera-back {
  margin-top: 14px;
  padding: 9px 20px;
  font-size: 13px;
  font-family: inherit;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.scan-hint {
  margin-top: 12px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #6ee7b7;
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .3);
  border-radius: 10px;
}
.scan-hint--loading {
  background: rgba(255, 255, 255, .06);
  border-color: var(--pc-glass-line);
  color: rgba(255, 255, 255, .62);
}
.scan-hint--error {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .3);
  color: #fca5a5;
}

/* ---------------------------------------------------------------- 提示弹窗 */
.prompt-body { text-align: center; }
.prompt-text { font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.prompt-image img { max-width: 100%; border-radius: 10px; margin-top: 12px; }
.prompt-url-wrap { margin-top: 12px; }
.prompt-link { color: #60a5fa; text-decoration: underline; word-break: break-all; font-size: 13px; }
.prompt-footer { text-align: center; }
.prompt-confirm-btn {
  padding: 10px 32px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
  border: none;
  border-radius: 9px;
  cursor: pointer;
}
.prompt-confirm-btn:hover { background: linear-gradient(135deg, #047857, #059669); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 560px) {
  .user-root { padding: 12px 10px 32px; }
  .user-root .card { padding: 22px 16px 20px; border-radius: 18px; }
  .user-root .brand { padding: 12px 0 18px; }
  .user-root .brand-text { font-size: 18px; }
  .user-root .sms-code { font-size: 26px; letter-spacing: 3px; }
  .user-root .platform-grid { gap: 8px; }
  .user-root .plat-btn { padding: 13px 4px; font-size: 12px; }
  .user-root .plat-btn i { font-size: 20px; }
  .user-root .features { gap: 14px; }
}

/* ================================================================ 弹层
   自管 overlay（替代 el-dialog）：该 Element Plus 构建下
   el-dialog 的内容插槽不渲染，故自行实现遮罩 + 面板。 */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  animation: qr-fade .16s ease-out;
}
@keyframes qr-fade { from { opacity: 0; } to { opacity: 1; } }

.qr-dialog {
  position: relative;
  max-width: 460px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--pc-card, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .34);
  animation: qr-pop .2s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes qr-pop {
  from { transform: translateY(12px) scale(.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.qr-dialog--prompt { max-width: 360px; padding: 22px 20px 18px; }

.qr-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  line-height: 1;
  font-size: 24px;
  color: var(--pc-sub, #64748b);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.qr-close:hover { background: #f1f5f9; color: var(--pc-ink, #1e293b); }

.scan-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 50px 16px 20px;
  border-bottom: 1px solid var(--pc-line, #e2e8f0);
}
.scan-dialog-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.scan-dialog-icon--pc     { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.scan-dialog-icon--mobile { background: linear-gradient(135deg, #22c55e, #16a34a); }
.scan-dialog-icon--tv     { background: linear-gradient(135deg, #f59e0b, #d97706); }
.scan-dialog-title { font-size: 16px; font-weight: 600; color: var(--pc-ink, #1e293b); }
.scan-dialog-sub   { margin-top: 3px; font-size: 12px; color: var(--pc-sub, #64748b); }

.scan-body { padding: 18px 20px 20px; }
.scan-options { display: flex; flex-direction: column; gap: 12px; }
.scan-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--pc-line, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.scan-opt:disabled { opacity: .55; cursor: not-allowed; }
.scan-opt:not(:disabled):hover {
  border-color: var(--pc-brand, #22c55e);
  box-shadow: 0 6px 18px rgba(34, 197, 94, .14);
}
.scan-opt:not(:disabled):active { transform: translateY(1px); }
.scan-opt--primary { border-color: #bbf7d0; background: #f0fdf4; }
.scan-opt-icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 20px;
  color: #fff;
  background: var(--pc-brand, #22c55e);
}
.scan-opt--secondary .scan-opt-icon { background: #64748b; }
.scan-opt-text { display: flex; flex-direction: column; gap: 2px; }
.scan-opt-text b { font-size: 14px; font-weight: 600; color: var(--pc-ink, #1e293b); }
.scan-opt-text small { font-size: 12px; color: var(--pc-sub, #64748b); }
.scan-opt-loading { animation: qr-spin .9s linear infinite; }
@keyframes qr-spin { to { transform: rotate(360deg); } }

/* ★ 2026-10-16 电视端操作指引
   电视端的二维码在电视屏幕上，操作方向与另外两端相反（拍下来传上去），
   所以给一段编号步骤，避免用户对着电视找摄像头。 */
.scan-tv-tip {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.scan-tv-step {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--pc-ink, #1e293b);
}
.scan-tv-step > b {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--pc-brand, #22c55e);
}
.scan-tv-step span b {
  display: inline;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0 2px;
  border-radius: 0;
  background: none;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
}
.scan-tv-note {
  margin: 7px 0 0;
  padding-top: 7px;
  border-top: 1px dashed #bbf7d0;
  font-size: 12px;
  line-height: 1.5;
  color: #15803d;
}

.hidden-file { display: none; }

.scan-hint {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--pc-sub, #64748b);
}
.scan-hint--loading { background: #eff6ff; color: #2563eb; }
.scan-hint--error   { background: #fef2f2; color: var(--pc-err, #ef4444); }

.scan-camera-wrap { display: flex; flex-direction: column; gap: 14px; }
.scan-camera-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}
.scan-box, .scan-box video, .scan-box canvas { width: 100%; height: 100%; object-fit: cover; }
.scan-camera-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--pc-brand, #22c55e);
}
.scan-camera-corner--tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.scan-camera-corner--tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.scan-camera-corner--bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.scan-camera-corner--br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.scan-camera-back {
  align-self: center;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--pc-sub, #64748b);
  background: #f1f5f9;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.scan-upload-panel { padding: 22px 0 6px; text-align: center; }
.scan-upload-icon { font-size: 30px; color: var(--pc-brand, #22c55e); }
.scan-upload-title { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--pc-ink, #1e293b); }
.scan-upload-desc { margin-top: 4px; font-size: 12px; color: var(--pc-sub, #64748b); }

.qr-dialog--prompt .prompt-body { text-align: center; }
.prompt-text { font-size: 14px; line-height: 1.7; color: var(--pc-ink, #1e293b); word-break: break-all; }
.prompt-text a { color: var(--pc-brand-deep, #16a34a); }
.prompt-image { margin-top: 12px; }
.prompt-image img { max-width: 100%; border-radius: 10px; }
.prompt-url-wrap { margin-top: 10px; word-break: break-all; }
.prompt-link { font-size: 12px; color: var(--pc-brand-deep, #16a34a); }
.prompt-footer { margin-top: 18px; }
.prompt-confirm-btn {
  width: 100%;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--pc-brand, #22c55e);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.prompt-confirm-btn:hover { background: var(--pc-brand-deep, #16a34a); }

@media (max-width: 560px) {
  .qr-dialog { max-width: 100%; }
  .scan-dialog-head { padding: 16px 46px 14px 16px; }
  .scan-body { padding: 14px 16px 18px; }
}

/* ============================================================================
   ★ 2026-10-10：识别失败诊断面板
   ----------------------------------------------------------------------------
   用户报「图很清楚却显示未识别」时，光看一句提示无从定位。
   这里把真实诊断（图片尺寸/库是否加载/每档尝试的报错）暴露出来。
   ========================================================================== */
.scan-diag {
  margin-top: 10px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #92400e;
}
.scan-diag > summary {
  cursor: pointer;
  font-weight: 600;
  outline: none;
  user-select: none;
}
.scan-diag > summary:hover { color: #b45309; }
.scan-diag-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #fcd34d;
  line-height: 1.7;
  word-break: break-all;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
