/* Tool Hub — shared styles
 * Distinctive: IBM Plex Sans + Mono, electric lime accent, sharp cards,
 * generous whitespace, monospace numerics, light/dark via [data-theme]
 */

:root {
  --bg: #0a0a0b;
  --surface: #131316;
  --surface-2: #1c1c21;
  --surface-3: #26262d;
  --border: #2a2a32;
  --border-strong: #3a3a44;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-faint: #71717a;
  --accent: #c5f432;
  --accent-ink: #0a0a0b;
  --accent-soft: rgba(197, 244, 50, .12);
  --danger: #ff5b5b;
  --warn: #ffb547;
  --good: #4ade80;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --radius: 6px;
  --radius-lg: 12px;
  --mono: 'IBM Plex Mono', ui-monospace, SF Mono, Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --display: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
}

[data-theme="light"] {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f4f4f0;
  --surface-3: #ebebe5;
  --border: #e2e2dc;
  --border-strong: #c8c8c0;
  --text: #18181b;
  --text-dim: #52525b;
  --text-faint: #a1a1aa;
  --accent: #5fa800;
  --accent-ink: #ffffff;
  --accent-soft: rgba(95, 168, 0, .1);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  font-feature-settings: "ss01", "cv01";
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.display { font-family: var(--display); letter-spacing: -.02em; }

/* ───── i18n ───── */
[data-en], [data-zh] { display: inline; }
body[data-lang="en"] [data-zh] { display: none; }
body[data-lang="zh"] [data-en] { display: none; }
body[data-lang="zh"] { font-family: 'Noto Sans SC', var(--sans); }

/* ───── HEADER ───── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  letter-spacing: -.01em;
}
.logo-mark {
  width: 28px; height: 28px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 700; font-size: .92rem;
  font-family: var(--mono);
}
.nav-spacer { flex: 1; }
.nav-search {
  flex: 1; max-width: 360px; position: relative;
}
.nav-search input {
  width: 100%; padding: 9px 14px 9px 36px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .92rem; outline: none;
  transition: border-color .15s;
}
.nav-search input:focus { border-color: var(--border-strong); }
.nav-search::before {
  content: ""; position: absolute; left: 12px; top: 50%;
  width: 14px; height: 14px; transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
.header-controls { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius);
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .82rem; font-weight: 500;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 16px; height: 16px; }
.lang-btn { width: auto; padding: 0 12px; font-family: var(--mono); font-size: .8rem; }

/* ───── LAYOUT ───── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.tool-page { max-width: 980px; margin: 0 auto; padding: 32px 24px 80px; }
.breadcrumb { font-size: .85rem; color: var(--text-dim); margin-bottom: 16px; font-family: var(--mono); }
.breadcrumb a:hover { color: var(--accent); }

/* ───── HERO ───── */
.hero {
  padding: 64px 24px 48px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, var(--accent-soft) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 50%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--mono); font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  margin-bottom: 22px;
  background: var(--accent-soft);
  position: relative;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 700; letter-spacing: -.035em;
  line-height: 1; margin-bottom: 20px;
  position: relative;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  font-size: 1.15rem; color: var(--text-dim);
  max-width: 620px; margin: 0 auto 32px;
  position: relative;
}
.hero-stats {
  display: flex; justify-content: center; gap: 36px; flex-wrap: wrap;
  position: relative;
}
.hero-stat .num { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; color: var(--accent); }
.hero-stat .lbl { font-size: .8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; }

/* ───── TOOL GRID ───── */
.section { padding: 48px 0; }
.section-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-family: var(--display); font-size: 1.6rem;
  font-weight: 600; letter-spacing: -.02em;
}
.section-head .count {
  font-family: var(--mono); font-size: .8rem;
  color: var(--text-faint);
}
.section-head .filter {
  margin-left: auto; display: flex; gap: 6px;
}
.chip {
  padding: 6px 12px; border-radius: 999px;
  font-size: .82rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border);
  transition: all .15s;
}
.chip:hover, .chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all .2s;
  position: relative; display: block;
  overflow: hidden;
}
.tool-card::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), transparent 40%);
  opacity: 0; transition: opacity .25s;
  z-index: -1; padding: 1px;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.tool-card:hover .tool-icon {
  background: var(--accent); color: var(--accent-ink);
}
.tool-card .pin {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  opacity: 0; transition: all .15s;
  font-size: .9rem;
}
.tool-card:hover .pin { opacity: .5; }
.tool-card .pin:hover, .tool-card .pin.pinned { opacity: 1; color: var(--accent); }
.tool-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  display: grid; place-items: center;
  margin-bottom: 14px;
  transition: all .2s;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-card h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.05rem; margin-bottom: 6px;
  letter-spacing: -.01em;
}
.tool-card p {
  font-size: .85rem; color: var(--text-dim);
  line-height: 1.45; margin-bottom: 10px;
}
.tool-card .meta {
  display: flex; gap: 10px; font-size: .72rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.tool-card .meta .uses::before { content: "↗ "; color: var(--accent); }

/* ───── TOOL PAGE ───── */
.tool-header {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.tool-header h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700; letter-spacing: -.025em;
  margin-bottom: 10px;
}
.tool-header .desc {
  color: var(--text-dim); font-size: 1.02rem;
  max-width: 680px;
}
.tool-actions {
  display: flex; gap: 8px; margin-top: 16px;
  flex-wrap: wrap;
}
.action-btn {
  padding: 8px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s;
}
.action-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.action-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.action-btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.action-btn svg { width: 14px; height: 14px; }

/* ───── PANEL / WORKSPACE ───── */
.workspace {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 28px;
}
.workspace.single { grid-template-columns: 1fr; }
@media (max-width: 760px) { .workspace { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  font-size: .85rem; font-weight: 500;
}
.panel-head .label { font-family: var(--mono); color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.panel-head .actions { margin-left: auto; display: flex; gap: 4px; }
.panel-head .mini-btn {
  padding: 4px 10px; border-radius: 5px;
  font-size: .76rem; color: var(--text-dim);
  transition: all .12s;
}
.panel-head .mini-btn:hover { background: var(--surface-3); color: var(--text); }
.panel-body {
  flex: 1; padding: 14px 16px;
  font-family: var(--mono); font-size: .9rem;
  line-height: 1.55;
}
textarea.code {
  width: 100%; min-height: 320px;
  background: transparent; border: none;
  font-family: var(--mono); font-size: .9rem;
  color: var(--text); resize: vertical;
  outline: none; line-height: 1.55;
}
.output-pre {
  margin: 0; white-space: pre-wrap; word-break: break-all;
  min-height: 320px; color: var(--text);
  font-family: var(--mono); font-size: .9rem;
}
.empty { color: var(--text-faint); font-style: italic; }

/* ───── INPUTS ───── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .78rem; color: var(--text-dim); font-weight: 500; }
input[type="text"], input[type="number"], input[type="url"], select, textarea.std {
  width: 100%; padding: 10px 13px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .9rem;
  outline: none; transition: border-color .12s;
}
input:focus, select:focus, textarea.std:focus { border-color: var(--accent); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }

/* ───── SEO BLOCK ───── */
.seo-section {
  margin-top: 56px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.seo-section h2 {
  font-family: var(--display); font-size: 1.4rem;
  margin-bottom: 14px; letter-spacing: -.015em;
  font-weight: 600;
}
.seo-section h3 {
  font-family: var(--display); font-size: 1.05rem;
  margin: 22px 0 8px; font-weight: 600;
  letter-spacing: -.01em;
}
.seo-section p { color: var(--text-dim); margin-bottom: 12px; max-width: 760px; line-height: 1.65; }
.seo-section ul { color: var(--text-dim); padding-left: 20px; margin-bottom: 12px; }
.seo-section ul li { margin-bottom: 6px; }
.seo-section code {
  font-family: var(--mono); font-size: .85em;
  background: var(--surface-2); padding: 2px 6px;
  border-radius: 4px; color: var(--accent);
}
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 8px; overflow: hidden;
  background: var(--surface);
}
.faq-q {
  padding: 14px 16px; cursor: pointer;
  font-weight: 500; font-size: .95rem;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-q::after { content: "+"; font-family: var(--mono); font-size: 1.2rem; color: var(--text-dim); }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a {
  padding: 0 16px; max-height: 0; overflow: hidden;
  color: var(--text-dim); font-size: .92rem;
  transition: all .25s;
}
.faq-item.open .faq-a { padding: 0 16px 14px; max-height: 400px; }

/* ───── EMBED CODE ───── */
.embed-block {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  font-family: var(--mono); font-size: .82rem;
  position: relative; word-break: break-all;
  margin-bottom: 16px;
}
.embed-block .copy-mini {
  position: absolute; top: 8px; right: 8px;
  font-size: .72rem; padding: 4px 8px;
  background: var(--surface-3); border-radius: 4px;
  font-family: var(--sans);
}

/* ───── FOOTER ───── */
.site-footer {
  margin-top: 80px; padding: 48px 24px 32px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer-col h4 {
  font-family: var(--mono); font-size: .76rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-faint); margin-bottom: 12px;
}
.footer-col a {
  display: block; padding: 4px 0;
  font-size: .88rem; color: var(--text-dim);
  transition: color .12s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1280px; margin: 32px auto 0;
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-size: .8rem; color: var(--text-faint);
  flex-wrap: wrap; gap: 12px;
  font-family: var(--mono);
}

/* ───── TOAST ───── */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translate(-50%, 100px);
  background: var(--text); color: var(--bg);
  padding: 11px 20px; border-radius: 8px;
  font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0; transition: all .25s;
  z-index: 200;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ───── SHARE MODAL ───── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px; max-width: 460px; width: 90%;
}
.modal h3 {
  font-family: var(--display); font-size: 1.3rem;
  font-weight: 600; margin-bottom: 14px;
}
.modal-link {
  background: var(--surface-2); padding: 12px;
  border-radius: var(--radius); font-family: var(--mono);
  font-size: .82rem; word-break: break-all;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.modal-share-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───── SCROLLBAR ───── */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: var(--bg); }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ───── ANIMATIONS ───── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.tool-card { animation: fadeUp .35s ease-out backwards; }
.tool-card:nth-child(1) { animation-delay: .02s; }
.tool-card:nth-child(2) { animation-delay: .04s; }
.tool-card:nth-child(3) { animation-delay: .06s; }
.tool-card:nth-child(4) { animation-delay: .08s; }
.tool-card:nth-child(5) { animation-delay: .1s; }
.tool-card:nth-child(6) { animation-delay: .12s; }
.tool-card:nth-child(7) { animation-delay: .14s; }
.tool-card:nth-child(8) { animation-delay: .16s; }
.tool-card:nth-child(9) { animation-delay: .18s; }

/* ───── REGEX HIGHLIGHTING ───── */
.match { background: var(--accent-soft); color: var(--accent); padding: 1px 0; }
.regex-info { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: .8rem; color: var(--text-dim); margin-bottom: 12px; }
.regex-info b { color: var(--accent); }

/* ───── MARKDOWN PREVIEW ───── */
.md-preview { line-height: 1.7; font-family: var(--sans); }
.md-preview h1, .md-preview h2, .md-preview h3 { font-family: var(--display); margin: 1em 0 .4em; }
.md-preview h1 { font-size: 1.7rem; border-bottom: 1px solid var(--border); padding-bottom: .2em; }
.md-preview h2 { font-size: 1.35rem; }
.md-preview h3 { font-size: 1.1rem; }
.md-preview p { margin-bottom: .8em; color: var(--text); }
.md-preview ul, .md-preview ol { margin: 0 0 .8em 1.4em; }
.md-preview code { background: var(--surface-2); padding: 2px 5px; border-radius: 4px; font-family: var(--mono); font-size: .88em; color: var(--accent); }
.md-preview pre { background: var(--surface-2); padding: 12px; border-radius: 6px; overflow-x: auto; margin-bottom: .8em; }
.md-preview pre code { background: transparent; padding: 0; color: var(--text); }
.md-preview blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--text-dim); margin-bottom: .8em; }
.md-preview a { color: var(--accent); text-decoration: underline; }
.md-preview img { max-width: 100%; }

/* ───── COLOR/RANGE INPUTS ───── */
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 4px;
  background: var(--surface-3); border-radius: 2px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  background: var(--accent); border-radius: 50%; cursor: pointer;
}
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }

/* ───── CALCULATOR ───── */
.calc {
  max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; margin: 0 auto;
}
.calc-display {
  background: var(--surface-2); border-radius: var(--radius);
  padding: 16px; min-height: 100px; margin-bottom: 14px;
  text-align: right; word-break: break-all;
}
.calc-display .expr { font-family: var(--mono); font-size: .85rem; color: var(--text-dim); min-height: 1.2em; }
.calc-display .val { font-family: var(--mono); font-size: 2rem; font-weight: 600; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-grid.sci { grid-template-columns: repeat(5, 1fr); }
.calc-btn {
  padding: 14px 0; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: var(--mono); font-size: .95rem; font-weight: 500;
  transition: all .1s;
}
.calc-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.calc-btn.op { color: var(--accent); }
.calc-btn.eq { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); grid-column: span 2; }
.calc-btn.clr { color: var(--danger); }
.calc-toggle { display: flex; gap: 4px; margin-bottom: 12px; }
.calc-toggle button {
  flex: 1; padding: 8px;
  border-radius: var(--radius); font-size: .82rem;
  background: var(--surface-2); border: 1px solid var(--border);
}
.calc-toggle button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ───── IMAGE COMPARE ───── */
.img-preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
@media (max-width: 600px) { .img-preview-row { grid-template-columns: 1fr; } }
.img-box {
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.img-box img { max-width: 100%; max-height: 280px; border-radius: 4px; }
.img-box .meta { font-family: var(--mono); font-size: .78rem; color: var(--text-dim); }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 48px 20px; text-align: center;
  background: var(--surface); transition: all .15s;
  cursor: pointer; margin-bottom: 16px;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone p { color: var(--text-dim); font-size: .92rem; margin-top: 8px; }

/* ───── PASSWORD ───── */
.pw-display {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  font-family: var(--mono); font-size: 1.4rem;
  text-align: center; margin-bottom: 12px;
  word-break: break-all; min-height: 70px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.strength-bar {
  height: 6px; background: var(--surface-2);
  border-radius: 3px; overflow: hidden;
  margin-bottom: 8px;
}
.strength-fill { height: 100%; transition: all .3s; }
.strength-label { font-size: .8rem; font-family: var(--mono); }
.options-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 16px 0;
}
.option-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--surface-2);
  border-radius: var(--radius); cursor: pointer;
  font-size: .88rem;
}

/* ───── QR ───── */
.qr-preview {
  display: flex; justify-content: center; padding: 24px;
  background: white; border-radius: var(--radius);
}
.qr-preview img, .qr-preview svg, .qr-preview canvas { max-width: 100%; }

/* ───── UNIT CONVERTER ───── */
.conv-row {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px;
  align-items: end; margin-bottom: 16px;
}
.conv-arrow {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%; background: var(--surface-2);
  color: var(--accent);
  margin-bottom: 6px;
}
.conv-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px;
}
.conv-tab {
  padding: 7px 14px; border-radius: 999px;
  font-size: .82rem; background: var(--surface);
  border: 1px solid var(--border);
}
.conv-tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
