:root{
  --bg:#171318; --panel:#211b22; --panel2:#2a222b; --text:#fff8f1;
  --muted:#cbbfc8; --accent:#f3b24d; --accent2:#ff7b54; --line:#3a303c;
  --shadow:0 14px 40px rgba(0,0,0,.28);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; min-height:100vh; color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 85% -10%,rgba(243,178,77,.12),transparent 28%),
    radial-gradient(circle at -10% 15%,rgba(255,123,84,.10),transparent 26%),
    var(--bg);
}
button,input{font:inherit}
button{cursor:pointer}
.app{width:min(720px,100%);margin:0 auto;min-height:100vh;padding:env(safe-area-inset-top) 18px calc(32px + env(safe-area-inset-bottom))}
.hero{padding:28px 2px 14px}
.brandrow{display:flex;align-items:center;gap:12px}
.logo{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,var(--accent),var(--accent2));box-shadow:var(--shadow);color:#241813;font-size:27px;font-weight:900}
.brand h1{margin:0;font-size:30px;line-height:1;font-weight:900;letter-spacing:-.8px}
.brand p{margin:7px 0 0;color:var(--muted);font-size:16px}
.searchwrap{position:relative;margin-top:22px}
.search{width:100%;border:1px solid var(--line);background:#fff;color:#211a21;padding:17px 48px;border-radius:18px;outline:none;font-size:17px;box-shadow:var(--shadow)}
.search:focus{box-shadow:0 0 0 3px rgba(243,178,77,.22),var(--shadow)}
.searchicon{position:absolute;left:17px;top:50%;transform:translateY(-50%);color:#6a5d66;font-size:20px}
.clearbtn{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:50%;background:#eee7ec;color:#493d46;font-size:18px;display:none}
.statusline{display:flex;justify-content:space-between;gap:8px;margin-top:12px;color:var(--muted);font-size:14px}
.online-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#66d18f;margin-right:6px}
.section{margin-top:24px}
.sectionhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.sectionhead h2{font-size:21px;margin:0}
.sectionhead button{border:0;background:transparent;color:var(--accent);font-weight:700;font-size:15px;padding:6px}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.cat{min-height:112px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,var(--panel2),var(--panel));color:var(--text);padding:15px;text-align:left;box-shadow:0 8px 22px rgba(0,0,0,.16);transition:.18s ease;position:relative;overflow:hidden}
.cat:active{transform:scale(.98)}
.cat .emoji{font-size:27px;display:block;margin-bottom:14px}
.cat strong{display:block;font-size:19px;line-height:1.24}
.cat small{display:block;margin-top:6px;color:var(--muted);font-size:14px;line-height:1.3}
.cat:after{content:"";position:absolute;width:70px;height:70px;border-radius:50%;right:-24px;top:-28px;background:rgba(243,178,77,.08)}
.quick{display:flex;gap:10px;overflow:auto;padding-bottom:4px;scrollbar-width:none}
.quick::-webkit-scrollbar{display:none}
.pill{flex:0 0 auto;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:999px;padding:12px 15px;font-size:16px}
.results{display:none}
.songlist{display:flex;flex-direction:column;gap:9px}
.song{width:100%;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:17px;padding:16px 15px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:14px}
.song .meta{min-width:0}
.song strong{display:block;font-size:20px;line-height:1.24;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.song small{display:block;color:var(--muted);margin-top:6px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chev{color:var(--accent);font-size:24px}
.empty{color:var(--muted);padding:20px 2px;text-align:center}
.footer{margin-top:34px;text-align:center;color:#8e808a;font-size:11px}
.screen{display:none;position:fixed;inset:0;background:var(--bg);z-index:20;overflow:auto}
.screen.active{display:block}
.screeninner{width:min(720px,100%);margin:0 auto;padding:calc(14px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom))}
.topbar{position:sticky;top:0;z-index:5;background:linear-gradient(var(--bg) 78%,rgba(23,19,24,0));padding:6px 0 18px;display:flex;align-items:center;gap:10px}
.back{width:42px;height:42px;border-radius:14px;border:1px solid var(--line);background:var(--panel);color:var(--text);font-size:22px}
.topbar h2{margin:0;font-size:22px;flex:1}
.catsearch{margin:6px 0 16px}
.catsearch input{width:100%;border:1px solid var(--line);border-radius:15px;padding:15px 16px;background:#fff;color:#211a21;outline:none;font-size:17px}
.songview h1{font-size:28px;line-height:1.05;margin:12px 0 8px;letter-spacing:-.7px}
.artist{color:var(--accent);font-weight:700;margin-bottom:18px;font-size:17px}
.tools{
  display:flex;
  gap:9px;
  position:sticky;
  top:66px;
  z-index:4;
  padding:10px 0 14px;
  max-height:76px;
  opacity:1;
  transform:translateY(0);
  overflow:hidden;
  pointer-events:auto;
  background:linear-gradient(var(--bg) 80%,rgba(23,19,24,0));
  transition:opacity .24s ease,transform .24s ease,max-height .28s ease,padding .28s ease;
}
.tools.tools-hidden{
  opacity:0;
  transform:translateY(-8px);
  max-height:0;
  padding-top:0;
  padding-bottom:0;
  pointer-events:none;
}
.toolbtn{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:14px;padding:10px 13px;font-weight:800}
.lyrics{font-family:Georgia,"Times New Roman",serif;font-size:21px;line-height:1.75;white-space:pre-line;padding:8px 0 50px}
.placeholder{border:1px dashed #5a4b58;background:#201a21;border-radius:18px;padding:18px;color:var(--muted);font-family:inherit;font-size:15px;line-height:1.6}
.badge{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--panel);padding:8px 11px;border-radius:999px;color:var(--muted);font-size:13px;margin-top:8px}
.errorbox{border:1px solid #7a4040;background:#2a1c20;border-radius:18px;padding:16px;color:#ffd9d9;margin-top:18px;font-size:14px;line-height:1.5}
@media (min-width:620px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hero{padding-top:38px}.brand h1{font-size:34px}}

/* ===== Bora Cantar v05 - Acesso da família ===== */
.access-hidden{display:none!important}
.access-gate{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 18px;
}
.access-gate.hidden{display:none}
.access-card{
  width:min(420px,100%);
  border:1px solid var(--line);
  background:linear-gradient(145deg,var(--panel2),var(--panel));
  border-radius:26px;
  padding:30px 24px 24px;
  box-shadow:var(--shadow);
  text-align:center;
}
.access-logo{
  width:70px;
  height:70px;
  margin:0 auto 18px;
  border-radius:22px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,var(--accent),var(--accent2));
  color:#241813;
  font-size:36px;
  font-weight:900;
  box-shadow:0 12px 30px rgba(0,0,0,.24);
}
.access-eyebrow{
  color:var(--accent);
  font-size:12px;
  font-weight:900;
  letter-spacing:1.8px;
}
.access-card h1{
  margin:8px 0 9px;
  font-size:27px;
  line-height:1.08;
  letter-spacing:-.6px;
}
.access-card p{
  margin:0 auto 20px;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.access-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.access-form input{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  color:#211a21;
  padding:15px 16px;
  border-radius:15px;
  outline:none;
  text-align:center;
  font-size:22px;
  font-weight:900;
  letter-spacing:5px;
}
.access-form input:focus{
  box-shadow:0 0 0 3px rgba(243,178,77,.22);
}
.access-form button{
  border:0;
  border-radius:15px;
  padding:14px 16px;
  background:linear-gradient(145deg,var(--accent),var(--accent2));
  color:#241813;
  font-weight:900;
  font-size:15px;
}
.access-form button:disabled{opacity:.65;cursor:wait}
.access-msg{
  min-height:22px;
  margin-top:12px;
  color:#ffb4b4;
  font-size:13px;
  font-weight:700;
}
.access-card small{
  display:block;
  margin-top:12px;
  color:#8e808a;
  font-size:11px;
}
.footerLogout{
  margin-left:7px;
  border:0;
  background:transparent;
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  padding:3px 5px;
}

/* v06 — controles da letra auto-ocultáveis */
.songview{touch-action:pan-y}

/* v07 — leitura geral um pouco maior; títulos das músicas +2px */
/* ===== Bora Cantar v10 — PWA / offline / leitura maior ===== */
.pwa-install-btn{
  display:none;
  width:100%;
  margin-top:10px;
  border:1px solid rgba(243,178,77,.42);
  background:rgba(243,178,77,.10);
  color:var(--accent);
  border-radius:14px;
  padding:11px 14px;
  font-size:13px;
  font-weight:900;
  letter-spacing:.1px;
}
.pwa-install-btn.show{display:block}
.pwa-install-btn:active{transform:scale(.99)}
.pwa-install-inline{width:auto;margin-top:12px;padding:9px 12px}
.online-dot.offline{background:#e36b6b}

.pwa-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:1000;
  align-items:flex-end;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.58);
  backdrop-filter:blur(5px);
}
.pwa-modal.show{display:flex}
.pwa-modal-card{
  position:relative;
  width:min(460px,100%);
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--panel);
  color:var(--text);
  padding:24px 20px 20px;
  box-shadow:0 22px 65px rgba(0,0,0,.42);
}
.pwa-modal-close{
  position:absolute;
  right:12px;
  top:10px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:var(--panel2);
  color:var(--text);
  font-size:24px;
}
.pwa-modal-icon{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:linear-gradient(145deg,var(--accent),var(--accent2));
  color:#241813;
  font-size:30px;
  font-weight:900;
  box-shadow:0 10px 24px rgba(0,0,0,.24);
}
.pwa-modal-card h2{margin:16px 0 10px;font-size:23px}
.pwa-modal-text{color:var(--muted);font-size:15px;line-height:1.55}
.pwa-modal-text p{margin:10px 0}
.pwa-modal-text ol{margin:10px 0 14px;padding-left:22px}
.pwa-modal-text li{margin:8px 0}
.pwa-modal-ok{
  width:100%;
  margin-top:14px;
  border:0;
  border-radius:14px;
  padding:13px 16px;
  background:linear-gradient(145deg,var(--accent),var(--accent2));
  color:#241813;
  font-weight:900;
}
@media (min-width:620px){
  .pwa-modal{align-items:center}
}
@media (display-mode: standalone){
  .pwa-install-btn{display:none!important}
  body{overscroll-behavior-y:none}
}

/* v10 — mais conforto de leitura nas telas de seleção */
@media (max-width:420px){
  .cat{padding:16px 14px}
  .cat strong{font-size:18px}
  .song strong{font-size:19px}
  .song small{font-size:15px}
}


/* ===== Bora Cantar v13 — navegação de leitura ===== */
/* Botão Voltar maior e com área de toque confortável no celular. */
.back{
  width:auto;
  min-width:104px;
  height:48px;
  padding:0 14px 0 10px;
  border-radius:15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:16px;
  font-weight:850;
}
.backArrow{font-size:29px;line-height:1;margin-top:-2px}
.songBottomNav{display:flex;justify-content:flex-end;padding:2px 0 34px}
.songBottomBack{
  min-height:48px;
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text);
  border-radius:15px;
  padding:12px 17px;
  font-size:16px;
  font-weight:850;
  box-shadow:0 8px 20px rgba(0,0,0,.14);
}
.songBottomBack:active,.back:active{transform:scale(.98)}
/* Sem Acesso rápido: as categorias passam a ser a primeira área do repertório. */
#resultsSection + .section{margin-top:18px}
@media(max-width:420px){
  .back{min-width:100px;height:50px;font-size:16px}
  .songBottomBack{width:100%;justify-content:center}
}


/* ===== Bora Cantar v14 — leitura +1 e pesquisa mais destacada ===== */
/* Ajuste pequeno de conforto visual, sem alterar o tamanho configurável da letra. */
.brand p{font-size:17px}
.search{font-size:18px}
.statusline{font-size:15px}
.sectionhead h2{font-size:22px}
.sectionhead button{font-size:16px}
.cat strong{font-size:20px}
.cat small{font-size:15px}
.song strong{font-size:21px}
.song small{font-size:17px}
.topbar h2{font-size:23px}
.catsearch input{font-size:18px}
.songview h1{font-size:29px}
.artist{font-size:18px}
.badge{font-size:14px}
.empty{font-size:17px}

/* Na busca do menu principal, o nome da música ganha +1 adicional. */
#resultsSection .song strong{font-size:22px}

@media(max-width:420px){
  .cat strong{font-size:19px}
  .cat small{font-size:15px}
  .song strong{font-size:20px}
  .song small{font-size:16px}
  #resultsSection .song strong{font-size:21px}
}


/* ===== Bora Cantar v15 — categorias -1 ponto ===== */
/* Somente os cartões de categoria voltam um ponto; o restante mantém a leitura da v14. */
.cat strong{font-size:19px}
.cat small{font-size:14px}
@media(max-width:420px){
  .cat strong{font-size:18px}
  .cat small{font-size:14px}
}

/* Pesquisa v21: resultados logo abaixo do campo, visiveis no teclado movel. */
.hero .results{margin-top:12px;}
.hero .results .sectionhead{margin-bottom:8px;}
@media(max-width:480px){
  .hero .results .sectionhead h2{font-size:17px;}
  .hero .results .songlist{gap:6px;}
  .hero .results .song{padding:12px 13px;min-height:56px;}
  .hero .results .song strong{font-size:18px;}
  .hero .results .song small{font-size:13px;margin-top:3px;}
}
