/* ============================================================
 * 图形验证码组件样式（8 种）—— 与 index.html / admin.html 既有安全验证组件风格统一
 *
 * 复用（定义在 index.html 内联样式 或 assets/captcha-widget.css 中）：
 *   .puz-status / .puz-bar-wrap / .puz-bar-fill / .puz-bar-txt / .puz-knob
 *   .link-btn / .puz-refresh / .tx-chip
 * 本文件只补 8 种图形验证码自己的舞台、遮挡层、旋转盘等。
 *
 * v5.3.1：颜色全部改成宿主设计令牌（var(--ink/--muted/--sea/--ok/--bad…)），
 * 取不到才回落项目默认值；同时删掉原来抢占 :root 的 --green/--ink2（会盖掉后台令牌）。
 * ============================================================ */

/* ---------- 舞台 ---------- */
.hwt-wrap { margin-top: 12px; }
.hwt-tip-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size:12.5px; color: var(--ink2, var(--ink,#274354)); font-weight: 700; margin-bottom: 8px; }
.hwt-tip-row:empty { display: none; }

.hwt-stage { position: relative; width: 100%; border-radius: 12px; overflow: hidden;
  background: var(--line2,#eef1f6); border: 1.5px solid var(--line,#e3e8ef);
  -webkit-user-select: none; user-select: none; touch-action: none; }
.hwt-stage.done { box-shadow: inset 0 0 0 2px var(--ok,#0E9F52); }

#hwt-canvas { display: block; width: 100%; height: auto; }
#hwt-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.hwt-stage.draw #hwt-overlay { pointer-events: auto; cursor: crosshair; }

/* ---------- 刮刮乐：灰色遮挡层（左缘随滑块右移擦除） ----------
 * v0.11.171：样式对齐源文件 tianai-captcha-js 的 public/tac.css:
 *   .tac-scrape-cover → 45° 斜纹白条 + #c9ced6 灰底 + 左缘 2px 半透明白描边
 * 圆角由父级 .hwt-stage 的 overflow:hidden 裁剪（源文件同样是父容器 .tac-content 裁）。
 * 注：源文件配套的 .tac-scrape-target 目标预览框**未搬**——画布上方的 #hwt-tip 已显示目标水果，画布内再放一个重复。 */
.hwt-cover { position: absolute; top: 0; height: 100%; left: 0; width: 100%; display: none;
  pointer-events: none; z-index: 3;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 10px, transparent 10px 20px),
    #c9ced6;
  border-left: 2px solid rgba(255,255,255,.6); }

/* ---------- 旋转验证：刻度盘 + 旋转块 ---------- */
.hwt-dial { position: absolute; display: none; pointer-events: none; border-radius: 50%; z-index: 4;
  border: 2px dashed rgba(255,255,255,.8);
  box-shadow: 0 0 0 1.5px rgba(15,23,42,.20), inset 0 0 0 1.5px rgba(15,23,42,.12); }
.hwt-dial::before { content: ''; position: absolute; left: 50%; top: -10px;
  width: 0; height: 0; margin-left: -7px;
  border: 7px solid transparent; border-bottom-color: #f97316; }
.hwt-rotor { position: absolute; display: none; z-index: 5; transform-origin: 50% 50%;
  filter: drop-shadow(0 3px 10px rgba(15,23,42,.45)); transition: transform 40ms linear; }
.hwt-rotor.dragging { transition: none; }

/* ---------- 乱序拼图：选中高亮提示 ---------- */
.hwt-hint { display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================
 * 宿主兼容层（小章鱼移植）：以下类由本文件补齐，使 captcha-tianai.js 可独立运行。
 * v5.3.1：不再声明 :root 变量（会盖掉后台 --ink2），改为每条规则内联回落。
 * ============================================================ */
.puz-status{ display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; margin-top:7px; min-height:17px; line-height:1.5; color:var(--muted,#8AA3B5); }
.puz-status.ok{ color:var(--ok,#0E9F52); font-weight:700; }
.puz-status.err{ color:var(--bad,#D4382C); font-weight:700; }
.puz-bar-wrap{ position:relative; height:44px; border-radius:12px; background:var(--line2,#f2f4f8); overflow:hidden; cursor:grab; touch-action:none; margin-top:8px; }
.puz-bar-wrap.drag{ cursor:grabbing; }
.puz-bar-wrap.done .puz-knob{ color:var(--ok,#0E9F52); }
.puz-bar-fill{ position:absolute; left:0; top:0; bottom:0; width:0; background:var(--tint2,#e6ecf3); }
.puz-bar-txt{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:var(--muted,#9aa4b2); pointer-events:none; }
.puz-knob{ position:absolute; top:3px; left:3px; width:46px; height:38px; border-radius:9px; background:#fff; color:var(--sea,#5CBB73); display:flex; align-items:center; justify-content:center; box-shadow:0 1px 5px rgba(15,23,42,.18); z-index:2; }
.link-btn{ border:none; background:none; color:var(--sea-d,#43945A); font-size:12px; font-weight:700; cursor:pointer; padding:8px 2px 0; }
.link-btn:hover{ text-decoration:underline; }
.tx-chip{ display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:32px; padding:0 8px; border-radius:9px; background:var(--tint1,#EDF8F1); border:1px solid var(--tint2,#DFF2E6); color:var(--sea-d,#43945A); font-weight:800; font-size:19px; line-height:1; }
