  :root{
    --bg:#000;
    --surface:#111;
    --surface-2:#151515;
    --surface-3:#181818;
    --surface-4:#0c0c0c;
    --surface-hover:#1c1c1c;
    --surface-hover-2:#1a1a1a;
    --modal-bg:#141414;
    --badge-bg:#262626;
    --btn-ghost-bg:#232323;
    --border:#232323;
    --text:#fff;
    --text-dim:#aaa;
    --text-faint:#777;
    --on-accent:#fff;
    --accent:#6a1bb2;
    --accent-2:#8c3ff0;
    --focus:#BB86FC;
    --shadow:none;
    --placeholder-bg:#222;
    --placeholder-text:#555;
    --star:#f4c542;
    color-scheme:dark;
  }
  html[data-theme="light"]{
    --bg:#f7f5fb;
    --surface:#ffffff;
    --surface-2:#f1edf8;
    --surface-3:#ffffff;
    --surface-4:#ffffff;
    --surface-hover:#ece6f7;
    --surface-hover-2:#ece6f7;
    --modal-bg:#ffffff;
    --badge-bg:#ece6f7;
    --btn-ghost-bg:#ece6f7;
    --border:#e1d9f0;
    --text:#1a1625;
    --text-dim:#5c5570;
    --text-faint:#726b87;
    --on-accent:#fff;
    --accent:#6a1bb2;
    --accent-2:#8c3ff0;
    --focus:#7c3aed;
    --shadow:0 2px 14px rgba(106,27,178,.08);
    --placeholder-bg:#ece6f7;
    --placeholder-text:#7d7399;
    --star:#9c6b0a;
    color-scheme:light;
  }
  * { box-sizing:border-box; margin:0; padding:0; }
  body {
    background:var(--bg); color:var(--text);
    font-family:'Segoe UI', Roboto, Arial, sans-serif;
    -webkit-font-smoothing:antialiased;
  }
  button { font-family:inherit; }
  a { color:inherit; text-decoration:none; }

  /* ---------- Top bar ---------- */
  .topbar {
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 16px; position:sticky; top:0; background:var(--bg);
    z-index:20; border-bottom:1px solid var(--border);
  }
  .topbar .left { display:flex; align-items:center; gap:10px; }
  .icon-btn {
    background:none; border:none; color:var(--text); font-size:20px;
    cursor:pointer; padding:6px; border-radius:8px; line-height:1;
    display:inline-flex; align-items:center; justify-content:center;
  }
  .icon-btn:hover, .icon-btn:focus-visible { background:var(--surface-hover); outline:2px solid var(--focus); }
  .title-wrap { display: flex; flex-direction: column; line-height: 1.1; }
  .topbar .title { font-weight:700; font-size:16.5px; letter-spacing:0.2px; }
  .topbar .subtitle {
    font-size: 10px; color: var(--text-faint); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 180px; margin-top: 1px;
  }
  .topbar .subtitle a { color: var(--accent-2); text-decoration: underline; font-weight: 600; }
  @media (min-width: 600px) {
    .topbar .title { font-size: 19px; }
    .topbar .subtitle { font-size: 11px; max-width: 400px; }
  }

  .topbar .icons { display:flex; gap:6px; align-items:center; }
  .lang-select-wrap { position:relative; display:inline-flex; }
  .lang-dropdown {
    display:none; position:absolute; top:100%; right:0; z-index:100;
    background:var(--surface-3); border:1px solid var(--border); border-radius:10px;
    padding:4px; min-width:180px; max-height:280px; overflow-y:auto;
    box-shadow:0 8px 24px rgba(0,0,0,.5); margin-top:4px;
  }
  .lang-dropdown.open { display:block; }
  .lang-opt {
    display:flex; align-items:center; gap:8px; padding:8px 10px;
    cursor:pointer; border-radius:6px; font-size:13px; color:var(--text-dim);
    transition:background .12s, color .12s;
  }
  .lang-opt:hover { background:var(--surface); color:var(--text); }
  .lang-opt.active { background:var(--accent); color:var(--on-accent); }
  .lang-opt .flag { font-size:16px; }
  img.twemoji-flag { width:1.15em; height:1.15em; vertical-align:-0.2em; margin:0 1px; }
  .lang-opt .lname { flex:1; }

  .search-bar {
    display:none; align-items:center; gap:10px; flex:1; margin:0 12px;
  }
  .search-bar.active { display:flex; }
  .search-bar input {
    flex:1; background:var(--surface-2); border:1px solid var(--border);
    color:var(--text); padding:9px 12px; border-radius:20px; font-size:15px;
  }
  .search-bar input:focus { outline:2px solid var(--focus); }

  /* ---------- Drawer ---------- */
  .overlay {
    position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:29;
    opacity:0; pointer-events:none; transition:opacity .2s;
  }
  .overlay.open { opacity:1; pointer-events:auto; }
  .drawer {
    position:fixed; top:0; left:0; bottom:0; width:280px; max-width:82vw;
    background:var(--surface-4); border-right:1px solid var(--border);
    transform:translateX(-100%); transition:transform .22s ease; z-index:30;
    overflow-y:auto; padding-bottom:24px;
  }
  .drawer.open { transform:translateX(0); }
  .drawer h4 {
    padding:16px 16px 8px; color:var(--text-faint); font-size:12px;
    letter-spacing:1px; text-transform:uppercase;
  }
  .drawer-item {
    display:flex; align-items:center; gap:10px; padding:11px 16px;
    cursor:pointer; font-size:14.5px; color:var(--text-dim);
  }
  .drawer-item:hover, .drawer-item:focus-visible { background:var(--surface-hover-2); color:var(--text); outline:none; }
  .drawer-item.active { background:linear-gradient(90deg, rgba(106,27,178,.35), transparent); color:var(--text); border-left:3px solid var(--accent-2); padding-left:13px; }
  .drawer-item .badge, .drawer-category .badge {
    margin-left:auto; background:var(--badge-bg); color:var(--text-dim); font-size:11px;
    padding:2px 8px; border-radius:10px;
  }
  .drawer-item .star { color:var(--star); filter:drop-shadow(0 0 4px rgba(244,197,66,.55)); }
  .drawer-category {
    display:flex; align-items:center; gap:8px; padding:10px 16px;
    cursor:pointer; font-size:14px; color:var(--text); font-weight:600;
    border-top:1px solid var(--border); margin-top:2px;
  }
  .drawer-category:hover, .drawer-category:focus-visible { background:var(--surface-hover-2); outline:none; }
  .drawer-category.active { background:linear-gradient(90deg, rgba(106,27,178,.25), transparent); border-left:3px solid var(--accent-2); padding-left:13px; }
  .cat-arrow { font-size:10px; color:var(--text-faint); width:14px; text-align:center; flex-shrink:0; }
  .cat-label { flex:1; }
  .drawer-subitems { display:none; }
  .drawer-subitem { padding-left:36px !important; font-size:13.5px !important; }
  .drawer-subitem .site-marker { font-size:11px; width:16px; text-align:center; flex-shrink:0; }
  .drawer-add {
    margin:10px 16px 0; padding:10px; border:1px dashed var(--border);
    border-radius:10px; text-align:center; color:var(--text-dim); font-size:13.5px;
    cursor:pointer;
  }
  .drawer-add:hover { border-color:var(--accent-2); color:var(--text); }

  /* ---------- Language flag strip ---------- */
  .lang-section { border-bottom: 1px solid var(--border); background: var(--surface-2); }
  .lang-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px; cursor: pointer; font-size: 12.5px; font-weight: 600;
    color: var(--text-dim); user-select: none; transition: background .15s;
  }
  .lang-header:hover { background: var(--surface-hover); color: var(--text); }
  .lang-header .arrow { font-size: 9px; transition: transform .22s ease; opacity: .7; }
  .lang-section.expanded .lang-header .arrow { transform: rotate(180deg); }

  .lang-strip {
    display:none; flex-wrap:nowrap; align-items:center; gap:6px;
    padding:0 16px 12px; background:var(--surface-2);
    overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
  }
  .lang-strip::-webkit-scrollbar { height: 3px; }
  .lang-strip::-webkit-scrollbar-track { background: transparent; }
  .lang-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
  .lang-section.expanded .lang-strip { display:flex; }

  .lang-chip {
    flex:0 0 auto; display:inline-flex; align-items:center; gap:3px;
    background:var(--surface); border:1px solid var(--border);
    border-radius:14px; padding:2px 8px; cursor:pointer;
    font-size:11px; color:var(--text-dim); white-space:nowrap;
    transition:background .15s, border-color .15s, color .15s;
  }
  .lang-chip:hover, .lang-chip:focus-visible {
    background:var(--accent); border-color:var(--accent-2); color:var(--on-accent);
    outline:none;
  }
  .lang-chip.active {
    background:var(--accent); border-color:var(--accent-2); color:var(--on-accent);
    font-weight:600;
  }  .lang-chip .flag { font-size:18px; line-height:1; font-family:'Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji','Twemoji Mozilla',sans-serif; text-rendering:optimizeLegibility; -webkit-font-smoothing:antialiased;
    filter:drop-shadow(0 1px 2px rgba(0,0,0,.4)) saturate(1.2);
    transform:scale(1); transition:transform .15s ease, filter .15s ease;
  }
  .lang-chip:hover .flag, .lang-chip.active .flag, .lang-opt:hover .flag, .lang-opt.active .flag {
    transform:scale(1.18);
    filter:drop-shadow(0 2px 4px rgba(0,0,0,.45)) saturate(1.35);
  }
  .lang-opt .flag {
    font-size:16px; filter:drop-shadow(0 1px 2px rgba(0,0,0,.35)) saturate(1.15);
    transition:transform .15s ease, filter .15s ease;
  }
  .site-chip .flag, .drawer-subitem .site-marker {
    filter:drop-shadow(0 1px 2px rgba(0,0,0,.35)) saturate(1.15);
  }
  .lang-chip .lname { font-size:10px; }
  .lang-export {
    margin-left:auto; flex:0 0 auto;
    display:inline-flex; align-items:center; justify-content:center;
    width:24px; height:24px; position:relative;
    background:none; border:none; color:var(--text-faint);
    cursor:pointer; font-size:13px; border-radius:50%;
  }
  .lang-export::before {
    content:''; position:absolute; inset:2px; border-radius:50%;
    background:linear-gradient(160deg, var(--accent), var(--accent-2));
    filter:blur(7px); opacity:0; transition:opacity .18s ease;
    z-index:-1;
  }
  .lang-export:hover { color:#fff; background:var(--accent); }
  .lang-export:hover::before { opacity:.65; }

  /* ---------- Status icon badges (заместват голи ✅/❌ емоджита) ---------- */
  .status-icon {
    display:inline-flex; align-items:center; justify-content:center;
    width:16px; height:16px; border-radius:50%; position:relative;
    vertical-align:-3px; margin-right:3px; flex-shrink:0;
    padding: 3px;
  }
  .status-icon svg { width: 100%; height: 100%; display: block; stroke-width: 3.5; }
  .status-icon::before {
    content:''; position:absolute; inset:-4px; border-radius:50%;
    filter:blur(6px); opacity:.5; z-index:-1;
  }
  .status-icon.ok { background:#1f9d55; color: #fff; }
  .status-icon.ok::before { background:#2ecc71; }
  .status-icon.error { background:#c0392b; color: #fff; }
  .status-icon.error::before { background:#e74c3c; }
  .status-icon.cache { background:#2172b8; color: #fff; }
  .status-icon.cache::before { background:#3ba7f0; }
  .status-icon.pending { background:#b8860b; color: #fff; }
  .status-icon.pending::before { background:#f5b942; }

  /* ---------- Favorite sites strip ---------- */
  .fav-title { display:flex; align-items:center; gap:8px; padding:14px 16px 8px; color:var(--text-dim); font-size:14px; }
  .fav-sites {
    display:flex; gap:14px; overflow-x:auto; padding:8px 16px 16px;
    scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
  }
  .fav-sites::-webkit-scrollbar { height: 4px; }
  .fav-sites::-webkit-scrollbar-track { background: transparent; }
  .fav-sites::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
  .site-chip { flex:0 0 auto; width:66px; text-align:center; cursor:pointer; background:none; border:none; }
  .site-chip .icon {
    width:58px; height:58px; border-radius:16px; display:flex; align-items:center;
    justify-content:center; font-weight:900; font-size:17px; color:var(--on-accent); margin:0 auto 6px;
    transition: box-shadow .2s ease, border .2s ease;
  }
  .site-chip.manual-fav .icon {
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.6), inset 0 0 8px rgba(46, 204, 113, 0.3);
    border: 2px solid #2ecc71;
    animation: favPulse 3s infinite ease-in-out;
  }
  @keyframes favPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(46, 204, 113, 0.5), inset 0 0 8px rgba(46, 204, 113, 0.2); transform: scale(1); }
    50% { box-shadow: 0 0 20px rgba(46, 204, 113, 0.8), inset 0 0 12px rgba(46, 204, 113, 0.4); transform: scale(1.03); }
  }
  .site-chip .name { font-size:11px; color:var(--text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }

  /* ---------- Status / title row ---------- */
  .status-row {
    display:flex; align-items:center; justify-content:space-between;
    padding:4px 16px 10px; color:var(--text-dim); font-size:13px;
  }
  .loading-bar { height:2px; background:linear-gradient(90deg,var(--accent),var(--accent-2)); display:none; }
  .loading-bar.active { display:block; animation:pulse 1s infinite; }
  @keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }

  /* ---------- Supertonic (офлайн ONNX глас) status ---------- */
  .supertonic-status {
    padding:8px 16px; font-size:13px; font-weight:600; color:var(--focus);
    background:var(--surface-2); border-bottom:2px solid var(--accent-2);
  }

  /* ---------- Voice bar (Edge/Azure TTS) ---------- */
  .voice-section { border-bottom: 1px solid var(--border); background: var(--surface-2); }
  .voice-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px; cursor: pointer; font-size: 12.5px; font-weight: 600;
    color: var(--text-dim); user-select: none; transition: background .15s;
  }
  .voice-header:hover { background: var(--surface-hover); color: var(--text); }
  .voice-header .arrow { font-size: 9px; transition: transform .22s ease; opacity: .7; }
  .voice-section.expanded .voice-header .arrow { transform: rotate(180deg); }

  .voice-bar {
    display:none; flex-direction:column; gap:10px; padding:0 16px 14px;
    background:var(--surface-2);
  }
  .voice-section.expanded .voice-bar { display:flex; }
  .voice-bar .voice-row {
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  }
  .voice-bar .voice-label { font-size:13px; color:var(--text-dim); white-space:nowrap; }
  .engine-toggle {
    display:flex; flex-wrap:wrap; gap:4px; background:var(--surface); border:1px solid var(--border);
    border-radius:10px; padding:3px; width:100%;
  }
  .engine-btn {
    flex:1 1 120px; background:none; border:none; color:var(--text-dim); cursor:pointer;
    font-size:13px; padding:8px 10px; border-radius:8px; white-space:nowrap;
    text-align:center; transition:background .15s, color .15s;
  }
  .engine-btn:hover { color:var(--text); }
  .engine-btn:focus-visible { outline:2px solid var(--focus); }
  .engine-btn.active { background:var(--accent); color:var(--on-accent); font-weight:600; }
  .engine-hint { width:100%; font-size:12px; color:var(--text-faint); }
  .voice-bar select {
    background:var(--surface); color:var(--text); border:1px solid var(--border);
    border-radius:8px; padding:7px 10px; font-size:13.5px; max-width:220px; flex:1 1 140px;
  }
  .voice-bar select:focus { outline:2px solid var(--focus); }
  .voice-bar .btn-demo {
    display:flex; align-items:center; justify-content:center; gap:6px; background:var(--accent); color:var(--on-accent);
    border:none; border-radius:8px; padding:7px 14px; font-size:13.5px; cursor:pointer;
    flex:0 0 auto;
  }
  .voice-bar .btn-demo:hover, .voice-bar .btn-demo:focus-visible { background:var(--accent-2); outline:none; }
  .voice-bar .btn-demo:disabled { opacity:.6; cursor:default; }
  /* Деструктивен вариант — за Uninstall бутоните, за да не се бъркат с Test/Install */
  .voice-bar .btn-demo.danger {
    background:rgba(239,68,68,.12);
    color:#ef4444;
    border:1px solid rgba(239,68,68,.45);
  }
  .voice-bar .btn-demo.danger:hover, .voice-bar .btn-demo.danger:focus-visible { background:rgba(239,68,68,.22); }
  .voice-bar .voice-status { font-size:12px; color:var(--text-faint); flex-basis:100%; }

  .empty-state { text-align:center; padding:64px 20px; color:var(--text-faint); }
  .empty-state .big {
    font-size:34px; margin:0 auto 14px; width:72px; height:72px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:linear-gradient(160deg, rgba(106,27,178,.16), rgba(140,63,240,.08));
    border:1px solid var(--border);
    filter:drop-shadow(0 3px 10px rgba(106,27,178,.35));
  }
  .empty-state .msg { font-size:14.5px; color:var(--text-dim); max-width:280px; margin:0 auto; }

  /* ---------- Article grid ---------- */
  .grid {
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap:16px; padding:0 16px 32px;
  }
  .card {
    background:var(--surface); border-radius:12px; padding:12px; box-shadow:var(--shadow);
    display:flex; flex-direction:column; border:1px solid transparent;
    transition:border-color .15s;
  }
  .card.read { opacity:.55; }
  .card:focus-within { border-color:var(--focus); }
  .row1 { display:flex; gap:12px; }
  .thumb-wrap { position:relative; width:96px; height:96px; flex-shrink:0; border-radius:8px; overflow:hidden; }
  .thumb-wrap img.blur {
    position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
    filter:blur(10px) brightness(.6); transform:scale(1.2);
  }
  .thumb-wrap img.main {
    position:relative; width:100%; height:100%; object-fit:cover; cursor:pointer;
  }
  .content { flex:1; display:flex; flex-direction:column; min-width:0; }
  .meta-row { display:flex; align-items:center; gap:8px; }
  .meta-row .dots { margin-left:auto; color:var(--text-dim); cursor:pointer; font-size:18px; background:none; border:none; }
  .tag {
    display:inline-block; background:var(--accent); color:var(--on-accent); font-size:11px;
    font-weight:700; padding:3px 8px; border-radius:4px; flex-shrink:0;
  }
  .source { color:var(--text-dim); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .card h3 { font-size:16px; margin-top:6px; font-weight:700; line-height:1.3; cursor:pointer; }
  .card .desc { font-size:12.5px; color:var(--text-dim); margin-top:6px; line-height:1.4;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .time { color:var(--text-faint); font-size:12px; margin-top:10px; }
  .actions { display:flex; justify-content:space-between; margin-top:12px; color:var(--text-dim); }
  .actions button {
    background:none; border:none; color:var(--text-dim); cursor:pointer;
    border-radius:8px; display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; font-size: 15px; transition: all .2s ease;
    padding: 0; /* Clear padding to rely on fixed height/width */
  }
  .actions button:hover, .actions button:focus-visible { color:var(--text); background:var(--surface-hover); outline:none; }
  .actions button.on { color:var(--focus); }
  .actions button[data-act="read"].on { color: #2ecc71; }
  .actions button[data-act="fav"], .actions button[data-act="read"] { transition:transform .2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color .2s ease; }
  .actions button svg { width: 18px; height: 18px; transition: fill .2s ease, stroke .2s ease; }
  .actions button[data-act="fav"].on { color:var(--star); filter:drop-shadow(0 0 6px rgba(244,197,66,.6)); transform:scale(1.1); }
  .actions button[data-act="fav"].on svg { fill: currentColor; }
  .actions button[data-act="ai"], .actions button[data-act="translate"] { font-size: 12px; font-weight: 700; }

  .drawer-item .star svg, .drawer-category .badge .star-tiny svg { width: 14px; height: 14px; vertical-align: -2px; }
  .star svg { fill: var(--star); color: var(--star); filter:drop-shadow(0 0 4px rgba(244,197,66,.4)); }
  .modal-overlay {
    position:fixed; inset:0; background:rgba(0,0,0,.6); display:none;
    align-items:center; justify-content:center; z-index:50; padding:20px;
  }
  .modal-overlay.open { display:flex; }
  .modal {
    background:var(--modal-bg); border:1px solid var(--border); border-radius:14px;
    max-width:420px; width:100%; padding:20px;
  }
  .modal h3 { margin-bottom:10px; font-size:17px; }
  .modal p { font-size:13.5px; color:var(--text-dim); line-height:1.5; margin-bottom:14px; }
  .modal input {
    width:100%; background:var(--surface-2); border:1px solid var(--border);
    color:var(--text); padding:9px 10px; border-radius:8px; margin-bottom:10px; font-size:14px;
  }
  .modal .row { display:flex; gap:10px; justify-content:flex-end; }
  .btn { padding:9px 16px; border-radius:8px; border:none; cursor:pointer; font-size:13.5px; }
  .btn.primary { background:var(--accent); color:var(--on-accent); }
  .btn.ghost { background:var(--btn-ghost-bg); color:var(--text-dim); }

  /* ---------- Onboarding & Guide Bubble ---------- */
  .guide-bubble {
    position: absolute; top: 120%; right: 0;
    background: var(--accent); color: #fff;
    padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35); z-index: 1000;
    white-space: nowrap; pointer-events: none;
    animation: bounceBubble 2s infinite ease-in-out;
    border: 1px solid var(--accent-2);
  }
  .guide-bubble::after {
    content: ''; position: absolute; bottom: 100%; right: 15px;
    border: 8px solid transparent; border-bottom-color: var(--accent);
  }
  @keyframes bounceBubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
  }

  /* ---------- Декоративни SVG иконки: слънце/луна, лупа, глобус ---------- */
  @keyframes sunSpin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
  @keyframes moonGlow { 0%,100% { filter:drop-shadow(0 0 2px rgba(187,134,252,.5)); } 50% { filter:drop-shadow(0 0 6px rgba(187,134,252,.9)); } }
  @keyframes globeSpin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
  @keyframes glassPeek { 0%,100% { transform:rotate(0deg) scale(1); } 25% { transform:rotate(-14deg) scale(1.1); } 75% { transform:rotate(10deg) scale(1.1); } }

  #btnTheme, #btnLang, #btnSearch, #btnHome { color:var(--text-dim); }
  #btnTheme svg, #btnLang svg, #btnSearch svg, #btnHome svg {
    width:21px; height:21px; display:block;
    transition:transform .25s ease, filter .25s ease, color .2s ease;
  }
  #btnTheme:hover, #btnLang:hover, #btnSearch:hover, #btnHome:hover,
  #btnTheme:focus-visible, #btnLang:focus-visible, #btnSearch:focus-visible, #btnHome:focus-visible { color:var(--accent-2); }

  /* Vox Player лого (вместо къщичка) — води към началния екран на сайта.
     Имитира brand-logo от Book Reader: бял квадрат с лилав play триъгълник. */
  #btnHome {
    width:34px; height:34px; padding:0;
    border-radius:10px; overflow:hidden;
    background:#fff; border:1px solid var(--border);
    display:flex; align-items:center; justify-content:center;
    flex:0 0 auto;
  }
  #btnHome svg { width:24px; height:24px; display:block; color:#512DA8; }
  #btnHome:hover, #btnHome:focus-visible {
    background:#fff; color:#512DA8;
    outline:none; box-shadow:0 0 0 2px var(--focus);
  }

  /* Слънце/луна */
  html[data-theme="light"] #btnTheme svg { color:#e8a317; filter:drop-shadow(0 0 4px rgba(232,163,23,.5)); }
  html:not([data-theme="light"]) #btnTheme svg { color:#BB86FC; animation:moonGlow 3.5s ease-in-out infinite; }
  #btnTheme:hover svg, #btnTheme:focus-visible svg {
    animation:sunSpin 1.2s linear infinite;
    filter:drop-shadow(0 0 8px rgba(232,163,23,.75));
  }

  /* Глобус */
  #btnLang svg { filter:drop-shadow(0 0 2px rgba(76,175,255,.3)); }
  #btnLang:hover svg, #btnLang:focus-visible svg {
    animation:globeSpin 1.6s linear infinite;
    color:#4fb2ff;
    filter:drop-shadow(0 0 6px rgba(76,175,255,.7));
  }

  /* Лупа */
  #btnSearch:hover svg, #btnSearch:focus-visible svg {
    animation:glassPeek .6s ease-in-out infinite;
    filter:drop-shadow(0 0 6px rgba(140,63,240,.7));
  }

  @media (prefers-reduced-motion: reduce) { * { animation:none !important; transition:none !important; } }

  /* ---------- GDPR / cookie consent banner ---------- */
  .cookie-consent {
    position:fixed; left:16px; right:16px; bottom:16px; z-index:90;
    max-width:460px; margin:0 auto;
    background:var(--modal-bg); border:1px solid var(--border); border-radius:14px;
    box-shadow:0 12px 40px rgba(0,0,0,.5); padding:18px 20px;
    opacity:0; transform:translateY(16px); pointer-events:none;
    transition:opacity .25s ease, transform .25s ease;
  }
  .cookie-consent.open { opacity:1; transform:translateY(0); pointer-events:auto; }
  .cookie-consent-title {
    display:flex; align-items:center; gap:8px;
    font-size:14.5px; font-weight:700; margin-bottom:6px;
  }
  .cookie-consent-text {
    font-size:12.5px; color:var(--text-dim); line-height:1.5; margin-bottom:14px;
  }
  .cookie-consent-buttons { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
  .cookie-consent-buttons .btn { font-size:13px; padding:9px 16px; }
  .cookie-consent-buttons .btn.primary:hover { background:var(--accent-2); }

  /* ---------- Google AdSense — in-feed ads ---------- */
  .feed-ad-slot {
    grid-column:1/-1; /* span all columns in the grid */
    min-height:90px; /* placeholder before ad loads */
    margin:4px 0 12px; padding:8px 0;
    border-top:1px solid var(--border);
    border-bottom:1px solid var(--border);
    display:flex; align-items:center; justify-content:center;
  }
  .feed-ad-slot.ads-filled { min-height:unset; margin:4px 0 12px; }
  .feed-ad-slot:empty { display:none; }
  /* Скривам slot-а ако ins елементът е празен (ad не се зареди) */
  .feed-ad-slot.ads-filled:has(> ins.adsbygoogle:empty) { display:none; }
  .feed-ad-slot .adsbygoogle { width:100%; }
  @media (min-width: 520px) {
    .cookie-consent { left:auto; right:20px; bottom:20px; margin:0; }
  }
