:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fb;
  --bg-nav: #1e1e2e;
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-nav: #cdd6f4;
  --border-color: #e2e8f0;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #22c55e;
  --error: #ef4444;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --radius: 8px;
  --header-top-h: 56px;
  --header-subnav-h: 44px;
  --scrollbar-size: 8px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: #c9d1dc;
  --scrollbar-thumb-hover: #a8b3c4;
}

[data-theme="dark"] {
  --bg-primary: #11111b;
  --bg-secondary: #1e1e2e;
  --bg-nav: #11111b;
  --text-primary: #cdd6f4;
  --text-secondary: #a6adc8;
  --text-nav: #cdd6f4;
  --border-color: #313244;
  --accent: #89b4fa;
  --accent-hover: #74c7ec;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --scrollbar-thumb: #45475a;
  --scrollbar-thumb-hover: #585b70;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 全局滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background 0.2s ease;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 上下结构布局 */
.app-layout.vertical {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  box-shadow: var(--shadow);
}

.header-top {
  height: var(--header-top-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-nav);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.brand-link:hover { text-decoration: none; opacity: 0.9; }
.brand-icon {
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.brand-icon .bi { font-size: 1.15em; }

.module-nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.module-tab {
  padding: 8px 20px;
  border-radius: var(--radius);
  color: rgba(205,214,244,0.75);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.module-tab .bi { font-size: 1.05em; opacity: 0.95; }
.module-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.module-tab.active {
  color: #fff;
  background: var(--accent);
}

.header-actions { flex-shrink: 0; }
.btn-icon {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-nav);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-icon .bi { font-size: 1.1em; }

.tool-nav {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  height: var(--header-subnav-h);
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(0,0,0,0.15);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.28) transparent;
}
.tool-nav::-webkit-scrollbar { height: 5px; }
.tool-nav::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 12px;
}
.tool-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}
.tool-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
  border: 1px solid transparent;
  background-clip: padding-box;
}

.tool-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  color: rgba(205,214,244,0.7);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-tab .bi { font-size: 1em; opacity: 0.9; }
.tool-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.tool-tab.active {
  color: #fff;
  background: rgba(99,102,241,0.5);
  font-weight: 500;
}

.page-body {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* 首页 */
.hero { text-align: center; padding: 32px 20px 40px; }
.hero h2 {
  font-size: 28px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.hero h2 .bi { font-size: 0.95em; color: var(--accent); }
.hero p { color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

.module-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.module-section:last-child { margin-bottom: 0; }
.module-title {
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-title .bi { color: var(--accent); }

/* 工具卡片网格 */
.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  min-height: 120px;
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12);
  border-color: var(--accent);
}
.tool-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 22px;
  line-height: 1;
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--accent);
}
.tool-card-icon .bi { font-size: 1em; line-height: 1; }
.tool-card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}
.tool-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.module-excel .tool-card:hover { border-color: #22c55e; box-shadow: 0 8px 20px rgba(34, 197, 94, 0.12); }
.module-excel .tool-card-icon { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.2); }

.module-pdf .tool-card:hover { border-color: #ef4444; box-shadow: 0 8px 20px rgba(239, 68, 68, 0.12); }
.module-pdf .tool-card-icon { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.2); }

.tool-links { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-link {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.15s;
}
.tool-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* 工具页 */
.tool-page-header { margin-bottom: 16px; }
.tool-page-header h2 {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tool-page-header h2 .bi { color: var(--accent); font-size: 1.05em; }

.tool-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-top-h) - var(--header-subnav-h) - 120px);
}

.tool-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool-option-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.tool-option-row label input[type="text"] {
  min-width: 180px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
}
.toolbar-right { display: flex; gap: 8px; }
.tool-hint {
  width: 100%;
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 兜底隐藏 Monaco 歧义字符提示条 */
.monaco-editor .unicode-highlight-banner,
.monaco-editor [class*="unicodeHighlight"] {
  display: none !important;
}

.tool-toolbar select,
.tool-toolbar input[type="text"],
.tool-toolbar input[type="number"] {
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
}

.editor-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 360px;
}
.editor-panel.result-only {
  grid-template-columns: 1fr;
}
.editor-panel.result-only .editor-input-col {
  display: none;
}
.editor-panel.input-only {
  grid-template-columns: 1fr;
}
.editor-panel.input-only .editor-output-col {
  display: none;
}
.tool-page.input-only .btn#btnCopy { display: none; }
.editor-panel.hidden { display: none !important; }
.tool-page.no-editors .btn#btnCopy { display: none; }
.editor-col { display: flex; flex-direction: column; min-height: 0; }
.editor-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.editor-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.editor-output-header .editor-label { margin-bottom: 0; }
.result-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}
.monaco-container {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  min-height: 360px;
  overflow: hidden;
  background: var(--bg-primary);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}
.editor-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  color: var(--text-secondary);
  font-size: 13px;
  background: var(--bg-primary);
}
.plain-editor {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: none;
  outline: none;
  resize: vertical;
  padding: 12px;
  font-family: Consolas, 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.file-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 12px;
  cursor: pointer;
  background: var(--bg-primary);
  transition: border-color 0.2s;
}
.file-upload-zone-tall {
  min-height: 140px;
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload-file-list-external {
  margin-top: 0;
  margin-bottom: 16px;
  max-width: none;
}
.upload-file-list-external .upload-file-remove {
  flex-shrink: 0;
  margin-left: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.upload-file-list-external .upload-file-remove:hover {
  background: var(--bg-secondary);
  color: var(--danger, #c0392b);
}
.pdf-to-image-page .upload-file-table-wrap {
  display: none;
  width: 100%;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-primary);
}
.pdf-to-image-page .upload-file-table-wrap.show {
  display: block;
}
.pdf-to-image-page .upload-file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pdf-to-image-page .upload-file-table th,
.pdf-to-image-page .upload-file-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: middle;
}
.pdf-to-image-page .upload-file-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
}
.pdf-to-image-page .upload-file-table tbody tr:last-child td {
  border-bottom: none;
}
.pdf-to-image-page .upload-file-table .col-name {
  word-break: break-all;
  max-width: 0;
  width: 45%;
}
.pdf-to-image-page .upload-file-table .col-type {
  width: 12%;
  white-space: nowrap;
}
.pdf-to-image-page .upload-file-table .col-size {
  width: 18%;
  white-space: nowrap;
  color: var(--text-secondary);
}
.pdf-to-image-page .upload-file-table .col-action {
  width: 10%;
  white-space: nowrap;
  text-align: center;
}
.pdf-to-image-page .upload-file-table th:last-child {
  text-align: center;
}
.pdf-to-image-page .upload-file-table .upload-file-remove {
  color: var(--danger, #c0392b);
  border-color: var(--border-color);
}
.progress-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}
.progress-modal-dialog {
  width: min(420px, 100%);
  padding: 24px 28px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.progress-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.progress-modal-file {
  display: none;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}
.progress-modal-percent {
  margin: 8px 0 4px;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent, #2563eb);
  text-align: center;
}
.progress-bar-modal {
  margin-bottom: 4px;
}
.file-upload-zone:hover,
.file-upload-zone.dragover { border-color: var(--accent); }
.file-upload-zone input { display: none; }
.file-upload-zone .upload-hint { color: var(--text-secondary); font-size: 14px; }
.file-upload-zone .upload-hint-sub {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.9;
}
.upload-file-list {
  list-style: none;
  margin: 12px auto 0;
  padding: 0;
  max-width: 520px;
  text-align: left;
  display: none;
}
.upload-file-list.show { display: block; }
.upload-file-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
}
.upload-file-list .file-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 16px;
}
.upload-file-list .file-size {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.tool-progress {
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #22c55e);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.progress-bar-inner.indeterminate {
  width: 40% !important;
  animation: progress-slide 1.2s ease-in-out infinite;
}
@keyframes progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.progress-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.tool-result {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 13px;
  max-height: 200px;
  overflow: auto;
  display: none;
}
.tool-result.show { display: block; }
.tool-result.error { border-color: var(--error); color: var(--error); }
.tool-result.success { border-color: var(--success); }

.data-preview {
  margin-top: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-primary);
  overflow: hidden;
}
.data-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.data-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.data-preview-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.data-preview-scroll {
  max-height: 420px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.data-preview-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 35%, var(--scrollbar-thumb));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.data-preview-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 55%, var(--scrollbar-thumb-hover));
  border: 2px solid transparent;
  background-clip: padding-box;
}
.data-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-preview-table th,
.data-preview-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-preview-table th {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  z-index: 1;
}
.data-preview-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.word-preview-scroll {
  background: #e8eaed;
  padding: 20px 16px;
  max-height: 560px;
}
.word-page {
  max-width: 720px;
  min-height: 360px;
  margin: 0 auto;
  padding: 48px 56px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.06);
  border-radius: 2px;
  color: #1f1f1f;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.75;
}
.word-page.word-page-images {
  max-width: 840px;
  padding: 20px 24px 28px;
}
.word-preview-page {
  margin-bottom: 20px;
}
.word-preview-page:last-child {
  margin-bottom: 0;
}
.word-preview-page-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}
.word-preview-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
}
.word-para {
  margin: 0 0 12px;
  word-break: break-word;
}
.word-placeholder {
  color: #94a3b8;
  text-align: center;
  margin-top: 80px;
}

.pdf-preview-box .pdf-viewer-scroll {
  max-height: 760px;
  overflow: auto;
  padding: 16px;
  background: #525659;
}
.pdf-viewer-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.pdf-viewer-loading,
.pdf-viewer-more,
.pdf-viewer-error {
  color: #e2e8f0;
  font-size: 13px;
  padding: 12px;
  text-align: center;
  width: 100%;
}
.pdf-viewer-error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
  border-radius: 6px;
}
.pdf-viewer-page {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  border-radius: 2px;
  overflow: hidden;
  max-width: 100%;
}
.pdf-viewer-page-label {
  padding: 6px 10px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.pdf-viewer-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  vertical-align: top;
}
.pdf-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: #94a3b8;
  font-size: 14px;
  padding: 24px;
  text-align: center;
  background: #e8eaed;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}
.error-page h1 { font-size: 72px; color: var(--text-secondary); }

@media (max-width: 768px) {
  .header-top { padding: 0 16px; gap: 12px; }
  .brand-text { display: none; }
  .module-tab { padding: 6px 12px; font-size: 13px; }
  .tool-nav { padding: 0 16px; }
  .page-body { padding: 16px; }
  .tool-card-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .tool-card { padding: 16px 10px 12px; min-height: 108px; }
  .tool-card-icon { width: 40px; height: 40px; font-size: 22px; }
}
