/* Typografie-Zeichen — Striche, Abstände & Sonderzeichen
   Shared chrome: ../assets/css/tool-chrome.css
   Tool palette + widgets only. Slate/ink palette (print/type themed,
   distinct from the Thai study-journal jade/saffron palette). */

:root {
  --paper: #f6f5f2;
  --paper-raised: #ffffff;
  --ink: #201f1c;
  --ink-soft: #5c584f;
  --ink-faint: #8b867a;
  --rule: #e2ded4;
  --rule-strong: #cdc7b8;

  --accent: #2b4a5e;
  --accent-soft: #dde6ea;

  --focus-ring: #2b4a5e;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 2px rgba(32, 31, 28, 0.06), 0 12px 32px -18px rgba(32, 31, 28, 0.35);

  --ctrl-h: 2.1rem;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #191815;
  --paper-raised: #211f1b;
  --ink: #f2efe6;
  --ink-soft: #c3bcac;
  --ink-faint: #8b8577;
  --rule: #33312b;
  --rule-strong: #46433a;

  --accent: #7ea3b8;
  --accent-soft: #26343c;

  --focus-ring: #7ea3b8;
  color-scheme: dark;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

/* .char-tile extends the shared .study-tile card (tool-chrome.css) with a
   taller layout: glyph, name, codepoint, description, usage — all visible
   at once (no detail panel/dialog, this tool is deliberately flatter than
   thai-alphabet). */
.char-tile {
  min-height: 8.5rem;
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  text-align: left;
}

.char-tile__glyph {
  font-size: 1.9rem;
  font-family: var(--font-serif, serif);
  min-height: 2.2rem;
  display: flex;
  align-items: center;
}

.char-tile__code-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-left: 0.1rem;
}

.char-tile__desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.char-tile__usage {
  font-size: 0.74rem;
  color: var(--ink-faint);
  line-height: 1.35;
  margin-top: auto;
  padding-top: 0.35rem;
}

/* Space-character visual swatch: a proportional bar between two markers so
   an otherwise invisible character has a legible on-screen representation.
   Purely decorative, aria-hidden via the parent glyph text content. */
.space-swatch {
  display: inline-flex;
  align-items: center;
  height: 1.1rem;
  padding: 0 0.15rem;
  border-left: 1px solid var(--rule-strong);
  border-right: 1px solid var(--rule-strong);
}

.space-swatch__bar {
  display: inline-block;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Copy-confirmation toast (bottom-center, fades in/out). Motion limited to
   transform/opacity, disabled entirely under prefers-reduced-motion. */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 0.4rem);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 40;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .copy-toast { transition: opacity 0.01ms linear; }
}

@media (max-width: 640px) {
  .char-grid { grid-template-columns: 1fr; }
}
