:root {
  /* Deep space backgrounds */
  --bg: #08041a;
  --bg-elev: #140a2e;
  --bg-card: #1a0f38;
  --bg-card-open: #251646;

  /* Cosmic text — slight lavender white */
  --text: #ece5f7;
  --text-dim: #9b8db8;
  --text-soft: #c8bcde;

  /* Neon purple borders */
  --border: #2e1f52;
  --border-strong: #4d3585;

  /* Neon negative — hot pink */
  --neg-accent: #ff6b9d;
  --neg-accent-soft: rgba(255, 107, 157, 0.14);
  --neg-flip: #ffd93d;

  /* Neon positive — cyan-teal */
  --pos-accent: #5eead4;
  --pos-accent-soft: rgba(94, 234, 212, 0.14);
  --pos-flip: #ff6b9d;

  /* Brand neon purple */
  --neon: #b768ff;
  --neon-soft: rgba(183, 104, 255, 0.14);
  --neon-glow: rgba(183, 104, 255, 0.45);
  --neon-deep: #7c3aed;

  --shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 200ms ease;
}

* { box-sizing: border-box; }

/* Custom scrollbars — match the cosmic palette everywhere they appear. */
/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 104, 255, 0.45) rgba(10, 4, 30, 0.4);
}
/* WebKit (Chrome, Edge, Safari, Opera, in-app browsers) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
  background: rgba(10, 4, 30, 0.4);
  border-left: 1px solid var(--border);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(183, 104, 255, 0.55), rgba(124, 58, 237, 0.55));
  border: 2px solid rgba(10, 4, 30, 0.6);
  border-radius: 999px;
  box-shadow: inset 0 0 6px rgba(183, 104, 255, 0.35);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(183, 104, 255, 0.85), rgba(255, 107, 157, 0.65));
  box-shadow: inset 0 0 8px rgba(183, 104, 255, 0.55), 0 0 8px rgba(183, 104, 255, 0.35);
}
::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, var(--neon), var(--neg-accent));
}
::-webkit-scrollbar-corner { background: transparent; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

html {
  background: #050210;
}

body {
  background:
    radial-gradient(ellipse 1200px 800px at 15% 20%, rgba(124, 58, 237, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 1000px 700px at 85% 75%, rgba(236, 72, 153, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 900px 900px at 50% 110%, rgba(79, 70, 229, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 700px 700px at 70% 10%, rgba(183, 104, 255, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0a041e 0%, #07021a 50%, #050210 100%);
  background-attachment: fixed;
}

/* Galaxy canvas — drifting starfield behind everything */
.galaxy-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Make sure content sits above the galaxy */
body > * { position: relative; z-index: 1; }
.galaxy-bg { z-index: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Site navigation — two-tier (categories + sub-pages) */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 4, 30, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(183, 104, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 28px;
  gap: 32px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(135deg, #ece5f7 0%, #b768ff 50%, #ff6b9d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(183, 104, 255, 0.25);
  transition: filter var(--transition);
}

.brand:hover { filter: brightness(1.15) drop-shadow(0 0 10px rgba(183, 104, 255, 0.4)); }

.nav-categories {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-start;
  flex: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.lang-switcher {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  background: rgba(10, 4, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(10, 4, 30, 0.5);
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.download-btn:hover {
  color: var(--text);
  background: rgba(183, 104, 255, 0.10);
  border-color: rgba(183, 104, 255, 0.45);
  box-shadow: 0 0 14px rgba(183, 104, 255, 0.25);
}

.download-modal[hidden] { display: none; }

.download-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.download-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 1, 16, 0.78);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}

.download-modal-card {
  position: relative;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(28, 12, 60, 0.96), rgba(14, 4, 38, 0.98));
  border: 1px solid rgba(183, 104, 255, 0.35);
  border-radius: 16px;
  padding: 28px 26px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(183, 104, 255, 0.15);
  animation: modalIn 220ms ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.download-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  transition: all var(--transition);
}
.download-modal-close:hover { color: var(--text); border-color: var(--border); }

.download-modal h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ece5f7 0%, #b768ff 60%, #ff6b9d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.download-modal-lede {
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.download-options {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.download-option {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label size"
    "desc  desc"
    "cta   cta";
  gap: 4px 12px;
  padding: 16px 18px;
  background: rgba(10, 4, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.download-option:hover {
  border-color: rgba(183, 104, 255, 0.55);
  background: rgba(20, 8, 46, 0.7);
  box-shadow: 0 0 24px rgba(183, 104, 255, 0.18);
}

.download-option-label {
  grid-area: label;
  font-weight: 600;
  color: var(--text);
  font-size: 1.02rem;
}
.download-option-size {
  grid-area: size;
  align-self: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.download-option-desc {
  grid-area: desc;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}
.download-option-cta {
  grid-area: cta;
  justify-self: start;
  margin-top: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text);
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.22), rgba(255, 107, 157, 0.15));
  border: 1px solid rgba(183, 104, 255, 0.45);
  border-radius: 999px;
}

.download-modal-foot {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-align: center;
}
.download-modal-foot code {
  background: rgba(10, 4, 30, 0.6);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 3px 8px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  transition: all var(--transition);
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.30), rgba(255, 107, 157, 0.20));
  box-shadow: 0 0 12px rgba(183, 104, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-cat {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  padding: 8px 18px;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  position: relative;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
  letter-spacing: 0.02em;
}

.nav-cat:hover {
  color: var(--text);
  background: rgba(183, 104, 255, 0.08);
  border-color: rgba(183, 104, 255, 0.18);
}

.nav-cat.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.22), rgba(255, 107, 157, 0.15));
  border-color: rgba(183, 104, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.18),
    0 0 24px rgba(183, 104, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-sub {
  border-top: 1px solid var(--border);
  padding: 10px 28px;
  background: #14082e;
}

.nav-sub.collapsed { display: none; }

.sub-row {
  display: none;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-start;
  animation: subFadeIn 260ms ease;
}

.sub-row.active {
  display: flex;
}

@keyframes subFadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-link {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 999px;
  position: relative;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(183, 104, 255, 0.06);
}

.nav-link.active {
  color: var(--text);
  background: rgba(183, 104, 255, 0.16);
  border-color: rgba(183, 104, 255, 0.35);
  box-shadow: 0 0 14px rgba(183, 104, 255, 0.22);
}

/* View switching */
.view {
  display: none;
  animation: viewFadeIn 360ms ease;
}

.view.active {
  display: block;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  padding: 64px 24px 36px;
  text-align: center;
  background:
    radial-gradient(ellipse 800px 300px at 50% 0%, rgba(183, 104, 255, 0.10) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 10, 46, 0.5) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  background: linear-gradient(135deg, #ece5f7 0%, #d3b5ff 40%, #ff9ec7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(183, 104, 255, 0.18);
}

.subtitle {
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.controls {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

#search {
  width: 100%;
  max-width: 420px;
  padding: 10px 16px;
  background: rgba(20, 10, 46, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

#search::placeholder { color: var(--text-dim); }

#search:focus {
  border-color: rgba(183, 104, 255, 0.55);
  background: rgba(28, 15, 56, 0.75);
  box-shadow: 0 0 20px rgba(183, 104, 255, 0.18);
}

.filters {
  display: flex;
  gap: 6px;
}

.filter-btn {
  background: rgba(20, 10, 46, 0.6);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text);
  border-color: rgba(183, 104, 255, 0.4);
  background: rgba(183, 104, 255, 0.08);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.25), rgba(255, 107, 157, 0.18));
  color: var(--text);
  border-color: rgba(183, 104, 255, 0.55);
  box-shadow: 0 0 18px rgba(183, 104, 255, 0.25);
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.sort-control label {
  letter-spacing: 0.02em;
}

#sort {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(20, 10, 46, 0.6);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 30px 6px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%23b768ff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
}

#sort:hover,
#sort:focus {
  border-color: rgba(183, 104, 255, 0.45);
  box-shadow: 0 0 14px rgba(183, 104, 255, 0.15);
}

#sort option {
  background: #14082a;
  color: var(--text);
}

.counts {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.counts .sep {
  margin: 0 8px;
  opacity: 0.5;
}

.scale-note {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.scale-note strong {
  color: var(--text-soft);
  font-weight: 500;
}

/* Columns */
.columns {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 36px 24px 48px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.column h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.column h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.negative-column h2::before {
  background: var(--neg-accent);
  box-shadow: 0 0 12px var(--neg-accent);
}
.positive-column h2::before {
  background: var(--pos-accent);
  box-shadow: 0 0 12px var(--pos-accent);
}

.column-hint {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin: 0 0 18px;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Card */
.card {
  background: linear-gradient(180deg, rgba(26, 15, 56, 0.85), rgba(20, 10, 46, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card:hover {
  background: linear-gradient(180deg, rgba(37, 22, 70, 0.9), rgba(28, 15, 56, 0.9));
  border-color: rgba(183, 104, 255, 0.35);
  box-shadow: 0 0 18px rgba(183, 104, 255, 0.12);
}

.card.open {
  background: linear-gradient(180deg, rgba(37, 22, 70, 0.95), rgba(28, 15, 56, 0.95));
  border-color: rgba(183, 104, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.15),
    0 0 32px rgba(183, 104, 255, 0.18),
    var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.card-toggle {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: transform var(--transition);
  user-select: none;
}

.card.open .card-toggle {
  transform: rotate(180deg);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hz badge — frequency-based color coding (Hawkins Map) — neon glow variant */
.hz-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
  background: rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  transition: opacity var(--transition);
}

.hz-badge[data-band="deep-low"]  { color: #ff5c8a; background: rgba(255, 92, 138, 0.10); box-shadow: 0 0 8px rgba(255, 92, 138, 0.25); }
.hz-badge[data-band="low"]       { color: #ff8060; background: rgba(255, 128, 96, 0.10); box-shadow: 0 0 8px rgba(255, 128, 96, 0.22); }
.hz-badge[data-band="mid-low"]   { color: #ffb84d; background: rgba(255, 184, 77, 0.10); box-shadow: 0 0 8px rgba(255, 184, 77, 0.22); }
.hz-badge[data-band="threshold"] { color: #ffd93d; background: rgba(255, 217, 61, 0.16); box-shadow: 0 0 16px rgba(255, 217, 61, 0.45); }
.hz-badge[data-band="mid-high"]  { color: #a0d873; background: rgba(160, 216, 115, 0.10); box-shadow: 0 0 8px rgba(160, 216, 115, 0.22); }
.hz-badge[data-band="high"]      { color: #5dd882; background: rgba(93, 216, 130, 0.12); box-shadow: 0 0 10px rgba(93, 216, 130, 0.28); }
.hz-badge[data-band="very-high"] { color: #5eead4; background: rgba(94, 234, 212, 0.12); box-shadow: 0 0 12px rgba(94, 234, 212, 0.32); }
.hz-badge[data-band="peace"]     { color: #67e8f9; background: rgba(103, 232, 249, 0.14); box-shadow: 0 0 14px rgba(103, 232, 249, 0.38); }

.card-body {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}

.card.open .card-body {
  display: block;
  animation: fadeIn 220ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.definition {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.flip-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.negative-column .flip-label {
  background: var(--neg-accent-soft);
  color: var(--neg-flip);
}

.positive-column .flip-label {
  background: var(--pos-accent-soft);
  color: var(--pos-flip);
}

.flip-text {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0;
}

/* Pair link */
.pair-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 12px 8px 14px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition), transform var(--transition);
  font-family: inherit;
  letter-spacing: 0.01em;
}

.pair-link:hover {
  color: var(--text);
  border-color: rgba(183, 104, 255, 0.5);
  background: rgba(183, 104, 255, 0.08);
  transform: translateX(2px);
  box-shadow: 0 0 14px rgba(183, 104, 255, 0.18);
}

.pair-direction {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  opacity: 0.7;
}

.negative-column .pair-direction { color: var(--pos-accent); }
.positive-column .pair-direction { color: var(--neg-accent); }

.pair-name {
  font-weight: 500;
  color: var(--text);
}

.pair-arrow {
  font-size: 0.9rem;
  opacity: 0.5;
  transition: transform var(--transition), opacity var(--transition);
}

.pair-link:hover .pair-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* Pulse highlight when navigated to */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 var(--pulse-color, rgba(183, 104, 255, 0.55)),
                0 0 32px var(--pulse-color, rgba(183, 104, 255, 0.4)),
                var(--shadow);
    border-color: var(--pulse-border, rgba(183, 104, 255, 0.7));
  }
  60% {
    box-shadow: 0 0 0 18px rgba(183, 104, 255, 0),
                0 0 20px rgba(183, 104, 255, 0.1),
                var(--shadow);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(183, 104, 255, 0),
                var(--shadow);
    border-color: var(--border-strong);
  }
}

.card.pulse {
  animation: pulseGlow 1.4s ease-out;
}

.negative-column .card.pulse {
  --pulse-color: rgba(217, 107, 107, 0.45);
  --pulse-border: var(--neg-accent);
}

.positive-column .card.pulse {
  --pulse-color: rgba(126, 196, 136, 0.45);
  --pulse-border: var(--pos-accent);
}

/* Practice list — numbered or bulleted steps inside pairs-closing */
.practice-list {
  max-width: 580px;
  margin: 12px auto 24px;
  padding: 18px 22px 18px 44px;
  background: rgba(94, 234, 212, 0.05);
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: var(--radius);
  color: var(--text-soft);
  text-align: left;
}

.practice-list li {
  padding: 6px 0;
  font-size: 0.94rem;
  line-height: 1.65;
  letter-spacing: 0.005em;
}

.practice-list li::marker {
  color: #5eead4;
  font-weight: 600;
}

/* Warning list (used inside pairs-closing) */
.warning-list {
  max-width: 640px;
  margin: 12px auto 24px;
  padding: 18px 22px 18px 40px;
  background: rgba(255, 107, 157, 0.06);
  border: 1px solid rgba(255, 107, 157, 0.25);
  border-radius: var(--radius);
  color: var(--text-soft);
  list-style: none;
  text-align: left;
}

.warning-list li {
  position: relative;
  padding: 6px 0 6px 16px;
  font-size: 0.94rem;
  line-height: 1.6;
  letter-spacing: 0.005em;
}

.warning-list li::before {
  content: "▴";
  position: absolute;
  left: -2px;
  top: 6px;
  color: #ff6b9d;
  font-size: 0.8rem;
  text-shadow: 0 0 8px rgba(255, 107, 157, 0.5);
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  background: #14082e;
}

footer p { margin: 0; }

/* Empty state when filtering */
.column.hidden { display: none; }
.cards.empty::after {
  content: "Nothing here.";
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 20px 4px;
  font-style: italic;
}

/* Friendship view */
.manifesto {
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 22px;
  letter-spacing: 0.005em;
}

.manifesto-second {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 1.0rem;
  line-height: 1.7;
}

.pairs-grid {
  background: linear-gradient(180deg, rgba(26, 15, 56, 0.85), rgba(20, 10, 46, 0.85));
  border: 1px solid var(--border);
  margin: 36px auto 24px;
  width: calc(100% - 48px);
  max-width: 980px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(183, 104, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pairs-header,
.pairs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.pairs-header {
  border-bottom: 1px solid var(--border-strong);
}

.pairs-row {
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}

.pairs-row:hover {
  background: rgba(183, 104, 255, 0.06);
}

.true-header,
.false-header {
  padding: 16px 22px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.true-header {
  color: var(--pos-accent);
  border-right: 1px solid var(--border-strong);
}

.false-header {
  color: var(--neg-accent);
}

.true,
.false {
  padding: 18px 22px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.true {
  color: var(--pos-accent);
  border-right: 1px solid var(--border);
  position: relative;
}

.false {
  color: var(--neg-accent);
  font-style: italic;
}

.true::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--pos-accent);
  transition: height var(--transition);
}

.pairs-row:hover .true::before {
  height: 60%;
}

.pairs-closing {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 64px;
  text-align: center;
  color: var(--text-soft);
}

.pairs-closing p {
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 22px;
}

.pairs-final {
  margin-top: 32px !important;
  font-size: 1.12rem !important;
  color: var(--text) !important;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.8 !important;
}

/* Landing page */
.landing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.landing-hero {
  text-align: center;
  padding: 40px 0 64px;
  position: relative;
}

.landing-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(183, 104, 255, 0.20) 0%, rgba(255, 107, 157, 0.08) 35%, transparent 70%);
  z-index: -1;
  filter: blur(40px);
  pointer-events: none;
}

.landing-title {
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 24px;
  background: linear-gradient(135deg, #ece5f7 0%, #d3b5ff 25%, #b768ff 50%, #ff6b9d 75%, #5eead4 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 100px rgba(183, 104, 255, 0.5);
  animation: titleShift 14s ease-in-out infinite;
}

@keyframes titleShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.landing-tagline {
  font-size: 1.3rem;
  color: var(--text-soft);
  margin: 0 0 40px;
  font-style: italic;
  letter-spacing: 0.01em;
}

.landing-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.85;
  letter-spacing: 0.005em;
}

.landing-begin {
  display: inline-block;
  padding: 14px 40px;
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.28), rgba(255, 107, 157, 0.20));
  border: 1px solid rgba(183, 104, 255, 0.6);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: all 260ms ease;
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.15),
    0 0 32px rgba(183, 104, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.landing-begin:hover {
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.45), rgba(255, 107, 157, 0.35));
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.25),
    0 0 48px rgba(183, 104, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.landing-rooms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0 60px;
}

.room-card {
  display: block;
  padding: 26px 24px;
  background: linear-gradient(180deg, rgba(26, 15, 56, 0.85), rgba(20, 10, 46, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.room-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.0), rgba(255, 107, 157, 0.0));
  border-radius: var(--radius);
  pointer-events: none;
  transition: background var(--transition);
}

.room-card:hover {
  background: linear-gradient(180deg, rgba(37, 22, 70, 0.92), rgba(28, 15, 56, 0.92));
  border-color: rgba(183, 104, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.15),
    0 0 32px rgba(183, 104, 255, 0.28),
    0 12px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.room-card h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ece5f7 0%, #b768ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.room-desc {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.005em;
}

.room-pages {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

.landing-closing {
  text-align: center;
  padding: 64px 0 20px;
  color: var(--text-soft);
}

.landing-closing p {
  font-size: 1.05rem;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

.landing-final {
  font-size: 1.25rem !important;
  margin-top: 32px !important;
  font-weight: 500;
  background: linear-gradient(135deg, #ece5f7 0%, #b768ff 50%, #ff6b9d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.02em;
}

/* License notice (Music page hero) */
.license-notice {
  max-width: 640px;
  margin: 28px auto 4px;
  padding: 16px 20px 18px;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.07), rgba(183, 104, 255, 0.07));
  border: 1px solid rgba(94, 234, 212, 0.30);
  border-radius: var(--radius);
  text-align: left;
  color: var(--text-soft);
  box-shadow: 0 0 18px rgba(94, 234, 212, 0.12);
}

.license-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5eead4;
  padding: 3px 10px;
  border: 1px solid rgba(94, 234, 212, 0.45);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.08);
  margin-bottom: 10px;
}

.license-notice p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  letter-spacing: 0.005em;
}

.license-notice strong {
  color: var(--text);
  font-weight: 600;
}

.license-notice em {
  color: var(--text-dim);
  font-style: italic;
}

/* Music page */
.music-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 36px 24px 96px;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

#music-search {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  padding: 10px 16px;
  background: rgba(20, 10, 46, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#music-search::placeholder { color: var(--text-dim); }

#music-search:focus {
  border-color: rgba(183, 104, 255, 0.55);
  box-shadow: 0 0 18px rgba(183, 104, 255, 0.18);
}

.music-count {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.song-row {
  display: grid;
  grid-template-columns: 36px 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(26, 15, 56, 0.6), rgba(20, 10, 46, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.song-row:hover {
  background: linear-gradient(180deg, rgba(37, 22, 70, 0.75), rgba(28, 15, 56, 0.75));
  border-color: rgba(183, 104, 255, 0.4);
  box-shadow: 0 0 16px rgba(183, 104, 255, 0.14);
}

.song-row.playing {
  border-color: rgba(183, 104, 255, 0.6);
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.18), rgba(255, 107, 157, 0.10));
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.2),
    0 0 28px rgba(183, 104, 255, 0.28);
}

.song-num {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.song-row.playing .song-num {
  color: #b768ff;
}

.song-play {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.song-play:hover {
  background: rgba(183, 104, 255, 0.15);
  border-color: rgba(183, 104, 255, 0.6);
  box-shadow: 0 0 14px rgba(183, 104, 255, 0.3);
}

.song-row.playing .song-play {
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.32), rgba(255, 107, 157, 0.22));
  border-color: rgba(183, 104, 255, 0.7);
  box-shadow: 0 0 18px rgba(183, 104, 255, 0.42);
  color: #fff;
}

.song-play-icon { line-height: 0; }

/* EQ bars — animated indicator on the currently playing song */
.eq-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.song-row.playing:not(.paused) .song-play-icon { display: none; }
.song-row.playing:not(.paused) .eq-bars { display: inline-flex; }

.eq-bars i {
  display: inline-block;
  width: 3px;
  background: #d3b5ff;
  border-radius: 1px;
  animation: eqBar 1s ease-in-out infinite;
}

.eq-bars i:nth-child(1) { animation-delay: 0s; height: 50%; }
.eq-bars i:nth-child(2) { animation-delay: 0.18s; height: 80%; }
.eq-bars i:nth-child(3) { animation-delay: 0.36s; height: 60%; }
.eq-bars i:nth-child(4) { animation-delay: 0.54s; height: 90%; }

@keyframes eqBar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.song-title {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-row.playing .song-title {
  background: linear-gradient(135deg, #ece5f7 0%, #d3b5ff 50%, #ff9ec7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
}

.song-download {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1rem;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.song-download:hover {
  color: var(--text);
  background: rgba(94, 234, 212, 0.10);
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.28);
}

/* Sticky right-side player — collapsible */
.sticky-player {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translate(110%, -50%);
  z-index: 60;
  width: 300px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, rgba(28, 15, 56, 0.96), rgba(20, 10, 46, 0.96));
  border: 1px solid rgba(183, 104, 255, 0.45);
  border-right: none;
  border-radius: 14px 0 0 14px;
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.12),
    0 0 36px rgba(183, 104, 255, 0.28),
    -10px 10px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 360ms cubic-bezier(0.2, 0.9, 0.3, 1),
    opacity 240ms ease,
    width 320ms cubic-bezier(0.2, 0.9, 0.3, 1),
    padding 320ms ease;
}

.sticky-player.visible {
  transform: translate(0, -50%);
  opacity: 1;
  pointer-events: auto;
}

.sticky-player.collapsed {
  width: 64px;
  padding: 12px 10px;
}

.sticky-player.collapsed .player-info,
.sticky-player.collapsed .player-progress,
.sticky-player.collapsed .player-volume,
.sticky-player.collapsed .player-close,
.sticky-player.collapsed #player-prev,
.sticky-player.collapsed #player-next {
  display: none;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sticky-player.collapsed .player-header {
  justify-content: center;
}

.player-toggle {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: all var(--transition);
}

.player-toggle:hover {
  color: var(--text);
  border-color: rgba(183, 104, 255, 0.6);
  background: rgba(183, 104, 255, 0.12);
  box-shadow: 0 0 12px rgba(183, 104, 255, 0.25);
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-close,
.player-dl-btn {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 1rem;
  line-height: 0;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.player-close:hover {
  color: #ff6b9d;
  border-color: rgba(255, 107, 157, 0.6);
  background: rgba(255, 107, 157, 0.08);
}

.player-dl-btn:hover {
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.6);
  background: rgba(94, 234, 212, 0.08);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.3);
}

.player-dl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.player-dl-btn.downloading {
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.6);
  animation: dlPulse 1.2s ease-in-out infinite;
}

@keyframes dlPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(94, 234, 212, 0.3); }
  50% { box-shadow: 0 0 16px rgba(94, 234, 212, 0.6); }
}

.player-cover {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.35), rgba(255, 107, 157, 0.25), rgba(94, 234, 212, 0.20));
  box-shadow: inset 0 0 12px rgba(183, 104, 255, 0.25), 0 0 14px rgba(183, 104, 255, 0.3);
  align-self: center;
}

.player-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}

.player-bars i {
  display: inline-block;
  width: 3px;
  background: #fff;
  border-radius: 1px;
  animation: eqBar 1s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}
.player-bars i:nth-child(1) { animation-delay: 0s; height: 55%; }
.player-bars i:nth-child(2) { animation-delay: 0.2s; height: 90%; }
.player-bars i:nth-child(3) { animation-delay: 0.4s; height: 65%; }
.player-bars i:nth-child(4) { animation-delay: 0.6s; height: 100%; }

/* Pause the EQ bars when the audio is paused */
.sticky-player.paused .player-bars i { animation-play-state: paused; }

.player-info {
  min-width: 0;
  text-align: center;
}

.player-title {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.player-progress {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b768ff, #ff6b9d, #5eead4);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(183, 104, 255, 0.6);
  transition: width 120ms linear;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.player-controls button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.player-controls button:hover {
  background: rgba(183, 104, 255, 0.12);
  border-color: rgba(183, 104, 255, 0.6);
  box-shadow: 0 0 12px rgba(183, 104, 255, 0.3);
}

.player-controls button.primary {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.5), rgba(255, 107, 157, 0.35));
  border-color: rgba(183, 104, 255, 0.7);
  box-shadow: 0 0 18px rgba(183, 104, 255, 0.42);
}

.player-controls button.primary:hover {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(183, 104, 255, 0.6);
}

/* Volume */
.player-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 0;
}

.mute-btn {
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  font-family: inherit;
  line-height: 1;
  transition: color var(--transition), text-shadow var(--transition);
  flex-shrink: 0;
}

.mute-btn:hover {
  color: var(--text);
  text-shadow: 0 0 8px rgba(183, 104, 255, 0.5);
}

#player-vol {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background-image: linear-gradient(90deg, #b768ff 0%, #b768ff var(--vol, 85%), rgba(255,255,255,0.08) var(--vol, 85%), rgba(255,255,255,0.08) 100%);
}

#player-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(183, 104, 255, 0.8);
  box-shadow: 0 0 10px rgba(183, 104, 255, 0.6);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

#player-vol::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(183, 104, 255, 0.85);
}

#player-vol::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(183, 104, 255, 0.8);
  box-shadow: 0 0 10px rgba(183, 104, 255, 0.6);
  cursor: pointer;
}

#player-vol::-moz-range-track {
  height: 4px;
  background: transparent;
}

/* Dictionary */
.dictionary {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.dict-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

#dict-search {
  width: 100%;
  max-width: 460px;
  padding: 10px 18px;
  background: rgba(20, 10, 46, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#dict-search::placeholder { color: var(--text-dim); }

#dict-search:focus {
  border-color: rgba(183, 104, 255, 0.55);
  box-shadow: 0 0 18px rgba(183, 104, 255, 0.18);
}

.dict-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  margin: 0 0 24px;
  background: rgba(20, 10, 46, 0.4);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: sticky;
  top: calc(var(--nav-h, 96px) + 4px);
  z-index: 20;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dict-jump button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all var(--transition);
}

.dict-jump button:hover {
  color: var(--text);
  background: rgba(183, 104, 255, 0.12);
  border-color: rgba(183, 104, 255, 0.45);
  box-shadow: 0 0 10px rgba(183, 104, 255, 0.3);
}

.dict-jump button.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(183, 104, 255, 0.45), rgba(255, 107, 157, 0.30));
  border-color: rgba(183, 104, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(183, 104, 255, 0.25),
    0 0 18px rgba(183, 104, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

.dict-group {
  margin-bottom: 32px;
  scroll-margin-top: calc(var(--nav-h, 96px) + 80px);
}

.dict-letter {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-strong);
  background: linear-gradient(135deg, #ece5f7 0%, #b768ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(183, 104, 255, 0.2);
}

.dict-entry {
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.dict-entry:hover {
  background: rgba(183, 104, 255, 0.06);
}

.dict-term {
  display: inline;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.005em;
  margin-right: 8px;
}

.dict-term::after {
  content: " — ";
  color: var(--text-dim);
  font-weight: 400;
}

.dict-def {
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.65;
}

.dict-link {
  color: #b768ff;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed rgba(183, 104, 255, 0.35);
  transition: color var(--transition), border-color var(--transition);
}

.dict-link:hover {
  color: #ff9ec7;
  border-bottom-color: rgba(255, 158, 199, 0.7);
}

.dict-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-style: italic;
}

/* Responsive */
@media (max-width: 800px) {
  .columns {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 16px 32px;
  }
  .hero { padding: 36px 16px 24px; }
  .hero h1 { font-size: 1.9rem; }
  .subtitle { font-size: 0.98rem; }
  .manifesto { font-size: 1.06rem; }
  .manifesto-second { font-size: 0.96rem; }

  .nav-main {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand   actions"
      "cats    cats";
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
  }

  .nav-main .brand { grid-area: brand; }
  .nav-main .nav-actions { grid-area: actions; margin-left: 0; }
  .nav-main .nav-categories {
    grid-area: cats;
    justify-content: center;
    gap: 4px;
  }

  .nav-sub {
    padding: 8px 12px;
  }

  .nav-cat {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .nav-cat.active::after {
    bottom: -12px;
    left: 10px;
    right: 10px;
  }

  .nav-link {
    padding: 5px 9px;
    font-size: 0.83rem;
  }

  .pairs-header,
  .pairs-row {
    grid-template-columns: 1fr;
  }

  .true,
  .true-header {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .false-header,
  .false {
    padding-top: 10px;
  }

  .true-header,
  .false-header {
    font-size: 0.72rem;
  }

  .pairs-grid {
    width: calc(100% - 32px);
    margin: 24px auto;
  }

  .landing { padding: 32px 16px 48px; }
  .landing-hero { padding: 20px 0 40px; }
  .landing-title { font-size: 2.2rem; letter-spacing: 0.01em; }
  .landing-tagline { font-size: 1.1rem; }
  .landing-intro { font-size: 0.98rem; }
  .landing-rooms { grid-template-columns: 1fr; gap: 14px; }
  .landing-final { font-size: 1.1rem !important; }
}

@media (max-width: 1100px) and (min-width: 801px) {
  .landing-rooms { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .dictionary { padding: 20px 14px 60px; }
  .dict-jump { padding: 8px; }
  .dict-jump button { width: 26px; height: 26px; font-size: 0.74rem; }
  .dict-letter { font-size: 1.4rem; }
  .dict-def { font-size: 0.88rem; }
}

@media (max-width: 800px) {
  .music-page { padding: 24px 14px 140px; }

  .song-row {
    grid-template-columns: 28px 40px 1fr 40px;
    gap: 8px;
    padding: 8px 10px;
  }

  .song-title { font-size: 0.88rem; }
  .song-num { font-size: 0.72rem; }

  .sticky-player {
    width: min(280px, calc(100% - 24px));
    padding: 12px 14px;
  }

  .sticky-player.collapsed {
    width: 56px;
    padding: 10px 8px;
  }

  .player-controls button { width: 30px; height: 30px; }
  .player-controls button.primary { width: 40px; height: 40px; }

  .player-cover { width: 40px; height: 40px; }
  .player-title { font-size: 0.88rem; }
}
