/* ===== Layout — Topbar, Hero, Footer ===== */

/* --- Topbar --- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-name { font-size: 16px; letter-spacing: 0.2px; line-height: 1.15; display: flex; flex-direction: column; align-items: flex-start; }
.brand-name b { color: var(--gold); font-weight: 600; letter-spacing: 1.5px; }
.brand-name small { font-size: 9.5px; letter-spacing: 2.2px; text-transform: uppercase; color: #7d8394; font-weight: 500; }
.logo { flex-shrink: 0; }
.stats { font-size: 13px; color: #c9cedb; }
.stat-label { color: var(--muted); margin-left: 6px; }

/* --- Tabs Navigation --- */
.tabs-nav {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 18, 0.5);
  position: sticky;
  top: 60px;
  z-index: 99;
}
.tabs-nav .wrap {
  display: flex;
  gap: 0;
  align-items: center;
  height: 48px;
  position: relative;
}
.tab-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 14px;
  background:
    radial-gradient(140% 140% at 30% 0%, rgba(255, 240, 200, 0.22), transparent 46%),
    radial-gradient(160% 120% at 50% 115%, rgba(255, 200, 90, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(212, 169, 78, 0.3), rgba(212, 169, 78, 0.1) 55%, rgba(20, 14, 4, 0.38));
  box-shadow:
    0 0 0 1px rgba(212, 169, 78, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 6px rgba(0, 0, 0, 0.45),
    0 6px 18px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(212, 169, 78, 0.45),
    0 0 48px rgba(212, 169, 78, 0.22);
  transition: left 0.32s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)), width 0.32s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  z-index: 0;
  will-change: left, width;
}
.tab-indicator::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 130, 0.75), transparent);
  filter: drop-shadow(0 0 6px rgba(212, 169, 78, 0.8));
  opacity: 0.9;
}
.tabs-nav .tab-btn { z-index: 1; }
.tabs-nav .tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 5px 3px;
  padding: 9px 20px;
  border: none;
  border-radius: 14px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  background:
    radial-gradient(130% 130% at 25% 0%, rgba(255, 255, 255, 0.09), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012) 55%, rgba(0, 0, 0, 0.16));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4),
    0 3px 0 rgba(60, 48, 22, 0.85),
    0 5px 10px rgba(0, 0, 0, 0.35);
  transition: color 0.25s, transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s, background 0.25s;
}
.tabs-nav .tab-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(212, 169, 78, 0.14), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.tabs-nav .tab-btn::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 0;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0.55;
  transition: opacity 0.25s;
  pointer-events: none;
}
.tabs-nav .tab-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  z-index: 3;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4),
    0 4px 0 rgba(60, 48, 22, 0.85),
    0 9px 18px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(212, 169, 78, 0.28);
}
.tabs-nav .tab-btn:hover::before { opacity: 1; }
.tabs-nav .tab-btn:hover::after { opacity: 0.9; }
.tabs-nav .tab-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(60, 48, 22, 0.85),
    0 2px 5px rgba(0, 0, 0, 0.35);
}
.tabs-nav .tab-btn.active {
  color: #ffe9b0;
  transform: translateY(0);
  z-index: 2;
  background:
    radial-gradient(140% 140% at 30% 0%, rgba(255, 240, 200, 0.26), transparent 45%),
    radial-gradient(160% 120% at 50% 115%, rgba(255, 200, 90, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(212, 169, 78, 0.34), rgba(212, 169, 78, 0.13) 55%, rgba(20, 14, 4, 0.5));
  box-shadow:
    0 0 0 1px rgba(212, 169, 78, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 6px rgba(0, 0, 0, 0.5),
    0 3px 0 rgba(120, 88, 30, 0.95),
    0 6px 14px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(212, 169, 78, 0.5),
    0 0 46px rgba(212, 169, 78, 0.25);
  text-shadow:
    0 0 8px rgba(255, 215, 130, 0.85),
    0 0 26px rgba(212, 169, 78, 0.6);
  animation: tabNeon 3.4s ease-in-out infinite;
}
.tabs-nav .tab-btn.active::before { opacity: 1; }
.tabs-nav .tab-btn.active::after { opacity: 0.95; }
@keyframes tabNeon {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(212, 169, 78, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      inset 0 -2px 6px rgba(0, 0, 0, 0.5),
      0 3px 0 rgba(120, 88, 30, 0.95),
      0 6px 14px rgba(0, 0, 0, 0.4),
      0 0 16px rgba(212, 169, 78, 0.5),
      0 0 46px rgba(212, 169, 78, 0.25);
    text-shadow:
      0 0 8px rgba(255, 215, 130, 0.85),
      0 0 26px rgba(212, 169, 78, 0.6);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(212, 169, 78, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -2px 6px rgba(0, 0, 0, 0.5),
      0 3px 0 rgba(120, 88, 30, 0.95),
      0 6px 14px rgba(0, 0, 0, 0.4),
      0 0 26px rgba(212, 169, 78, 0.65),
      0 0 70px rgba(212, 169, 78, 0.35);
    text-shadow:
      0 0 12px rgba(255, 225, 150, 1),
      0 0 38px rgba(212, 169, 78, 0.8);
  }
}
.tabs-nav .tab-ico {
  opacity: 0.75;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.tabs-nav .tab-btn.active .tab-ico {
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(212, 169, 78, 0.8));
}

/* --- Tab Panes --- */
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.2s ease-in; }
@keyframes fadeIn { from { opacity: 0.8; } to { opacity: 1; } }

/* --- Books Grid --- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.source-card {
  padding: 20px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.source-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.load-books-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  color: var(--gold);
  color: #0b0d12;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font);
}
.load-books-btn:hover { background: rgba(212, 169, 78, 0.16); color: #f4e3b2; }
.books-list {
  list-style: none;
  text-align: left;
  margin-top: 12px;
  max-height: 400px;
  overflow-y: auto;
}
.books-list.hidden { display: none; }
.books-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(212, 169, 78, 0.1);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.books-list li strong { color: var(--text); font-weight: 600; }

/* --- About Content --- */
.about-content {
  max-width: 720px;
  margin: 24px 0;
}
.about-content h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: #e8eaf1;
  margin-top: 24px;
  margin-bottom: 12px;
}
.about-content h3:first-of-type { margin-top: 0; }
.about-content p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
  font-size: 14.5px;
}
.about-content p b { color: var(--text); font-weight: 600; }
.about-content code {
  background: var(--bg2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  color: #a8d3a8;
}
.about-content ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px 0;
}
.about-content ul li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.about-content ul li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: #7d8394;
}

/* --- Share Panel --- */
.share-panel {
  margin-top: 24px;
  padding: 16px;
  background: rgba(212, 169, 78, 0.08);
  border: 1px solid rgba(212, 169, 78, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-panel.hidden { display: none; }
.share-btn, .save-btn {
  padding: 7px 13px;
  background: transparent;
  border: 1px solid rgba(212, 169, 78, 0.45);
  border-radius: 20px;
  color: #e3c887;
  color: #0b0d12;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font);
}
.share-btn:hover, .save-btn:hover { background: rgba(212, 169, 78, 0.16); color: #f4e3b2; }
.share-btn:active, .save-btn:active { transform: scale(0.97); }
.share-url {
  flex: 1;
  min-width: 200px;
  padding: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  font-family: monospace;
}
.share-url.hidden { display: none; }

/* --- Hero --- */
.hero {
  padding: 96px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden; /* кольцо планеты не должно создавать горизонтальный скролл */
}
.hero-orb-wrap {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 680px;
  max-width: 96vw;
  pointer-events: none;
  z-index: 0;
  animation: orbBreath 14s ease-in-out infinite;
  will-change: transform;
}
.hero-orb {
  opacity: 0.32;
  width: 100%;
  display: block;
  animation: orbSpin 120s linear infinite;
}
.hero .wrap { position: relative; z-index: 1; }
@keyframes orbSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes orbBreath {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%      { transform: translateX(-50%) scale(1.045); }
}

/* --- Планета с кольцом --- */
.hero-planet {
  position: absolute;
  left: 50%;
  top: -168px;
  opacity: 0.45;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  filter: blur(5px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, #6f8fd8 0%, #2f4a86 38%, #142450 68%, #070d24 100%);
  box-shadow:
    inset -28px -32px 70px rgba(0, 0, 0, 0.8),
    inset 10px 12px 34px rgba(170, 200, 255, 0.22),
    0 0 40px rgba(124, 156, 255, 0.35),
    0 0 110px rgba(124, 156, 255, 0.16);
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(170, 200, 255, 0.14);
}
.hero-planet::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 55% 16% at 32% 44%, rgba(212, 169, 78, 0.22), transparent 72%),
    radial-gradient(ellipse 48% 12% at 62% 58%, rgba(124, 156, 255, 0.18), transparent 72%),
    radial-gradient(ellipse 40% 10% at 45% 70%, rgba(123, 216, 143, 0.10), transparent 70%);
  filter: blur(1px);
}
.planet-ring {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 580px;
  height: 180px;
  border: 3px solid rgba(232, 194, 104, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(74deg) rotateZ(-10deg);
  box-shadow: 0 0 40px rgba(212, 169, 78, 0.25), inset 0 0 40px rgba(212, 169, 78, 0.14);
  animation: ringPulse 7s ease-in-out infinite;
}
.planet-ring::before {
  content: '';
  position: absolute;
  left: 6%;
  top: 50%;
  width: 88%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(232, 194, 104, 0.75), transparent);
  transform: translateY(-50%);
}
@keyframes ringPulse {
  0%, 100% { opacity: 0.8; }
  50%      { opacity: 1; }
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.15;
  max-width: 820px;
  margin: 0 auto;
  background: linear-gradient(110deg, #ffffff 0%, #f4e3b2 28%, var(--gold-bright) 52%, #ffffff 75%, var(--gold) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 26px rgba(212, 169, 78, 0.25));
  animation: none;
}
@keyframes goldShift {
  from { background-position: 0% center; }
  to   { background-position: 220% center; }
}

/* --- Бейдж над заголовком --- */
.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(232, 194, 104, 0.8);
  font-weight: 500;
  margin-bottom: 22px;
  padding: 7px 18px;
  border: 1px solid rgba(212, 169, 78, 0.35);
  border-radius: 50px;
  background: rgba(212, 169, 78, 0.08);
  box-shadow: 0 0 24px rgba(212, 169, 78, 0.12), inset 0 0 14px rgba(212, 169, 78, 0.06);
  text-shadow: 0 0 14px rgba(212, 169, 78, 0.4);
}
.sub {
  max-width: 660px;
  margin: 24px auto 40px;
  color: #b6bccd;
  font-size: 17px;
  line-height: 1.85;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.sub b { color: var(--text); font-weight: 600; }

/* --- Search --- */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  max-width: 700px;
  margin: 0 auto;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-box:focus-within {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
#query {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15.5px;
  font-family: var(--font);
  padding: 11px 0;
}
#query::placeholder { color: #555a66; }
.search-box:focus-within {
  border-color: rgba(212, 169, 78, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 169, 78, 0.25), 0 0 26px rgba(212, 169, 78, 0.12);
}
.search-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #f5d88b 0%, var(--gold-bright) 26%, var(--gold) 54%, #a67c2f 100%);
  border: 1px solid rgba(255, 226, 152, 0.4);
  border-radius: 50px;
  color: #161006;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 11px 27px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(0);
  transition: transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s ease, filter 0.2s ease;
  box-shadow:
    0 4px 0 #7d5a18,
    0 7px 0 rgba(0, 0, 0, 0.38),
    0 10px 26px rgba(212, 169, 78, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -5px 9px rgba(122, 86, 20, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  -webkit-tap-highlight-color: transparent;
}
.search-btn-ico {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.5));
}
.search-btn:hover {
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-2px);
  box-shadow:
    0 6px 0 #7d5a18,
    0 10px 0 rgba(0, 0, 0, 0.38),
    0 16px 34px rgba(212, 169, 78, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset 0 -5px 9px rgba(122, 86, 20, 0.4);
  filter: brightness(1.07);
}
.search-btn:active {
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(4px) scale(0.985);
  box-shadow:
    0 1px 0 #7d5a18,
    0 2px 0 rgba(0, 0, 0, 0.3),
    0 5px 14px rgba(212, 169, 78, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 6px rgba(122, 86, 20, 0.45);
  transition-duration: 0.05s;
}
.search-btn:focus-visible {
  outline: none;
  box-shadow:
    0 4px 0 #7d5a18,
    0 0 0 3px rgba(212, 169, 78, 0.55),
    0 0 34px rgba(212, 169, 78, 0.6),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -5px 9px rgba(122, 86, 20, 0.4);
}
/* бегущий блик по кнопке */
.search-btn-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 32%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55) 50%, transparent);
  transform: skewX(-18deg) translateX(-160%);
  animation: btnShine 3.4s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
}
@keyframes btnShine {
  0% { transform: skewX(-18deg) translateX(-160%); }
  55%, 100% { transform: skewX(-18deg) translateX(340%); }
}
@media (prefers-reduced-motion: reduce) {
  .search-btn-shine { animation: none; display: none; }
}

/* --- Source Toggle --- */
.source-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.chip {
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover {
  border-color: var(--gold-dim);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.chip:active { transform: translateY(0); box-shadow: none; }
.chip.active {
  color: #0b0d12;
  font-weight: 700;
  transform: translateY(-1px);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.chip[data-src="all"].active {
  background: linear-gradient(180deg, #f5d88b, var(--gold) 55%, #a67c2f);
  border-color: rgba(255, 226, 152, 0.5);
}
.chip[data-src="urantia"].active {
  background: linear-gradient(180deg, #9db4ff, #5f7fe0 55%, #3d55a8);
  border-color: rgba(160, 180, 255, 0.45);
  color: #0a0d18;
  box-shadow: 0 4px 14px rgba(63, 85, 168, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.chip[data-src="bible"].active {
  background: linear-gradient(180deg, #9fe3b2, #5fbf7e 55%, #3d9258);
  border-color: rgba(150, 225, 170, 0.45);
  color: #06130b;
  box-shadow: 0 4px 14px rgba(61, 146, 88, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.chip[data-src="quran"].active {
  background: linear-gradient(180deg, #f0cf85, #d99f45 55%, #a8772a);
  border-color: rgba(255, 220, 150, 0.45);
  color: #141006;
  box-shadow: 0 4px 14px rgba(168, 119, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* --- Examples --- */
.example {
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s;
}
.example:hover { transform: translateY(-1px); border-color: var(--gold-dim); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.examples {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.example {
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.example:hover {
  border-color: rgba(232, 194, 104, 0.5);
  color: #e9d9a8;
  background: transparent;
}

/* --- Results --- */
.results { padding: 40px 0 64px; }
.results.hidden { display: none; }
.status-line .counts { display: inline-flex; align-items: center; gap: 12px; margin-left: 10px; flex-wrap: wrap; }
.count-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.count-chip b { color: var(--text); font-weight: 600; }
.count-chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 6px currentColor; }
.status-line {
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 28px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
}
.status-line.loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-line.error { color: #e0a3a3; }
.status-line .counts { color: var(--gold); }
.status-line .retry-btn {
  background: var(--gold);
  border: none;
  border-radius: 20px;
  color: #0b0d12;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s;
}
.status-line .retry-btn:hover { background: #e0c070; }

/* --- History --- */
.history {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: rgba(22, 28, 42, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.history-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-right: 4px;
}
.history-chip {
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.history-chip:hover { border-color: var(--gold-dim); color: var(--gold); background: var(--gold-glow); }
.history-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s;
}
.history-clear:hover { color: #e0a3a3; }

/* --- Empty state --- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state h3 {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 600;
}
.empty-state p { font-size: 14px; max-width: 480px; margin: 0 auto 20px; }
.empty-examples { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.empty-examples .example { font-size: 13px; }

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.column { display: flex; flex-direction: column; gap: 16px; }
.col-header {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.4px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
.col-header .count { font-weight: 400; font-size: 12px; opacity: 0.6; }

/* --- Footer --- */
footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 24px 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .columns { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero-planet { display: none; }
  .hero-orb-wrap { opacity: 0.22; }
  h1 { letter-spacing: 0.4px; }
  .eyebrow { letter-spacing: 2.5px; font-size: 10.5px; padding: 6px 14px; }
  .brand-name { font-size: 15px; }
  .topbar .stats { font-size: 11px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 52px 0 34px; }
  .tabs-nav .wrap { overflow-x: auto; scrollbar-width: none; }
  .tabs-nav .wrap::-webkit-scrollbar { display: none; }
  .tabs-nav::after {
    content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 30px;
    background: linear-gradient(90deg, transparent, rgba(11, 13, 18, 0.92));
    pointer-events: none; z-index: 2;
    opacity: 1; transition: opacity 0.4s;
  }
  .tabs-nav.at-end::after { opacity: 0; }
  .tabs-nav .tab-btn { padding: 7px 14px; gap: 6px; margin: 5px 2px; font-size: 11px; letter-spacing: 0.8px; }
  .tab-ico { width: 14px; height: 14px; }
  .topbar .wrap { height: 54px; }
  .tabs-nav { top: 54px; }
  .brand-name b { letter-spacing: 1px; font-size: 15px; }
  .search-box { border-radius: 30px; padding: 4px 4px 4px 14px; }
  #query { font-size: 14.5px; }
  .search-btn { padding: 8px 16px; font-size: 13px; }
  .sub { font-size: 15.5px; line-height: 1.75; margin: 18px auto 32px; }
}

/* --- Scrollbar & Selection --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0d14; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8a6a2a, #5d4717);
  border-radius: 6px;
  border: 2px solid #0b0d14;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #a87c2f, #7a5a1e); }
html { scrollbar-color: #6d531f #0b0d14; scrollbar-width: thin; scroll-behavior: smooth; }
::selection { background: rgba(212, 169, 78, 0.35); color: #fff; }

/* --- Фаза 4: бегущий блик на активной вкладке --- */
.tabs-nav .tab-btn { overflow: hidden; }
.tab-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.24) 50%, transparent);
  transform: skewX(-18deg) translateX(-180%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
  will-change: transform;
}
.tabs-nav .tab-btn.active .tab-shine {
  opacity: 1;
  animation: tabShine 3.4s ease-in-out infinite;
}
@keyframes tabShine {
  0% { transform: skewX(-18deg) translateX(-180%); }
  55%, 100% { transform: skewX(-18deg) translateX(420%); }
}
@media (prefers-reduced-motion: reduce) {
  .tab-shine { display: none; }
}
