/* ========================
   呆宝工具箱 - 全局样式
   ======================== */

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --text-main: #334155;
  --text-title: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --radius: 8px;
  --radius-lg: 12px;
  --app-header-h: 65px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
}

.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* 顶部导航 */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: 0.5px;
}

.main-nav {
  flex: 1;
  margin-left: 40px;
  overflow-x: auto;
}

.nav-list {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--primary-dark);
}

.nav-item.active {
  background: #eff6ff;
  color: var(--primary-dark);
}

.nav-icon {
  font-size: 16px;
}

/* 二级工具导航 */
.sub-nav-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}

.sub-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.sub-nav-item {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all 0.2s ease;
}

.sub-nav-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sub-nav-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 主内容区 */
.app-main {
  flex: 1;
  padding: 28px 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* 页脚 */
.app-footer {
  text-align: center;
  padding: 18px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  background: #fff;
}

/* ========================
   工具卡片容器
   ======================== */
.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.tool-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.tool-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ========================
   增值税计算器 - 精确还原
   ======================== */
.vat-calculator {
  max-width: 880px;
  margin: 0 auto;
}

.vat-header {
  text-align: center;
  margin-bottom: 36px;
}

.vat-title-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
}

.vat-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-title);
}

.vat-title-deco {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vat-title-deco::before,
.vat-title-deco::after {
  content: "";
  display: inline-block;
  border-radius: 2px;
  background: var(--primary);
}

.vat-title-deco::before {
  width: 28px;
  height: 4px;
}

.vat-title-deco::after {
  width: 10px;
  height: 4px;
}

.vat-title-deco.right::before {
  width: 10px;
}

.vat-title-deco.right::after {
  width: 28px;
}

.vat-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.vat-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.vat-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-title);
  text-align: center;
  margin-bottom: 24px;
}

/* 输入区 */
.vat-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vat-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vat-label {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
}

.vat-input,
.vat-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-title);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vat-input:focus,
.vat-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vat-input.error {
  border-color: #ef4444;
  background: #fef2f2;
}

.vat-error-msg {
  font-size: 12px;
  color: #ef4444;
  min-height: 18px;
}

.vat-submit {
  display: block;
  width: 160px;
  height: 42px;
  margin: 8px auto 0;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.vat-submit:hover {
  background: var(--accent-hover);
}

.vat-submit:active {
  transform: scale(0.98);
}

/* 输出区 */
.vat-result-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vat-result-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vat-result-label {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.vat-result-value {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-title);
  font-family: "SF Mono", Monaco, Consolas, "Roboto Mono", monospace;
}

.vat-formula {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.vat-formula strong {
  color: var(--text-main);
  font-weight: 600;
}

/* ========================
   响应式适配
   ======================== */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .main-nav {
    margin-left: 0;
    width: 100%;
    margin-top: 8px;
  }

  .nav-list {
    gap: 4px;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 14px;
  }

  .sub-nav-bar {
    padding: 10px 16px;
  }

  .app-main {
    padding: 20px 16px;
  }

  .tool-card {
    padding: 24px 18px;
  }

  .vat-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .vat-title {
    font-size: 20px;
  }

  .vat-submit {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 18px;
  }

  .nav-text {
    display: none;
  }

  .nav-item {
    padding: 8px 10px;
  }
}

/* ========================
   通用工具模块样式
   ======================== */
.tool-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tool-head {
  text-align: center;
}

.tool-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-title);
}

.tool-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.tool-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.tool-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-title);
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 禁止纵向拉伸/压缩，保证输入框与下拉框高度稳定为 40px */
.tool-field > .tool-input,
.tool-field > .tool-select {
  flex: 0 0 auto;
}

.tool-label {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}

.tool-input,
.tool-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-title);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tool-textarea {
  width: 100%;
  min-height: 190px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-title);
  outline: none;
  resize: vertical;
  font-family: "SF Mono", Monaco, Consolas, monospace;
}

.tool-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-btn {
  padding: 0 16px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.tool-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tool-btn.primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.tool-btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tool-btn.accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

.tool-output {
  min-height: 190px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: "SF Mono", Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-title);
}

.tool-output.plain {
  font-family: inherit;
}

.tool-error {
  color: #ef4444;
  font-size: 13px;
  min-height: 20px;
}

.tool-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.tool-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.tool-stat {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}

.tool-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}

.tool-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tool-bignum {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-title);
  text-align: center;
  line-height: 1.2;
}

.tool-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.tool-badge.ok {
  background: #e7f6ec;
  color: #0f6e56;
}

.tool-badge.warn {
  background: #fef3c7;
  color: #854f0b;
}

.tool-badge.bad {
  background: #fde8e8;
  color: #a32d2d;
}

.tool-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 仅作用于 .tool-inline 的直接子输入框。
   用后代选择器会误伤「.tool-inline > .tool-field > input」这类嵌套结构：
   .tool-field 是 column 方向，flex:1 会沿高度伸缩并把 height 覆盖掉。 */
.tool-inline > .tool-input {
  flex: 1;
  min-width: 130px;
}

.tool-inline > .tool-field {
  flex: 1;
  min-width: 130px;
}

.tool-colorbox {
  width: 100%;
  height: 110px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tool-center {
  text-align: center;
}

.tool-quiet {
  color: var(--text-muted);
  font-size: 13px;
}

.tool-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  max-width: 90%;
}

/* ========================
   扩展组件：复选 / 滑块 / 表格
   ======================== */
.tool-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

.tool-check input[type="checkbox"],
.tool-check input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}

.tool-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e2e8f0;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.tool-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.tool-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid #fff;
}

.tool-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: #fff;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tool-table th,
.tool-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.tool-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  font-weight: 600;
  color: var(--text-title);
  white-space: nowrap;
  z-index: 1;
}

.tool-table tbody tr:last-child td {
  border-bottom: none;
}

.tool-table tbody tr:hover {
  background: #f8fafc;
}

.tool-table code {
  font-family: "SF Mono", Monaco, Consolas, monospace;
  word-break: break-all;
}

.tool-table .table-input {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}

.tool-table .table-input:hover {
  border-color: var(--border);
}

.tool-table .table-input:focus {
  border-color: var(--primary);
  background: #fff;
}

.tool-btn.small {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

/* 正则匹配高亮 */
.re-hit {
  background: #fde68a;
  color: #78350f;
  border-radius: 3px;
  padding: 0 1px;
}

/* 文本对比 */
.diff-table td {
  font-size: 12.5px;
}

.diff-num {
  color: var(--text-muted);
  text-align: right;
  background: #f8fafc;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  white-space: nowrap;
}

.diff-cell code {
  white-space: pre-wrap;
}

.diff-row.del td:nth-child(1),
.diff-row.del td:nth-child(2) {
  background: #fdecec;
}

.diff-row.add td:nth-child(3),
.diff-row.add td:nth-child(4) {
  background: #e7f6ec;
}

.diff-row.mod td:nth-child(1),
.diff-row.mod td:nth-child(2) {
  background: #fef6e7;
}

.diff-row.mod td:nth-child(3),
.diff-row.mod td:nth-child(4) {
  background: #fef6e7;
}

.diff-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 6px;
}

.diff-tag.add {
  background: #e7f6ec;
  color: #0f6e56;
}

.diff-tag.del {
  background: #fdecec;
  color: #dc2626;
}

.diff-tag.mod {
  background: #fef6e7;
  color: #d97706;
}

@media (max-width: 768px) {
  .tool-cols {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ==================== 鼠标点击特效 ==================== */

.click-effect-item {
  position: fixed;
  z-index: 2147483000;
  font-weight: bold;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  transform: translate(-50%, 0);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  animation: click-effect-rise 1500ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  will-change: transform, opacity;
}

@keyframes click-effect-rise {
  0% {
    transform: translate(-50%, 0) scale(0.6);
    opacity: 0;
  }
  12% {
    transform: translate(calc(-50% + var(--ce-drift, 0px) * 0.15), -18px) scale(1.12);
    opacity: 1;
  }
  35% {
    transform: translate(calc(-50% + var(--ce-drift, 0px) * 0.5), -60px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--ce-drift, 0px)), -160px) scale(0.94);
    opacity: 0;
  }
}

/* 关闭特效时不产生任何元素（JS 侧也会拦截，双保险） */
body.click-effect-off .click-effect-item {
  display: none;
}

/* 顶部开关按钮 */
.effect-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  margin-left: 14px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  color: var(--text-main);
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, background 0.15s;
}

.effect-toggle:hover {
  transform: translateY(-1px);
  background: var(--bg-card);
}

.effect-toggle:active {
  transform: translateY(0);
}

.effect-toggle.is-off {
  opacity: 0.4;
  filter: grayscale(1);
}

@media (max-width: 768px) {
  .effect-toggle {
    margin-left: 8px;
  }
}

/* 尊重系统的「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  .click-effect-item {
    animation-duration: 600ms;
  }
}

/* ========================
   图标处理：页内竖直菜单
   ======================== */
.it-layout {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.it-menu {
  width: 150px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  align-self: flex-start;
  position: sticky;
  top: 16px;
}

.it-menu-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.it-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.it-menu-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.it-menu-item:hover {
  background: #eef2f7;
  color: var(--primary-dark);
}

.it-menu-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.it-content {
  flex: 1;
  min-width: 0;
}

/* ========================
   图标排列
   ======================== */
.iw-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.iw-file-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.iw-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 22px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.iw-ctrl {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iw-ctrl .tool-label strong {
  color: var(--primary-dark);
}

.iw-wall {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(10, 1fr);
  background: #eef0f3;
  border: 1px dashed transparent;
  border-radius: 12px;
  padding: 16px;
  min-height: 220px;
  align-content: start;
}

.iw-wall.iw-dragover {
  border-color: var(--primary);
  background: #e8f0fe;
}

.iw-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--text-muted);
  font-size: 14px;
}

.iw-card {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iw-card img {
  width: 100%;
  height: 100%;
  display: block;
}

.iw-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  padding: 0;
}

.iw-card:hover .iw-remove {
  opacity: 1;
}

.iw-remove:hover {
  background: #ef4444;
}

@media (max-width: 768px) {
  .it-layout {
    flex-direction: column;
  }

  .it-menu {
    width: 100%;
    position: static;
  }

  .it-menu-list {
    flex-direction: row;
    overflow-x: auto;
  }

  .it-menu-item {
    white-space: nowrap;
  }

  .iw-wall {
    padding: 10px;
  }
}

/* ==================== QQ Music 歌词 ==================== */

.qm-search {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.qm-search .tool-input {
  flex: 1;
  min-width: 200px;
}

.qm-format {
  width: auto;
  min-width: 170px;
}

.qm-status {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.qm-status.is-info {
  background: var(--bg-page);
  color: var(--text-muted);
  border-color: var(--border);
}

.qm-status.is-ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.qm-status.is-warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.qm-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

html[data-theme='dark'] .qm-status.is-ok {
  background: rgba(6, 95, 70, 0.24);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.32);
}

html[data-theme='dark'] .qm-status.is-warn {
  background: rgba(120, 53, 15, 0.24);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.32);
}

html[data-theme='dark'] .qm-status.is-error {
  background: rgba(127, 29, 29, 0.26);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.32);
}

/* --- 搜索结果 --- */
.qm-results {
  margin-top: 14px;
  max-height: 320px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.qm-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.qm-result-cover {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  background: var(--bg-page);
}

.qm-result-cover.is-broken {
  visibility: hidden;
}

.qm-result-cover.is-note {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--bg-page);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.qm-result-info {
  flex: 1;
  min-width: 0;
}

.qm-result-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-title);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qm-result-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qm-result-dur {
  flex: none;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* 酷我结果卡片：时长列（秒数转 mm:ss） */
.qm-result-time {
  flex: none;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}

/* --- 歌词区 --- */
.qm-lyric-wrap {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.qm-song-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qm-cover {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex: none;
  background: var(--bg-page);
  box-shadow: var(--shadow);
}

.qm-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qm-cover.is-broken {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.qm-cover.is-broken::after {
  content: '🎵';
}

.qm-cover.is-broken img {
  display: none;
}

.qm-song-name {
  font-size: 19px;
  font-weight: 500;
  color: var(--text-title);
}

.qm-song-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.qm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}

.qm-toolbar-right {
  display: flex;
  gap: 8px;
}

/* --- 时间开关 --- */
.qm-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.qm-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.qm-switch-track {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  flex: none;
}

.qm-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.qm-switch input:checked + .qm-switch-track {
  background: var(--primary);
}

.qm-switch input:checked + .qm-switch-track .qm-switch-thumb {
  left: 20px;
}

.qm-switch input:focus-visible + .qm-switch-track {
  box-shadow: var(--ring);
}

.qm-switch-label {
  font-size: 13px;
  color: var(--text-main);
}

/* --- 歌词瀑布流 --- */
.qm-lyric {
  max-height: 480px;
  overflow-y: auto;
  padding: 22px 26px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.qm-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 5px 8px;
  margin: 0 -8px;
  border-radius: var(--radius);
  line-height: 1.75;
}

.qm-line-time {
  flex: none;
  width: 64px;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  font-family: "SF Mono", Consolas, Monaco, monospace;
  font-variant-numeric: tabular-nums;
  opacity: 0.72;
}

.qm-line-text {
  flex: 1;
  font-size: 15px;
  color: var(--text-title);
  word-break: break-word;
}

/* 制作信息行弱化，与歌词正文区分 */
.qm-line.is-credit .qm-line-text {
  font-size: 13px;
  color: var(--text-muted);
}

.qm-loading {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.qm-raw {
  margin: 0;
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 440px;
  overflow: auto;
}

@media (max-width: 768px) {
  .qm-search .tool-input {
    min-width: 100%;
  }

  .qm-lyric {
    padding: 16px 14px;
  }

  .qm-line {
    gap: 10px;
  }

  .qm-line-time {
    width: 54px;
    font-size: 11px;
  }

  .qm-line-text {
    font-size: 14px;
  }

  .qm-toolbar-right {
    width: 100%;
  }
}

/* ==================== 咪咕音乐 / 在线听歌 ==================== */

.qm-song-info {
  min-width: 0;
}

.mm-detail {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.mm-vip {
  display: inline-block;
  margin-top: 8px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
}

html[data-theme='dark'] .mm-vip {
  color: #fcd34d;
  background: rgba(120, 53, 15, 0.3);
  border-color: rgba(245, 158, 11, 0.4);
}

.mm-audio {
  width: 100%;
  margin: 18px 0 6px;
  border-radius: var(--radius);
  outline: none;
}

.mm-quality {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 2px;
}

.mm-quality-label {
  font-size: 13px;
  color: var(--text-muted);
}

.mm-qbtn {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mm-qbtn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.mm-qbtn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 500;
}

.mm-src {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.6;
}

/* 当前播放歌词行高亮 + 跟随滚动锚点 */
.qm-line.is-active {
  background: rgba(59, 130, 246, 0.1);
}

.qm-line.is-active .qm-line-text {
  color: var(--primary-dark);
  font-weight: 600;
}

html[data-theme='dark'] .qm-line.is-active {
  background: rgba(96, 165, 250, 0.16);
}

html[data-theme='dark'] .qm-line.is-active .qm-line-text {
  color: #93c5fd;
}

@media (max-width: 768px) {
  .mm-quality-label {
    width: 100%;
  }
}

/* ========================
   趣味测算 / 你是小猪
   ======================== */
.rp-card {
  max-width: 560px;
  margin: 0 auto;
}

.rp-head {
  text-align: center;
  margin-bottom: 18px;
}

.rp-head .tool-title {
  font-size: 20px;
  margin: 0 0 6px;
}

.rp-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

.rp-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 18px;
}

.rp-result {
  min-height: 120px;
}

.rp-pig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  animation: rpPop 0.35s ease;
}

@keyframes rpPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rp-img-wrap {
  width: 160px;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rp-info {
  width: 100%;
  text-align: center;
}

.rp-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.rp-desc {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 12px;
}

.rp-analysis {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.rp-label {
  display: inline-block;
  font-weight: 600;
  color: var(--primary);
  margin-right: 6px;
}

.rp-status {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  min-height: 18px;
  color: var(--text-muted);
}

.rp-status.ok {
  color: #16a34a;
}

.rp-status.warn {
  color: #dc2626;
}

[data-theme='dark'] .rp-pig,
[data-theme='dark'] .rp-analysis {
  background: #1f2733;
}

[data-theme='dark'] .rp-img-wrap,
[data-theme='dark'] .rp-analysis {
  border-color: #2c3744;
}

[data-theme='dark'] .rp-name {
  color: var(--primary);
}

/* ===== 五行穿衣 ===== */
.fed-card {
  max-width: 600px;
  margin: 0 auto;
}
.fed-head {
  text-align: center;
  margin-bottom: 18px;
}
.fed-head .tool-title {
  font-size: 20px;
  margin: 0 0 6px;
}
.fed-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}
.fed-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.fed-label-inline {
  font-size: 13px;
  color: var(--text-muted);
}
.fed-date {
  flex: 0 0 auto;
  width: auto;
  min-width: 150px;
}
.fed-result {
  min-height: 120px;
}
.fed-day {
  text-align: center;
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 18px;
}
.fed-element {
  display: inline-block;
  min-width: 34px;
  padding: 2px 12px;
  margin: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.fed-date-tag {
  font-size: 13px;
  color: var(--text-muted);
}
.fed-group {
  margin-bottom: 18px;
}
.fed-group-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}
.fed-group-title.best {
  color: #e11d48;
  border-left-color: #e11d48;
}
.fed-group-title.good {
  color: #16a34a;
  border-left-color: #16a34a;
}
.fed-group-title.avoid {
  color: #a16207;
  border-left-color: #a16207;
}
.fed-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.fed-swatch {
  width: 96px;
  text-align: center;
}
.fed-chip {
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fed-chip.avoid {
  opacity: 0.9;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}
.fed-swatch:hover .fed-chip {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}
.fed-meta {
  margin-top: 6px;
  line-height: 1.4;
}
.fed-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.fed-hex {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.fed-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.fed-desc .fed-label {
  display: inline-block;
  font-weight: 600;
  color: var(--primary);
  margin-right: 6px;
}
.fed-status {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  min-height: 18px;
  color: var(--text-muted);
}
.fed-status.ok {
  color: #16a34a;
}
.fed-status.warn {
  color: #dc2626;
}

[data-theme='dark'] .fed-desc {
  background: #1f2733;
  border-color: #2c3744;
}
[data-theme='dark'] .fed-chip {
  border-color: #2c3744;
}

/* ========================
   趣味测算 / 答案之书
   ======================== */
.aob-card {
  max-width: 560px;
  margin: 0 auto;
}
.aob-head {
  text-align: center;
  margin-bottom: 22px;
}
.aob-head .tool-title {
  font-size: 20px;
  margin: 0 0 6px;
}
.aob-sub {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
.aob-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 30px 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.aob-question {
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.aob-open {
  font-size: 16px;
  padding: 12px 28px;
}
.aob-result {
  text-align: center;
  padding: 34px 24px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(220, 38, 38, 0.08);
}
.aob-answer {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.aob-en {
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.aob-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.aob-flip {
  animation: aobFlip 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: center top;
}
@keyframes aobFlip {
  0% {
    opacity: 0;
    transform: rotateX(85deg) translateY(-12px);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: rotateX(0deg) translateY(0);
  }
}
.aob-status {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  min-height: 18px;
  color: var(--text-muted);
}
.aob-status.ok {
  color: #16a34a;
}
.aob-status.warn {
  color: #dc2626;
}

[data-theme='dark'] .aob-stage {
  background: #1c2530;
  border-color: #2c3744;
}
[data-theme='dark'] .aob-result {
  background: linear-gradient(135deg, #2a2018 0%, #2a1c1c 100%);
  border-color: #3a2c2c;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* ========================
   趣味测算 / 塔罗牌
   ======================== */
.tr-card { max-width: 940px; margin: 0 auto; }
.tr-head { text-align: center; margin-bottom: 14px; }
.tr-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.tr-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.tr-input { flex: 1 1 240px; max-width: 360px; }
.tr-result { min-height: 80px; }
.tr-status { text-align: center; margin-top: 14px; font-size: 13px; color: #5f5e5a; }
.tr-status.ok { color: #3b6d11; }
.tr-status.warn { color: #854f0b; }

.tr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 720px) { .tr-grid { grid-template-columns: repeat(2, 1fr); } }

.tr-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.tr-pos { font-weight: 500; font-size: 14px; color: #2c2c2a; }
.tr-posdesc { font-size: 12px; color: #5f5e5a; margin-top: 4px; min-height: 32px; line-height: 1.4; }
.tr-img-wrap { margin: 10px 0; width: 100%; display: flex; justify-content: center; }
.tr-img { width: 100%; max-width: 130px; height: auto; border-radius: 8px; background: #fff; }
.tr-img-fallback {
  width: 130px; height: 180px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; background: #f1efe8;
}
.tr-name { margin: 4px 0 6px; font-size: 13px; }
.tr-name-cn { font-weight: 500; color: #2c2c2a; }
.tr-name-en { color: #5f5e5a; font-size: 12px; margin-left: 4px; }
.tr-badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }
.tr-badge.up { background: rgba(99, 161, 34, 0.15); color: #3b6d11; }
.tr-badge.rev { background: rgba(162, 45, 45, 0.14); color: #a32d2d; }
.tr-reading { font-size: 13px; line-height: 1.5; color: #2c2c2a; }

[data-theme='dark'] .tr-head .tr-sub,
[data-theme='dark'] .tr-status { color: #8a98a8; }
[data-theme='dark'] .tr-card { background: transparent; }
[data-theme='dark'] .tr-item { background: #1c242e; border-color: #2c3744; }
[data-theme='dark'] .tr-pos { color: #e8edf2; }
[data-theme='dark'] .tr-posdesc { color: #8a98a8; }
[data-theme='dark'] .tr-img { background: #0e141b; }
[data-theme='dark'] .tr-img-fallback { background: #11181f; }
[data-theme='dark'] .tr-name-cn { color: #e8edf2; }
[data-theme='dark'] .tr-name-en { color: #8a98a8; }
[data-theme='dark'] .tr-reading { color: #d4dbe3; }
[data-theme='dark'] .tr-badge.up { background: rgba(151, 196, 89, 0.2); color: #97c459; }
[data-theme='dark'] .tr-badge.rev { background: rgba(240, 149, 149, 0.18); color: #f09595; }


/* ========================
   热点资讯 / 历史上的今天
   ======================== */
.ht-card { max-width: 980px; margin: 0 auto; }
.ht-head { text-align: center; margin-bottom: 14px; }
.ht-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; line-height: 1.5; }
.ht-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; justify-content: center; margin-bottom: 18px; }
.ht-date-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5f5e5a; }
.ht-date { width: 170px; }
.ht-result { min-height: 80px; text-align: left; }

.ht-featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 8px; }
@media (max-width: 720px) { .ht-featured { grid-template-columns: 1fr; } }
.ht-feat {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ht-feat-year { font-weight: 500; font-size: 13px; color: #3a5c8a; }
.ht-feat-img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 8px; background: #f1efe8; }
.ht-feat-text { font-size: 13px; line-height: 1.5; color: #2c2c2a; margin: 0; }
.ht-feat-text a { color: #3a5c8a; text-decoration: none; }
.ht-feat-text a:hover { text-decoration: underline; }

.ht-section { margin-top: 18px; }
.ht-section-title { font-size: 15px; font-weight: 600; color: #2c2c2a; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.ht-list { display: flex; flex-direction: column; gap: 8px; }
.ht-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  background: #faf9f5;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
}
.ht-year {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: #3a5c8a;
  background: rgba(58, 92, 138, 0.12);
  border-radius: 6px;
  padding: 1px 8px;
  white-space: nowrap;
}
.ht-text { font-size: 14px; line-height: 1.55; color: #2c2c2a; text-decoration: none; }
a.ht-text:hover { color: #3a5c8a; text-decoration: underline; }

[data-theme='dark'] .ht-head .ht-sub { color: #8a98a8; }
[data-theme='dark'] .ht-date-label { color: #8a98a8; }
[data-theme='dark'] .ht-feat { background: #1c242e; border-color: #2c3744; }
[data-theme='dark'] .ht-feat-year { color: #8fb3e0; }
[data-theme='dark'] .ht-feat-img { background: #0e141b; }
[data-theme='dark'] .ht-feat-text { color: #d4dbe3; }
[data-theme='dark'] .ht-feat-text a { color: #8fb3e0; }
[data-theme='dark'] .ht-section-title { color: #e8edf2; border-color: #2c3744; }
[data-theme='dark'] .ht-item { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .ht-year { color: #8fb3e0; background: rgba(143, 179, 224, 0.16); }
[data-theme='dark'] .ht-text { color: #d4dbe3; }
[data-theme='dark'] a.ht-text:hover { color: #8fb3e0; }


/* ========================
   热点资讯 / 头条热搜
   ======================== */
.hts-card { max-width: 760px; margin: 0 auto; }
.hts-head { text-align: center; margin-bottom: 12px; }
.hts-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.hts-controls { display: flex; justify-content: center; margin-bottom: 16px; }
.hts-result { min-height: 80px; text-align: left; }
.hts-list { display: flex; flex-direction: column; gap: 6px; }
.hts-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #faf9f5;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
}
.hts-rank {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #8a7a52;
  background: rgba(0, 0, 0, 0.06);
}
.hts-rank.rank-1 { color: #fff; background: #e0a100; }
.hts-rank.rank-2 { color: #fff; background: #9aa7b3; }
.hts-rank.rank-3 { color: #fff; background: #c08457; }
.hts-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hts-title {
  font-size: 14px;
  line-height: 1.4;
  color: #2c2c2a;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.hts-title:hover { color: #c0392b; text-decoration: underline; }
.hts-hot { font-size: 12px; color: #b0543b; }
.hts-thumb { flex: 0 0 auto; width: 72px; height: 48px; object-fit: cover; border-radius: 6px; background: #f1efe8; }

[data-theme='dark'] .hts-head .hts-sub { color: #8a98a8; }
[data-theme='dark'] .hts-item { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .hts-rank { color: #c9b483; background: rgba(255, 255, 255, 0.08); }
[data-theme='dark'] .hts-rank.rank-1 { color: #1c1c1c; background: #e0a100; }
[data-theme='dark'] .hts-rank.rank-2 { color: #1c1c1c; background: #9aa7b3; }
[data-theme='dark'] .hts-rank.rank-3 { color: #1c1c1c; background: #c08457; }
[data-theme='dark'] .hts-title { color: #d4dbe3; }
[data-theme='dark'] a.hts-title:hover { color: #ff8a7a; }
[data-theme='dark'] .hts-hot { color: #e08b73; }
[data-theme='dark'] .hts-thumb { background: #0e141b; }


/* ========================
   热点资讯 / 抖音热搜
   ======================== */
.dhs-card { max-width: 760px; margin: 0 auto; }
.dhs-head { text-align: center; margin-bottom: 12px; }
.dhs-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.dhs-controls { display: flex; justify-content: center; margin-bottom: 16px; }
.dhs-result { min-height: 80px; text-align: left; }
.dhs-list { display: flex; flex-direction: column; gap: 6px; }
.dhs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #faf9f5;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
}
.dhs-rank {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #8a7a52;
  background: rgba(0, 0, 0, 0.06);
}
.dhs-rank.rank-1 { color: #fff; background: #e0a100; }
.dhs-rank.rank-2 { color: #fff; background: #9aa7b3; }
.dhs-rank.rank-3 { color: #fff; background: #c08457; }
.dhs-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #2c2c2a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dhs-thumb { flex: 0 0 auto; width: 72px; height: 48px; object-fit: cover; border-radius: 6px; background: #f1efe8; }

[data-theme='dark'] .dhs-head .dhs-sub { color: #8a98a8; }
[data-theme='dark'] .dhs-item { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .dhs-rank { color: #c9b483; background: rgba(255, 255, 255, 0.08); }
[data-theme='dark'] .dhs-rank.rank-1 { color: #1c1c1c; background: #e0a100; }
[data-theme='dark'] .dhs-rank.rank-2 { color: #1c1c1c; background: #9aa7b3; }
[data-theme='dark'] .dhs-rank.rank-3 { color: #1c1c1c; background: #c08457; }
[data-theme='dark'] .dhs-title { color: #d4dbe3; }
[data-theme='dark'] .dhs-thumb { background: #0e141b; }

/* ========================
   热点资讯 / 微博热搜
   ======================== */
.wbs-card { max-width: 760px; margin: 0 auto; }
.wbs-head { text-align: center; margin-bottom: 12px; }
.wbs-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.wbs-controls { display: flex; justify-content: center; margin-bottom: 16px; }
.wbs-result { min-height: 80px; text-align: left; }
.wbs-list { display: flex; flex-direction: column; gap: 6px; }
.wbs-item { display: flex; align-items: center; gap: 12px; background: #faf9f5; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 8px; padding: 8px 12px; }
.wbs-rank { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #8a7a52; background: rgba(0, 0, 0, 0.06); }
.wbs-rank.rank-1 { color: #fff; background: #e0a100; }
.wbs-rank.rank-2 { color: #fff; background: #9aa7b3; }
.wbs-rank.rank-3 { color: #fff; background: #c08457; }
.wbs-main { flex: 1 1 auto; min-width: 0; }
.wbs-title { display: block; font-size: 14px; line-height: 1.4; color: #2c2c2a; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.wbs-title:hover { color: #e6162d; text-decoration: underline; }
.wbs-thumb { flex: 0 0 auto; width: 72px; height: 48px; object-fit: cover; border-radius: 6px; background: #f1efe8; }

[data-theme='dark'] .wbs-head .wbs-sub { color: #8a98a8; }
[data-theme='dark'] .wbs-item { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wbs-rank { color: #c9b483; background: rgba(255, 255, 255, 0.08); }
[data-theme='dark'] .wbs-rank.rank-1 { color: #1c1c1c; background: #e0a100; }
[data-theme='dark'] .wbs-rank.rank-2 { color: #1c1c1c; background: #9aa7b3; }
[data-theme='dark'] .wbs-rank.rank-3 { color: #1c1c1c; background: #c08457; }
[data-theme='dark'] .wbs-title { color: #d4dbe3; }
[data-theme='dark'] a.wbs-title:hover { color: #ff8a7a; }
[data-theme='dark'] .wbs-thumb { background: #0e141b; }

/* ========================
   热点资讯 / 知乎热搜
   ======================== */
.zhs-card { max-width: 760px; margin: 0 auto; }
.zhs-head { text-align: center; margin-bottom: 12px; }
.zhs-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.zhs-controls { display: flex; justify-content: center; margin-bottom: 16px; }
.zhs-result { min-height: 80px; text-align: left; }
.zhs-list { display: flex; flex-direction: column; gap: 6px; }
.zhs-item { display: flex; align-items: center; gap: 12px; background: #faf9f5; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 8px; padding: 8px 12px; }
.zhs-rank { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #8a7a52; background: rgba(0, 0, 0, 0.06); }
.zhs-rank.rank-1 { color: #fff; background: #e0a100; }
.zhs-rank.rank-2 { color: #fff; background: #9aa7b3; }
.zhs-rank.rank-3 { color: #fff; background: #c08457; }
.zhs-title { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.4; color: #2c2c2a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zhs-thumb { flex: 0 0 auto; width: 72px; height: 48px; object-fit: cover; border-radius: 6px; background: #f1efe8; }

[data-theme='dark'] .zhs-head .zhs-sub { color: #8a98a8; }
[data-theme='dark'] .zhs-item { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .zhs-rank { color: #c9b483; background: rgba(255, 255, 255, 0.08); }
[data-theme='dark'] .zhs-rank.rank-1 { color: #1c1c1c; background: #e0a100; }
[data-theme='dark'] .zhs-rank.rank-2 { color: #1c1c1c; background: #9aa7b3; }
[data-theme='dark'] .zhs-rank.rank-3 { color: #1c1c1c; background: #c08457; }
[data-theme='dark'] .zhs-title { color: #d4dbe3; }
[data-theme='dark'] .zhs-thumb { background: #0e141b; }

/* ========================
   热点资讯 / 澎湃新闻
   ======================== */
.ppn-card { max-width: 760px; margin: 0 auto; }
.ppn-head { text-align: center; margin-bottom: 12px; }
.ppn-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.ppn-controls { display: flex; justify-content: center; margin-bottom: 16px; }
.ppn-result { min-height: 80px; text-align: left; }
.ppn-list { display: flex; flex-direction: column; gap: 8px; }
.ppn-item { display: flex; align-items: center; gap: 12px; background: #faf9f5; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 8px; padding: 8px 12px; }
.ppn-rank { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #8a7a52; background: rgba(0, 0, 0, 0.06); }
.ppn-rank.rank-1 { color: #fff; background: #e0a100; }
.ppn-rank.rank-2 { color: #fff; background: #9aa7b3; }
.ppn-rank.rank-3 { color: #fff; background: #c08457; }
.ppn-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ppn-title { font-size: 14px; line-height: 1.4; color: #2c2c2a; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
a.ppn-title:hover { color: #0a5bb5; text-decoration: underline; }
.ppn-time { font-size: 12px; color: #8a7a52; }
.ppn-cover { flex: 0 0 auto; width: 84px; height: 56px; object-fit: cover; border-radius: 6px; background: #f1efe8; }

[data-theme='dark'] .ppn-head .ppn-sub { color: #8a98a8; }
[data-theme='dark'] .ppn-item { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .ppn-rank { color: #c9b483; background: rgba(255, 255, 255, 0.08); }
[data-theme='dark'] .ppn-rank.rank-1 { color: #1c1c1c; background: #e0a100; }
[data-theme='dark'] .ppn-rank.rank-2 { color: #1c1c1c; background: #9aa7b3; }
[data-theme='dark'] .ppn-rank.rank-3 { color: #1c1c1c; background: #c08457; }
[data-theme='dark'] .ppn-title { color: #d4dbe3; }
[data-theme='dark'] a.ppn-title:hover { color: #7fb6ff; }
[data-theme='dark'] .ppn-time { color: #c9b483; }
[data-theme='dark'] .ppn-cover { background: #0e141b; }


/* ========================
   休闲娱乐 / 漂流瓶
   ======================== */
.db-card { max-width: 560px; margin: 0 auto; }
.db-head { text-align: center; margin-bottom: 14px; }
.db-title { font-size: 22px; margin: 0; color: #2c2c2a; }
.db-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.db-controls { display: flex; justify-content: center; margin-bottom: 18px; }
.db-result { min-height: 120px; text-align: left; }
.db-loading { text-align: center; color: #5f5e5a; font-size: 13px; padding: 30px 0; }

.db-bottle {
  background: linear-gradient(135deg, #eef6ff 0%, #f7f1e8 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 22px 22px 16px;
  animation: db-float 0.5s ease;
}
@keyframes db-float {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.db-paper {
  background: #fffdf7;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}
.db-content {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #2c2c2a;
  white-space: pre-wrap;
  word-break: break-word;
}
.db-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
  color: #8a7a52;
}
.db-nick { font-weight: 600; }
.db-time { color: #9a8f7a; }

.db-replies { margin-top: 14px; border-top: 1px dashed rgba(0, 0, 0, 0.12); padding-top: 10px; }
.db-replies-title { font-size: 12px; color: #8a7a52; margin-bottom: 8px; }
.db-reply {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #2c2c2a;
}
.db-reply-nick { font-weight: 600; color: #3a5c8a; margin-right: 6px; }
.db-reply-content { color: #2c2c2a; }

[data-theme='dark'] .db-head .db-title { color: #e8edf2; }
[data-theme='dark'] .db-head .db-sub { color: #8a98a8; }
[data-theme='dark'] .db-loading { color: #8a98a8; }
[data-theme='dark'] .db-bottle {
  background: linear-gradient(135deg, #16222e 0%, #1e2026 100%);
  border-color: #2c3744;
}
[data-theme='dark'] .db-paper { background: #11181f; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4); }
[data-theme='dark'] .db-content { color: #d4dbe3; }
[data-theme='dark'] .db-meta { color: #c9b483; }
[data-theme='dark'] .db-time { color: #9aa7b3; }
[data-theme='dark'] .db-replies { border-color: #2c3744; }
[data-theme='dark'] .db-replies-title { color: #c9b483; }
[data-theme='dark'] .db-reply { background: rgba(255, 255, 255, 0.05); }
[data-theme='dark'] .db-reply-nick { color: #8fb3e0; }
[data-theme='dark'] .db-reply-content { color: #d4dbe3; }


/* ========================
   Epic 免费游戏
   ======================== */
.epic-card { max-width: 920px; margin: 0 auto; }
.epic-head { text-align: center; margin-bottom: 14px; }
.epic-title { font-size: 22px; margin: 0; color: var(--text-main); }
.epic-sub { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; }
.epic-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.epic-updated { color: var(--text-muted); font-size: 12px; }
.epic-result { min-height: 120px; }
.epic-loading { text-align: center; color: var(--text-muted); font-size: 13px; padding: 30px 0; }
.epic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.epic-game {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.epic-game-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.epic-game-title { font-size: 16px; font-weight: 600; color: var(--text-main); line-height: 1.35; }
.epic-badge {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
}
.epic-badge-on { color: #1a7f37; background: rgba(26, 127, 55, 0.12); }
.epic-badge-soon { color: #9a6b00; background: rgba(154, 107, 0, 0.12); }
.epic-game-seller { font-size: 13px; color: var(--text-muted); }
.epic-game-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.epic-game-time { font-size: 12px; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 8px; margin-top: auto; }

[data-theme='dark'] .epic-title { color: #e8edf2; }
[data-theme='dark'] .epic-sub { color: #8a98a8; }
[data-theme='dark'] .epic-loading { color: #8a98a8; }
[data-theme='dark'] .epic-game { background: #16202b; border-color: #2c3744; }
[data-theme='dark'] .epic-game-title { color: #e8edf2; }
[data-theme='dark'] .epic-badge-on { color: #4ec97a; background: rgba(78, 201, 122, 0.14); }
[data-theme='dark'] .epic-badge-soon { color: #d7a93a; background: rgba(215, 169, 58, 0.14); }
[data-theme='dark'] .epic-game-seller,
[data-theme='dark'] .epic-game-desc,
[data-theme='dark'] .epic-game-time { color: #9aa7b3; }
[data-theme='dark'] .epic-game-time { border-color: #2c3744; }


/* ========================
   图册表情 / 王者英雄
   ======================== */
.wzh-card { max-width: 760px; margin: 0 auto; }
.wzh-head { text-align: center; margin-bottom: 14px; }
.wzh-title { font-size: 22px; margin: 0; color: #2c2c2a; }
.wzh-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.wzh-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.wzh-input { flex: 1 1 200px; max-width: 280px; }
.wzh-result { min-height: 120px; text-align: left; }
.wzh-loading { text-align: center; color: #5f5e5a; font-size: 13px; padding: 30px 0; }

.wzh-hero { animation: wzh-float 0.5s ease; }
@keyframes wzh-float { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.wzh-top { display: flex; gap: 18px; align-items: flex-start; background: #faf9f5; border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; padding: 16px; }
.wzh-pic-wrap { flex: 0 0 auto; width: 120px; height: 120px; border-radius: 10px; background: #f1efe8; display: flex; align-items: center; justify-content: center; font-size: 44px; overflow: hidden; }
.wzh-pic { width: 100%; height: 100%; object-fit: cover; }
.wzh-info { flex: 1 1 auto; min-width: 0; }
.wzh-name { margin: 0 0 4px; font-size: 20px; color: #2c2c2a; }
.wzh-title-tag { display: inline-block; font-size: 13px; color: #8a5a2b; background: rgba(224,161,0,0.16); border-radius: 6px; padding: 2px 10px; margin-bottom: 8px; }
.wzh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.wzh-tag { font-size: 12px; color: #3a5c8a; background: rgba(58,92,138,0.12); border-radius: 6px; padding: 2px 8px; }
.wzh-id { font-size: 12px; color: #9a8f7a; }

.wzh-facts { margin-top: 14px; }
.wzh-word { font-size: 15px; font-style: italic; color: #2c2c2a; text-align: center; margin: 12px 0; }
.wzh-fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 520px) { .wzh-fact-grid { grid-template-columns: 1fr; } }
.wzh-fact { background: #faf9f5; border: 1px solid rgba(0,0,0,0.06); border-radius: 8px; padding: 8px 12px; }
.wzh-fact-label { display: block; font-size: 12px; color: #8a7a52; margin-bottom: 2px; }
.wzh-fact-val { font-size: 14px; color: #2c2c2a; }

.wzh-section { margin-top: 18px; }
.wzh-section-title { font-size: 15px; font-weight: 600; color: #2c2c2a; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.wzh-story { margin-bottom: 14px; }
.wzh-story-title { font-size: 14px; font-weight: 600; color: #2c2c2a; margin-bottom: 4px; }
.wzh-story-content { font-size: 14px; line-height: 1.7; color: #2c2c2a; margin: 0 0 8px; white-space: pre-wrap; }
.wzh-story-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.wzh-story-img { width: 140px; max-height: 120px; object-fit: cover; border-radius: 8px; background: #f1efe8; }

.wzh-skin { display: flex; gap: 12px; align-items: flex-start; background: #faf9f5; border: 1px solid rgba(0,0,0,0.06); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.wzh-skin-img { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #f1efe8; }
.wzh-skin-name { font-size: 14px; font-weight: 600; color: #2c2c2a; }
.wzh-lines { list-style: none; margin: 6px 0 0; padding: 0; flex: 1 1 auto; }
.wzh-line { font-size: 13px; line-height: 1.6; color: #2c2c2a; padding: 3px 0; border-bottom: 1px dashed rgba(0,0,0,0.08); }
.wzh-line:last-child { border-bottom: none; }
.wzh-line-word { margin-right: 8px; }
.wzh-line-voice { font-size: 12px; color: #3a5c8a; text-decoration: none; }
.wzh-line-voice:hover { text-decoration: underline; }

[data-theme='dark'] .wzh-head .wzh-title { color: #e8edf2; }
[data-theme='dark'] .wzh-head .wzh-sub { color: #8a98a8; }
[data-theme='dark'] .wzh-loading { color: #8a98a8; }
[data-theme='dark'] .wzh-top { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wzh-pic-wrap { background: #0e141b; }
[data-theme='dark'] .wzh-name { color: #e8edf2; }
[data-theme='dark'] .wzh-title-tag { color: #e0b86a; background: rgba(224,161,0,0.2); }
[data-theme='dark'] .wzh-tag { color: #8fb3e0; background: rgba(143,179,224,0.16); }
[data-theme='dark'] .wzh-id { color: #9aa7b3; }
[data-theme='dark'] .wzh-word { color: #d4dbe3; }
[data-theme='dark'] .wzh-fact { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wzh-fact-label { color: #c9b483; }
[data-theme='dark'] .wzh-fact-val { color: #d4dbe3; }
[data-theme='dark'] .wzh-section-title { color: #e8edf2; border-color: #2c3744; }
[data-theme='dark'] .wzh-story-title { color: #e8edf2; }
[data-theme='dark'] .wzh-story-content { color: #d4dbe3; }
[data-theme='dark'] .wzh-story-img { background: #0e141b; }
[data-theme='dark'] .wzh-skin { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wzh-skin-img { background: #0e141b; }
[data-theme='dark'] .wzh-skin-name { color: #e8edf2; }
[data-theme='dark'] .wzh-line { color: #d4dbe3; border-color: #2c3744; }
[data-theme='dark'] .wzh-line-voice { color: #8fb3e0; }

/* Pximg：R18 确认区（复用 CSS 变量，暗色自动适配） */
.pxg-consent { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 16px 0; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 12px; background: var(--input-bg); }
.pxg-check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 14px; user-select: none; }
.pxg-check input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }
.pxg-hint { color: var(--muted); font-size: 13px; padding: 10px 0; }
.pxg-r18 { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #e23a3a; color: #fff; font-size: 12px; font-weight: 600; vertical-align: middle; }
.pxg-author { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pxg-tags { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.6; }

/* 小米壁纸 */
.xmwp-card { max-width: 1000px; margin: 0 auto; }
.xmwp-head { text-align: center; margin-bottom: 14px; }
.xmwp-title { font-size: 22px; margin: 0; color: #2c2c2a; }
.xmwp-sub { color: #5f5e5a; font-size: 13px; margin: 6px 0 0; }
.xmwp-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; margin-bottom: 18px; }
.xmwp-label { font-size: 13px; color: #5f5e5a; }
.xmwp-select { flex: 0 0 auto; min-width: 140px; }
.xmwp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.xmwp-card-item { display: flex; flex-direction: column; background: #faf9f5; border: 1px solid rgba(0,0,0,0.06); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.xmwp-card-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.xmwp-img-wrap { aspect-ratio: 3 / 4; background: #f1efe8; display: flex; align-items: center; justify-content: center; font-size: 40px; overflow: hidden; }
.xmwp-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xmwp-img-fallback { color: #b9b2a4; }
.xmwp-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.xmwp-name { font-size: 13px; color: #2c2c2a; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xmwp-size { font-size: 12px; color: #9a8f7a; }
.xmwp-status { text-align: center; margin-top: 16px; min-height: 24px; }
.xmwp-loading { color: #5f5e5a; font-size: 13px; padding: 12px 0; }
.xmwp-end { color: #9a8f7a; font-size: 13px; padding: 8px 0; }
.xmwp-lightbox { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; }
.xmwp-lightbox[hidden] { display: none; }
.xmwp-light-backdrop { position: absolute; inset: 0; background: rgba(15,18,22,0.82); }
.xmwp-light-box { position: relative; max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.xmwp-light-img { max-width: 92vw; max-height: 80vh; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); background: #0e141b; }
.xmwp-light-close { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border: none; border-radius: 50%; background: #fff; color: #2c2c2a; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.xmwp-light-bar { margin-top: 10px; display: flex; gap: 16px; align-items: center; color: #e8edf2; font-size: 13px; }
.xmwp-light-name { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xmwp-light-link { color: #8fb3e0; text-decoration: none; }
.xmwp-light-link:hover { text-decoration: underline; }

[data-theme='dark'] .xmwp-title { color: #e8edf2; }
[data-theme='dark'] .xmwp-sub,
[data-theme='dark'] .xmwp-label { color: #8a98a8; }
[data-theme='dark'] .xmwp-card-item { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .xmwp-img-wrap { background: #0e141b; }
[data-theme='dark'] .xmwp-name { color: #e8edf2; }
[data-theme='dark'] .xmwp-size { color: #9aa7b3; }
[data-theme='dark'] .xmwp-loading { color: #8a98a8; }
[data-theme='dark'] .xmwp-end { color: #9aa7b3; }

/* 米游社原神COS（图册表情 L3） */
.gcos-feed { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.gcos-post { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.gcos-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gcos-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--bg-page); flex: 0 0 auto; }
.gcos-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gcos-nick { font-size: 14px; font-weight: 600; color: var(--text-main); }
.gcos-time { font-size: 12px; color: var(--text-muted); }
.gcos-title { font-size: 15px; font-weight: 600; color: var(--text-main); line-height: 1.5; margin-bottom: 4px; }
.gcos-content { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcos-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.gcos-img { position: relative; border: none; padding: 0; margin: 0; background: var(--bg-page); border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; font-size: 30px; transition: transform .15s ease; }
.gcos-img:hover { transform: translateY(-2px); }
.gcos-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcos-img-fallback { color: var(--text-muted); }

/* 米游社原神COS · 上下双分页控件 */
.gcos-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 16px 0; }
.gcos-pager[hidden] { display: none; }
.gcos-pgtext { font-size: 13px; color: var(--text-muted); }
.gcos-pginput { width: 78px; text-align: center; -moz-appearance: textfield; }
.gcos-pginput::-webkit-outer-spin-button,
.gcos-pginput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gcos-pgbtn { min-width: 84px; }
.gcos-select { flex: 0 0 auto; width: 104px; }
.gcos-pgcount { font-size: 12px; color: var(--text-muted); margin-left: 2px; }
.gcos-status:empty { display: none; }

[data-theme='dark'] .gcos-post { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .gcos-nick { color: #e8edf2; }
[data-theme='dark'] .gcos-time { color: #9aa7b3; }
[data-theme='dark'] .gcos-title { color: #e8edf2; }
[data-theme='dark'] .gcos-content { color: #8a98a8; }
[data-theme='dark'] .gcos-img { background: #0e141b; }
[data-theme='dark'] .gcos-img-fallback { color: #9aa7b3; }
[data-theme='dark'] .xmwp-light-close { background: #1c242e; color: #e8edf2; }

/* 表情包搜索（图册表情 L3） */
.ems-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.ems-input { flex: 1 1 240px; width: auto; min-width: 200px; }
.ems-limit { flex: 0 0 auto; width: 108px; }

.ems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.ems-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ems-cell:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow); }
.ems-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ems-cell-fallback { font-size: 26px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; }

.ems-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  letter-spacing: .3px;
  pointer-events: none;
}

.ems-foot { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ems-status { min-height: 20px; font-size: 13px; color: var(--text-muted); text-align: center; width: 100%; }

.ems-loading { display: inline-flex; align-items: center; gap: 8px; }
.ems-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ems-spin .7s linear infinite;
}
@keyframes ems-spin { to { transform: rotate(360deg); } }

/* 灯箱：显式覆盖 hidden，避免作者样式的 display 盖掉 [hidden] */
.ems-lightbox[hidden] { display: none; }
.ems-light-meta { color: #e8edf2; font-size: 13px; }
.ems-light-actions { display: inline-flex; align-items: center; gap: 10px; }
.ems-light-btn {
  padding: 0 10px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #e8edf2;
  font-size: 12px;
  cursor: pointer;
}
.ems-light-btn:hover { background: rgba(255, 255, 255, .22); }
.ems-light-btn[hidden] { display: none; }

[data-theme='dark'] .ems-cell { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .ems-cell-fallback { color: #9aa7b3; }

/* 高清背景图（图册表情 L3，容器类复用 xmwp-*） */
.hdw-select { flex: 0 0 auto; width: 132px; }
.hdw-stage {
  position: relative;
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hdw-img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.hdw-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, .72);
  color: var(--text-muted);
  font-size: 14px;
}
.hdw-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: hdw-spin .8s linear infinite;
}
@keyframes hdw-spin { to { transform: rotate(360deg); } }
.hdw-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.hdw-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.hdw-open { text-decoration: none; }
/* 防御：以下元素均由 hidden 属性控制显隐，且上方用了非默认 display，必须显式覆盖 */
.hdw-img[hidden], .hdw-mask[hidden], .hdw-error[hidden], .hdw-meta[hidden], .hdw-open[hidden] { display: none; }
[data-theme='dark'] .hdw-stage { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .hdw-mask { background: rgba(14, 20, 27, .78); }

/* SSL 证书检测（网络工具 L3） */
.ssl-tool { max-width: 980px; margin: 0 auto; }
.ssl-header { margin-bottom: 14px; }
.ssl-title { font-size: 18px; font-weight: 600; color: var(--text-main); }
.ssl-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

.ssl-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.ssl-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ssl-field { display: flex; flex-direction: column; gap: 6px; }
.ssl-field-grow { flex: 1 1 240px; min-width: 200px; }
.ssl-field-port { flex: 0 0 110px; }
.ssl-label { font-size: 12px; color: var(--text-muted); }
.ssl-input { height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 14px; background: var(--bg-page); color: var(--text-main); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.ssl-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 132, 255, .15); }
.ssl-submit { height: 40px; padding: 0 22px; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .15s ease, transform .1s ease; white-space: nowrap; }
.ssl-submit:hover { opacity: .92; }
.ssl-submit:active { transform: scale(.98); }
.ssl-submit:disabled { opacity: .6; cursor: not-allowed; }
.ssl-error { color: #e5484d; font-size: 13px; margin: 10px 0 0; min-height: 16px; }

.ssl-result { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.ssl-status-bar { border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ssl-status-ok { background: rgba(46, 160, 67, .12); color: #2ea043; }
.ssl-status-warn { background: rgba(210, 153, 34, .14); color: #d29922; }
.ssl-status-danger { background: rgba(229, 109, 38, .14); color: #e56d26; }
.ssl-status-expired { background: rgba(229, 72, 77, .14); color: #e5484d; }
.ssl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.ssl-item { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; background: var(--bg-page); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.ssl-item-label { font-size: 12px; color: var(--text-muted); }
.ssl-item-value { font-size: 13px; color: var(--text-main); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.ssl-meta { font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.6; word-break: break-all; }

[data-theme='dark'] .ssl-title { color: #e8edf2; }
[data-theme='dark'] .ssl-subtitle { color: #9aa7b3; }
[data-theme='dark'] .ssl-form { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .ssl-label { color: #9aa7b3; }
[data-theme='dark'] .ssl-input { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .ssl-error { color: #ff7b82; }
[data-theme='dark'] .ssl-result { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .ssl-item { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .ssl-item-label { color: #9aa7b3; }
[data-theme='dark'] .ssl-item-value { color: #e8edf2; }
[data-theme='dark'] .ssl-meta { color: #8a98a8; }
[data-theme='dark'] .ssl-status-ok { background: rgba(63, 185, 80, .18); color: #56d364; }
[data-theme='dark'] .ssl-status-warn { background: rgba(210, 153, 34, .20); color: #e3b341; }
[data-theme='dark'] .ssl-status-danger { background: rgba(229, 109, 38, .20); color: #f0883e; }
[data-theme='dark'] .ssl-status-expired { background: rgba(248, 81, 73, .20); color: #ff7b82; }

/* IP 定位（网络工具 L3，样式复用 SSL 检测布局） */
.ipl-tool { max-width: 980px; margin: 0 auto; }
.ipl-header { margin-bottom: 14px; }
.ipl-title { font-size: 18px; font-weight: 600; color: var(--text-main); }
.ipl-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.ipl-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.ipl-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ipl-field { display: flex; flex-direction: column; gap: 6px; }
.ipl-field-grow { flex: 1 1 240px; min-width: 200px; }
.ipl-label { font-size: 12px; color: var(--text-muted); }
.ipl-input { height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 14px; background: var(--bg-page); color: var(--text-main); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.ipl-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 132, 255, .15); }
.ipl-submit { height: 40px; padding: 0 22px; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .15s ease, transform .1s ease; white-space: nowrap; }
.ipl-submit:hover { opacity: .92; }
.ipl-submit:active { transform: scale(.98); }
.ipl-submit:disabled { opacity: .6; cursor: not-allowed; }
.ipl-error { color: #e5484d; font-size: 13px; margin: 10px 0 0; min-height: 16px; }
.ipl-result { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.ipl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.ipl-item { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; background: var(--bg-page); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.ipl-item-label { font-size: 12px; color: var(--text-muted); }
.ipl-item-value { font-size: 13px; color: var(--text-main); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.ipl-meta { font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.6; word-break: break-all; }

[data-theme='dark'] .ipl-title { color: #e8edf2; }
[data-theme='dark'] .ipl-subtitle { color: #9aa7b3; }
[data-theme='dark'] .ipl-form { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .ipl-label { color: #9aa7b3; }
[data-theme='dark'] .ipl-input { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .ipl-error { color: #ff7b82; }
[data-theme='dark'] .ipl-result { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .ipl-item { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .ipl-item-label { color: #9aa7b3; }
[data-theme='dark'] .ipl-item-value { color: #e8edf2; }
[data-theme='dark'] .ipl-meta { color: #8a98a8; }

/* 随机英文单词（学习资料 L3） */
.rwd-tool { max-width: 680px; margin: 0 auto; }
.rwd-header { text-align: center; margin-bottom: 14px; }
.rwd-title { font-size: 22px; margin: 0; color: var(--text-main); }
.rwd-subtitle { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; }
.rwd-controls { display: flex; justify-content: center; margin-bottom: 18px; }
.rwd-result { min-height: 120px; }
.rwd-loading { text-align: center; color: var(--text-muted); font-size: 13px; padding: 30px 0; }
.rwd-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.rwd-word-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.rwd-word { font-size: 30px; font-weight: 700; color: var(--text-main); letter-spacing: .5px; }
.rwd-trans { font-size: 16px; color: var(--text-muted); }
.rwd-sentences { margin-top: 16px; }
.rwd-sent-label { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.rwd-sentence { padding: 10px 12px; background: var(--bg-page); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.rwd-sent-eng { font-size: 14px; color: var(--text-main); line-height: 1.5; }
.rwd-sent-cn { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

[data-theme='dark'] .rwd-title { color: #e8edf2; }
[data-theme='dark'] .rwd-subtitle { color: #8a98a8; }
[data-theme='dark'] .rwd-loading { color: #8a98a8; }
[data-theme='dark'] .rwd-card { background: #16202b; border-color: #2c3744; }
[data-theme='dark'] .rwd-word { color: #e8edf2; }
[data-theme='dark'] .rwd-trans { color: #9aa7b3; }
[data-theme='dark'] .rwd-word-row { border-color: #2c3744; }
[data-theme='dark'] .rwd-sent-label { color: #8a98a8; }
[data-theme='dark'] .rwd-sentence { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .rwd-sent-eng { color: #e8edf2; }
[data-theme='dark'] .rwd-sent-cn { color: #9aa7b3; }

/* 名言警句（学习资料 · 语言文学 L3） */
.say-tool { max-width: 680px; margin: 0 auto; }
.say-header { text-align: center; margin-bottom: 14px; }
.say-title { font-size: 22px; margin: 0; color: var(--text-main); }
.say-subtitle { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; }
.say-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.say-result { min-height: 120px; }
.say-loading { text-align: center; color: var(--text-muted); font-size: 13px; padding: 30px 0; }

.say-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.say-figure { margin: -24px -24px 18px; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--bg-page); }
.say-img { display: block; width: 100%; max-height: 260px; object-fit: cover; }

.say-quote {
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.9;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}
.say-quote::before { content: '“'; color: var(--primary); margin-right: 2px; }
.say-quote::after { content: '”'; color: var(--primary); margin-left: 2px; }

.say-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.say-from { font-size: 14px; color: var(--text-muted); }
.say-time { font-size: 12px; color: var(--text-muted); opacity: .8; }

/* 语录家族（古诗词名句 / 每日一句 / 爱情公寓 / 情话 / 发病语录 / 一言）共用控件 */
.say-sub {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.say-audio { display: block; width: 100%; margin-top: 16px; }

.say-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.say-field { display: inline-flex; align-items: center; gap: 6px; }
.say-field-label { font-size: 13px; color: var(--text-muted); }
.say-date { width: auto; min-width: 140px; height: 38px; }

/* 复制按钮靠 hidden 控制显隐，显式覆盖避免作者样式盖掉 [hidden] */
#sayCopy[hidden],
.say-controls .tool-btn[hidden] { display: none; }

[data-theme='dark'] .say-sub { color: #9aa7b3; }
[data-theme='dark'] .say-field-label { color: #8a98a8; }
[data-theme='dark'] .say-date { background: #0e141b; border-color: #2c3744; color: #e8edf2; }

[data-theme='dark'] .say-title { color: #e8edf2; }
[data-theme='dark'] .say-subtitle,
[data-theme='dark'] .say-loading { color: #8a98a8; }
[data-theme='dark'] .say-card { background: #16202b; border-color: #2c3744; }
[data-theme='dark'] .say-quote { color: #e8edf2; }
[data-theme='dark'] .say-from { color: #9aa7b3; }
[data-theme='dark'] .say-time { color: #8a98a8; }
[data-theme='dark'] .say-figure { background: #0e141b; }
[data-theme='dark'] .say-meta { border-color: #2c3744; }

/* QQ 账号查询（其他分类 · 信息查询 L3，样式复用查询工具布局） */
.iql-tool { max-width: 980px; margin: 0 auto; }
.iql-header { margin-bottom: 14px; }
.iql-title { font-size: 18px; font-weight: 600; color: var(--text-main); }
.iql-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.iql-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.iql-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.iql-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 200px; }
.iql-label { font-size: 12px; color: var(--text-muted); }
.iql-input { height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 14px; background: var(--bg-page); color: var(--text-main); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.iql-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 132, 255, .15); }
.iql-row-actions { align-items: center; justify-content: space-between; margin-top: 4px; }
.iql-remember { font-size: 13px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.iql-remember input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.iql-submit { height: 40px; padding: 0 22px; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .15s ease, transform .1s ease; white-space: nowrap; }
.iql-submit:hover { opacity: .92; }
.iql-submit:active { transform: scale(.98); }
.iql-submit:disabled { opacity: .6; cursor: not-allowed; }
.iql-hint { font-size: 12px; color: var(--text-muted); margin: 10px 0 0; line-height: 1.6; }
.iql-hint a { color: var(--primary); text-decoration: none; }
.iql-hint a:hover { text-decoration: underline; }
.iql-error { color: #e5484d; font-size: 13px; margin: 0 0 12px; min-height: 16px; }
.iql-result { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.iql-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.iql-avatar-wrap { flex: 0 0 auto; }
.iql-avatar { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); background: var(--bg-page); }
.iql-grid { flex: 1 1 320px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; min-width: 0; }
.iql-item { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; background: var(--bg-page); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.iql-item-label { font-size: 12px; color: var(--text-muted); }
.iql-item-value { font-size: 13px; color: var(--text-main); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }

[data-theme='dark'] .iql-title { color: #e8edf2; }
[data-theme='dark'] .iql-subtitle { color: #9aa7b3; }
[data-theme='dark'] .iql-form { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .iql-label { color: #9aa7b3; }
[data-theme='dark'] .iql-input { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .iql-remember { color: #9aa7b3; }
[data-theme='dark'] .iql-hint { color: #8a98a8; }
[data-theme='dark'] .iql-error { color: #ff7b82; }
[data-theme='dark'] .iql-result { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .iql-avatar { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .iql-item { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .iql-item-label { color: #9aa7b3; }
[data-theme='dark'] .iql-item-value { color: #e8edf2; }

/* 二维码工具（图片工具 · 二维码 L3） */
.qr-tool { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.qr-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.qr-card-title { font-size: 16px; font-weight: 600; color: var(--text-main); margin-bottom: 12px; }
.qr-card-tip { font-size: 12px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.5; }
.qr-field { display: flex; flex-direction: column; gap: 6px; }
.qr-field-grow { flex: 1 1 160px; min-width: 140px; }
.qr-label { font-size: 12px; color: var(--text-muted); }
.qr-textarea { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; background: var(--bg-page); color: var(--text-main); outline: none; resize: vertical; font-family: inherit; line-height: 1.5; transition: border-color .15s ease, box-shadow .15s ease; }
.qr-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 132, 255, .15); }
.qr-input { height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 14px; background: var(--bg-page); color: var(--text-main); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.qr-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 132, 255, .15); }
.qr-select { height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; font-size: 14px; background: var(--bg-page); color: var(--text-main); outline: none; }
.qr-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 12px; }
.qr-submit { margin-top: 14px; height: 40px; padding: 0 22px; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .15s ease, transform .1s ease; white-space: nowrap; }
.qr-submit:hover { opacity: .92; }
.qr-submit:active { transform: scale(.98); }
.qr-submit:disabled { opacity: .6; cursor: not-allowed; }
.qr-error { color: #e5484d; font-size: 13px; margin-top: 10px; min-height: 16px; }
.qr-result { margin-top: 14px; }
.qr-img { max-width: 280px; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-page); display: block; }
.qr-img-fallback { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.qr-result-meta { margin-top: 10px; }
.qr-img-link { font-size: 13px; color: var(--primary); text-decoration: none; }
.qr-img-link:hover { text-decoration: underline; }
.qr-out { margin-top: 12px; }
.qr-out-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.qr-out-label { font-size: 12px; color: var(--text-muted); }
.qr-copy { height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-page); color: var(--text-main); font-size: 12px; cursor: pointer; transition: border-color .15s ease; }
.qr-copy:hover { border-color: var(--primary); }
.qr-out-text { margin: 0; padding: 12px; background: var(--bg-page); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text-main); white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 260px; overflow: auto; }

[data-theme='dark'] .qr-card { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .qr-card-title { color: #e8edf2; }
[data-theme='dark'] .qr-card-tip { color: #9aa7b3; }
[data-theme='dark'] .qr-label { color: #9aa7b3; }
[data-theme='dark'] .qr-textarea { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .qr-input { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .qr-select { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .qr-error { color: #ff7b82; }
[data-theme='dark'] .qr-img { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .qr-img-fallback { color: #8a98a8; }
[data-theme='dark'] .qr-out-label { color: #9aa7b3; }
[data-theme='dark'] .qr-copy { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .qr-out-text { background: #0e141b; border-color: #2c3744; color: #e8edf2; }


/* 获取网站ico（图片工具 · 图标处理 L3） */
.wsi-tool { max-width: 760px; margin: 0 auto; padding: 4px 2px; }
.wsi-header { margin-bottom: 16px; }
.wsi-title { font-size: 18px; font-weight: 600; color: var(--text-main); margin: 0 0 4px; }
.wsi-subtitle { font-size: 13px; color: var(--text-muted); margin: 0; }

.wsi-form { margin-bottom: 16px; }
.wsi-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.wsi-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.wsi-field { flex: 1 1 320px; min-width: 220px; }
.wsi-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-main);
  font-size: 14px; outline: none;
}
.wsi-input:focus { border-color: var(--accent); }
.wsi-submit {
  padding: 10px 22px; border: none; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.wsi-submit:hover { opacity: .9; }
.wsi-submit:disabled { opacity: .5; cursor: not-allowed; }
.wsi-error {
  margin-top: 10px; padding: 8px 12px; border-radius: 8px;
  background: rgba(248, 81, 73, .12); color: #f85149; font-size: 13px;
}

.wsi-loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 14px; padding: 20px 0; }
/* 必须显式覆盖 hidden 属性：否则 display:flex 会盖掉 [hidden] 默认的 display:none，导致模块一打开就常驻"查询中" */
.wsi-loading[hidden] { display: none; }
.wsi-result[hidden] { display: none; }
.wsi-error[hidden] { display: none; }
.wsi-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: wsi-spin .8s linear infinite;
}
@keyframes wsi-spin { to { transform: rotate(360deg); } }

.wsi-result {
  margin-top: 8px; padding: 20px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.wsi-preview {
  width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 14px;
  background: var(--bg-page); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.wsi-preview-img { width: 64px; height: 64px; object-fit: contain; }
.wsi-preview-fallback { font-size: 44px; display: flex; align-items: center; justify-content: center; }
.wsi-note {
  margin: 0 0 14px; font-size: 12.5px; color: var(--text-muted);
  text-align: center; line-height: 1.6;
}
.wsi-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.wsi-item { display: flex; flex-direction: column; gap: 5px; }
.wsi-item-label { font-size: 12px; color: var(--text-muted); }
.wsi-item-value { font-size: 14px; color: var(--text-main); word-break: break-word; line-height: 1.6; }
.wsi-title-val a { color: var(--accent); text-decoration: none; font-weight: 600; }
.wsi-title-val a:hover { text-decoration: underline; }
.wsi-item-value a { color: var(--accent); text-decoration: none; }
.wsi-item-value a:hover { text-decoration: underline; }
.wsi-desc-val { color: var(--text-muted); }

.wsi-ico-wrap { border-top: 1px dashed var(--border); padding-top: 14px; }
.wsi-ico-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wsi-ico-link { flex: 1 1 260px; min-width: 0; color: var(--accent); text-decoration: none; font-size: 13px; word-break: break-all; }
.wsi-ico-link:hover { text-decoration: underline; }
.wsi-copy {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-card); color: var(--text-main); font-size: 13px; cursor: pointer; white-space: nowrap;
}
.wsi-copy:hover { border-color: var(--accent); }

[data-theme='dark'] .wsi-title { color: #e8edf2; }
[data-theme='dark'] .wsi-input { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .wsi-preview { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .wsi-result { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wsi-item-label, [data-theme='dark'] .wsi-note { color: #9aa7b3; }
[data-theme='dark'] .wsi-item-value { color: #e8edf2; }
[data-theme='dark'] .wsi-desc-val { color: #9aa7b3; }
[data-theme='dark'] .wsi-ico-wrap { border-top-color: #2c3744; }
[data-theme='dark'] .wsi-copy { background: #0e141b; border-color: #2c3744; color: #e8edf2; }


/* 垃圾分类（生活工具 L3） */
.gbg-card { max-width: 760px; }
.gbg-desc { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin: 0 0 14px; }
.gbg-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.gbg-leg { color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; letter-spacing: .5px; }
.gbg-form { margin-bottom: 12px; }
.gbg-input-row { display: flex; gap: 10px; }
.gbg-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gbg-input:focus { border-color: var(--accent, #4f7cff); box-shadow: 0 0 0 3px rgba(79, 124, 255, .15); }
.gbg-submit {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  background: var(--accent, #4f7cff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s ease;
}
.gbg-submit:hover { opacity: .9; }
.gbg-submit:disabled { opacity: .6; cursor: not-allowed; }
.gbg-error {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(229, 72, 77, .12);
  color: #e5484d;
  font-size: 13px;
}
.gbg-best {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.gbg-badge {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
  letter-spacing: 1px;
}
.gbg-msg { font-size: 16px; color: var(--text-main); font-weight: 600; }
.gbg-sub { font-size: 12px; color: var(--text-muted); }
.gbg-more-title { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.gbg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gbg-chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.gbg-chip:hover { border-color: var(--accent, #4f7cff); color: var(--accent, #4f7cff); }
.gbg-chip.active { background: var(--accent, #4f7cff); color: #fff; border-color: var(--accent, #4f7cff); }
.gbg-loading, .gbg-hint-box, .gbg-error-box {
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
}
.gbg-loading { color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); }
.gbg-hint-box { color: var(--text-muted); background: var(--bg-card); border: 1px dashed var(--border); }
.gbg-error-box { color: #e5484d; background: rgba(229, 72, 77, .12); }

[data-theme='dark'] .gbg-desc,
[data-theme='dark'] .gbg-sub,
[data-theme='dark'] .gbg-more-title { color: #8a98a8; }
[data-theme='dark'] .gbg-msg { color: #e6edf3; }
[data-theme='dark'] .gbg-loading,
[data-theme='dark'] .gbg-hint-box { background: #1c2230; }
[data-theme='dark'] .gbg-input { background: #11151f; }
[data-theme='dark'] .gbg-chip { background: #11151f; }

/* 天气查询（生活工具 L3） */
.wtq-wrap { max-width: 980px; margin: 0 auto; }
.wtq-head { margin-bottom: 16px; }
.wtq-title { margin: 0 0 6px; font-size: 20px; font-weight: 600; color: var(--text-main); }
.wtq-sub { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.wtq-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.wtq-input { flex: 1 1 auto; width: auto; min-width: 160px; }

.wtq-hot { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.wtq-chip {
  padding: 0 12px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wtq-chip:hover { border-color: var(--primary); color: var(--primary); }

.wtq-status { min-height: 22px; }
.wtq-tip { font-size: 13px; color: var(--text-muted); }
.wtq-loading { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.wtq-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: wtq-spin .7s linear infinite;
}
@keyframes wtq-spin { to { transform: rotate(360deg); } }

/* 显式覆盖 hidden，避免作者样式的 display 盖掉 [hidden] */
.wtq-result[hidden] { display: none; }

/* 概览卡 */
.wtq-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.wtq-city { font-size: 22px; font-weight: 600; color: var(--text-main); }
.wtq-city-en { font-size: 12px; color: var(--text-muted); letter-spacing: .5px; margin-top: 2px; }
.wtq-temp-row { display: flex; align-items: baseline; gap: 4px; margin-top: 8px; }
.wtq-temp { font-size: 44px; font-weight: 700; line-height: 1; color: var(--text-main); }
.wtq-unit { font-size: 18px; color: var(--text-muted); }
.wtq-range { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 13px; }
.wtq-low { color: #4a90d9; }
.wtq-high { color: #e06c5a; }
.wtq-fah { color: var(--text-muted); }

.wtq-hero-side { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 108px; }
.wtq-icon { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.wtq-icon-img { width: 64px; height: 64px; object-fit: contain; }
.wtq-icon-fallback { font-size: 42px; }
.wtq-weather { font-size: 15px; font-weight: 500; color: var(--text-main); }
.wtq-time { font-size: 12px; color: var(--text-muted); }

/* 预警 */
.wtq-warn {
  padding: 12px 16px;
  border: 1px solid rgba(248, 81, 73, .4);
  border-radius: var(--radius);
  background: rgba(248, 81, 73, .08);
  margin-bottom: 16px;
}
.wtq-warn-title { font-size: 14px; font-weight: 600; color: #d94b42; margin-bottom: 6px; }
.wtq-warn-list { margin: 0; padding-left: 18px; }
.wtq-warn-item { font-size: 13px; color: #b8413a; line-height: 1.7; }

/* 指标网格 */
.wtq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.wtq-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.wtq-item-label { font-size: 12px; color: var(--text-muted); }
.wtq-item-value { font-size: 15px; font-weight: 600; color: var(--text-main); word-break: break-all; }

/* 空气质量分级着色 */
.wtq-air-1 { color: #2da44e; }
.wtq-air-2 { color: #b98900; }
.wtq-air-3 { color: #d1731f; }
.wtq-air-4 { color: #cf222e; }
.wtq-air-5 { color: #9c3d8f; }
.wtq-air-6 { color: #7d2b2b; }

/* 生活指数 */
.wtq-living { margin-top: 4px; }
.wtq-living-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wtq-living-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--text-main); }
.wtq-toggle {
  padding: 0 12px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}
.wtq-toggle:hover { border-color: var(--primary); color: var(--primary); }

.wtq-living-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.wtq-lv {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.wtq-lv-extra { display: none; }
.wtq-living-grid.wtq-expanded .wtq-lv-extra { display: block; }
.wtq-lv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.wtq-lv-name { font-size: 14px; font-weight: 600; color: var(--text-main); }
.wtq-lv-index { flex: 0 0 auto; padding: 1px 8px; border-radius: 999px; background: var(--tag-bg, #eef2f6); color: var(--primary); font-size: 12px; }
.wtq-lv-tips { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

[data-theme='dark'] .wtq-chip { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wtq-hero,
[data-theme='dark'] .wtq-item,
[data-theme='dark'] .wtq-lv { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wtq-toggle { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .wtq-warn { background: rgba(248, 81, 73, .12); }
[data-theme='dark'] .wtq-warn-title { color: #ff7b82; }
[data-theme='dark'] .wtq-warn-item { color: #ffb3b7; }
[data-theme='dark'] .wtq-low { color: #58a6ff; }
[data-theme='dark'] .wtq-high { color: #ff8b76; }

/* 摩斯电码（生活工具 L3） */
.mrs-mode { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.mrs-mode-btn { flex: 1 1 200px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-page); color: var(--text-main); font-size: 14px; cursor: pointer; transition: all .15s ease; }
.mrs-mode-btn:hover { border-color: var(--primary); }
.mrs-mode-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.mrs-status { margin-top: 12px; min-height: 18px; font-size: 13px; color: var(--text-muted); }
.mrs-status.error { color: #e5484d; }

[data-theme='dark'] .mrs-mode-btn { background: #0e141b; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .mrs-mode-btn:hover { border-color: var(--primary); }
[data-theme='dark'] .mrs-status { color: #9aa7b3; }
[data-theme='dark'] .mrs-status.error { color: #ff7b82; }
.mrs-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.mrs-desc code { background: var(--bg-page); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.mrs-desc a { color: var(--primary); text-decoration: none; }
.mrs-desc a:hover { text-decoration: underline; }
[data-theme='dark'] .mrs-desc { color: #9aa7b3; }
[data-theme='dark'] .mrs-desc code { background: #0e141b; border-color: #2c3744; }
[data-theme='dark'] .mrs-desc a { color: #6ea8fe; }

/* ========================
   首页 · 网址导航落地页
   ======================== */
.home { display: flex; flex-direction: column; gap: 0; }

/* 顶部固定区：搜索区 + 分类列表，滚动时钉在顶部，仅下方列表滚动 */
.home-top {
  position: sticky;
  top: var(--app-header-h);
  z-index: 40;
  background: var(--bg-page);
  margin: 0 -24px;
  padding: 0 24px 16px;
  box-shadow: 0 10px 16px -12px rgba(15, 23, 42, .18);
}

/* Hero 区（已压缩高度） */
.home-hero {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 22px 24px 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.home-hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.home-title { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.home-sub { margin-top: 6px; font-size: 13px; opacity: .9; }
.home-search {
  margin: 14px auto 0; max-width: 520px; display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px; padding: 7px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.home-search-icon { font-size: 15px; opacity: .6; }
.home-search-input {
  flex: 1; border: none; outline: none; background: transparent; font-size: 14px; color: #1e293b;
}
.home-search-input::placeholder { color: #94a3b8; }
.home-stats { margin-top: 10px; font-size: 12px; opacity: .92; }
.home-stats b { font-weight: 700; }

/* 分类快捷跳转 */
.home-cats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.home-chip {
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-card); color: var(--text-main); font-size: 13px; cursor: pointer;
  transition: all .15s ease;
}
.home-chip:hover { border-color: var(--primary); color: var(--primary); }
.home-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 分类分节 */
.home-section { scroll-margin-top: 220px; }
.home-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.home-section-icon {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .15);
}
.home-section-icon svg { width: 18px; height: 18px; display: block; }
.home-section-title { font-size: 17px; font-weight: 600; color: var(--text-title); }
.home-section-count {
  font-size: 12px; color: var(--text-muted); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px;
}

/* 卡片网格 */
.home-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; align-content: start;
}
.home-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card);
  padding: 16px 14px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.home-card:hover { border-color: var(--primary); box-shadow: 0 6px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.home-card-icon { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--bg-page); }
.home-card-icon-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-card-letter { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 18px; }
.home-card-name { font-size: 15px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-card-intro { font-size: 12px; color: var(--text-muted); line-height: 1.5; max-height: 3em; overflow: hidden; }

/* 搜索结果态 */
.home-results-head { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }
.home-empty { padding: 30px 10px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* hidden 防御（首页切换显隐 + 首页隐藏二级导航） */
.sub-nav-bar[hidden] { display: none; }
.home-body[hidden], .home-results[hidden], .home-cats[hidden], .home-section[hidden] { display: none; }

/* 暗色模式 */
[data-theme='dark'] .home-top { background: #0f141a; box-shadow: 0 10px 16px -12px rgba(0,0,0,.6); }
[data-theme='dark'] .home-hero { box-shadow: 0 10px 30px rgba(0,0,0,.5); }
[data-theme='dark'] .home-search { background: #1c242e; }
[data-theme='dark'] .home-search-input { color: #e8edf2; }
[data-theme='dark'] .home-search-input::placeholder { color: #6b7886; }
[data-theme='dark'] .home-chip { background: #161d26; border-color: #2c3744; color: #e8edf2; }
[data-theme='dark'] .home-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme='dark'] .home-section-title { color: #e8edf2; }
[data-theme='dark'] .home-section-count { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .home-card { background: #161d26; border-color: #2c3744; }
[data-theme='dark'] .home-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,.45); }
[data-theme='dark'] .home-card-icon { background: #0e141b; }
[data-theme='dark'] .home-card-name { color: #e8edf2; }



