.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero p { color: var(--muted); max-width: 34rem; margin: 0.5rem auto 1.25rem; }
#tool-search { width: min(24rem, 100%); padding: 0.65rem 1rem; border: 1px solid var(--line);
  border-radius: 999px; font-size: 1rem; background: var(--surface); color: var(--ink); }
.tool-grid { list-style: none; padding: 0; display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tool-card a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s, transform 0.15s; }
.tool-card a:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card p { color: var(--muted); font-size: 0.9rem; }
.tool-page .intro { color: var(--muted); max-width: 44rem; }
.tool-ui { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin: 1.25rem 0; }
.tool-form { display: grid; gap: 0.9rem; }
.field { display: grid; gap: 0.25rem; }
.field label, .field .field-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { padding: 0.55rem 0.7rem; border: 1px solid var(--line);
  border-radius: 6px; font-size: 1rem; font-family: inherit; background: var(--bg); color: var(--ink); }
.field textarea { font-family: var(--mono); min-height: 9rem; resize: vertical; }
.row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.row .field { flex: 1 1 10rem; }
.btn { justify-self: start; padding: 0.55rem 1.3rem; border: none; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink); font-size: 1rem; cursor: pointer; }
.btn:hover { opacity: 0.9; }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.output { background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 0.75rem; font-family: var(--mono); font-size: 0.9rem; white-space: pre-wrap;
  word-break: break-word; min-height: 3rem; margin-top: 0.5rem; }
.output mark { background: #ede9fe; color: var(--accent); border-radius: 3px; }
.error { color: var(--err); font-size: 0.9rem; }
.notice { color: var(--muted); font-size: 0.9rem; }
.result-table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.95rem; }
.result-table th, .result-table td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); }
.result-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.result-table tr.total { font-weight: 700; }
.table-scroll { overflow-x: auto; }
.ad-slot { margin: 1.5rem 0; }
.ad-placeholder { border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted);
  text-align: center; padding: 1.5rem; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.tool-faq details { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
.tool-faq summary { cursor: pointer; font-weight: 600; }
.related ul { padding-left: 1.2rem; }
.disclaimer { font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 0.75rem; margin: 1rem 0; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); text-align: center;
  padding: 2rem 1rem; color: var(--muted); cursor: pointer; margin-top: 0.75rem; }
.dropzone.dragover { border-color: var(--accent); color: var(--accent); }
.price-input { width: 5.5rem; }
.qr-preview { margin-top: 1rem; }
.qr-preview svg { max-width: 260px; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.hash-hex { word-break: break-all; font-size: 0.8rem; }
.hash-table td:last-child { text-align: left; }
.diff-output { line-height: 1.5; }
.diff-add { background: #dcfce7; color: #14532d; display: inline-block; width: 100%; }
.diff-del { background: #fee2e2; color: #7f1d1d; display: inline-block; width: 100%; }
.diff-same { color: var(--muted); }

@media (prefers-color-scheme: dark) {
  .output mark { background: #4c1d95; color: #f4f4f5; }
  .diff-add { background: #14532d; color: #bbf7d0; }
  .diff-del { background: #7f1d1d; color: #fecaca; }
}

:root[data-theme="dark"] .output mark { background: #4c1d95; color: #f4f4f5; }
:root[data-theme="dark"] .diff-add { background: #14532d; color: #bbf7d0; }
:root[data-theme="dark"] .diff-del { background: #7f1d1d; color: #fecaca; }

:root[data-theme="light"] .output mark { background: #ede9fe; color: #5b21b6; }
:root[data-theme="light"] .diff-add { background: #dcfce7; color: #14532d; }
:root[data-theme="light"] .diff-del { background: #fee2e2; color: #7f1d1d; }

.theme-toggle { background: transparent; border: 1px solid var(--line); border-radius: 999px;
  width: 2.1rem; height: 2.1rem; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; color: var(--ink); line-height: 1; }
.theme-toggle:hover { border-color: var(--accent); }

.color-swatch { height: 64px; border-radius: var(--radius); border: 1px solid var(--line); margin-top: 0.75rem; }
.shade-strip { display: flex; gap: 4px; margin-top: 0.5rem; }
.shade { flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.countdown-tiles { display: flex; gap: 0.75rem; margin: 1rem 0; }
.cd-tile { flex: 1; text-align: center; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 0.4rem; }
.cd-tile span { display: block; font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-tile small { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; }
.fancy-sample { font-size: 1.1rem; }
.code-image-preview { margin-top: 1rem; overflow-x: auto; }
.code-image-preview svg { max-width: 100%; height: auto; }
.file-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.5rem; }
.file-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--line); border-radius: 6px; }
.file-list .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list button { background: transparent; border: 1px solid var(--line); border-radius: 4px;
  cursor: pointer; padding: 0.15rem 0.5rem; color: inherit; }
.file-list button:hover { border-color: var(--accent); color: var(--accent); }

.callout { background: var(--bg); border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 0.85rem 1rem; margin-bottom: 1rem; font-size: 0.92rem; color: var(--ink); }
.callout code { font-family: var(--mono); font-size: 0.85em; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-chip { background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.9rem; font-size: 0.85rem; cursor: pointer; color: var(--ink); }
.filter-chip:hover { border-color: var(--accent); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.shortcut-list { list-style: none; padding: 0; display: grid; gap: 0.9rem; margin: 1rem 0; }
.shortcut-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem;
  background: var(--bg); }
.shortcut-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  flex-wrap: wrap; }
.shortcut-head code { font-family: var(--mono); font-weight: 700; }
.shortcut-tag { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.1rem 0.6rem; }
.shortcut-card p { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0; }
.shortcut-template { display: flex; align-items: center; gap: 0.6rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 0.7rem; }
.shortcut-template code { flex: 1; font-family: var(--mono); font-size: 0.82rem; white-space: pre-wrap;
  word-break: break-word; }
.cc-commands { margin-top: 1.5rem; }

.prompt-list { list-style: none; padding: 0; display: grid; gap: 1.1rem; margin: 1rem 0; }
.prompt-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
  background: var(--bg); }
.prompt-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.prompt-card p { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.75rem; }
.prompt-card .row { margin-bottom: 0.75rem; }
.prompt-card .output { margin-bottom: 0.6rem; }

.part-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
  background: var(--bg); }
.part-card h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.part-question { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.part-card textarea { width: 100%; }
.part-tip { font-size: 0.82rem; color: var(--muted); margin: 0.5rem 0 0; }
.tool-ui-output { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tool-ui-output label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted);
  margin-bottom: 0.35rem; }

.checklist-progress { margin: 1rem 0; }
.checklist-progress-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.checklist-progress-fill { height: 100%; background: var(--accent); border-radius: 999px;
  transition: width 0.2s; }
.checklist-progress p { margin: 0.4rem 0 0; }
.checklist-group { margin-top: 1.5rem; }
.checklist-group h2 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.checklist-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.checklist-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.checklist-item label { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.75rem 0.9rem;
  cursor: pointer; }
.checklist-item input[type="checkbox"] { margin-top: 0.2rem; width: 1.05rem; height: 1.05rem;
  accent-color: var(--accent); flex-shrink: 0; }
.checklist-item-title { display: block; font-weight: 600; }
.checklist-item p { color: var(--muted); font-size: 0.88rem; margin: 0.25rem 0 0; }
.checklist-item:has(input:checked) { border-color: var(--ok); }
.checklist-item:has(input:checked) .checklist-item-title { text-decoration: line-through;
  text-decoration-color: var(--ok); }
.typing-passage { font-family: var(--mono); font-size: 1.05rem; line-height: 1.8; letter-spacing: 0.02em;
  overflow-wrap: break-word; }
.typing-passage span.char-correct { color: var(--accent); }
.typing-passage span.char-wrong { color: var(--err); text-decoration: underline; }
.btn.secondary.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
