/* ═══════════════════════════════════════════════════════
   Unicode Index — styles.css
   Theme: Emerald & Violet (dark)
   ═══════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────── */
:root {
  --bg-void: #080e0c;
  --bg-deep: #0c1512;
  --bg-surface: #141e1a;
  --bg-card: rgba(45 212 168 / 0.04);
  --bg-card-hover: rgba(45 212 168 / 0.08);
  --bg-glass: rgba(8 14 12 / 0.94);

  --accent: #2dd4a8;
  --accent-dim: #22b892;
  --green: #2dd4a8;
  --red: #f85149;
  --yellow: #d29922;
  --purple: #8b5cf6;

  --text-1: rgba(240 240 255 / 0.95);
  --text-2: rgba(160 165 180 / 1);
  --text-3: rgba(100 105 120 / 1);

  --border-subtle: #1a2b25;
  --border-mid: #253530;
  --border-focus: rgba(45 212 168 / 0.5);

  --header-h: 64px;
  --filter-h: 48px;

  --radius-card: 12px;
  --radius-pill: 999px;

  --transition-fast: 0.12s ease;
  --transition-smooth: 0.2s ease;
  --transition-panel: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base ───────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", system-ui,
    sans-serif;
  background: var(--bg-void);
  background-image: radial-gradient(
    ellipse 60% 50% at 50% 0%,
    rgba(45 212 168 / 0.06) 0%,
    transparent 70%
  );
  background-attachment: fixed;
  color: var(--text-1);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8 14 12 / 0.8);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  border-bottom: 1px solid rgba(45 212 168 / 0.08);
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-1);
}

.logo-accent {
  color: var(--accent);
}

.logo-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Search */
.search-wrap {
  flex: 1;
  position: relative;
  max-width: 600px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255 255 255 / 0.03);
  border: 1px solid rgba(255 255 255 / 0.06);
  border-radius: var(--radius-pill);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-smooth);
}

.search-box:focus-within {
  border-color: rgba(45, 212, 168, 0.4);
  box-shadow:
    0 0 0 3px rgba(45, 212, 168, 0.1),
    0 0 20px rgba(45, 212, 168, 0.06);
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-3);
  pointer-events: none;
  transition: color var(--transition-fast);
}
.search-box:focus-within .search-icon {
  color: var(--accent);
}

.search-kbd {
  position: absolute;
  right: 10px;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 11px;
  color: var(--text-3);
  background: rgba(255 255 255 / 0.06);
  border: 1px solid rgba(255 255 255 / 0.1);
  border-radius: 4px;
  padding: 2px 6px;
  pointer-events: none;
  transition: opacity 0.15s;
  user-select: none;
}
.search-box:focus-within .search-kbd {
  opacity: 0;
}
.search-input:not(:placeholder-shown) ~ .search-kbd {
  opacity: 0;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-1);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  padding: 11px 40px 11px 46px;
  caret-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-clear {
  position: absolute;
  right: 10px;
  background: rgba(255 255 255 / 0.08);
  border: 1px solid rgba(255 255 255 / 0.1);
  color: var(--text-3);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}
.search-clear[hidden] {
  display: none;
}
.search-clear:hover {
  background: rgba(248, 81, 73, 0.15);
  border-color: rgba(248, 81, 73, 0.3);
  color: var(--red);
}

/* ── Filter Bar ─────────────────────────────────────── */
.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  height: var(--filter-h);
  background: rgba(12 21 18 / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255 255 255 / 0.04);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.filter-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 24px;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255 255 255 / 0.06);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.filter-chip:hover {
  border-color: rgba(255 255 255 / 0.12);
  color: var(--text-1);
  background: rgba(255 255 255 / 0.04);
}

.filter-chip.active {
  background: rgba(45, 212, 168, 0.12);
  border-color: rgba(45, 212, 168, 0.3);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(45, 212, 168, 0.08);
}

.filter-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.filter-fade-r {
  position: absolute;
  right: 140px;
  top: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--bg-deep));
  pointer-events: none;
}

.filter-fade-l {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to left, transparent, var(--bg-deep));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 1;
}
.filter-fade-l.visible {
  opacity: 1;
}

.results-badge {
  flex-shrink: 0;
  padding: 0 20px 0 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  border-left: 1px solid var(--border-subtle);
  height: 100%;
  display: flex;
  align-items: center;
  background: var(--bg-deep);
}

#resultCount {
  color: var(--accent);
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 13px;
  font-weight: 500;
  margin-right: 4px;
}

/* ── Main content ────────────────────────────────────── */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── Section Headers ────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 16px;
}

.section-header:first-child {
  margin-top: 0;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-line {
  flex: 1;
  height: 1px;
  background: rgba(255 255 255 / 0.04);
}

.section-count {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
}

/* ── Character Grid ──────────────────────────────────── */
.char-grid {
  /* sections each contain a .char-group */
}

.char-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

/* ── Character Card ──────────────────────────────────── */
.char-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
  aspect-ratio: 1;
  background: rgba(255 255 255 / 0.02);
  border: 1px solid rgba(255 255 255 / 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 76px 76px;
  user-select: none;
}

.char-card:hover {
  background: rgba(255 255 255 / 0.05);
  border-color: rgba(255 255 255 / 0.1);
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 12px rgba(45, 212, 168, 0.06);
  z-index: 2;
}

.char-card:active {
  transform: translateY(0) scale(0.98);
}

.char-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.char-card.is-active {
  background: rgba(45, 212, 168, 0.1);
  border-color: rgba(45, 212, 168, 0.35);
  box-shadow: 0 0 0 2px rgba(45, 212, 168, 0.2);
}

.char-glyph {
  font-size: 22px;
  line-height: 1;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  letter-spacing: 0;
}

.char-glyph.is-control {
  font-size: 9px;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-weight: 600;
  color: var(--red);
  background: rgba(248, 81, 73, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.char-hex {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 9px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.3px;
  line-height: 1;
}

.char-name {
  font-size: 7.5px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.1px;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
  opacity: 0.7;
}

/* ── Detail Panel ────────────────────────────────────── */
.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8 14 12 / 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-panel);
}
.detail-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 210;
  width: min(400px, 95vw);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  transform: translateX(100%);
  transition: transform var(--transition-panel);
  overflow: hidden;
}

.detail-panel[aria-hidden="false"] {
  transform: translateX(0);
}

.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 32px;
  height: 32px;
  background: rgba(255 255 255 / 0.07);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}
.detail-close:hover {
  background: rgba(248, 81, 73, 0.12);
  color: var(--red);
}

.detail-inner {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  padding: 56px 28px 24px;
}

/* Detail — character hero */
.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 0 28px;
  margin-bottom: 28px;
  position: relative;
}

.detail-hero-glyph-wrap {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255 255 255 / 0.03);
  border: 1px solid rgba(255 255 255 / 0.06);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(45, 212, 168, 0.05);
}

.detail-hero-glyph {
  font-size: 72px;
  line-height: 1;
}

.detail-hero-glyph.is-control {
  font-size: 20px;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-weight: 600;
  color: var(--red);
}

.detail-hero-name {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  max-width: 280px;
}

.detail-hero-block {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255 255 255 / 0.04);
}

/* Detail — info rows */
.detail-section {
  margin-bottom: 24px;
}

.detail-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255 255 255 / 0.02);
  border: 1px solid rgba(255 255 255 / 0.05);
  border-radius: 10px;
  margin-bottom: 5px;
  transition: background var(--transition-fast);
}
.detail-row:hover {
  background: rgba(255 255 255 / 0.05);
}

.detail-row-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  width: 80px;
  flex-shrink: 0;
}

.detail-row-value {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-copy-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(45, 212, 168, 0.07);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}
.detail-copy-btn:hover {
  background: rgba(45, 212, 168, 0.14);
  color: var(--accent);
}
.detail-copy-btn:active {
  background: rgba(45, 212, 168, 0.2);
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  letter-spacing: 0.5px;
}

/* Detail — nav footer */
.detail-nav {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-glass);
}

.detail-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.detail-nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-mid);
  color: var(--text-1);
}
.detail-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 16px));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 500;
  background: rgba(20 30 26 / 0.95);
  border: 1px solid rgba(45, 212, 168, 0.2);
  border-radius: var(--radius-card);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  white-space: nowrap;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(45, 212, 168, 0.06);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.2s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Empty state ──────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  opacity: 0.15;
  font-family: serif;
  line-height: 1;
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-2);
}

.empty-sub {
  font-size: 14px;
  color: var(--text-3);
  max-width: 320px;
  line-height: 1.6;
}
.empty-sub code {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  color: var(--accent);
  background: rgba(45, 212, 168, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ── Load sentinel ────────────────────────────────────── */
.load-sentinel {
  height: 80px;
}

/* ── Category colors ─────────────────────────────────── */
.cat-Lu,
.cat-Ll,
.cat-Lt,
.cat-Lm,
.cat-Lo {
  --cat-bg: rgba(45, 212, 168, 0.12);
  --cat-fg: #2dd4a8;
  --cat-border: rgba(45, 212, 168, 0.25);
}
.cat-Mn,
.cat-Mc,
.cat-Me {
  --cat-bg: rgba(210, 153, 34, 0.12);
  --cat-fg: #d29922;
  --cat-border: rgba(210, 153, 34, 0.25);
}
.cat-Nd,
.cat-Nl,
.cat-No {
  --cat-bg: rgba(52, 211, 153, 0.12);
  --cat-fg: #34d399;
  --cat-border: rgba(52, 211, 153, 0.25);
}
.cat-Ps,
.cat-Pe,
.cat-Pi,
.cat-Pf,
.cat-Pd,
.cat-Pc,
.cat-Po {
  --cat-bg: rgba(139, 148, 158, 0.12);
  --cat-fg: #8b949e;
  --cat-border: rgba(139, 148, 158, 0.25);
}
.cat-Sm,
.cat-Sc,
.cat-Sk,
.cat-So {
  --cat-bg: rgba(139, 92, 246, 0.12);
  --cat-fg: #8b5cf6;
  --cat-border: rgba(139, 92, 246, 0.25);
}
.cat-Zs,
.cat-Zl,
.cat-Zp {
  --cat-bg: rgba(110, 118, 129, 0.12);
  --cat-fg: #6e7681;
  --cat-border: rgba(110, 118, 129, 0.25);
}
.cat-Cc,
.cat-Cf,
.cat-Cs,
.cat-Co,
.cat-Cn {
  --cat-bg: rgba(248, 81, 73, 0.12);
  --cat-fg: #f85149;
  --cat-border: rgba(248, 81, 73, 0.25);
}

.cat-badge {
  background: var(--cat-bg, rgba(255, 255, 255, 0.08));
  color: var(--cat-fg, var(--text-2));
  border-color: var(--cat-border, var(--border-subtle));
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ── Animations ────────────────────────────────────────── */
/* (intentionally minimal — no decorative enter animations) */
/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
    --filter-h: 44px;
  }

  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .logo-sub {
    display: none;
  }

  .main-content {
    padding: 20px 12px 60px;
  }

  .char-group {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 5px;
  }

  .detail-panel {
    width: 100vw;
  }
}

@media (max-width: 480px) {
  .logo-title {
    font-size: 16px;
  }

  .char-group {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 4px;
  }

  .search-input {
    font-size: 14px;
  }

  .filter-fade-r {
    right: 100px;
  }
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ── About button ─────────────────────────────────────── */
.about-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: rgba(255 255 255 / 0.03);
  border: 1px solid rgba(255 255 255 / 0.1);
  border-radius: var(--radius-pill);
  cursor: pointer;
  overflow: hidden;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

/* Shimmer sweep */
.about-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(45 212 168 / 0.12) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.45s ease;
  pointer-events: none;
  border-radius: inherit;
}
.about-btn:hover::before {
  transform: translateX(100%);
}

.about-btn:hover {
  color: var(--accent);
  background: rgba(45 212 168 / 0.06);
  border-color: rgba(45 212 168 / 0.32);
  box-shadow: 0 0 18px rgba(45 212 168 / 0.1), 0 2px 8px rgba(0 0 0 / 0.3);
  transform: translateY(-1px);
}
.about-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: none;
}

.about-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── About modal ──────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-backdrop.visible {
  display: block;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 201;
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: #111c17;
  border: 1px solid rgba(45 212 168 / 0.14);
  border-radius: 20px;
  padding: 40px 36px 36px;
  color: var(--text-1);
  box-shadow: 0 24px 60px rgba(0 0 0 / 0.7), 0 0 0 1px rgba(255 255 255 / 0.04);
  /* Reset <dialog> default styles */
  max-width: none;
}
.about-modal:not([open]) { display: none; }
.about-modal::backdrop { display: none; } /* we use our own */

.about-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255 255 255 / 0.05);
  border: 1px solid rgba(255 255 255 / 0.08);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-3);
  transition: color 0.15s, background 0.15s;
}
.about-modal-close:hover { color: var(--text-1); background: rgba(255 255 255 / 0.1); }
.about-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.about-modal-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.about-modal-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
  margin: 0 0 8px;
}
.about-modal-tagline {
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
  margin: 0 0 28px;
  line-height: 1.6;
}

.about-stat-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.about-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  background: rgba(255 255 255 / 0.03);
  border: 1px solid rgba(255 255 255 / 0.07);
  border-radius: 14px;
}
.about-stat-num {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

.about-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.about-feat-icon {
  font-size: 16px;
  line-height: 1.4;
  flex-shrink: 0;
  color: var(--accent);
}
.about-feature-list code {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 12px;
  background: rgba(255 255 255 / 0.07);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
}

.about-modal-source {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  margin: 0;
  line-height: 1.6;
}
.about-modal-source a {
  color: var(--accent);
  text-decoration: none;
}
.about-modal-source a:hover { text-decoration: underline; }
.about-modal-source a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
  text-decoration: underline;
}

/* ── Hero glyph copyable ──────────────────────────────── */
.detail-hero-glyph-copyable {
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.detail-hero-glyph-copyable:hover {
  background: rgba(45 212 168 / 0.06);
  transform: scale(1.04);
}
.detail-hero-glyph-copyable:active,
.detail-hero-glyph-copyable.copied {
  transform: scale(0.96);
  background: rgba(45 212 168 / 0.12);
}
.detail-hero-glyph-copyable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.detail-hero-copy-hint {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  white-space: nowrap;
}
.detail-hero-glyph-copyable:hover .detail-hero-copy-hint {
  opacity: 1;
}
