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

@font-face {
  font-family: 'Friz Quadrata';
  src: url('/fonts/FRIZQT__.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --wc3-gold: #ffab01;
  --wc3-gold-rgb: 255, 171, 1;
  --wc3-bg: #000;
  --wc3-card-bg: #111118;
  --wc3-card-border: #222233;
  --wc3-terminal-bg: #1a1b26;
  --wc3-terminal-bar: #0c0d14;
  --wc3-text-primary: #f4f7ff;
  --wc3-text-body: #e0d8c8;
  --wc3-text-bright: #e0e8ff;
  --wc3-text-muted: #9ca8c5;
  --wc3-text-dim: #505a79;
  --wc3-text-subtle: #7b818d;
  --wc3-green: #4ade80;
  --font-display: 'Friz Quadrata', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --wc3-text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.92);
  --wc3-text-shadow-lg: 2px 2px 0 rgba(0, 0, 0, 0.92);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--wc3-bg);
  color: var(--wc3-text-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Atmospheric background orb --- */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.atmosphere-orb {
  position: absolute;
  top: 30%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255,171,1,0.45) 0%,
    rgba(255,171,1,0.25) 20%,
    rgba(82,214,252,0.2) 50%,
    transparent 75%);
  filter: blur(100px);
}

/* --- Layout --- */
.container { max-width: 860px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
section { padding: 80px 0; }

/* --- Typography --- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; text-shadow: var(--wc3-text-shadow); }
a { color: var(--wc3-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Hero --- */
.hero { padding: 100px 0 60px; text-align: center; }
.hero-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--wc3-gold);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  margin-bottom: 16px;
  opacity: 0.8;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  color: var(--wc3-text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  text-shadow: var(--wc3-text-shadow-lg);
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--wc3-text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-sub strong { color: var(--wc3-gold); font-weight: 500; text-shadow: var(--wc3-text-shadow); }

/* --- Install command --- */
.install-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 5px solid transparent;
  border-image-source: url('/textures/button-bg.webp');
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--wc3-text-bright);
  cursor: pointer;
  transition: filter 0.2s;
  max-width: 100%;
}
.install-block:hover { filter: brightness(1.2); }
.install-block code { white-space: nowrap; overflow-x: auto; min-width: 0; }
.copy-btn {
  background: none;
  border: none;
  color: var(--wc3-text-subtle);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: color 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--wc3-gold); }
.copy-btn.copied { color: var(--wc3-green); }

/* --- Section headers --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--wc3-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.7;
  text-shadow: 0 0 12px rgba(var(--wc3-gold-rgb), 0.3);
}
.section-title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 500;
  color: var(--wc3-text-primary);
  margin-bottom: 16px;
  text-shadow: var(--wc3-text-shadow-lg);
}
.section-desc {
  color: var(--wc3-text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  font-size: 0.95rem;
  text-align: center;
}

/* --- WC3 textured frames --- */
.wc3-card {
  border: 16px solid transparent;
  border-image-source: url('/textures/card-bg.webp');
  border-image-slice: 24 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
}
.wc3-card-lg {
  border-width: 20px;
}
.wc3-button {
  border: 5px solid transparent;
  border-image-source: url('/textures/button-bg.webp');
  border-image-slice: 16 fill;
  border-image-repeat: stretch;
  border-radius: 0;
}

/* --- Fix section: Before/After table --- */
.fix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.fix-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.fix-table th:first-child { color: var(--wc3-text-muted); }
.fix-table th.col-without { color: var(--wc3-text-dim); }
.fix-table th.col-with { color: var(--wc3-gold); }
.fix-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: top;
}
.fix-table tr:last-child td { border-bottom: none; }
.fix-table td:first-child {
  color: var(--wc3-text-bright);
  font-weight: 500;
  white-space: nowrap;
}
.fix-table td.col-without {
  color: var(--wc3-text-dim);
  font-style: italic;
}
.fix-table td.col-with {
  color: var(--wc3-gold);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.fix-table-wrap {
  border: 24px solid transparent;
  border-image-source: url('/textures/card-bg.webp');
  border-image-slice: 24 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  overflow: hidden;
  padding: 20px 20px;
}

/* --- Audio demo grid --- */
.audio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.audio-card {
  border: 14px solid transparent;
  border-image-source: url('/textures/card-bg.webp');
  border-image-slice: 24 fill;
  border-image-repeat: stretch;
  border-radius: 0;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: filter 0.2s, box-shadow 0.2s;
  user-select: none;
}
.audio-card:hover, .audio-card:focus-visible { filter: brightness(1.25); outline: 2px solid var(--wc3-gold); outline-offset: -2px; }
.audio-card:focus:not(:focus-visible) { outline: none; }
.audio-card.playing { filter: brightness(1.3); box-shadow: 0 0 20px rgba(var(--wc3-gold-rgb),0.35); }
.audio-quote {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--wc3-text-body);
  margin-bottom: 8px;
  font-style: italic;
  text-shadow: var(--wc3-text-shadow);
}
.audio-file {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--wc3-text-dim);
}
.audio-play-icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(var(--wc3-gold-rgb),0.1);
  border: 1px solid rgba(var(--wc3-gold-rgb),0.2);
  margin-bottom: 12px;
  line-height: 32px;
  font-size: 0.85rem;
  color: var(--wc3-gold);
  transition: background 0.2s;
}
.audio-card:hover .audio-play-icon { background: rgba(var(--wc3-gold-rgb),0.2); }
.audio-card.playing .audio-play-icon { background: rgba(var(--wc3-gold-rgb),0.35); }

/* --- Terminal animation --- */
.terminal-wrap {
  background: var(--wc3-terminal-bg);
  border: 1px solid var(--wc3-card-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(0,0,0,0.5),
    0 0 1px rgba(var(--wc3-gold-rgb), 0.15);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--wc3-terminal-bar);
  border-bottom: 1px solid var(--wc3-card-border);
}
.terminal-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-bar-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--wc3-text-dim);
  margin-left: auto;
}
.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  min-height: 280px;
}
.term-line {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.term-line.visible {
  opacity: 1;
  transform: translateY(0);
}
.term-prompt { color: var(--wc3-green); }
.term-cmd { color: var(--wc3-text-bright); }
.term-sound { color: var(--wc3-gold); }
.term-dim { color: var(--wc3-text-dim); }
.term-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--wc3-green);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- Sound packs carousel --- */
.carousel-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.carousel-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.carousel-slide {
  display: none;
  animation: carouselFadeIn 0.35s ease;
}
.carousel-slide.active { display: block; }
@keyframes carouselFadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
.carousel-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--wc3-card-border);
  background: var(--wc3-card-bg);
  color: var(--wc3-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.carousel-arrow:hover {
  border-color: rgba(var(--wc3-gold-rgb), 0.5);
  color: var(--wc3-gold);
  background: rgba(var(--wc3-gold-rgb), 0.06);
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--wc3-text-dim);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}
.carousel-dot.active {
  background: var(--wc3-gold);
  border-color: var(--wc3-gold);
  box-shadow: 0 0 8px rgba(var(--wc3-gold-rgb), 0.4);
}
.carousel-dot:hover { border-color: var(--wc3-gold); }

.pack-card-full {
  border: 18px solid transparent;
  border-image-source: url('/textures/card-bg.webp');
  border-image-slice: 24 fill;
  border-image-repeat: stretch;
  padding: 24px 20px;
}
.pack-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 12px;
}
.pack-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wc3-gold);
  margin-bottom: 4px;
}
.pack-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--wc3-text-primary);
  text-shadow: var(--wc3-text-shadow-lg);
  margin-bottom: 2px;
}
.pack-game {
  font-size: 0.82rem;
  color: var(--wc3-text-muted);
}
.pack-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--wc3-text-dim);
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: 3px;
  margin-top: 6px;
}
.pack-credit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--wc3-text-dim);
  margin-bottom: 16px;
  text-align: center;
}
.pack-credit a { color: var(--wc3-text-muted); }
.pack-credit a:hover { color: var(--wc3-gold); }
.pack-sounds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pack-sound-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: inherit;
}
.pack-sound-btn:hover {
  background: rgba(var(--wc3-gold-rgb), 0.08);
  border-color: rgba(var(--wc3-gold-rgb), 0.25);
}
.pack-sound-btn.playing {
  background: rgba(var(--wc3-gold-rgb), 0.12);
  border-color: rgba(var(--wc3-gold-rgb), 0.4);
  box-shadow: 0 0 12px rgba(var(--wc3-gold-rgb), 0.15);
}
.pack-sound-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(var(--wc3-gold-rgb), 0.1);
  border: 1px solid rgba(var(--wc3-gold-rgb), 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--wc3-gold);
  transition: background 0.2s;
}
.pack-sound-btn:hover .pack-sound-icon { background: rgba(var(--wc3-gold-rgb), 0.2); }
.pack-sound-btn.playing .pack-sound-icon { background: rgba(var(--wc3-gold-rgb), 0.35); }
.pack-sound-quote {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--wc3-text-body);
  font-style: italic;
  text-shadow: var(--wc3-text-shadow);
  text-align: center;
  line-height: 1.3;
}
.pack-sound-cat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--wc3-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contribute-cta {
  text-align: center;
  padding: 24px;
  border: 1px solid var(--wc3-card-border);
  border-radius: 4px;
  background: var(--wc3-card-bg);
}
.contribute-cta p {
  font-size: 0.9rem;
  color: var(--wc3-text-muted);
  line-height: 1.6;
}
.contribute-cta code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--wc3-text-bright);
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 3px;
}
.contribute-ideas {
  margin-top: 8px;
  font-size: 0.8rem !important;
  color: var(--wc3-text-dim) !important;
  font-style: italic;
}

/* --- Pack picker --- */
.picker-search {
  width: 100%;
  max-width: 360px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 14px;
  background: var(--wc3-card-bg);
  border: 1px solid var(--wc3-card-border);
  border-radius: 4px;
  color: var(--wc3-text);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}
.picker-search::placeholder {
  color: var(--wc3-text-muted);
}
.picker-search:focus {
  border-color: var(--wc3-gold);
}
.picker-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.picker-filter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 14px;
  background: var(--wc3-card-bg);
  border: 1px solid var(--wc3-card-border);
  border-radius: 4px;
  color: var(--wc3-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.picker-filter:hover { border-color: rgba(var(--wc3-gold-rgb), 0.4); }
.picker-filter.active {
  background: rgba(var(--wc3-gold-rgb), 0.1);
  border-color: var(--wc3-gold);
  color: var(--wc3-gold);
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--wc3-card-border) transparent;
}
.picker-grid::-webkit-scrollbar { width: 6px; }
.picker-grid::-webkit-scrollbar-track { background: transparent; }
.picker-grid::-webkit-scrollbar-thumb { background: var(--wc3-card-border); border-radius: 3px; }
.picker-card {
  background: var(--wc3-card-bg);
  border: 1px solid var(--wc3-card-border);
  border-radius: 4px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}
.picker-card:hover { border-color: rgba(var(--wc3-gold-rgb), 0.4); }
.picker-card.selected {
  border-color: var(--wc3-gold);
  background: rgba(var(--wc3-gold-rgb), 0.06);
}
.picker-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.picker-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1.5px solid var(--wc3-text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--wc3-gold);
  transition: all 0.2s;
}
.picker-card.selected .picker-checkbox {
  border-color: var(--wc3-gold);
  background: rgba(var(--wc3-gold-rgb), 0.15);
}
.picker-card-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--wc3-text-bright);
  text-shadow: var(--wc3-text-shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.picker-card-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--wc3-text-dim);
  margin-bottom: 8px;
}
.picker-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.picker-default-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wc3-gold);
  background: rgba(var(--wc3-gold-rgb), 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}
.picker-card-preview {
  background: none;
  border: 1px solid rgba(var(--wc3-gold-rgb), 0.2);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--wc3-gold);
  font-size: 0.65rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.picker-card-preview:hover {
  background: rgba(var(--wc3-gold-rgb), 0.15);
  border-color: rgba(var(--wc3-gold-rgb), 0.5);
}
.picker-card-preview.playing {
  background: rgba(var(--wc3-gold-rgb), 0.25);
  border-color: var(--wc3-gold);
}
.picker-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.picker-count {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--wc3-gold);
  margin-right: auto;
}
.picker-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  background: var(--wc3-card-bg);
  border: 1px solid var(--wc3-card-border);
  border-radius: 4px;
  color: var(--wc3-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.picker-btn:hover { border-color: rgba(var(--wc3-gold-rgb), 0.4); color: var(--wc3-text-bright); }
.picker-command { text-align: center; }
.picker-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--wc3-text-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* --- Install toggle --- */
.picker-install-toggle {
  display: inline-flex;
  border: 1px solid var(--wc3-card-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.picker-install-toggle button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 14px;
  background: var(--wc3-card-bg);
  color: var(--wc3-text-dim);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.picker-install-toggle button.active {
  background: rgba(var(--wc3-gold-rgb), 0.15);
  color: var(--wc3-gold);
}
.picker-install-toggle button:hover:not(.active) {
  color: var(--wc3-text-bright);
}

/* --- Expand-to-preview --- */
.picker-card.expanded {
  grid-column: 1 / -1;
  border-color: var(--wc3-gold);
}
.picker-card-expand-area {
  display: none;
}
.picker-card.expanded .picker-card-expand-area {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--wc3-card-border);
}
.picker-expand-desc {
  font-size: 0.78rem;
  color: var(--wc3-text-muted);
  margin-bottom: 10px;
}
.picker-expand-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--wc3-gold);
  text-transform: uppercase;
  margin: 10px 0 6px;
  letter-spacing: 0.5px;
}
.picker-expand-category:first-child {
  margin-top: 0;
}
.picker-expand-sounds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}
.picker-expand-sound {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--wc3-text-muted);
  text-align: left;
}
.picker-expand-sound:hover {
  background: rgba(var(--wc3-gold-rgb), 0.08);
  border-color: rgba(var(--wc3-gold-rgb), 0.2);
  color: var(--wc3-text-bright);
}
.picker-expand-sound.playing {
  background: rgba(var(--wc3-gold-rgb), 0.15);
  border-color: var(--wc3-gold);
  color: var(--wc3-gold);
}
.picker-expand-sound-icon {
  font-size: 0.6rem;
  flex-shrink: 0;
}
.picker-expand-sound-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Features strip (accent stripe) --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.features-grid .feature-card:last-child {
  grid-column: 1 / -1;
  max-width: 50%;
  justify-self: center;
}
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--wc3-card-bg);
  border: 1px solid var(--wc3-card-border);
  border-radius: 4px;
  padding: 18px 20px;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}
.feature-card:hover {
  border-color: rgba(var(--wc3-gold-rgb), 0.3);
  background: #161622;
}
.feature-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(var(--wc3-gold-rgb),0.08);
}
.feature-text {
  min-width: 0;
}
.feature-card h3 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--wc3-text-bright);
  margin-bottom: 4px;
}
.feature-card p {
  font-size: 0.8rem;
  color: var(--wc3-text-subtle);
  line-height: 1.5;
}

/* --- Trainer Section --- */
.trainer-demo {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 40px 0 32px;
  position: relative;
}
.trainer-step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-left: 2px solid var(--wc3-card-border);
  margin-left: 19px;
  padding-left: 32px;
  position: relative;
}
.trainer-step:last-child {
  border-left-color: transparent;
}
.trainer-step-num {
  position: absolute;
  left: -20px;
  top: 24px;
  width: 40px;
  height: 40px;
  background: var(--wc3-card-bg);
  border: 2px solid var(--wc3-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--wc3-gold);
  font-weight: 600;
  flex-shrink: 0;
}
.trainer-step-content {
  flex: 1;
}
.trainer-step-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--wc3-text-primary);
  margin-bottom: 4px;
  text-shadow: var(--wc3-text-shadow);
}
.trainer-step-desc {
  font-size: 0.9rem;
  color: var(--wc3-text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}
.trainer-quote {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--wc3-gold);
  background: rgba(var(--wc3-gold-rgb), 0.08);
  border: 1px solid rgba(var(--wc3-gold-rgb), 0.15);
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
}
.trainer-cmd {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--wc3-green);
  background: var(--wc3-terminal-bg);
  border: 1px solid var(--wc3-card-border);
  border-radius: 6px;
  padding: 8px 14px;
  display: block;
  margin-bottom: 10px;
  width: fit-content;
}
.trainer-enable {
  text-align: center;
  max-width: 320px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .trainer-step {
    padding-left: 24px;
  }
}

/* --- Footer --- */
footer {
  padding: 40px 0 60px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--wc3-text-dim);
  border-top: 1px solid var(--wc3-card-border);
}
footer p { margin-bottom: 6px; }
footer a { color: var(--wc3-text-subtle); }
footer a:hover { color: var(--wc3-gold); }

/* --- Responsive --- */
@media (max-width: 640px) {
  section { padding: 48px 0; }
  .hero { padding: 64px 0 40px; }
  .fix-table { font-size: 0.8rem; }
  .fix-table td, .fix-table th { padding: 10px 12px; }
  .fix-table td:first-child { white-space: normal; }
  .fix-table-wrap { border-width: 14px; }
  .audio-grid { grid-template-columns: repeat(2, 1fr); }
  .audio-card { border-width: 12px; }
  .pack-sounds { grid-template-columns: repeat(2, 1fr); }
  .pack-card-full { border-width: 14px; padding: 16px 12px; }
  .carousel-arrow { width: 32px; height: 32px; }
  .carousel-arrow svg { width: 16px; height: 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .features-grid .feature-card:last-child {
    max-width: 100%;
  }
  .install-block {
    display: flex;
    width: 100%;
    font-size: 0.75rem;
    padding: 10px 12px;
    border-width: 4px;
  }
  .install-block code {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .install-block code::-webkit-scrollbar {
    display: none;
  }
  .atmosphere-orb { width: 600px; height: 600px; }
  .picker-grid { grid-template-columns: 1fr; max-height: 360px; }
}

/* --- Scrollbar & Selection --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--wc3-bg); }
::-webkit-scrollbar-thumb { background: var(--wc3-card-border); border: 2px solid var(--wc3-bg); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--wc3-gold-rgb), 0.4); }
html { scrollbar-width: thin; scrollbar-color: var(--wc3-card-border) var(--wc3-bg); }
::selection { background: rgba(var(--wc3-gold-rgb), 0.3); color: var(--wc3-text-primary); }

/* --- Textured elements --- */
.wc3-card, .wc3-card-lg, .audio-card, .pack-card-full, .fix-table-wrap, .install-block, .wc3-button {
  image-rendering: pixelated;
}

/* --- Peon mascot --- */
.hero-mascot {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}
.peon-avatar {
  width: 200px;
  height: auto;
  border-radius: 6px;
  box-shadow:
    0 0 40px rgba(var(--wc3-gold-rgb),0.2),
    0 0 80px rgba(var(--wc3-gold-rgb),0.1);
  transition: box-shadow 0.3s;
}
.peon-avatar:hover {
  box-shadow:
    0 0 50px rgba(var(--wc3-gold-rgb),0.35),
    0 0 100px rgba(var(--wc3-gold-rgb),0.15);
}

/* --- Terminal sound toggle --- */
.terminal-sound-toggle {
  background: none;
  border: 1px solid #333;
  color: var(--wc3-text-dim);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: auto;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  white-space: nowrap;
  position: relative;
}
.terminal-sound-toggle:hover { color: var(--wc3-text-muted); border-color: #555; }
.terminal-sound-toggle.active {
  color: var(--wc3-gold);
  border-color: rgba(var(--wc3-gold-rgb),0.4);
  background: rgba(var(--wc3-gold-rgb),0.05);
}
.terminal-sound-toggle svg { flex-shrink: 0; }

/* --- Terminal in hero (compact) --- */
.terminal-hero { padding: 0 0 40px; }

/* --- Sound beacon indicator --- */
.sound-beacon {
  position: absolute;
  inset: -4px;
  border-radius: 6px;
  border: 1.5px solid var(--wc3-gold);
  animation: beacon-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}
@keyframes beacon-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.6, 2); opacity: 0; }
}
.sound-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  padding: 6px 10px;
  background: var(--wc3-gold);
  color: var(--wc3-bg);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  animation: tooltip-enter 0.4s ease-out;
}
.sound-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 14px;
  border: 5px solid transparent;
  border-bottom-color: var(--wc3-gold);
}
@keyframes tooltip-enter {
  0% { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}
.sound-beacon-wrap { display: contents; }
.sound-beacon-wrap.dismissed .sound-beacon,
.sound-beacon-wrap.dismissed .sound-tooltip { display: none; }
@media (prefers-reduced-motion: reduce) {
  .sound-beacon { animation: none; }
}
