/* Text Deco Hub — mobile-first dark theme, hand-written (no framework) */
:root {
  --bg: #0f1115;
  --bg-soft: #171a21;
  --bg-card: #1d212b;
  --border: #2a2f3a;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.6rem; line-height: 1.3; margin: 24px 0 8px; }
h2 { font-size: 1.25rem; margin: 28px 0 10px; }
h3 { font-size: 1.05rem; margin: 18px 0 8px; color: var(--muted); }
.lede { color: var(--muted); margin: 0 0 18px; }

/* header / nav */
.site-header { background: var(--bg-soft); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
.logo { font-weight: 700; color: var(--text); font-size: 1.05rem; }
.nav a { color: var(--muted); margin-left: 14px; font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* cards on home */
.tool-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 20px 0; }
@media (min-width: 640px) { .tool-cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; color: var(--text);
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card h2 { margin-top: 0; font-size: 1.1rem; }
.card p { color: var(--muted); font-size: .92rem; margin: 0 0 10px; }
.card-cta { color: var(--accent-2); font-size: .9rem; }

/* tool UI */
.tool-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 16px 0 24px; }
.tool-box input[type="text"], .tool-box textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  outline: none;
}
.tool-box input[type="text"]:focus, .tool-box textarea:focus { border-color: var(--accent); }
.tool-hint { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }

.result-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.result-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px;
}
.result-label { color: var(--muted); font-size: .75rem; min-width: 92px; flex-shrink: 0; }
.result-text { flex: 1; font-size: 1.15rem; overflow-wrap: anywhere; }
.copy-btn {
  flex-shrink: 0; background: var(--accent); color: #fff; border: 0;
  border-radius: 6px; padding: 7px 14px; font-size: .85rem; cursor: pointer;
}
.copy-btn:hover { filter: brightness(1.15); }
.copy-btn:active { transform: scale(.96); }

/* symbol grid */
.symbol-box { display: flex; flex-wrap: wrap; gap: 6px; }
.symbol {
  min-width: 40px; height: 40px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 1.2rem; cursor: pointer;
}
.symbol:hover { border-color: var(--accent-2); }
.symbol:active { transform: scale(.92); }

/* matrix dir */
.matrix-dir ul { columns: 1; padding-left: 18px; }
@media (min-width: 640px) { .matrix-dir ul { columns: 2; } }
.matrix-dir h3 { margin-top: 16px; }
.related ul { padding-left: 18px; }

/* faq */
.faq details { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 8px 0; background: var(--bg-card); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 8px 0 2px; }

/* how-to */
.how-to ol { padding-left: 20px; }
.how-to li { margin: 6px 0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: #fff; padding: 10px 22px; border-radius: 24px;
  font-size: .9rem; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 0 32px; color: var(--muted); font-size: .85rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ad slots (reserved placeholders, no code yet) */
.ad-slot { min-height: 90px; margin: 24px 0; border: 1px dashed var(--border); border-radius: var(--radius); }

/* lenny faces / kaomoji */
.face-box { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.face {
  padding: 8px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 1rem; cursor: pointer; white-space: nowrap;
}
.face:hover { border-color: var(--accent-2); }
.face:active { transform: scale(.94); }

/* text art */
.art-piece { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 12px 0; background: var(--bg); }
.art-pre {
  margin: 0 0 10px; overflow-x: auto; white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95rem; line-height: 1.35; color: var(--text);
}
.aesthetic-links { list-style: none; padding-left: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.aesthetic-links li { margin: 0; }
.aesthetic-links a {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 20px; background: var(--bg-card);
}
.aesthetic-links a:hover { border-color: var(--accent); text-decoration: none; }

/* AdSense ad wrappers (2026-10-22) — min-height reserves space, prevents CLS */
.adwrap{min-height:280px;margin:24px 0;display:flex;justify-content:center}
@media(max-width:600px){.adwrap{min-height:120px}}
.adwrap ins.adsbygoogle{display:block!important;width:100%!important}

/* character map tables (2026-10-25) — per-style letter/digit coverage */
.charmap {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px; margin: 10px 0 18px;
}
.cm {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 2px; min-height: 56px; overflow: hidden;
}
.cm b { color: var(--muted); font-size: .7rem; font-weight: 600; line-height: 1; }
.cm i { font-style: normal; font-size: 1.1rem; line-height: 1.4; overflow-wrap: anywhere; text-align: center; }
.cm-off { opacity: .38; }
.cm-off i { font-size: .95rem; }

/* measured data tables (2026-10-25) — text art layout, style coverage */
.chartable {
  width: 100%; border-collapse: collapse; margin: 12px 0 18px;
  font-size: .88rem; background: var(--bg-card); border-radius: 8px; overflow: hidden;
}
.chartable th, .chartable td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border);
}
.chartable th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.chartable tbody tr:last-child td { border-bottom: 0; }
.chartable td:nth-child(n+2) { color: var(--muted); white-space: nowrap; }
