/* ============================================================
   网盘海报一键生成 · 用户端样式
   风格：深色流光 + 玻璃拟态，响应式自适应
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-soft: #0c1220;
  --card: rgba(255, 255, 255, 0.045);
  --card-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e9eefb;
  --muted: #8b98b4;
  --accent1: #6366f1;
  --accent2: #a855f7;
  --accent3: #22d3ee;
  --gold: #fbbf24;
  --danger: #f87171;
  --success: #34d399;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
/* 让 [hidden] 属性始终生效，避免被作者样式 display:flex/grid 覆盖 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ------------------------------ 背景光晕 ------------------------------ */

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-orbs::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(99, 102, 241, .30), transparent 60%),
    radial-gradient(800px 520px at 88% 8%, rgba(168, 85, 247, .26), transparent 62%),
    radial-gradient(760px 520px at 50% 108%, rgba(34, 211, 238, .16), transparent 60%),
    linear-gradient(180deg, #070b14 0%, #0a1020 55%, #070b14 100%);
  filter: saturate(120%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  animation: float 18s ease-in-out infinite;
}
.orb.a { width: 380px; height: 380px; left: -80px; top: 8%;  background: #4f46e5; }
.orb.b { width: 320px; height: 320px; right: -60px; top: 22%; background: #a855f7; animation-delay: -6s; }
.orb.c { width: 300px; height: 300px; left: 45%; bottom: -90px; background: #0891b2; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(28px, -22px, 0) scale(1.06); }
  66%      { transform: translate3d(-22px, 18px, 0) scale(.96); }
}

/* ------------------------------ 布局 ------------------------------ */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: 0 10px 26px rgba(99, 102, 241, .45);
  font-size: 22px;
}
.brand h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .5px;
  background: linear-gradient(120deg, #ffffff, #c7d2fe 60%, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

/* 授权状态条 */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  backdrop-filter: blur(10px);
}
.chip b { color: var(--text); font-weight: 600; }
.chip.warn { color: var(--gold); border-color: rgba(251, 191, 36, .35); }
.chip.bad { color: var(--danger); border-color: rgba(248, 113, 113, .35); }
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .18);
}
.chip.warn .dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(251, 191, 36, .18); }
.chip.bad .dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(248, 113, 113, .18); }

.btn-ghost {
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  transition: .2s;
  font-family: inherit;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--card); }

/* ------------------------------ 卡片 ------------------------------ */

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 22px; }

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
}
.panel-title .idx {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  font-size: 13px; font-weight: 700;
  color: #fff;
  flex: none;
}

/* ------------------------------ 表单 ------------------------------ */

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: #c3cde3;
  font-weight: 500;
}
.field label .opt { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.field .hint { margin-top: 7px; font-size: 12px; color: var(--muted); }

.input, textarea.input {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  transition: .2s;
  outline: none;
}
.input::placeholder { color: #5c6780; }
.input:focus {
  border-color: rgba(139, 92, 246, .6);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .13);
}
.row2 { display: grid; grid-template-columns: 1fr 180px; gap: 14px; }

.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; }

/* 主按钮 */
.btn-primary {
  width: 100%;
  padding: 15px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(99, 102, 241, .38);
  transition: transform .18s, box-shadow .18s, opacity .18s;
  letter-spacing: .5px;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(99, 102, 241, .5);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg);
}
.btn-primary:not(:disabled)::after { animation: sheen 2.6s ease-in-out infinite; }
@keyframes sheen {
  0%   { left: -60%; }
  55%  { left: 120%; }
  100% { left: 120%; }
}

/* ------------------------------ 进度条 ------------------------------ */

.progress-box { margin-top: 20px; display: none; }
.progress-box.show { display: block; }
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
  transition: width .5s ease;
}
.progress-text {
  margin-top: 10px;
  font-size: 13px;
  color: #b9c4dc;
  display: flex;
  align-items: center;
  gap: 9px;
}
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 提示条 ------------------------------ */

.alert {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  display: none;
}
.alert.show { display: block; }
.alert.error { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.alert.warn  { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .35); color: #fde68a; }
.alert.info  { background: rgba(99, 102, 241, .12); border-color: rgba(99, 102, 241, .35); color: #c7d2fe; }

/* ------------------------------ 结果区 ------------------------------ */

.result-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 26px;
}
.poster-box {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  position: relative;
}
.poster-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-box .ph { color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }
.poster-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

.result-right { display: flex; flex-direction: column; gap: 16px; }

.copy-block {
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.copy-head h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #c3cde3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-head h4 .badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .18);
  color: #a5b4fc;
  font-weight: 500;
}
.copy-body {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.copy-body.title { font-weight: 600; font-size: 15.5px; }

.btn-copy {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--card-strong);
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
  transition: .2s;
  white-space: nowrap;
}
.btn-copy:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); }
.btn-copy.ok { color: var(--success); border-color: rgba(52, 211, 153, .5); }

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(16, 185, 129, .32);
  transition: .2s;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(16, 185, 129, .42); }

/* 标签 */
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tag {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(168, 85, 247, .18));
  border: 1px solid rgba(139, 92, 246, .3);
  color: #ddd6fe;
}

/* 原始名称列表 */
.names-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}
.name-item {
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.name-item.dir { color: #a5b4fc; border-color: rgba(129, 140, 248, .3); }

/* ------------------------------ 激活卡 ------------------------------ */

.activate-card { max-width: 460px; margin: 40px auto; }
.activate-card .lead {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin: -6px 0 22px;
}

/* ------------------------------ 页脚 ------------------------------ */

footer.foot {
  margin-top: 34px;
  text-align: center;
  font-size: 12.5px;
  color: #5c6780;
}
footer.foot a { color: #8b98b4; text-decoration: none; }
footer.foot a:hover { color: var(--text); }

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 900px) {
  .result-grid { grid-template-columns: 1fr; }
  .poster-box { max-width: 380px; margin: 0 auto; }
}
@media (max-width: 620px) {
  .wrap { padding: 18px 14px 48px; }
  .panel { padding: 20px 18px; }
  .row2 { grid-template-columns: 1fr; }
  .brand h1 { font-size: 18px; }
  .btn-primary { font-size: 15px; padding: 14px; }
  header.top { gap: 12px; }
  .status-bar { width: 100%; }
}

/* 淡入动画 */
.fade-in { animation: fadeIn .45s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 智能识别命中时的反馈动画 */
.input.pulse { animation: pulse .7s ease; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(139, 92, 246, .55); }
  100% { box-shadow: 0 0 0 14px rgba(139, 92, 246, 0); }
}

/* ============================================================
   两步流程：步骤条 / 标签编辑器
   ============================================================ */

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 20px;
}

.step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  transition: all .25s ease;
}
.step .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, .10);
  color: var(--muted);
}
.step.active {
  border-color: rgba(139, 92, 246, .55);
  background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(168, 85, 247, .22));
  color: var(--text);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .22);
}
.step.active .num { background: linear-gradient(135deg, var(--accent1), var(--accent2)); color: #fff; }
.step.done {
  border-color: rgba(52, 211, 153, .45);
  color: var(--text);
}
.step.done .num { background: var(--success); color: #06301f; }

.step-line {
  flex: 0 0 64px;
  height: 2px;
  border-radius: 2px;
  background: var(--border);
  transition: background .25s ease;
}
.step-line.done { background: linear-gradient(90deg, var(--success), var(--accent3)); }

/* ------------------------------ 编辑区 ------------------------------ */

.edit-block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-strong);
}
.edit-block.mt { margin-top: 22px; }

.edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.edit-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.edit-head h4 .badge,
.copy-head h4 .badge {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
}
.edit-head.mt { margin-top: 22px; }

.edit-actions { display: flex; align-items: center; gap: 8px; }

.src-tip { font-size: 12px; color: var(--muted); }

.btn-mini {
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-mini:hover { color: var(--text); border-color: rgba(139, 92, 246, .5); background: var(--card-strong); }
.btn-mini.primary {
  border-color: rgba(139, 92, 246, .55);
  background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(168, 85, 247, .28));
  color: #ede9fe;
}
.btn-mini:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------ 可编辑标签 ------------------------------ */

.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .18);
  min-height: 56px;
  align-content: flex-start;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 6px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(168, 85, 247, .18));
  border: 1px solid rgba(139, 92, 246, .32);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tag-chip:focus-within {
  border-color: rgba(34, 211, 238, .8);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .18);
}
.tag-chip .t {
  outline: none;
  min-width: 24px;
  max-width: 220px;
  color: #e9d5ff;
  font-size: 13px;
  cursor: text;
  word-break: break-all;
}
.tag-chip .x {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: all .2s ease;
}
.tag-chip .x:hover { background: var(--danger); color: #fff; }

.tag-add { display: flex; gap: 9px; margin-top: 12px; }
.tag-add .input { flex: 1; }

.mt { margin-top: 18px; }
.mt-lg { margin-top: 22px; }
.muted { color: var(--muted); font-size: 13px; }

/* 第二步里可编辑的标题 / 文案 */
.copy-input {
  width: 100%;
  resize: vertical;
  line-height: 1.7;
  background: rgba(0, 0, 0, .22);
}

.btn-ghost.block {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}
/* 第二步主操作按钮：与下载按钮同列、整列宽。
   注意 .btn-download 本身是 inline-flex（图标要居中），不能改成 display:block。 */
.btn-primary.block {
  display: block;
  width: 100%;
  margin-top: 12px;
  text-align: center;
}
.btn-download.block {
  margin-top: 10px;
  padding: 14px;
  font-size: 15px;
}

@media (max-width: 620px) {
  .steps { gap: 8px; }
  .step { padding: 7px 12px; font-size: 13px; }
  .step-line { flex-basis: 28px; }
  .tag-add { flex-direction: column; }
}

/* ============================================================
   可折叠设置卡（教材封面 / 明水印）
   ============================================================ */
.opt-card {
  margin: 4px 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden;
}
.opt-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.opt-head:hover { background: var(--card-strong); }
.opt-ico { font-size: 18px; line-height: 1; }
.opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-txt b { font-size: 14px; font-weight: 600; }
.opt-txt small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.opt-arrow { color: var(--muted); transition: transform .2s ease; font-size: 13px; }
.opt-head.open .opt-arrow { transform: rotate(180deg); }
.opt-body {
  padding: 4px 14px 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* -------------------- 教材封面 -------------------- */
.field .row { display: flex; gap: 8px; align-items: stretch; }
.field .row .input { flex: 1; min-width: 0; }
.field .row .btn-mini { white-space: nowrap; }

.seg {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, .18);
  flex-wrap: wrap;
}
.seg-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.seg-item:hover { color: var(--text); }
.seg-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.check input { width: 15px; height: 15px; accent-color: var(--accent1); cursor: pointer; }
.check.lead { margin: 0 0 14px; color: var(--text); font-size: 13.5px; }

.cover-preview {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(0, 0, 0, .16);
}
.cover-preview img {
  width: 92px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  background: #fff;
}
.cp-tip { font-size: 12.5px; color: var(--muted); }
.cp-tip.ok { color: var(--success); }

/* -------------------- 明水印 -------------------- */
.wm-styles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.wm-style {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, .16);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: .15s;
}
.wm-style:hover { border-color: rgba(139, 92, 246, .45); background: var(--card-strong); }
.wm-style.active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(99, 102, 241, .25), rgba(168, 85, 247, .22));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .55);
}
.wm-ico { font-size: 16px; color: var(--accent3); line-height: 1.2; }
.wm-name { font-size: 13.5px; font-weight: 600; }
.wm-desc { font-size: 11.5px; color: var(--muted); }

.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field.two label { display: block; margin-bottom: 6px; }
.field.two label b { color: var(--accent3); font-weight: 600; }
.field.two input[type="range"] {
  width: 100%;
  accent-color: var(--accent1);
  cursor: pointer;
}

.wm-preview {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.wm-preview canvas {
  width: 270px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #eef2ff;
}
.wm-ph { font-size: 11.5px; color: var(--muted); }

@media (max-width: 620px) {
  .field.two { grid-template-columns: 1fr; }
  .cover-preview { flex-direction: column; align-items: flex-start; }
  .wm-styles { grid-template-columns: 1fr 1fr; }
}

/* -------------------- 明水印（新） -------------------- */
.wm-styles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 7px;
  max-height: 320px;
  overflow-y: auto;
}
.wm-style {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(0, 0, 0, .16);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: .12s;
}
.wm-style:hover { border-color: rgba(139, 92, 246, .45); background: var(--card-strong); }
.wm-style.active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(168, 85, 247, .24));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .55);
}
.wm-mini {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 56px;
  background: #fff; border-radius: 6px;
  overflow: hidden;
}
.wm-mini svg { max-width: 100%; max-height: 100%; }
.wm-name { font-size: 12px; font-weight: 600; line-height: 1.4; }
.wm-desc { display: none; }

.wm-fonts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.wm-font {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, .16);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 8px 4px;
  cursor: pointer;
  text-align: center;
  transition: .12s;
}
.wm-font:hover { border-color: rgba(139, 92, 246, .45); background: var(--card-strong); }
.wm-font.active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(168, 85, 247, .24));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .55);
}

.wm-pos { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.wm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 110px; height: 80px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, .16);
}
.wm-grid.disabled { opacity: .4; pointer-events: none; }
.wm-cell {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  padding: 0;
  transition: .12s;
}
.wm-cell:hover { background: rgba(139, 92, 246, .25); border-color: rgba(139, 92, 246, .55); }
.wm-cell.active {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  border-color: transparent;
}
.check.inline { margin-top: 0; }

/* ---------------- 本机机器码 ---------------- */
.mid-box {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 12px;
  border: 1px dashed var(--border2, var(--border));
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}
.mid-label { font-size: 12px; color: var(--muted); flex: none; }
.mid-val {
  flex: 1 1 auto; min-width: 0; cursor: pointer;
  font-family: ui-monospace, Consolas, Menlo, monospace;
  font-size: 12px; color: #c7d2fe; word-break: break-all;
}
.tiny { font-size: 12px; line-height: 1.6; margin: 8px 0 0; }

@media (max-width: 620px) {
  .wm-fonts { grid-template-columns: repeat(3, 1fr); }
  .wm-styles { grid-template-columns: repeat(2, 1fr); }
}
