:root {
  --bg: #09090c;
  --surface: #121218;
  --surface-hover: #1b1b24;
  --border: #262633;
  --border-strong: #3a3a4d;
  --text: #f4f4f7;
  --text-muted: #9b9bad;
  --lime: #c6ff4d;
  --lime-ink: #0a0c04;
  --pink: #ff4d8d;
  --cyan: #4de2ff;
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(198, 255, 77, 0.08), transparent 60%),
    radial-gradient(700px 380px at 8% 12%, rgba(255, 77, 141, 0.07), transparent 55%),
    var(--bg);
  line-height: 1.5;
  padding-bottom: 112px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--lime);
  color: var(--lime-ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 60;
}

.skip-link:focus {
  left: 12px;
}

.faq-section {
  margin-top: 32px;
  display: grid;
  gap: 8px;
}

.faq-section h2 {
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--text-muted);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}

.faq-item p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(9, 9, 12, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--lime);
  border: 1px solid rgba(198, 255, 77, 0.35);
  padding: 2px 7px;
  border-radius: 999px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.nav a.nav-cop {
  color: var(--lime);
  border-color: rgba(198, 255, 77, 0.3);
}

.nav a.nav-cop[aria-current="page"],
.nav a.nav-cop:hover {
  background: var(--lime);
  color: var(--lime-ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: end;
  padding: 36px 0 24px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 58ch;
  font-size: 1rem;
}

.hero-stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-k {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lime);
}

.stat-l {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-wrap {
  flex: 1 1 240px;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
}

.search-input:focus {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
  border-color: var(--lime);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  appearance: none;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chip[aria-pressed="true"] {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
}

.chip.chip-pink[aria-pressed="true"] {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.section-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.tile {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: transform 0.12s ease, border-color 0.14s ease, background 0.14s ease;
}

.tile:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.tile:active {
  transform: scale(0.98);
}

.tile.just-copied {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime);
}

.tile-glyph {
  font-size: 1.5rem;
  line-height: 1.3;
  word-break: break-word;
}

.tile-glyph.is-symbol {
  font-size: 1.15rem;
  font-family: var(--font-sans);
}

.tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tile-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-actions {
  display: flex;
  gap: 4px;
}

.mini-btn {
  appearance: none;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
}

.mini-btn:hover,
.mini-btn.active {
  color: var(--lime);
  border-color: var(--lime);
}

/* Bio Decorator & EmoCop panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 22px;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.panel-sub {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.textarea {
  width: 100%;
  min-height: 92px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.textarea:focus {
  outline: 2px solid var(--lime);
  border-color: var(--lime);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
}

.btn-pink {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.btn:hover {
  filter: brightness(1.06);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.cop-report {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
  align-items: start;
}

.cop-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.cop-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 77, 141, 0.18);
  color: var(--pink);
  border: 1px solid rgba(255, 77, 141, 0.45);
  margin-bottom: 8px;
}

.cop-badge.clean {
  background: rgba(198, 255, 77, 0.14);
  color: var(--lime);
  border-color: rgba(198, 255, 77, 0.4);
}

.cop-translated {
  font-size: 1.2rem;
  margin: 10px 0 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  word-break: break-word;
}

.violation-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.ticket-canvas {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  display: block;
}

/* Floating Combo Tray */
.dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  background: rgba(18, 18, 24, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 40;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.dock-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 1.05rem;
  font-family: inherit;
}

.toast {
  position: fixed;
  top: 76px;
  right: 20px;
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.seo-links {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.seo-links h2 {
  font-size: 0.95rem;
  margin: 0 0 12px;
  color: var(--text-muted);
}

.pill-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 999px;
}

.pill-links a:hover {
  color: var(--lime);
  border-color: var(--lime);
}

.site-footer {
  margin-top: 36px;
  padding: 20px 0 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.preset-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-right: 4px;
}

@media (max-width: 780px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }
  .cop-report {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  }
}

@media (max-width: 520px) {
  .wrap {
    padding: 0 14px;
  }
  .topbar-inner {
    gap: 8px;
  }
  .brand {
    font-size: 1.02rem;
    gap: 8px;
  }
  .nav a {
    padding: 6px 10px;
    font-size: 0.82rem;
  }
  .hero-stat-box {
    padding: 12px 14px;
    gap: 8px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
  .dock {
    width: calc(100% - 16px);
    padding: 8px;
    gap: 6px;
  }
  .dock .btn {
    padding: 8px 11px;
    font-size: 0.84rem;
  }
}

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