 :root{
      --bg:#f4f7ff;
      --panel:#ffffff;
      --panel2:#f7f9ff;
      --stroke:#d7deef;
      --ink:#111827;
      --muted:#5b647a;
      --brand:#2563eb;
      --brand2:#7c3aed;
      --ok:#16a34a;
      --warn:#d97706;
      --danger:#dc2626;
      --shadow: 0 10px 24px rgba(17,24,39,.10);
      --radius: 10px;
      --radius2: 12px;
    }

    *{box-sizing:border-box}

    /* Background contínuo */
    html{min-height:100%}
    html,body{
      margin:0;
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background-color: var(--bg);
      color: var(--ink);
    }
    body{
      min-height:100vh;
      background:
        radial-gradient(1100px 650px at 10% 0%, rgba(37,99,235,.10), transparent 60%),
        radial-gradient(900px 600px at 90% 10%, rgba(124,58,237,.10), transparent 60%),
        radial-gradient(900px 600px at 50% 100%, rgba(22,163,74,.08), transparent 60%),
        var(--bg);
      background-repeat: no-repeat;
      background-attachment: fixed;
      background-size: cover;
    }

    .wrap{max-width:1200px; margin:0 auto; padding:22px 18px 40px}

    header{
      display:flex;
      gap:14px;
      align-items:flex-end;
      justify-content:space-between;
      margin-bottom:16px;
    }

    .brand{display:flex; flex-direction:column; gap:4px;}
    .brand-top{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
    .brand h1{margin:0; font-size:20px; letter-spacing:.2px}
    .badge{display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; border-radius:999px; border:1px solid rgba(17,24,39,.12); background: rgba(17,24,39,.03); color: rgba(17,24,39,.85); font-size:12px; line-height:1; white-space:nowrap}
    html[data-theme="dark"] .badge{border:1px solid rgba(226,232,240,.14); background: rgba(226,232,240,.04); color: rgba(229,231,235,.92)}
    .brand p{margin:0; color:var(--muted); font-size:13px; line-height:1.35}

    .top-actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}

    .search{
      width:min(520px, 100%);
      display:flex;
      gap:10px;
      align-items:center;
      padding:10px 12px;
      background: linear-gradient(180deg, rgba(17,24,39,.02), rgba(17,24,39,.00));
      border:1px solid rgba(17,24,39,.12);
      border-radius: 12px;
      box-shadow: 0 10px 24px rgba(0,0,0,.12);
    }
    .search input{width:100%; border:0; outline:0; background:transparent; color:var(--ink); font-size:13px;}
    .search input::placeholder{color:rgba(91,100,122,.65)}

    .playerPanel{width:100%}
    .libraryPanel{width:100%}

    /* Botao de voltar para a biblioteca dentro do player */
    .player-back{
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 600;
      padding: 8px 14px;
      border-radius: 10px;
    }
    .player-hd{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    /* Playlist na tela dedicada: mais espaco que no modo sticky */
    #viewPlayer .playlist{
      max-height: calc(100dvh - 460px);
      min-height: 120px;
      overflow-y: auto;
    }

    @media (max-width: 980px){
      header{flex-direction:column; align-items:stretch}
      .top-actions{justify-content:flex-start}
    }

    @media (max-width: 760px){
      header{padding-left:60px;}
      #viewPlayer .playlist{max-height: calc(100dvh - 420px)}
    }

    @media (max-height: 600px){
      #viewPlayer .playlist{max-height: calc(100dvh - 380px)}
    }

    .panel{
      background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.86));
      border: 1px solid rgba(17,24,39,.12);
      border-radius: var(--radius2);
      box-shadow: var(--shadow);
      overflow:hidden;
    }

    .panel-hd{
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:14px 14px 12px;
      border-bottom:1px solid rgba(17,24,39,.08);
    }
    .panel-hd h2{margin:0; font-size:14px; letter-spacing:.2px}
    .panel-hd small{color:var(--muted)}

    /* Biblioteca */
    .library{padding: 14px; display:flex; flex-direction:column; gap: 14px;}

    .cat{
      border: 1px solid rgba(17,24,39,.10);
      border-radius: var(--radius2);
      background: rgba(255,255,255,.60);
      overflow:hidden;
    }
    .cat-hd{
      display:flex;
      align-items:baseline;
      justify-content:space-between;
      gap:10px;
      padding: 12px 12px;
      cursor: pointer;
      user-select: none;
      background: linear-gradient(180deg, rgba(17,24,39,.03), rgba(17,24,39,.00));
      border-bottom: 1px solid rgba(17,24,39,.08);
    }
    .cat-hd h3{margin:0; font-size:13px; letter-spacing:.2px}
    .cat-hd small{color:var(--muted); font-size:12px}

    .cat-hd .chev{display:inline-flex; align-items:center; justify-content:center; width:18px; color:var(--muted); transition: transform .12s ease;}
    .cat.collapsed .cat-hd .chev{transform: rotate(-90deg)}
    .cat.collapsed .cat-grid{display:none}

    .cat-grid{padding: 12px; display:grid; grid-template-columns: repeat(2, 1fr); gap: 12px;}
    @media (max-width: 520px){ .cat-grid{grid-template-columns: 1fr} }

    .card{
      position: relative;
      display:flex;
      gap: 12px;
      padding: 12px;
      padding-bottom: 28px;
      border-radius: var(--radius);
      border: 1px solid rgba(17,24,39,.12);
      background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,249,255,.90));
      transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
      cursor:pointer;
    }
    .card:hover{transform: translateY(-2px); border-color: rgba(37,99,235,.35); box-shadow: 0 16px 30px rgba(17,24,39,.12)}
    .card.active{border-color: rgba(37,99,235,.55); box-shadow: 0 18px 34px rgba(17,24,39,.16)}

    .thumb{
      width: 54px;
      height: 72px;
      border-radius: 8px;
      border: 1px solid rgba(17,24,39,.12);
      background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(124,58,237,.08));
      overflow:hidden;
      flex: 0 0 auto;
    }
    .thumb img{width:100%; height:100%; object-fit:cover; display:block}
    .thumb .ph{
      width:100%; height:100%; display:flex;
      align-items:center; justify-content:center;
      font-weight:700; font-size:12px;
      color: rgba(17,24,39,.70);
      text-transform: uppercase;
      letter-spacing:.4px;
    }

    .meta{min-width:0; flex:1; padding-right: 46px}
    .meta .title{
      font-weight:700;
      font-size:13px;
      line-height:1.2;
      margin:0 0 6px 0;
      overflow:hidden;
      text-overflow:ellipsis;
      display:-webkit-box;
      -webkit-line-clamp:2;
      -webkit-box-orient: vertical;
    }
    .meta .sub{margin:0; color:var(--muted); font-size:12px; line-height:1.25}

    .wbar{height:7px; width:100%; border-radius: 7px; background: rgba(17,24,39,.06); border: 1px solid rgba(17,24,39,.10); overflow:hidden;}
    /* Progress do tile ocupando o width disponível do card */
    .card .wbar{position:absolute; left:12px; right:12px; bottom:10px; margin:0; width:auto;}
    .wfill{height:100%; width:0%; background: linear-gradient(90deg, rgba(22,163,74,.70), rgba(37,99,235,.70));}

    /* Player */
    .player{padding: 14px; display:flex; flex-direction:column; gap: 12px; min-height: 0; overflow: hidden;}

    .now{display:flex; gap:12px; align-items:flex-start;}
    .now .cover{width: 92px; height: 122px; border-radius: 10px; border:1px solid rgba(17,24,39,.12); overflow:hidden; background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(124,58,237,.08)); flex: 0 0 auto;}
    .now .cover img{width:100%; height:100%; object-fit:cover; display:block}

    .now .info{min-width:0; flex:1}
    .now .info h3{margin:0 0 6px; font-size:14px; letter-spacing:.2px}
    .now .info p{margin:0; color:var(--muted); font-size:12px; line-height:1.35}
    .now .info p.nowPlaying{
      margin: 2px 0 4px;
      font-size: 12px;
      font-weight: 600;
      color: rgba(37,99,235,.95);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    html[data-theme="dark"] .now .info p.nowPlaying{color: rgba(191,219,254,.95)}

    .controls{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}

    .btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      border:1px solid rgba(17,24,39,.12);
      background: rgba(17,24,39,.03);
      color: var(--ink);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 12px;
      cursor:pointer;
      user-select:none;
      transition: transform .10s ease, border-color .12s ease;
    }
    .btn:hover{transform: translateY(-1px); border-color: rgba(37,99,235,.28)}
    .btn.primary{background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(124,58,237,.10)); border-color: rgba(37,99,235,.28);}
    .btn:disabled{opacity:.55; cursor:not-allowed; transform:none}
    /* Botoes apenas com icone (prev/next/dl/share/etc): compactos e quadrados */
    .btn.btn-icon{
      padding: 10px;
      min-width: 40px;
      font-size: 16px;
      line-height: 1;
    }
    /* Play/Pause: destaca um pouco maior */
    .btn.btn-icon.primary{
      min-width: 48px;
      font-size: 18px;
    }
    /* Spinner de carregamento — substitui visualmente o ícone do botão play */
    .btn.btn-icon.loading{
      position: relative;
      color: transparent !important;
      pointer-events: none;
    }
    .btn.btn-icon.loading::after{
      content: '';
      position: absolute;
      inset: 8px;
      border-radius: 50%;
      border: 2.5px solid rgba(37,99,235,.18);
      border-top-color: #2563eb;
      animation: playbtn-spin .65s linear infinite;
    }
    html[data-theme="dark"] .btn.btn-icon.loading::after{
      border-color: rgba(120,160,255,.18);
      border-top-color: #7cabff;
    }
    @keyframes playbtn-spin{ to{ transform: rotate(360deg); } }
    /* Botões de skip ±10 s */
    .btn.btn-skip{
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 6px 8px;
      min-width: 38px;
      gap: 1px;
      font-size: 16px;
      line-height: 1;
    }
    .btn.btn-skip span{
      font-size: 10px;
      font-weight: 700;
      line-height: 1;
      opacity: .80;
    }

    /* Speed (1.0×): mesma silhueta dos icone, mas com texto curto menor */
    .btn.btn-icon-text{
      padding: 10px;
      min-width: 40px;
      font-size: 12px;
      font-weight: 600;
      line-height: 1;
    }
    #dlStatusVis{margin-top:-4px; color:var(--muted); font-size:12px; padding:0 2px; min-height: 16px;}

    /* Volume */
    .vol-row{display:flex; align-items:center; gap:8px; padding: 2px 0 6px;}
    .vol-icon{font-size:14px; flex:0 0 auto; cursor:default; user-select:none; width:20px; text-align:center;}
    .vol-slider{flex:1; accent-color:var(--brand); height:4px; max-width:180px; cursor:pointer;}
    .le-vol-ctrl{display:inline-flex; align-items:center; gap:6px; flex:0 0 auto;}
    .le-vol-ctrl .vol-slider{width:80px; max-width:80px;}
    @media (max-width:520px){
      .le-vol-ctrl .vol-slider{width:60px;}
    }

    .bar{display:flex; flex-direction:column; gap:6px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(17,24,39,.12); background: rgba(255,255,255,.70);}
    .time{display:flex; justify-content:space-between; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums;}
    input[type="range"]{width: 100%; accent-color: var(--brand);}

    .plist{border-top:1px solid rgba(17,24,39,.10); padding-top:10px; min-height:0; display:flex; flex-direction:column; gap:10px;}
    .plist-hd{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 10px; border-radius: 10px; border: 1px solid rgba(17,24,39,.12); background: rgba(17,24,39,.02); cursor:pointer; user-select:none;}
    .plist-hd .lbl{font-weight:700; font-size:12px}
    .plist-hd small{color:var(--muted); font-size:12px}
    .plist-hd .chev{display:inline-flex; width:18px; justify-content:center; color:var(--muted); transition: transform .12s ease;}
    .plist.collapsed .plist-hd .chev{transform: rotate(-90deg)}
    .plist.collapsed .playlist{display:none}

    .playlist{flex: 1 1 auto; min-height: 0; max-height: 380px; overflow-y: auto; padding-right: 6px;}

    .track{display:flex; gap:10px; align-items:center; padding:10px 10px; border-radius: 10px; cursor:pointer; border:1px solid transparent;}
    .track:hover{background: rgba(17,24,39,.03); border-color: rgba(17,24,39,.10)}
    .track.active{background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.22)}

    .track .idx{width: 26px; height: 26px; border-radius: 6px; display:flex; align-items:center; justify-content:center; font-size: 11px; color: rgba(17,24,39,.80); background: rgba(17,24,39,.04); border:1px solid rgba(17,24,39,.12); flex: 0 0 auto;}
    .track .tmeta{min-width:0; flex:1}
    .track .tmeta .name{margin:0; font-size:12px; line-height:1.2; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
    .track .tmeta .dur{margin:3px 0 0; color:var(--muted); font-size:11px}

    .track .pbar{margin-top:6px; height:6px; border-radius: 6px; background: rgba(17,24,39,.06); border: 1px solid rgba(17,24,39,.10); overflow:hidden;}
    .track .pfill{height:100%; width:0%; background: linear-gradient(90deg, rgba(37,99,235,.85), rgba(124,58,237,.70));}

    .trackActions{
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .trackIconBtn{
      width: 30px; height: 30px;
      border-radius: 8px;
      border: 1px solid rgba(17,24,39,.10);
      background: rgba(255,255,255,.6);
      color: rgba(17,24,39,.70);
      font-size: 13px;
      line-height: 1;
      cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center;
      transition: background .12s ease, transform .08s ease, border-color .12s ease;
      padding: 0;
    }
    .trackIconBtn:hover{background: rgba(37,99,235,.10); border-color: rgba(37,99,235,.30); color: rgba(37,99,235,.95)}
    .trackIconBtn:active{transform: scale(.96)}
    .trackIconBtn:focus-visible{outline: 2px solid rgba(37,99,235,.55); outline-offset: 1px}
    html[data-theme="dark"] .trackIconBtn{
      background: rgba(15,23,42,.55);
      border-color: rgba(226,232,240,.16);
      color: rgba(229,231,235,.80);
    }
    html[data-theme="dark"] .trackIconBtn:hover{background: rgba(37,99,235,.20); border-color: rgba(37,99,235,.45); color: rgba(191,219,254,.95)}

    @media (max-width: 480px){
      .trackActions{gap: 2px}
      .trackIconBtn{width: 28px; height: 28px; font-size: 12px}
    }

    /* ===== Cloud sync ===== */
    .cloud-btn{ opacity: .7; transition: opacity .15s; }
    .cloud-btn:hover{ opacity: 1; }
    .cloud-btn.synced::after{          /* indicador verde quando logado */
      content: ''; display: inline-block;
      width: 7px; height: 7px; border-radius: 50%;
      background: #22c55e;
      margin-left: 3px; vertical-align: middle;
    }

    .cloud-overlay{
      position: fixed; inset: 0; z-index: 9000;
      background: rgba(0,0,0,.45);
      display: flex; align-items: center; justify-content: center;
      padding: 16px;
    }
    .cloud-overlay[hidden]{ display: none; }

    .cloud-dialog{
      background: var(--panel);           /* era var(--card) — variável inexistente */
      border: 1px solid var(--stroke);    /* era var(--border) — variável inexistente */
      border-radius: 18px;
      padding: 28px 28px 24px;
      width: 100%; max-width: 380px;
      box-shadow: 0 32px 80px rgba(0,0,0,.38), 0 8px 24px rgba(0,0,0,.18);
      position: relative;
      display: flex; flex-direction: column; gap: 12px;
    }
    html[data-theme="dark"] .cloud-dialog{
      background: #131e35;
      border-color: rgba(226,232,240,.16);
      box-shadow: 0 32px 80px rgba(0,0,0,.65), 0 8px 24px rgba(0,0,0,.40);
    }
    .cloud-close{
      position: absolute; top: 14px; right: 14px;
      background: none; border: none; cursor: pointer;
      font-size: 16px; color: var(--muted); padding: 4px 8px;
      border-radius: 8px; line-height: 1;
    }
    .cloud-close:hover{ color: var(--ink); background: var(--stroke); }

    .cloud-header{
      display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
    }
    .cloud-icon-lg{ font-size: 26px; }
    .cloud-title{ font-size: 17px; font-weight: 700; margin: 0; }

    .cloud-desc{
      font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0;
    }
    .cloud-input{
      width: 100%; box-sizing: border-box;
      padding: 10px 12px; font-size: 14px;
      border: 1px solid var(--stroke); border-radius: 10px;
      background: var(--panel2); color: var(--ink);
      outline: none;
    }
    .cloud-input:focus{ border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
    .cloud-error{
      font-size: 12px; color: #dc2626; margin: 0;
    }
    .cloud-action-btn{
      width: 100%; justify-content: center;
    }
    .cloud-logout-btn{
      font-size: 12px; opacity: .7;
    }
    .cloud-logout-btn:hover{ opacity: 1; }

    .cloud-user-email{
      font-size: 13px; font-weight: 600;
      word-break: break-all; margin: 0;
      color: var(--ink);
    }
    .cloud-sync-status{
      font-size: 12px; color: var(--muted); margin: 0;
    }

    html[data-theme="dark"] .cloud-input{
      border-color: rgba(255,255,255,.12);
    }
    html[data-theme="dark"] .cloud-input:focus{
      border-color: #6395ff;
      box-shadow: 0 0 0 3px rgba(99,149,255,.18);
    }
    /* ===== /Cloud sync ===== */

    /* ── Banner de sincronização mais recente ── */
    .sync-banner{
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 8500;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      padding: 12px 20px;
      background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
      color: #fff;
      font-size: 13px;
      box-shadow: 0 -4px 24px rgba(0,0,0,.28);
      animation: syncBannerIn .3s ease;
    }
    .sync-banner[hidden]{ display: none; }
    @keyframes syncBannerIn{ from{ transform: translateY(100%); opacity: 0; } }
    .sync-banner-msg{ flex: 1; min-width: 0; }
    .sync-banner-btns{ display: flex; gap: 8px; flex-shrink: 0; }
    /* Botões autônomos do sync-banner (sem herança do sistema .btn) */
    .sbtn{
      display: inline-flex; align-items: center; justify-content: center;
      padding: 7px 18px; border-radius: 8px;
      border: 1.5px solid rgba(255,255,255,.40);
      background: rgba(255,255,255,.18); color: #fff;
      font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
      transition: background .15s;
    }
    .sbtn:hover{ background: rgba(255,255,255,.30); }
    .sbtn-primary{ background: #fff; color: #1d4ed8; border-color: #fff; }
    .sbtn-primary:hover{ background: rgba(255,255,255,.88); }

    .toast{position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(17,24,39,.12); background: rgba(255,255,255,.86); color: rgba(17,24,39,.90); font-size: 12px; box-shadow: 0 18px 40px rgba(17,24,39,.18); display:none; max-width: min(980px, calc(100% - 24px)); text-align:center;}

    .sr{position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden}

    /* =========================
       Tema escuro
       ========================= */
    html[data-theme="dark"]{
      --bg:#0b1220;
      --panel:#0f172a;
      --panel2:#0b1327;
      --stroke:rgba(226,232,240,.14);
      --ink:#e5e7eb;
      --muted:#a7b0c0;
      --shadow: 0 16px 34px rgba(0,0,0,.48);
    }

    html[data-theme="dark"] body{
      background:
        radial-gradient(1100px 650px at 10% 0%, rgba(37,99,235,.18), transparent 60%),
        radial-gradient(900px 600px at 90% 10%, rgba(124,58,237,.18), transparent 60%),
        radial-gradient(900px 600px at 50% 100%, rgba(22,163,74,.12), transparent 60%),
        var(--bg);
      background-repeat: no-repeat;
      background-attachment: fixed;
      background-size: cover;
      background-color: var(--bg);
      color: var(--ink);
    }

    html[data-theme="dark"] .panel{
      background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(11,19,39,.90));
      border: 1px solid rgba(226,232,240,.14);
      box-shadow: var(--shadow);
    }

    html[data-theme="dark"] .panel-hd{border-bottom: 1px solid rgba(226,232,240,.10)}

    html[data-theme="dark"] .search{
      background: linear-gradient(180deg, rgba(226,232,240,.06), rgba(226,232,240,.02));
      border: 1px solid rgba(226,232,240,.14);
      box-shadow: 0 12px 30px rgba(0,0,0,.40);
    }
    html[data-theme="dark"] .search input::placeholder{color: rgba(167,176,192,.70)}

    html[data-theme="dark"] .cat{
      border: 1px solid rgba(226,232,240,.12);
      background: rgba(15,23,42,.55);
    }
    html[data-theme="dark"] .cat-hd{
      background: linear-gradient(180deg, rgba(226,232,240,.06), rgba(226,232,240,.02));
      border-bottom: 1px solid rgba(226,232,240,.10);
    }

    html[data-theme="dark"] .card{
      background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(11,19,39,.88));
      border: 1px solid rgba(226,232,240,.14);
    }
    html[data-theme="dark"] .card:hover{border-color: rgba(37,99,235,.42); box-shadow: 0 18px 38px rgba(0,0,0,.42)}
    html[data-theme="dark"] .card.active{border-color: rgba(37,99,235,.60)}

    html[data-theme="dark"] .thumb,
    html[data-theme="dark"] .now .cover{
      border: 1px solid rgba(226,232,240,.14);
    }

    html[data-theme="dark"] .bar,
    html[data-theme="dark"] .plist-hd{
      border: 1px solid rgba(226,232,240,.14);
      background: rgba(226,232,240,.04);
    }

    html[data-theme="dark"] .track:hover{background: rgba(226,232,240,.04); border-color: rgba(226,232,240,.12)}
    html[data-theme="dark"] .track.active{background: rgba(37,99,235,.14); border-color: rgba(37,99,235,.30)}

    html[data-theme="dark"] .toast{
      background: rgba(15,23,42,.92);
      color: rgba(229,231,235,.92);
      border: 1px solid rgba(226,232,240,.14);
      box-shadow: 0 20px 44px rgba(0,0,0,.55);
    }

    html[data-theme="dark"] .btn{
      border: 1px solid rgba(226,232,240,.14);
      background: rgba(226,232,240,.04);
      color: var(--ink);
    }
    html[data-theme="dark"] .btn.primary{background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(124,58,237,.14)); border-color: rgba(37,99,235,.38)}


    html[data-theme="dark"] .wbar,
    html[data-theme="dark"] .track .pbar{background: rgba(226,232,240,.05); border: 1px solid rgba(226,232,240,.12)}

    html[data-theme="dark"] .track .idx{background: rgba(226,232,240,.05); border: 1px solid rgba(226,232,240,.14); color: rgba(229,231,235,.85)}

    html[data-theme="dark"] input[type="range"]{accent-color: rgba(147,197,253,.95)}

    html[data-theme="dark"] .search input{color: var(--ink)}

    html[data-theme="dark"] .panel-hd small,
    html[data-theme="dark"] .cat-hd small,
    html[data-theme="dark"] .meta .sub,
    html[data-theme="dark"] .now .info p,
    html[data-theme="dark"] .time,
    html[data-theme="dark"] .track .tmeta .dur{color: var(--muted)}

    html[data-theme="dark"] .cat-hd .chev,
    html[data-theme="dark"] .plist-hd .chev{color: rgba(167,176,192,.90)}

    html[data-theme="dark"] .thumb .ph{color: rgba(229,231,235,.80)}

    html[data-theme="dark"] .panel-hd h2,
    html[data-theme="dark"] .cat-hd h3,
    html[data-theme="dark"] .meta .title,
    html[data-theme="dark"] .now .info h3{color: var(--ink)}

    html[data-theme="dark"] .libraryPanel .panel-hd,
    html[data-theme="dark"] .playerPanel .panel-hd{background: rgba(226,232,240,.02)}

    html[data-theme="dark"] .search input{caret-color: rgba(147,197,253,.95)}
    html[data-theme="dark"] .search input::selection{background: rgba(37,99,235,.35)}
    html[data-theme="dark"] .btn:hover{border-color: rgba(147,197,253,.32)}

    /* Botão de tema sempre no canto superior direito */
    #themeBtn{position:fixed; top:14px; right:14px; z-index:9999; width:44px; padding:10px 0; font-size:14px}
    /* Botão de cloud ao lado do botão de tema */
    #cloudBtn{position:fixed; top:14px; right:62px; z-index:9998; width:44px; padding:10px 0; font-size:15px}
    @media (max-width: 520px){
      #themeBtn{top:10px; right:10px}
      #cloudBtn{top:10px; right:58px}
    }

    /* =========================
       Toolbar (Home/Histórico)
       - Desktop: expandido
       - Mobile: colapsado (drawer)
       ========================= */

    .toolbar{
      position: sticky;
      top: 0;
      left: 0;
      width: 100%;
      height: auto;
      z-index: 9000;
      padding: 10px 12px;
      background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.86));
      border-bottom: 1px solid rgba(17,24,39,.10);
      box-shadow: 0 10px 24px rgba(17,24,39,.10);
      overflow: visible;
    }

    .tb-inner{display:flex; flex-direction:row; gap:10px; align-items:center; justify-content:flex-start;}

    .tb-title{display:none; font-size:12px; color:rgba(91,100,122,.85); padding: 4px 8px 2px;}

    .tb-btn{
      display:flex;
      align-items:center;
      gap:10px;
      width: auto;
      border: 1px solid rgba(17,24,39,.12);
      background: rgba(17,24,39,.03);
      color: var(--ink);
      border-radius: 10px;
      padding: 10px 10px;
      font-size: 13px;
      cursor: pointer;
      user-select: none;
      transition: transform .10s ease, border-color .12s ease;
      text-align:left;
    }
    .tb-btn:hover{transform: translateY(-1px); border-color: rgba(37,99,235,.28)}
    .tb-btn.active{background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(124,58,237,.10)); border-color: rgba(37,99,235,.30); font-weight:700;}

    .tb-ico{width: 22px; display:inline-flex; justify-content:center; opacity:.95}

    .tb-toggle{display:none; position: fixed; top: 14px; left: 14px; z-index: 9998; width:44px; padding:10px 0;}

    .views{display:block;}
    .view{display:none;}
    .view.active{display:block;}

    .historyWrap{padding: 14px; display:flex; flex-direction:column; gap: 12px;}

    /* Favoritar (estrela nos tiles) */
    .favBtn{
      position:absolute;
      top:10px;
      right:10px;
      width:34px;
      height:34px;
      border-radius: 10px;
      border:1px solid rgba(17,24,39,.14);
      background: rgba(255,255,255,.78);
      color: rgba(17,24,39,.82);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      cursor:pointer;
      user-select:none;
      line-height: 1;
      font-size: 16px;
      box-shadow: 0 8px 18px rgba(17,24,39,.10);
      transition: transform .10s ease, border-color .12s ease, background .12s ease;
      z-index: 5;
    }
    .favBtn:hover{transform: translateY(-1px); border-color: rgba(37,99,235,.28)}
    .favBtn.on{background: linear-gradient(135deg, rgba(250,204,21,.20), rgba(37,99,235,.10)); border-color: rgba(250,204,21,.40); color: rgba(146,64,14,.95)}

    html[data-theme="dark"] .favBtn{
      background: rgba(15,23,42,.78);
      border:1px solid rgba(226,232,240,.16);
      color: rgba(229,231,235,.88);
    }
    html[data-theme="dark"] .favBtn.on{background: linear-gradient(135deg, rgba(250,204,21,.16), rgba(37,99,235,.14)); border-color: rgba(250,204,21,.32); color: rgba(253,230,138,.92)}

    .hitem{
      position: relative;
      display:flex; gap:12px; align-items:center;
      padding: 12px;
      border-radius: var(--radius);
      border: 1px solid rgba(17,24,39,.12);
      background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,249,255,.90));
      cursor:pointer;
      transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
    }
    .hitem:hover{transform: translateY(-2px); border-color: rgba(37,99,235,.35); box-shadow: 0 16px 30px rgba(17,24,39,.12)}
    .hmeta{min-width:0; flex:1}
    .hmeta .ht{margin:0 0 4px; font-weight:700; font-size:13px; line-height:1.2; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
    .hmeta .hs{margin:0; color: var(--muted); font-size:12px; line-height:1.25; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}

    /* Botão de desfavoritar na lista de Favoritos */
    .favMini{
      position:absolute;
      top:10px;
      right:10px;
      width:34px;
      height:34px;
      border-radius: 10px;
      border:1px solid rgba(17,24,39,.14);
      background: rgba(255,255,255,.78);
      color: rgba(17,24,39,.82);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      cursor:pointer;
      user-select:none;
      line-height: 1;
      font-size: 16px;
      box-shadow: 0 8px 18px rgba(17,24,39,.10);
      transition: transform .10s ease, border-color .12s ease, background .12s ease;
      z-index: 6;
    }
    .favMini:hover{transform: translateY(-1px); border-color: rgba(37,99,235,.28)}
    .favMini.on{background: linear-gradient(135deg, rgba(250,204,21,.20), rgba(37,99,235,.10)); border-color: rgba(250,204,21,.40); color: rgba(146,64,14,.95)}

    html[data-theme="dark"] .favMini{
      background: rgba(15,23,42,.78);
      border:1px solid rgba(226,232,240,.16);
      color: rgba(229,231,235,.88);
    }
    html[data-theme="dark"] .favMini.on{background: linear-gradient(135deg, rgba(250,204,21,.16), rgba(37,99,235,.14)); border-color: rgba(250,204,21,.32); color: rgba(253,230,138,.92)}

    /* Mobile: toolbar vira drawer */
    @media (max-width: 760px){
      .toolbar{
        position: fixed;
        top: 0;
        left: 0;
        width: min(84vw, 320px);
        height: 100vh;
        transform: translateX(-110%);
        transition: transform .16s ease;
        box-shadow: 18px 0 44px rgba(17,24,39,.22);
        overflow: auto;
        padding: 14px 12px;
        border-bottom: 0;
        border-right: 1px solid rgba(17,24,39,.10);
      }
      .toolbar.open{transform: translateX(0);}
      .tb-toggle{display:inline-flex;}
      .tb-inner{flex-direction:column; align-items:stretch;}
      .tb-title{display:block;}
      .tb-btn{width:100%;}
    }

    /* Dark mode toolbar */
    html[data-theme="dark"] .toolbar{
      background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(11,19,39,.90));
      border-bottom: 1px solid rgba(226,232,240,.12);
      box-shadow: 12px 0 34px rgba(0,0,0,.55);
    }
    html[data-theme="dark"] .tb-btn{
      border: 1px solid rgba(226,232,240,.14);
      background: rgba(226,232,240,.04);
      color: var(--ink);
    }
    html[data-theme="dark"] .tb-btn.active{background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(124,58,237,.14)); border-color: rgba(37,99,235,.38)}
    html[data-theme="dark"] .hitem{background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(11,19,39,.88)); border: 1px solid rgba(226,232,240,.14)}

/* =========================
   Fullscreen da capa
   ========================= */
.now .cover img{cursor: zoom-in;}

body.noScroll{overflow:hidden;}

.fsOverlay{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}
.fsOverlay.open{display:flex;}

.fsOverlay img{
  max-width: min(92vw, 980px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.20);
  box-shadow: 0 26px 60px rgba(0,0,0,.55);
  background: rgba(0,0,0,.18);
}

.fsClose{
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10001;
  width: 44px;
  padding: 10px 0;
  font-size: 14px;
}

@media (max-width: 520px){
  .fsClose{top: 10px; right: 10px;}
}

/* =========================
   Livro dos Espiritos (LE)
   ========================= */
.le-intro{padding: 0 12px 10px; color: var(--muted); font-size: 13px}
.le-intro p{margin: 0}
.le-intro strong{color: var(--ink)}

.le-toolbar{
  display:flex; gap: 10px; align-items: center;
  padding: 8px 12px 12px; flex-wrap: wrap;
}
.le-toolbar .search{flex: 1 1 280px; min-width: 0}
.le-langs{display: inline-flex; gap: 4px; flex: 0 0 auto}
.le-lang{padding: 6px 12px; font-size: 12px}
.le-lang.active{background: rgba(37,99,235,.15); border-color: rgba(37,99,235,.45); color: rgba(37,99,235,.95); font-weight: 600}
html[data-theme="dark"] .le-lang.active{background: rgba(37,99,235,.25); border-color: rgba(37,99,235,.55); color: rgba(191,219,254,.95)}

/* Player sequencial das perguntas */
.le-player{
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(124,58,237,.08));
  border: 1px solid rgba(37,99,235,.30);
  box-shadow: 0 6px 18px rgba(17,24,39,.10);
}
html[data-theme="dark"] .le-player{
  background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(124,58,237,.15));
  border-color: rgba(37,99,235,.50);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.le-player[hidden]{display: none}

.le-player-controls{display:flex; gap:8px; align-items:center; flex-wrap: wrap; margin-bottom: 10px}

/* Card fixo com a pergunta e resposta do áudio tocando */
.le-now-card{
  border-top: 1px dashed rgba(37,99,235,.25);
  padding-top: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.le-now-header{ display: flex; align-items: center; gap: 8px; justify-content: space-between; }

/* Botão de colapso do card */
.le-card-toggle{
  flex-shrink: 0;
  padding: 2px 7px;
  font-size: 14px;
  line-height: 1;
  border-radius: 6px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  transition: transform .15s ease, color .12s ease;
  cursor: pointer;
}
.le-card-toggle:hover{ color: var(--brand); }

/* Colapso: chevron roda e corpo desaparece */
.le-now-card.collapsed .le-card-toggle{ transform: rotate(-90deg); }
.le-now-card.collapsed .le-now-body{ display: none; }
.le-now-id{
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(37,99,235,.18);
  border: 1px solid rgba(37,99,235,.30);
  color: rgba(37,99,235,.95);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
html[data-theme="dark"] .le-now-id{ background: rgba(37,99,235,.30); border-color: rgba(37,99,235,.50); color: rgba(191,219,254,.95) }
.le-now-q{
  font-size: 13px; font-weight: 600; color: var(--ink);
  line-height: 1.4;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.22);
}
html[data-theme="dark"] .le-now-q{background: rgba(22,163,74,.13); border-color: rgba(22,163,74,.32)}
.le-now-r{
  font-size: 13px; color: var(--ink);
  line-height: 1.45; white-space: pre-wrap;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(17,24,39,.04);
  border: 1px solid rgba(17,24,39,.09);
}
html[data-theme="dark"] .le-now-r{background: rgba(226,232,240,.05); border-color: rgba(226,232,240,.12)}
.le-now-actions{display:flex; gap:8px; flex-wrap:wrap}
.le-now-actions .btn{padding: 6px 10px; font-size: 12px}
.le-player-seek{
  flex: 1 1 160px;
  min-width: 120px;
  height: 4px;
}
.le-player-time{font-size: 11px; color: var(--muted); flex: 0 0 auto; white-space: nowrap}

@media (max-width: 520px){
  .le-player-controls{gap: 6px}
  .le-player-time{flex-basis: 100%; text-align: right}
}

/* LE panel: flex column so le-player stays above the scrollable list on ALL screen sizes */
#viewLE .panel{
  display: flex;
  flex-direction: column;
  /* overflow:clip clips visual overflow (border-radius) without creating a scroll container,
     allowing position:sticky children to work correctly */
  overflow: clip;
}

.le-list{
  padding: 4px 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
  /* Initial fallback; JS overwrites with a precise measurement */
  max-height: calc(100dvh - 360px);
  overflow-y: auto;
  flex: 1 1 auto;
}
/* Smaller screens: tighter offset (toolbar is fixed, so less total offset) */
@media (max-width: 760px){ .le-list{max-height: calc(100dvh - 280px)} }

.le-item.playing{
  border-color: rgba(37,99,235,.65) !important;
  background: rgba(37,99,235,.10) !important;
  box-shadow: 0 0 0 2px rgba(37,99,235,.18);
}

.le-empty{padding: 18px 8px; color: var(--muted); text-align: center}

/* Seção Sobre */
.about-body{
  padding: 16px 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.about-body p{ margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink) }
.about-contact{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(37,99,235,.07);
  border: 1px solid rgba(37,99,235,.20);
  font-size: 15px; font-weight: 600;
}
.about-contact a{ color: var(--brand); text-decoration: none }
.about-contact a:hover{ text-decoration: underline }
.about-hint{ font-size: 12px !important; color: var(--muted) !important }
html[data-theme="dark"] .about-contact{ background: rgba(37,99,235,.15); border-color: rgba(37,99,235,.35) }

.le-item{
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 10px;
  background: rgba(255,255,255,.55);
  overflow: hidden;
  /* flex-shrink: 0 eh essencial: a .le-list usa display:flex column +
     overflow-y: auto. Sem isso, o browser comprime cada item ate zero
     em vez de gerar scroll, deixando todas as linhas "vazias". */
  flex: 0 0 auto;
  transition: border-color .12s ease, background .12s ease;
}
.le-item:hover{border-color: rgba(37,99,235,.25)}
html[data-theme="dark"] .le-item{background: rgba(15,23,42,.55); border-color: rgba(226,232,240,.14)}
html[data-theme="dark"] .le-item:hover{border-color: rgba(37,99,235,.40)}

.le-head{
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.le-head .le-id{
  flex: 0 0 auto;
  min-width: 32px; height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.25);
  color: rgba(37,99,235,.95);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
html[data-theme="dark"] .le-head .le-id{background: rgba(37,99,235,.20); border-color: rgba(37,99,235,.40); color: rgba(191,219,254,.95)}

.le-head .le-q{
  flex: 1 1 auto; min-width: 0;
  font-size: 13px; line-height: 1.4;
  color: var(--ink);
}
.le-head .le-play-ico{
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  transition: color .15s ease, transform .15s ease;
}
.le-item.playing .le-head .le-play-ico{
  color: rgba(37,99,235,.95);
  transform: scale(1.2);
}

html[data-theme="dark"] .le-r{background: rgba(226,232,240,.04); border-color: rgba(226,232,240,.10)}

.le-actions{
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 6px;
}
.le-actions audio{
  flex: 1 1 240px;
  min-width: 0;
  height: 34px;
}
.le-actions .btn{padding: 6px 10px; font-size: 12px}
.le-actions .btn[disabled]{opacity:.45; cursor: not-allowed}

.le-no-audio{
  flex: 1 1 240px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(245,158,11,.10);
  border: 1px dashed rgba(245,158,11,.45);
  color: rgba(146,64,14,.95);
  font-size: 12px;
  font-style: italic;
}
html[data-theme="dark"] .le-no-audio{
  background: rgba(245,158,11,.10);
  border-color: rgba(245,158,11,.40);
  color: rgba(252,211,77,.95);
}

@media (max-width: 520px){
  .le-actions audio{flex-basis: 100%}
}

/* ══════════════════════════════════════════════════════════════════════════
   Hero da Homepage
   ══════════════════════════════════════════════════════════════════════════ */

/* Quando a home está ativa, o header some por completo — o hero e a busca cobrem tudo */
.wrap:has(#viewHome.active) header { display: none; }

/* ── Carousel wrapper ─────────────────────────────────────────────────────── */
.home-carousel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 22px;
  isolation: isolate;
  /* Pausa animação CSS quando o mouse entra — o JS pausa o timer */
}

/* Empilha todos os slides na mesma célula de grid (crossfade puro) */
.carousel-track {
  display: grid;
}
.carousel-slide {
  grid-area: 1 / 1;
  position: relative;
  padding: 54px 24px 54px;   /* padding-bottom maior: dá espaço para os dots */
  color: #fff;
  text-align: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .75s ease;
}
.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Slide 1: Biblioteca geral (azul-violeta) ────────────────────────────── */
.carousel-slide--general {
  background: linear-gradient(135deg, #0c1445 0%, #1e3a8a 42%, #5b21b6 100%);
}
.carousel-slide--general::before {
  content: '';
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.28) 0%, transparent 70%);
  top: -160px; right: -100px;
  pointer-events: none;
}
.carousel-slide--general::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.22) 0%, transparent 70%);
  bottom: -120px; left: -80px;
  pointer-events: none;
}
html[data-theme="dark"] .carousel-slide--general {
  background: linear-gradient(135deg, #1e1b4b 0%, #1d4ed8 42%, #7c3aed 100%);
}

/* ── Slide 2: Livro dos Espíritos (esmeralda + navy) ─────────────────────── */
.carousel-slide--le {
  background: linear-gradient(135deg, #042f2e 0%, #065f46 42%, #0c4a6e 100%);
}
.carousel-slide--le::before {
  content: '';
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,.30) 0%, transparent 70%);
  top: -160px; right: -80px;
  pointer-events: none;
}
.carousel-slide--le::after {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,148,104,.26) 0%, transparent 70%);
  bottom: -120px; left: -80px;
  pointer-events: none;
}
html[data-theme="dark"] .carousel-slide--le {
  background: linear-gradient(135deg, #021a1a 0%, #053b2e 42%, #0a3454 100%);
}

/* SVG decorativo em cima dos blobs */
.home-hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Conteúdo acima de tudo */
.hero-content {
  position: relative;
  z-index: 1;
}

.hero-icon {
  font-size: 58px;
  display: block;
  margin-bottom: 14px;
  line-height: 1;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.45));
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

.hero-sub {
  margin: 0 auto 24px;
  font-size: clamp(13px, 2vw, 15px);
  line-height: 1.65;
  opacity: .82;
  max-width: 540px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.20);
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  transition: background .12s ease;
}
.hero-chip:hover {
  background: rgba(255,255,255,.18);
}

/* CTA button no slide do LE */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 11px 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1.5px solid rgba(255,255,255,.38);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.hero-cta:hover {
  background: rgba(255,255,255,.26);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.hero-cta:active { transform: translateY(0); }

/* ── Dots de navegação ────────────────────────────────────────────────────── */
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.cdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.55);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .25s ease, transform .2s ease, width .25s ease;
}
.cdot.active {
  background: #fff;
  border-color: #fff;
  width: 22px;         /* pílula alongada no slide ativo */
  border-radius: 999px;
  transform: none;
}
.cdot:not(.active):hover {
  background: rgba(255,255,255,.45);
  transform: scale(1.2);
}

/* Em mobile o header some mas os botões fixos (theme/cloud/menu) ficam em top:14px.
   Eles terminam em ~58px; o wrap tem padding-top:22px; adicionamos margem para não sobreposição. */
@media (max-width: 760px) {
  .home-carousel { margin-top: 44px; }
}
@media (max-width: 600px) {
  .carousel-slide { padding: 38px 16px 46px; }
  .hero-icon      { font-size: 46px; }
  .hero-chip      { font-size: 11px; padding: 5px 11px; }
}
/* Em telas ≤520px os botões passam para top:10px → terminam em ~54px → margem menor */
@media (max-width: 520px) {
  .home-carousel { margin-top: 40px; }
}

/* ── Contador global de acessos ──────────────────────────────────────────── */
.global-views-strip {
  text-align: center;
  font-size: 13px;
  color: var(--ink2);
  letter-spacing: .05em;
  margin: -4px 0 12px;
  min-height: 20px;
  opacity: .68;
  transition: opacity .5s ease;
}

/* Busca abaixo do hero */
.hero-search-row {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.hero-search-row .search {
  width: min(600px, 100%);
  box-shadow: 0 4px 18px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
}

/* ── View counter nos cards da biblioteca ─────────────────────────────────── */
.wview {
  display: block;
  font-size: 10.5px;
  color: var(--ink2);
  opacity: .72;
  margin-top: 2px;
  letter-spacing: .01em;
  min-height: 13px;   /* evita layout shift quando o valor chega via fetch */
  transition: opacity .15s;
}
.wview:empty { min-height: 0; }
.card:hover .wview,
.card.active .wview { opacity: 1; }

