/* ============================================================
   工具页 · 公共样式（数据统计 / 查询助手 / 工具箱 / 老黄历 / 生肖属性）
   顶栏 .dh 与号码球 .num-ball 直接复用 draw.css / gallery.css，
   保证和历史开奖页、首页是同一套视觉。
   ============================================================ */

/* ---------- 通用小节 ---------- */
.tk-sec { margin: 10px 12px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tk-sec-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px 9px; border-bottom: 1px solid var(--line);
}
.tk-sec-hd h2 { margin: 0; font-size: 14.5px; font-weight: 700; }
.tk-sec-hd .sub { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.tk-sec-bd { padding: 10px 12px 12px; }
.tk-note { padding: 8px 12px 12px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* ---------- 彩种切换（复用 .dh-lt 的观感，另起 tk- 前缀避免与历史页耦合） ---------- */
.tk-lt { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.tk-lt button {
  border: 0; background: #fff; font-family: inherit; font-size: 12.5px;
  padding: 6px 14px; color: #7b838c; cursor: pointer;
}
.tk-lt button + button { border-left: 1px solid var(--line); }
.tk-lt button.active { background: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 筛选行 ---------- */
.tk-filters {
  position: sticky; top: 48px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line);
}
.tk-filters .sp { margin-left: auto; }
.tk-pill {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 11px; font-family: inherit; font-size: 12.5px;
  color: #5b6470; cursor: pointer; white-space: nowrap;
}
.tk-pill i { font-style: normal; font-size: 10px; color: #b9bfc7; }
.tk-pill.on { border-color: #b9e7cd; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.tk-pill.on i { color: var(--brand); }

/* 值选择器（生肖/五行/波色… 横排可滑动） */
.tk-chips {
  display: flex; flex-wrap: nowrap; gap: 7px; overflow-x: auto;
  padding: 10px 12px 11px; scrollbar-width: none;
}
.tk-chips::-webkit-scrollbar { display: none; }
.tk-chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 7px 12px; font-family: inherit; font-size: 13.5px;
  color: #4b5560; cursor: pointer; line-height: 1.2; text-align: center;
}
.tk-chip small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.tk-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.tk-chip.on small { color: var(--brand-dark); }

/* 值特别多的维度（号码 49 个）换行成宫格 —— 横排 nowrap 一屏只能看十几个，
   两位数 chip 更宽、被藏在可视区外，根本点不到（2026-10-14 用户实报）。
   等宽方格 + 等宽数字，1 和 49 一样大，7 列自动换行一次看全。 */
.tk-chips.wrap { flex-wrap: wrap; overflow-x: visible; }
.tk-chips.wrap .tk-chip {
  min-width: 42px; padding: 7px 0; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- 查询助手：命中表 + SVG 连线 ---------- */
.q-wrap { position: relative; overflow-x: auto; padding: 4px 12px 12px; scrollbar-width: none; }
.q-wrap::-webkit-scrollbar { display: none; }
/* 连线层压在表格**下面**：叠在上面时 Chrome 会把命中标签里的白字重新光栅化，
   "1" 这种细笔画数字会被绿色描边吃掉，看着像数字被切了一刀。放到下面最稳。 */
.q-table { border-collapse: collapse; min-width: 100%; position: relative; z-index: 1; }
.q-table th, .q-table td {
  border-bottom: 1px solid var(--line); padding: 7px 4px;
  font-size: 12.5px; text-align: center; white-space: nowrap;
}
.q-table th { color: var(--muted); font-weight: 600; font-size: 11.5px; background: #fafbfc; }
.q-table td.iss { color: #2b6fd4; font-weight: 600; font-variant-numeric: tabular-nums; }
.q-table td.no { color: #6b737c; font-variant-numeric: tabular-nums; }
.q-table td.sp { border-left: 1px dashed var(--line); }
.q-hit {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 5px; border-radius: 6px;
  background: var(--brand); color: #fff; font-weight: 700;
}
.q-hit.miss { background: transparent; color: #c3c8ce; }
.q-line { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.q-sum { display: flex; gap: 8px; padding: 0 12px 12px; }
.q-sum div {
  flex: 1; background: #fafbfc; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; text-align: center;
}
.q-sum b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.q-sum span { font-size: 11px; color: var(--muted); }

/* ---------- 工具箱 ---------- */
.bx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bx-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 11px; }
.bx-card h3 { margin: 0 0 7px; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.bx-card h3 i { font-style: normal; font-size: 15px; }
.bx-input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-family: inherit; font-size: 13.5px; background: #fafbfc;
}
.bx-input:focus { outline: none; border-color: var(--brand); background: #fff; }
.bx-out { margin-top: 9px; font-size: 12.5px; line-height: 1.9; }
.bx-out b { color: var(--brand-dark); }
.bx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bx-chips button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 5px 10px; font-family: inherit; font-size: 12.5px; color: #4b5560; cursor: pointer;
}
.bx-list { display: grid; gap: 8px; }
.bx-item {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff;
}
.bx-item .ic {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.bx-item b { display: block; font-size: 13.5px; }
.bx-item span { font-size: 11.5px; color: var(--muted); }
.bx-item .arw { margin-left: auto; color: #c3c8ce; }

/* ---------- 老黄历 ---------- */
.alm-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.alm-bar button {
  width: 32px; height: 32px; border: 1px solid var(--line); background: #fff;
  border-radius: 9px; font-size: 16px; color: #5b6470; cursor: pointer; line-height: 1;
}
.alm-bar input {
  flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px;
  font-family: inherit; font-size: 13.5px; text-align: center; background: #fafbfc;
}
.alm-hero { text-align: center; padding: 16px 12px 14px; }
.alm-hero .d1 { font-size: 15px; color: var(--muted); }
.alm-hero .d2 { font-size: 26px; font-weight: 800; margin: 4px 0 2px; letter-spacing: 1px; }
.alm-hero .d3 { font-size: 14px; color: var(--brand-dark); font-weight: 600; }
.alm-hero .d4 { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.alm-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.alm-kv div { background: #fafbfc; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.alm-kv b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.alm-kv span { font-size: 13.5px; font-weight: 600; }
.alm-yj { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.alm-yj div { border-radius: 9px; padding: 9px 10px; }
.alm-yj .yi { background: #f0fbf5; border: 1px solid #cdeedd; }
.alm-yj .ji { background: #fdf3f2; border: 1px solid #f6dcda; }
.alm-yj b { display: block; font-size: 13px; margin-bottom: 4px; }
.alm-yj .yi b { color: var(--brand-dark); }
.alm-yj .ji b { color: #d0523f; }
.alm-yj span { font-size: 12.5px; line-height: 1.8; word-break: break-all; }
.alm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.alm-tags span { background: #fafbfc; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12px; }

/* ---------- 生肖属性 ---------- */
.zd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.zd-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px; }
.zd-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.zd-card h3 small { font-size: 11px; color: var(--muted); font-weight: 400; }
.zd-nums { display: flex; flex-wrap: wrap; gap: 5px; }
.zd-nums b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 25px; height: 25px; border-radius: 50%; font-size: 12px;
  font-weight: 700; border: 1px solid var(--line); background: #fafbfc;
}
.zd-nums b.w-red { color: var(--w-red); border-color: #f6cdcd; background: #fdf3f3; }
.zd-nums b.w-blue { color: var(--w-blue); border-color: #cfe0f7; background: #f2f7fd; }
.zd-nums b.w-green { color: var(--w-green); border-color: #cbe9d8; background: #f1faf5; }
.zd-meta { margin-top: 7px; font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.zd-meta b { color: #4b5560; }

.tk-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tabs button {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 13px; font-family: inherit; font-size: 12.5px; color: #5b6470; cursor: pointer;
}
.tk-tabs button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

.zd-num-table { width: 100%; border-collapse: collapse; }
.zd-num-table th, .zd-num-table td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.zd-num-table th { font-size: 11.5px; color: var(--muted); font-weight: 600; background: #fafbfc; }
.zd-num-table td b { font-variant-numeric: tabular-nums; }

.zd-groups { display: grid; gap: 10px; }
.zd-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.zd-group h3 { margin: 0 0 7px; font-size: 13px; font-weight: 700; }
.zd-group .row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 5px; font-size: 12.5px; }
.zd-group .row:last-child { margin-bottom: 0; }
.zd-group .row u {
  text-decoration: none; background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 6px; padding: 2px 7px;
}

/* ---------- 通用 ---------- */
/* ---------- 六合统计（对齐参考站：筛选条 + 16 个区块卡片） ---------- */
.st-bar {
  position: sticky; top: 48px; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line);
}
.st-f { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #5b6470; }
.st-f select, .st-f input {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
  font-family: inherit; font-size: 13px; background: #fafbfc; color: var(--text);
  min-width: 92px;
}
.st-f select:focus, .st-f input:focus { outline: none; border-color: var(--brand); background: #fff; }
.st-f input { width: 96px; }
.st-go {
  margin-left: auto; border: 0; border-radius: 8px; padding: 7px 18px;
  background: var(--brand); color: #fff; font-family: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.st-go:active { background: var(--brand-dark); }
.st-info { margin: 10px 12px 0; text-align: center; font-size: 12px; color: var(--muted); }

.st-sec {
  margin: 10px 12px 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.st-title {
  margin: 0; padding: 11px 12px; font-size: 14px; font-weight: 700; text-align: center;
  background: #fafbfc; border-bottom: 1px solid var(--line);
}
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(66px, 1fr)); gap: 2px; padding: 8px 6px 10px; }
.st-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 2px; border-radius: 8px;
}
.st-item:active { background: var(--brand-soft); }
.st-label { font-size: 14px; color: var(--text); }
.st-val { font-size: 12px; color: #8a9199; font-variant-numeric: tabular-nums; }
.st-num { gap: 5px; }
/* 号码球：沿用 118 的波色语义色（红/蓝/绿） */
.st-ball {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
  border: 2px solid; background: #fff;
}
.st-ball.red   { color: var(--w-red);   border-color: var(--w-red);   background: #fdf3f3; }
.st-ball.blue  { color: var(--w-blue);  border-color: var(--w-blue);  background: #f2f7fd; }
.st-ball.green { color: var(--w-green); border-color: var(--w-green); background: #f1faf5; }

.tk-state { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.tk-foot { padding: 16px 12px 8px; text-align: center; font-size: 11px; color: #b9bfc7; }

/* ============================================================
   娱乐 / 选码类页面（转盘 · 摇一摇 · 天机测算 · 恋人特码 · 挑码助手 · 生肖卡牌）
   ============================================================ */

/* 号码球：样式对齐参考站 shake-luck.php（实心波色渐变球 + 白色粗体号码 + 投影）
   —— 转盘 / 摇一摇 / 天机测算 / 恋人特码 / 挑码助手 共用。
   ⚠ 别再改回"白底彩边"那种描边球，和首页开奖号码（.num-ball 空心圆环）才是两套。 */
.pl-balls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.pl-ball {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 18px; line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .2);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
  background: radial-gradient(circle at 30% 30%, #b9bfc7, #7b838c);   /* 无波色时兜底 */
}
.pl-ball.red   { background: radial-gradient(circle at 30% 30%, #ff6b6b, #c62828); }
.pl-ball.blue  { background: radial-gradient(circle at 30% 30%, #5dade2, #1565c0); }
.pl-ball.green { background: radial-gradient(circle at 30% 30%, #58d68d, #2e7d32); }
/* 特码（金框 + 发光 + 放大），对应参考站 .ball.special */
.pl-ball.is-sp {
  width: 56px; height: 56px; font-size: 24px;
  border: 3px solid #d4af37;
  box-shadow: 0 0 14px rgba(212, 175, 55, .7);
}
/* 幸运号（摇一摇的第二组），对应参考站 .lucky-ball */
.pl-balls.big { gap: 14px; }
.pl-balls.big .pl-ball {
  width: 64px; height: 64px; font-size: 22px;
  border: 3px solid #f4d03f;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}
/* 出结果时依次弹入（参考站 popIn） */
.pl-ball.pop { animation: plPop .4s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes plPop {
  0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
/* 滚动中（参考站 rollPulse） */
.pl-ball.rolling { background: #bbb; color: #fff; animation: plRoll .3s ease-in-out infinite alternate; }
@keyframes plRoll {
  0%   { transform: scale(.9); }
  100% { transform: scale(1.05); }
}
.pl-last { display: inline-flex; align-items: center; gap: 4px; }
.pl-last { display: inline-flex; align-items: center; gap: 4px; }
.pl-plus { font-style: normal; color: #b9bfc7; font-size: 15px; margin: 0 2px; }
.pl-tag { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.pl-empty { margin: 0; padding: 18px 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.pl-pending { color: var(--muted); font-size: 13px; }
.pl-rolling { text-align: center; padding: 26px 0; font-size: 15px; color: var(--brand-dark); font-weight: 600; }
.pl-sec + .pl-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pl-sec h3 { margin: 0 0 9px; font-size: 13px; color: var(--muted); font-weight: 600; text-align: center; }

/* 转盘 */
.pl-wheel { position: relative; width: min(92vw, 336px); aspect-ratio: 1 / 1; margin: 2px auto 8px; }
.pl-wheel canvas { width: 100%; height: 100%; display: block; }
.pl-wheel::before {         /* 顶部固定指针 */
  content: ''; position: absolute; left: 50%; top: -2px; transform: translateX(-50%);
  border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-top: 20px solid #e6b53c;
}
.pl-wheel-go {
  display: block; margin: 6px auto 0; border: 0; border-radius: 999px;
  padding: 9px 26px; background: var(--brand); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.pl-wheel-go:disabled { opacity: .55; }

/* 摇一摇 */
.pl-dice { font-size: 62px; text-align: center; line-height: 1; }
.pl-dice.go { animation: plShake .6s ease-in-out infinite; }
@keyframes plShake {
  0%,100% { transform: rotate(0) scale(1); }
  25% { transform: rotate(-14deg) scale(1.06); }
  75% { transform: rotate(14deg) scale(1.06); }
}
.pl-btn {
  display: block; margin: 10px auto 0; border: 0; border-radius: 999px;
  padding: 9px 26px; background: var(--brand); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.pl-btn.ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--brand); }
.pl-btn:disabled { opacity: .55; }

/* 天机测算 */
.sc-card { text-align: center; }
.sc-step { display: inline-flex; align-items: center; gap: 12px; margin: 2px 0 4px; }
.sc-step button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; font-size: 17px; color: #5b6470; cursor: pointer; line-height: 1;
}
.sc-step button:active { border-color: var(--brand); color: var(--brand-dark); }
.sc-step b { min-width: 34px; font-size: 18px; font-variant-numeric: tabular-nums; }
.sc-out { min-height: 76px; padding-top: 8px; }
.pl-zodiacs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pl-zd {
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 3px;
}
.pl-zd b { font-size: 16px; }
.pl-zd span { font-size: 11px; color: var(--muted); }
.pl-tails { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.pl-tails i {
  font-style: normal; border-radius: 999px; padding: 6px 12px; font-size: 13px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
}

/* 恋人特码 */
.lv-form { display: grid; gap: 10px; }
.lv-seg { display: flex; gap: 8px; }
.lv-seg label {
  flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 0; font-size: 13px; color: #5b6470; cursor: pointer;
}
.lv-seg input { display: none; }
.lv-seg input:checked + span { color: #fff; }
.lv-seg label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.lv-seg label span { font-size: 13px; }
.lv-form input[type=date] {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px;
  font-family: inherit; font-size: 13.5px; background: #fafbfc; width: 100%;
}
.lv-score { text-align: center; margin-bottom: 6px; }
.lv-score b { display: block; font-size: 40px; line-height: 1.1; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.lv-score span { font-size: 11.5px; color: var(--muted); }
.lv-pair { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 2px; }
.lv-pair i {
  font-style: normal; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark); font-style: normal;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
}
.lv-pair em { color: #e2523f; font-size: 15px; }
.lv-pair u { text-decoration: none; margin-left: 6px; font-size: 12px; background: #fff6e8; color: #c8901a; border-radius: 999px; padding: 3px 9px; }

/* 挑码助手 */
.pk-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.pk-row:last-child { border-bottom: 0; }
.pk-dim { flex: 0 0 40px; font-size: 12.5px; color: var(--muted); padding-top: 5px; }
.pk-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-vals button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 10px;
  font-family: inherit; font-size: 12.5px; color: #4b5560; cursor: pointer;
}
.pk-vals button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.pk-out { margin-top: 12px; }
.pk-cnt { width: 100%; border-collapse: collapse; margin-top: 8px; }
.pk-cnt th, .pk-cnt td { border-bottom: 1px solid var(--line); padding: 6px 4px; font-size: 13px; text-align: center; }
.pk-cnt th { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.pk-cnt tr.sum td { font-weight: 700; color: var(--brand-dark); }
.pk-layer {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .38); padding: 16px;
}
.pk-box { width: 100%; max-width: 420px; background: #fff; border-radius: 12px; padding: 14px; }
.pk-box h3 { margin: 0 0 10px; font-size: 15px; }
.pk-box input {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px;
  font-family: inherit; font-size: 13.5px; background: #fafbfc;
}
.pk-box .pl-btn { display: inline-block; margin: 12px 8px 0 0; }   /* 计算/关闭 并排 */

/* 生肖卡牌 */
.cd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cd-card {
  position: relative; height: 96px; border: 0; background: transparent; padding: 0;
  cursor: pointer; perspective: 600px; font-family: inherit;
}
.cd-back, .cd-front {
  position: absolute; inset: 0; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  backface-visibility: hidden; transition: transform .45s ease;
}
.cd-back { background: linear-gradient(135deg, #d9822b, #c2591a); color: #fff; font-size: 24px; font-weight: 700; }
.cd-front {
  background: #fff; border: 1px solid var(--line); transform: rotateY(180deg);
}
.cd-front b { font-size: 20px; }
.cd-front i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.cd-card.open .cd-back { transform: rotateY(-180deg); }
.cd-card.open .cd-front { transform: rotateY(0); }
.cd-result { text-align: center; }
.cd-icons { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.cd-icons span { font-size: 22px; }
.cd-icons em { font-style: normal; color: var(--muted); font-size: 14px; }
.cd-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.cd-tags u {
  text-decoration: none; background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 999px; padding: 3px 10px; font-size: 12px;
}

/* ---------- 全部工具：4 列图标宫格（对齐参考站工具墙） ---------- */
.tk-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; }
.tk-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-decoration: none; color: inherit;
}
.tk-tile .ic {
  width: 50px; height: 50px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .13);
  transition: transform .2s ease;
}
.tk-tile b { font-size: 13px; font-weight: 700; letter-spacing: .3px; }
/* 说明文字在 390 宽下一行放不下会折成两行 —— 预留两行高度，整行标题才能对齐 */
.tk-tile span { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.45; min-height: 2.9em; }
.tk-tile:active .ic { transform: scale(.93); }
