/* =====================================================================
   SOMOS - Centro de Aprendizagem Musical
   Folha de estilo principal (não depende de internet nem de Tailwind)

   CORES: altere aqui para mudar o visual do site inteiro.
   A cor de destaque (--accent) muda em cada aba: ela vem do cadastro
   de cada serviço no painel administrativo.
   ===================================================================== */
:root {
    --bg: #0F1117;
    --card: #161822;
    --input: #1D202D;
    --borda: #272A3B;
    --borda-forte: #353950;
    --texto: #E2E8F0;
    --texto-forte: #FFFFFF;
    --muted: #94A3B8;
    --muted2: #64748B;

    --marca: #9EF01A;            /* verde-limão SOMOS */
    --marca-rgb: 158, 240, 26;
    --accent: var(--marca);      /* cor da aba atual */
    --accent-rgb: var(--marca-rgb);

    --ouro: #F5C451;
    --perigo: #F87171;
    --info: #60A5FA;

    --raio: 16px;
    --raio-g: 24px;
    --sombra: 0 15px 40px rgba(0, 0, 0, .45);
    --fonte: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
    --mono: Consolas, Menlo, 'DejaVu Sans Mono', 'Roboto Mono', 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--fonte);
    font-size: 15px;
    line-height: 1.5;
    color: var(--texto);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 10% 8%, rgba(var(--accent-rgb), .06) 0%, transparent 42%),
        radial-gradient(circle at 92% 88%, rgba(var(--accent-rgb), .04) 0%, transparent 45%);
    background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--texto-forte); margin: 0 0 .4em; line-height: 1.2; }
p { margin: 0 0 1em; }
img, svg, video, iframe { max-width: 100%; }
button { font-family: inherit; }

.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
.muted { color: var(--muted); }
.pequeno { font-size: .82rem; }
.centro { text-align: center; }
.oculto, [hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.linha { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.linha-entre { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pilha > * + * { margin-top: 1rem; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 760px) { .grade-2, .grade-3 { grid-template-columns: 1fr; } }

/* ---------- Cabeçalho ---------- */
.topo {
    position: sticky; top: 0; z-index: 40;
    background: rgba(15, 17, 23, .92);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(39, 42, 59, .8);
}
.topo-linha {
    max-width: 1280px; margin: 0 auto; padding: .7rem 1.25rem;
    display: flex; align-items: center; gap: 1rem; justify-content: space-between;
}
.marca { display: flex; align-items: center; gap: .7rem; color: var(--texto-forte); text-decoration: none !important; flex-shrink: 0; }
.marca strong { display: block; font-size: 1.1rem; font-weight: 900; letter-spacing: .12em; line-height: 1; }
.marca small { display: block; font-size: .64rem; color: var(--muted); font-weight: 600; margin-top: 3px; }
.marca-icone {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(var(--marca-rgb), .1); border: 1px solid rgba(var(--marca-rgb), .3); color: var(--marca);
}
.marca-icone .ic { width: 22px; height: 22px; }

.menu {
    display: flex; gap: 4px; padding: 5px; border-radius: 18px;
    background: rgba(22, 24, 34, .8); border: 1px solid var(--borda);
    overflow-x: auto; scrollbar-width: none;
}
.menu::-webkit-scrollbar { display: none; }
.menu-item {
    --item: var(--marca); --item-rgb: var(--marca-rgb);
    display: flex; align-items: center; gap: .45rem; white-space: nowrap;
    padding: .5rem .85rem; border-radius: 13px; border: 1px solid transparent;
    color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none !important;
    transition: color .2s, background .2s, border-color .2s;
}
.menu-item:hover { color: var(--item); }
.menu-item.ativo { color: var(--item); background: rgba(var(--item-rgb), .1); border-color: rgba(var(--item-rgb), .3); }

.perfil { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.perfil-usuario { display: flex; align-items: center; gap: .6rem; color: var(--texto); text-decoration: none !important; padding-left: .6rem; border-left: 1px solid var(--borda); }
.perfil-texto strong { display: block; font-size: .78rem; color: var(--texto-forte); line-height: 1.2; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perfil-texto small { display: block; font-size: .66rem; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: var(--marca); color: var(--bg); font-weight: 800; font-size: .8rem;
    box-shadow: 0 0 14px rgba(var(--marca-rgb), .25);
}

@media (max-width: 1440px) {
    .topo-linha { flex-wrap: wrap; row-gap: .6rem; }
    .menu { order: 3; flex: 0 1 auto; max-width: 100%; margin: 0 auto; }
}
@media (max-width: 1100px) {
    .menu { width: 100%; }
    .perfil-texto { display: none; }
}

/* Botão "Menu" (só aparece no celular/tablet) */
.menu-botao {
    display: none; align-items: center; gap: .45rem; cursor: pointer;
    padding: .55rem .85rem; border-radius: 12px; font-weight: 800; font-size: .82rem;
    background: rgba(var(--marca-rgb), .1); color: var(--marca); border: 1px solid rgba(var(--marca-rgb), .35);
}
.menu-botao .ic { width: 20px; height: 20px; }
.menu-botao[aria-expanded=true] { background: var(--marca); color: #0F1117; }
@media (max-width: 900px) {
    .menu-botao { display: inline-flex; margin-left: auto; }
    .topo-linha { gap: .6rem; }
    .marca { margin-right: 0; }
    .menu {
        display: none; order: 3; width: 100%; margin: 0;
        grid-template-columns: 1fr 1fr; gap: .5rem; padding: .6rem;
        overflow: visible; border-radius: 18px;
    }
    .menu.aberto { display: grid; }
    .menu-item {
        padding: .85rem .9rem; font-size: .88rem; border-radius: 14px; white-space: normal;
        background: var(--input); border-color: var(--borda); color: var(--texto-forte);
    }
    .menu-item .ic { color: var(--item); width: 20px; height: 20px; }
    .menu-item.ativo { background: rgba(var(--item-rgb), .12); border-color: rgba(var(--item-rgb), .45); }
}
@media (max-width: 340px) { .menu-botao span { display: none; } }
@media (max-width: 640px) {
    .so-desktop { display: none !important; }
    .marca small { display: none; }
    .topo-linha { padding: .6rem .8rem; }
}

/* ---------- Estrutura ---------- */
.conteudo { width: 100%; margin: 0 auto; padding: 2rem 1.25rem 3rem; flex: 1; }
.largura-normal { max-width: 1280px; }
.largura-larga { max-width: 1440px; }
.largura-estreita { max-width: 760px; }
.largura-minima { max-width: 460px; }
@media (max-width: 640px) { .conteudo { padding: 1.25rem .8rem 2.5rem; } }

.card {
    background: rgba(22, 24, 34, .92);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--raio-g);
    box-shadow: var(--sombra);
    padding: 1.75rem;
}
.card + .card { margin-top: 1.25rem; }
.card-interno { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.25rem; }
.card-campo { background: var(--input); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.1rem 1.25rem; }
@media (max-width: 640px) { .card { padding: 1.15rem; border-radius: 20px; } }

.titulo-pagina {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    border-bottom: 1px solid var(--borda); padding-bottom: 1rem; margin-bottom: 1.5rem;
}
.titulo-pagina-texto { display: flex; align-items: center; gap: .85rem; }
.titulo-pagina h1 { font-size: 1.3rem; margin: 0; }
.titulo-pagina p { font-size: .8rem; color: var(--muted); margin: 2px 0 0; }

.icone-box {
    width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
    background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .25); color: var(--accent);
}
.icone-box .ic { width: 22px; height: 22px; }
.icone-grande { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 1rem; }
.icone-grande .ic { width: 34px; height: 34px; }

.rotulo { display: block; font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1.4rem; border-radius: 14px; border: 1px solid transparent;
    font-size: .85rem; font-weight: 700; cursor: pointer; text-decoration: none !important;
    transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s;
    line-height: 1.1; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-p { padding: .55rem .9rem; font-size: .78rem; border-radius: 12px; }
.btn-g { padding: 1rem 1.8rem; font-size: 1rem; border-radius: 18px; }
.btn-bloco { width: 100%; }
.btn-acc { background: var(--accent); color: #0F1117; box-shadow: 0 0 18px rgba(var(--accent-rgb), .3); }
.btn-acc:hover { box-shadow: 0 0 28px rgba(var(--accent-rgb), .5); transform: translateY(-1px); filter: brightness(.95); }
.btn-marca { background: var(--marca); color: #0F1117; box-shadow: 0 0 18px rgba(var(--marca-rgb), .3); }
.btn-marca:hover { box-shadow: 0 0 28px rgba(var(--marca-rgb), .5); }
.btn-sec { background: var(--input); color: var(--texto-forte); border-color: var(--borda); }
.btn-sec:hover { border-color: rgba(var(--accent-rgb), .55); color: var(--accent); }
.btn-perigo { background: rgba(248, 113, 113, .1); color: var(--perigo); border-color: rgba(248, 113, 113, .3); }
.btn-perigo:hover { background: rgba(248, 113, 113, .2); }
.btn-icone {
    width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; cursor: pointer;
    background: transparent; border: 1px solid transparent; color: var(--muted);
}
.btn-icone:hover { color: var(--perigo); background: var(--card); }
.btn-redondo {
    width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; cursor: pointer;
    background: var(--card); border: 1px solid var(--borda); color: var(--texto-forte); font-weight: 800; font-size: .9rem;
}
.btn-redondo:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .5); }
.acoes-centro { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Chips (botões pequenos de seleção) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    padding: .5rem .85rem; border-radius: 12px; cursor: pointer;
    background: var(--input); border: 1px solid var(--borda); color: var(--texto);
    font-size: .8rem; font-weight: 700; transition: all .15s;
}
.chip:hover { border-color: rgba(var(--accent-rgb), .55); }
.chip.ativo { background: var(--accent); border-color: var(--accent); color: #0F1117; box-shadow: 0 0 14px rgba(var(--accent-rgb), .3); }

/* ---------- Formulários ---------- */
.campo { margin-bottom: 1rem; }
.campo label { display: block; font-size: .72rem; font-weight: 700; color: #CBD5E1; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.campo small { display: block; color: var(--muted2); font-size: .75rem; margin-top: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
    width: 100%; padding: .75rem .95rem; border-radius: 12px;
    background: var(--input); border: 1px solid #2A2E40; color: var(--texto-forte);
    font-family: inherit; font-size: .9rem; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .2); }
textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
textarea.mono { font-family: var(--mono); font-size: .85rem; }
input[type=color] { width: 46px; height: 38px; padding: 2px; border-radius: 10px; background: var(--input); border: 1px solid var(--borda); cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.campo-icone { position: relative; }
.campo-icone > .ic { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted2); pointer-events: none; }
.campo-icone input { padding-left: 2.6rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .85rem; color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--accent); cursor: pointer; }

/* ---------- Alertas e toast ---------- */
.alerta { display: flex; gap: .6rem; align-items: center; padding: .85rem 1.1rem; border-radius: 14px; margin-bottom: 1.25rem; font-size: .88rem; border: 1px solid; }
.alerta-ok { background: rgba(var(--marca-rgb), .08); border-color: rgba(var(--marca-rgb), .3); color: #D9F99D; }
.alerta-erro { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); color: #FECACA; }
.alerta-info { background: rgba(96, 165, 250, .08); border-color: rgba(96, 165, 250, .3); color: #BFDBFE; }
.toast {
    position: fixed; top: 18px; right: 18px; z-index: 100; max-width: 340px;
    padding: .8rem 1.1rem; border-radius: 14px; font-size: .85rem; font-weight: 600;
    background: var(--card); border: 1px solid var(--borda); color: #fff; box-shadow: var(--sombra);
    transform: translateX(130%); transition: transform .3s;
}
.toast.visivel { transform: translateX(0); }
.toast::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: .55rem; vertical-align: 1px; }

/* ---------- Selos ---------- */
.selo { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; border: 1px solid; white-space: nowrap; }
.selo .ic { width: 12px; height: 12px; }
.selo-gratis { color: var(--marca); background: rgba(var(--marca-rgb), .08); border-color: rgba(var(--marca-rgb), .3); }
.selo-ok { color: var(--marca); background: rgba(var(--marca-rgb), .12); border-color: rgba(var(--marca-rgb), .4); }
.selo-pro { color: var(--ouro); background: rgba(245, 196, 81, .08); border-color: rgba(245, 196, 81, .35); }
.selo-login { color: var(--info); background: rgba(96, 165, 250, .08); border-color: rgba(96, 165, 250, .3); }
.selo-bloq, .selo-off { color: var(--perigo); background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .3); }
.selo-neutro { color: var(--muted); background: var(--input); border-color: var(--borda); }

/* ---------- Página inicial ---------- */
.hero { position: relative; overflow: hidden; padding: 2.5rem; }
.hero::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 38%; background: linear-gradient(to left, rgba(var(--marca-rgb), .1), transparent); pointer-events: none; }
.hero-conteudo { position: relative; z-index: 1; max-width: 660px; }
.hero h1 { font-size: 2.3rem; font-weight: 900; margin: .9rem 0 .7rem; }
.hero h1 em { color: var(--marca); font-style: normal; }
.hero p { color: var(--muted); }
@media (max-width: 640px) { .hero { padding: 1.5rem; } .hero h1 { font-size: 1.6rem; } }

.secao-titulo { display: flex; justify-content: space-between; align-items: center; margin: 2.25rem 0 1rem; }
.secao-titulo h2 { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.grade-servicos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.cartao-servico {
    display: flex; flex-direction: column; min-height: 210px; padding: 1.4rem;
    background: rgba(22, 24, 34, .92); border: 1px solid rgba(255, 255, 255, .06); border-radius: 20px;
    box-shadow: var(--sombra); color: var(--texto); text-decoration: none !important;
    transition: border-color .2s, transform .2s;
}
.cartao-servico:hover { border-color: rgba(var(--accent-rgb), .45); transform: translateY(-2px); }
.cartao-topo { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.cartao-servico h3 { font-size: 1.02rem; margin-bottom: .3rem; transition: color .2s; }
.cartao-servico:hover h3 { color: var(--accent); }
.cartao-servico p { font-size: .8rem; color: var(--muted); flex: 1; }
.cartao-link { font-size: .78rem; font-weight: 800; color: var(--accent); display: inline-flex; align-items: center; gap: .3rem; }

/* ---------- Tela de bloqueio / planos ---------- */
.bloqueio { text-align: center; padding: 2.5rem 2rem; }
.bloqueio h1 { font-size: 1.6rem; margin-top: .8rem; }
.bloqueio p { color: var(--muted); max-width: 480px; margin-left: auto; margin-right: auto; }
.previa-aulas { text-align: left; max-width: 420px; margin: 1.25rem auto 0; background: var(--input); border: 1px solid var(--borda); border-radius: 16px; padding: 1rem 1.2rem; }
.previa-aulas ul { list-style: none; padding: 0; margin: .6rem 0 0; }
.previa-aulas li { font-size: .85rem; color: var(--texto); padding: .3rem 0; display: flex; gap: .5rem; align-items: center; }
.previa-aulas .ic { color: var(--muted2); width: 14px; height: 14px; }

.grade-planos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.plano { display: flex; flex-direction: column; }
.plano.destaque { border-color: rgba(245, 196, 81, .45); }
.plano h3 { font-size: 1.15rem; }
.plano-preco { font-size: 1.9rem; font-weight: 900; color: var(--texto-forte); margin: .5rem 0; }
.plano-preco small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.plano ul { list-style: none; padding: 0; margin: .5rem 0 1.25rem; flex: 1; }
.plano li { display: flex; gap: .5rem; align-items: center; font-size: .86rem; padding: .3rem 0; }
.plano li .ic { color: var(--marca); }

/* ---------- Login ---------- */
.auth-marca { text-align: center; margin-bottom: 1.5rem; }
.auth-marca .icone-box { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto .8rem; }
.auth-marca h1 { font-size: 1.6rem; font-weight: 900; letter-spacing: .14em; margin: 0; }
.abas { display: flex; background: var(--input); padding: 4px; border-radius: 16px; border: 1px solid rgba(39, 42, 59, .6); margin-bottom: 1.5rem; }
.abas button, .abas a { flex: 1; padding: .65rem; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: .85rem; cursor: pointer; text-align: center; text-decoration: none !important; }
.abas .ativo { background: var(--card); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }

/* ---------- Tabelas (admin / conta) ---------- */
.tabela-wrap { overflow-x: auto; border: 1px solid var(--borda); border-radius: 16px; }
table.tabela { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tabela th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--card); padding: .75rem .9rem; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.tabela td { padding: .7rem .9rem; border-bottom: 1px solid rgba(39, 42, 59, .7); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tr:hover td { background: rgba(255, 255, 255, .015); }
.tabela input, .tabela select { padding: .45rem .6rem; font-size: .82rem; border-radius: 9px; }

.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.numero { background: var(--card); border: 1px solid var(--borda); border-radius: 18px; padding: 1.1rem 1.25rem; }
.numero strong { display: block; font-size: 1.8rem; font-weight: 900; color: var(--texto-forte); line-height: 1.1; }
.numero span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }

.admin-abas { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-abas a { padding: .55rem .95rem; border-radius: 12px; background: var(--card); border: 1px solid var(--borda); color: var(--muted); font-size: .8rem; font-weight: 700; text-decoration: none !important; display: inline-flex; gap: .45rem; align-items: center; }
.admin-abas a.ativo, .admin-abas a:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .4); background: rgba(var(--accent-rgb), .08); }
.cor-ponto { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; }

/* ---------- Rodapé ---------- */
.rodape { border-top: 1px solid rgba(39, 42, 59, .6); padding: 1.1rem 1.25rem; font-size: .75rem; color: var(--muted2); }
.rodape-linha { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rodape-links { display: flex; gap: 1.1rem; }
.rodape a { color: var(--muted); }

/* ---------- Barra de rolagem ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--borda); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =====================================================================
   CIFRAS
   ===================================================================== */
.busca-cifras { display: flex; gap: .6rem; margin-bottom: 1.25rem; }
.busca-cifras .campo-icone { flex: 1; }
.lista-cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.item-cifra {
    display: flex; align-items: center; gap: .9rem; padding: .95rem 1.1rem; border-radius: 16px;
    background: var(--card); border: 1px solid var(--borda); color: var(--texto); text-decoration: none !important;
    transition: border-color .2s;
}
.item-cifra:hover { border-color: rgba(var(--accent-rgb), .5); }
.item-cifra strong { display: block; color: var(--texto-forte); font-size: .92rem; }
.item-cifra small { color: var(--muted); font-size: .78rem; }
.item-cifra .tom-badge { margin-left: auto; }
.tom-badge { font-family: var(--mono); font-weight: 800; font-size: .78rem; color: var(--accent); background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .25); border-radius: 9px; padding: .2rem .5rem; }

.cifra-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .cifra-layout { grid-template-columns: minmax(0, 1fr); } .cifra-lateral { order: -1; } }
.cifra-lateral { position: sticky; top: 90px; }
@media (max-width: 960px) { .cifra-lateral { position: static; } }
.controle-grupo { margin-bottom: 1.1rem; }
.controle { display: flex; align-items: center; gap: .4rem; background: var(--input); border: 1px solid var(--borda); border-radius: 14px; padding: .35rem; }
.controle .valor { flex: 1; text-align: center; font-family: var(--mono); font-weight: 900; color: var(--accent); font-size: 1rem; }
.controle .btn-redondo { width: 34px; height: 34px; border-radius: 10px; }

.folha-cifra { background: var(--card); border: 1px solid var(--borda); border-radius: 20px; padding: 1.75rem 2rem; overflow-x: auto; }
@media (max-width: 640px) { .folha-cifra { padding: 1.1rem; } }
.folha-cifra h2 { font-size: 1.45rem; margin: 0; }
.folha-cifra .artista { color: var(--muted); font-size: .9rem; margin-bottom: .3rem; }
.cifra-texto { font-family: var(--mono); font-size: 15px; line-height: 1.45; white-space: pre; color: #CBD5E1; margin: 1.25rem 0 0; }
.cifra-texto .linha-acordes { color: var(--accent); font-weight: 700; }
.cifra-texto .acorde { cursor: pointer; border-radius: 4px; }
.cifra-texto .acorde:hover { background: rgba(var(--accent-rgb), .15); }
.cifra-texto .secao { color: var(--texto-forte); font-weight: 800; font-family: var(--fonte); }
.acordes-usados { display: flex; flex-wrap: wrap; gap: .4rem; }
.acordes-usados button { font-family: var(--mono); font-weight: 800; font-size: .8rem; padding: .35rem .6rem; border-radius: 9px; cursor: pointer; background: var(--input); color: var(--accent); border: 1px solid var(--borda); }
.acordes-usados button:hover { border-color: var(--accent); }

@media print {
    .topo, .rodape, .cifra-lateral, .titulo-pagina, .toast, .alerta, .nao-imprimir { display: none !important; }
    body { background: #fff !important; color: #000; }
    .folha-cifra { border: 0; background: #fff; padding: 0; }
    .folha-cifra h2, .cifra-texto, .cifra-texto .secao { color: #000; }
    .cifra-texto .linha-acordes { color: #000; }
    .cifra-layout { display: block; }
    .card { box-shadow: none; border: 0; background: #fff; padding: 0; }
}

/* =====================================================================
   DESCOBRIR TONS
   ===================================================================== */
.grade-notas { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; }
@media (max-width: 640px) { .grade-notas { grid-template-columns: repeat(4, 1fr); } }
.nota {
    padding: .95rem 0; text-align: center; border-radius: 14px; cursor: pointer; user-select: none;
    background: var(--input); border: 2px solid var(--borda); color: var(--texto-forte); font-weight: 800; font-size: 1.05rem;
    transition: all .15s;
}
.nota:hover { border-color: rgba(var(--accent-rgb), .6); transform: translateY(-2px); }
.nota.ativa { background: var(--accent); border-color: var(--accent); color: #0F1117; box-shadow: 0 4px 14px rgba(var(--accent-rgb), .35); }
.nota.sustenido { background: #13151E; }
.nota.sustenido.ativa { background: var(--accent); }
.lista-escalas { display: flex; flex-direction: column; gap: .5rem; }
.escala { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1.1rem; border-radius: 14px; background: var(--input); border: 1px solid var(--borda); font-weight: 700; }
.escala small { color: var(--muted); font-weight: 600; }
.escala.destaque { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); color: var(--accent); }
.contador { background: var(--borda); color: #fff; font-size: .75rem; padding: .1rem .6rem; border-radius: 999px; }
.grade-acordes { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; }
@media (max-width: 640px) { .grade-acordes { grid-template-columns: repeat(4, 1fr); } }
.acorde-card { padding: .7rem .3rem; text-align: center; border-radius: 12px; cursor: pointer; background: var(--input); border: 1px solid var(--borda); transition: all .15s; }
.acorde-card:hover, .acorde-card.tocando { border-color: var(--accent); background: rgba(var(--accent-rgb), .1); transform: translateY(-2px); }
.acorde-card strong { display: block; color: #fff; font-size: .98rem; }
.acorde-card small { color: var(--muted); font-size: .72rem; }
.tom-resultado { font-size: 2rem; font-weight: 900; color: var(--accent); line-height: 1.1; }

/* =====================================================================
   VIOLÃO INTERATIVO
   ===================================================================== */
.violao-app { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .violao-app { grid-template-columns: 1fr; } }
.violao-painel { background: var(--card); border: 1px solid var(--borda); border-radius: 24px; padding: 1.25rem 1rem 1.25rem 2rem; user-select: none; -webkit-user-select: none; }
.violao-acorde { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.violao-acorde h2 { font-size: 2rem; font-weight: 900; text-align: center; margin: 0; line-height: 1; }
.violao-acorde p { text-align: center; color: var(--muted); font-size: .75rem; font-weight: 700; margin: 3px 0 0; }
.cordas-linha { width: 100%; max-width: 280px; margin: 0 auto; display: flex; justify-content: space-between; }
.cordas-linha > * { width: 32px; height: 32px; display: grid; place-items: center; }
.afinacao span { font-size: .75rem; font-weight: 800; color: var(--muted2); }
.indicador { background: transparent; border: 0; border-radius: 50%; cursor: pointer; color: var(--muted2); font-weight: 900; font-size: .85rem; }
.indicador:hover { background: var(--input); }
.indicador .aberta { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff; display: inline-block; }
.indicador .presa { color: #3F3F46; font-size: .6rem; }
.braco { position: relative; width: 100%; max-width: 280px; margin: .4rem auto 0; aspect-ratio: 1 / 1.3; }
@supports not (aspect-ratio: 1) { .braco { height: 364px; } }
.braco-nut { position: absolute; top: 0; left: 0; right: 0; height: 12px; background: rgba(254, 243, 199, .9); border-radius: 2px; z-index: 10; }
.braco-area { position: absolute; top: 12px; left: 0; right: 0; bottom: 0; }
.braco-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.braco-grade { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(5, 1fr); z-index: 20; }
.casa-alvo { position: relative; cursor: pointer; }
.casa-alvo:hover::after { content: ''; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(var(--accent-rgb), .18); }
.dedo {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30;
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: #000; font-weight: 900; font-size: .75rem; border: 2px solid #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .5); pointer-events: none;
}
.pestana {
    position: absolute; height: 24px; transform: translateY(-50%); z-index: 25; pointer-events: none;
    background: var(--accent); border-radius: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
    color: #000; font-weight: 900; font-size: .75rem; display: flex; align-items: center; padding-left: 8px;
}
.numeros-casas { position: absolute; left: -24px; top: 0; bottom: 0; width: 18px; }
.numeros-casas span { position: absolute; left: 0; width: 18px; text-align: center; transform: translateY(-50%); font-size: .7rem; font-weight: 800; color: var(--muted2); }
.notas-base button { width: 32px; height: 32px; border-radius: 50%; font-size: .72rem; font-weight: 800; cursor: pointer; background: var(--input); color: #E4E4E7; border: 1px solid #3F3F46; }
.notas-base button.muda { background: transparent; color: #52525B; border-color: #27272A; }
.notas-base button.raiz { background: var(--accent); color: #000; border-color: var(--accent); transform: scale(1.06); }
.corda-anim { animation: vibrar .25s ease-in-out; stroke: #fff !important; }
@keyframes vibrar { 0%,100% { stroke-width: inherit; } 30% { opacity: .6; } 60% { opacity: 1; } }
.violao-botoes { display: flex; gap: .6rem; margin-top: 1.1rem; }
.violao-botoes .btn-acc { flex: 1; border-radius: 999px; }
.violao-botoes .btn-sec { border-radius: 999px; }
.resumo-notas { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: var(--input); border: 1px solid var(--borda); border-radius: 14px; padding: .7rem .9rem; font-size: .8rem; }
.resumo-notas strong { font-family: var(--mono); color: var(--accent); }

/* Modal simples */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .7); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-caixa { background: var(--card); border: 1px solid var(--borda); border-radius: 20px; padding: 1.5rem; max-width: 380px; width: 100%; box-shadow: var(--sombra); }
.modal-caixa ul { padding-left: 1.1rem; font-size: .85rem; color: var(--muted); }
.modal-caixa li { margin-bottom: .5rem; }
.modal-caixa strong { color: #fff; }

/* =====================================================================
   METRÔNOMO
   ===================================================================== */
.metro { max-width: 520px; margin: 0 auto; text-align: center; }
.metro-circulo {
    width: 170px; height: 170px; border-radius: 50%; margin: .5rem auto 1.25rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--card); border: 4px solid var(--borda); transition: border-color .1s;
}
.metro-circulo strong { font-size: 3.2rem; font-weight: 900; font-family: var(--mono); color: #fff; line-height: 1; }
.metro-circulo span { font-size: .7rem; letter-spacing: .2em; font-weight: 800; color: var(--accent); margin-top: .3rem; }
.metro-circulo.pulso { border-color: var(--accent); box-shadow: 0 0 34px rgba(var(--accent-rgb), .45); transform: scale(1.04); }
.metro-circulo.pulso-forte { border-color: #fff; box-shadow: 0 0 44px rgba(var(--accent-rgb), .7); transform: scale(1.07); }
.metro-circulo { transition: transform .08s, box-shadow .1s, border-color .1s; }
.tempos { display: flex; justify-content: center; gap: .6rem; margin-bottom: 1.5rem; }
.tempos span { width: 16px; height: 16px; border-radius: 50%; background: var(--borda); transition: background .08s, transform .08s; }
.tempos span.ligado { background: var(--accent); transform: scale(1.25); }
.tempos span.primeiro.ligado { background: #fff; }
.metro-controles { display: flex; align-items: center; gap: .5rem; }
.andamento-nome { font-size: .8rem; color: var(--muted); margin-top: -.5rem; margin-bottom: 1rem; }

/* =====================================================================
   JOGO ESCALAS CADENTES
   ===================================================================== */
.jogo-layout { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .jogo-layout { grid-template-columns: 1fr; } }
.jogo-moldura { display: flex; justify-content: center; }
#game-container {
    position: relative; width: 480px; height: 680px; max-width: 100%;
    background: linear-gradient(180deg, #181820 0%, #0d0d12 100%);
    border: 3px solid #333344; border-radius: 18px; box-shadow: var(--sombra);
    display: flex; flex-direction: column; overflow: hidden; user-select: none; -webkit-user-select: none;
}
#status-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: #20202c; border-bottom: 2px solid #2d2d3f; z-index: 5; }
.stat-box { display: flex; flex-direction: column; }
.stat-label { font-size: 11px; color: #a0a0b0; text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 20px; font-weight: bold; color: var(--accent); }
#toggle-help-btn { background: #2d2d3f; border: 1px solid #44445c; color: #ccc; padding: 6px 10px; border-radius: 8px; font-size: 11px; cursor: pointer; }
#toggle-help-btn:hover { background: #3d3d52; color: #fff; }
#play-area { flex: 1; position: relative; background-size: 20px 20px; background-image: radial-gradient(circle, #252535 1px, transparent 1px); overflow: hidden; }
.note-block { position: absolute; width: 200px; left: 50%; margin-left: -100px; padding: 10px 14px; border-radius: 10px; text-align: center; z-index: 3; background: linear-gradient(135deg, #00b4db, #0083b0); border: 2px solid #00d2ff; box-shadow: 0 4px 15px rgba(0, 180, 219, .4); color: #fff; }
.note-block.flats { background: linear-gradient(135deg, #ff416c, #ff4b2b); border-color: #ff758c; box-shadow: 0 4px 15px rgba(255, 65, 108, .4); }
.note-block.natural { background: linear-gradient(135deg, #f7b731, #eb3b5a); border-color: #fed330; box-shadow: 0 4px 15px rgba(247, 183, 49, .4); }
.block-title { font-size: 11px; text-transform: uppercase; color: rgba(255, 255, 255, .85); margin-bottom: 2px; font-weight: 600; }
.block-notes { font-size: 17px; font-weight: bold; letter-spacing: 2px; }
#target-bar { position: absolute; bottom: 16px; left: 20px; right: 20px; height: 52px; background: rgba(var(--accent-rgb), .12); border: 2px dashed var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold; color: var(--accent); z-index: 2; }
#key-selector-panel { flex-shrink: 0; padding-bottom: 14px !important; background: #171722; border-top: 2px solid #29293d; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; z-index: 5; }
.key-row-label { font-size: 10px; color: #777788; text-transform: uppercase; margin-left: 4px; font-weight: 600; }
.key-row { display: flex; gap: 6px; justify-content: center; }
.key-btn { flex: 1; height: 40px; background: #252535; border: 1px solid #3d3d52; border-radius: 8px; color: #fff; font-size: 14px; font-weight: bold; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all .15s; }
.key-row:first-of-type .key-btn, .key-row.unica .key-btn { max-width: 140px; }
.key-btn .acc-info { font-size: 9px; color: #8888a0; margin-top: 1px; display: none; }
.mostrar-dicas .key-btn .acc-info { display: inline; }
.key-btn:hover { background: #333348; border-color: #555577; }
.key-btn.active { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .5); }
.key-btn.active .acc-info { color: rgba(0, 0, 0, .6); }
.overlay { position: absolute; inset: 0; background: rgba(10, 10, 15, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; z-index: 10; }
.overlay h1 { font-size: 28px; color: var(--accent); }
.overlay h2 { font-size: 26px; color: #ff5252; }
.overlay p { font-size: 14px; color: #b0b0c0; line-height: 1.5; }
.report-card { background: #1e1e2d; border: 1px solid #3d3d52; border-radius: 12px; padding: 16px; width: 100%; margin-bottom: 20px; text-align: left; }
.report-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.report-row:last-child { margin-bottom: 0; }
.btn-main { background: var(--accent); color: #000; border: none; padding: 14px 28px; font-size: 16px; font-weight: bold; border-radius: 30px; cursor: pointer; box-shadow: 0 4px 15px rgba(var(--accent-rgb), .4); transition: transform .15s; }
.btn-main:hover { transform: scale(1.05); }
.recorde-linha { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 1rem; }

/* =====================================================================
   CURSOS
   ===================================================================== */
.curso-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .curso-layout { grid-template-columns: 1fr; } }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 18px; overflow: hidden; border: 1px solid var(--borda); }
@supports not (aspect-ratio: 1) { .player { height: 0; padding-bottom: 56.25%; } }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-vazio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; color: var(--muted); background: radial-gradient(circle, rgba(var(--accent-rgb), .08), transparent 70%), var(--card); text-align: center; padding: 1rem; }
.player-vazio .ic { width: 42px; height: 42px; color: var(--accent); }
.lista-aulas { max-height: 70vh; overflow-y: auto; }
.modulo-nome { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); margin: 1rem 0 .4rem; }
.modulo-nome:first-child { margin-top: 0; }
.aula-item { display: flex; gap: .65rem; align-items: center; padding: .6rem .7rem; border-radius: 12px; color: var(--texto); font-size: .85rem; text-decoration: none !important; border: 1px solid transparent; }
.aula-item:hover { background: var(--input); }
.aula-item.atual { background: rgba(var(--accent-rgb), .1); border-color: rgba(var(--accent-rgb), .35); color: #fff; }
.aula-num { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: var(--input); border: 1px solid var(--borda); color: var(--muted); }
.aula-item.feita .aula-num { background: var(--accent); color: #000; border-color: var(--accent); }
.progresso { height: 8px; background: var(--input); border-radius: 999px; overflow: hidden; border: 1px solid var(--borda); }
.progresso span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.descricao-aula { white-space: pre-line; color: var(--muted); font-size: .9rem; }

/* Espaço entre grades e cartões seguidos */
.grade-2 + .card, .grade-3 + .card, .numeros + .card { margin-top: 1.25rem; }
.campo label.check { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--muted); font-weight: 500; }

/* =====================================================================
   CIFRAS NO CELULAR + DIAGRAMAS DE ACORDES
   ===================================================================== */
.cifra-texto { overflow-x: auto; max-width: 100%; }
.folha-cifra { overflow: hidden; }
.cifra-texto .acorde { padding: 0 1px; }
.chips-cheios { display: grid; grid-template-columns: 1fr 1fr; }
.chips-cheios .chip { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
@media (max-width: 960px) {
    .cifra-lateral { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; padding: 1rem; }
    .cifra-lateral .controle-grupo { margin: 0; }
    .cifra-lateral .controle-grupo:nth-child(5),
    .cifra-lateral .controle-grupo:last-child { grid-column: 1 / -1; }
    .cifra-lateral .controle .btn-redondo { width: 32px; height: 32px; }
    .cifra-lateral .controle .valor { font-size: .9rem; }
}
@media (max-width: 640px) {
    .folha-cifra { padding: 1rem .9rem; border-radius: 16px; }
    .folha-cifra h2 { font-size: 1.2rem; }
    .cifra-texto { margin-top: .9rem; }
    .cifra-lateral { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) { .cifra-lateral { grid-template-columns: 1fr; } }

.modal-acorde .modal-caixa { max-width: 360px; text-align: center; }
.modal-acorde h3 { font-size: 1.6rem; color: var(--accent); font-family: var(--mono); }
.modal-acorde .chips { justify-content: center; }
.acorde-desenho { background: var(--input); border: 1px solid var(--borda); border-radius: 16px; padding: .8rem; margin-bottom: .7rem; }
.acorde-desenho svg { width: 100%; height: auto; display: block; margin: 0 auto; }
.diagrama-violao { max-width: 230px; }
.diagrama-teclado { max-width: 340px; }
.d-dedo { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.d-x { fill: var(--muted); font-size: 18px; font-weight: 800; font-family: var(--fonte); }
.d-casa { fill: var(--muted); font-size: 13px; font-weight: 800; font-family: var(--fonte); }
.d-nota { fill: var(--muted); font-size: 11px; font-weight: 700; font-family: var(--fonte); }
.t-branca { fill: #F1F5F9; stroke: #334155; }
.t-preta { fill: #111827; stroke: #000; }
.t-on { fill: var(--accent); stroke: #0F1117; }
.t-txt { font-size: 10px; font-weight: 800; fill: #0F1117; font-family: var(--fonte); }
.t-txt-p { font-size: 8px; }
@media (max-width: 640px) {
    .modal-acorde { align-items: flex-end; padding: 0; }
    .modal-acorde .modal-caixa { max-width: none; border-radius: 22px 22px 0 0; padding: 1.1rem 1.1rem 1.4rem; }
}

/* =====================================================================
   JOGO NO CELULAR
   ===================================================================== */
.jogo-layout > *, .jogo-moldura { min-width: 0; }
#game-container { width: 100%; max-width: 480px; }
@media (max-width: 640px) {
    .pagina-jogo .titulo-pagina { margin-bottom: .8rem; padding-bottom: .7rem; }
    .pagina-jogo .titulo-pagina p { display: none; }
    .pagina-jogo.card { padding: .8rem; }
    #game-container {
        height: calc(100vh - 150px); min-height: 500px; max-height: 680px;
        border-width: 2px; border-radius: 14px;
    }
    #status-bar { padding: 8px 12px; }
    .stat-value { font-size: 17px; }
    #key-selector-panel { padding: 6px 8px 12px !important; gap: 4px; }
    .key-row { gap: 4px; }
    .key-btn { height: 38px; font-size: 13px; }
    .note-block { width: 180px; margin-left: -90px; }
    .overlay { padding: 20px; }
    .overlay h1 { font-size: 24px; }
}

.cifra-layout > *, .curso-layout > *, .violao-app > * { min-width: 0; }

/* Cabeçalho no celular: marca + avatar + Menu na mesma linha */
.menu-extra { display: none; }
@media (max-width: 900px) {
    .topo-linha { flex-wrap: wrap; }
    .perfil { order: 2; margin-left: auto; gap: .45rem; }
    .menu-botao { order: 3; margin-left: 0; }
    .menu { order: 4; }
    .perfil .btn, .perfil .btn-icone { display: none; }
    .perfil-usuario { border-left: 0; padding-left: 0; }
    .menu-extra { display: flex; }
    .menu-extra .ic { color: var(--muted) !important; }
}

/* Violão: posição no braço */
.braco-nut.deslocado { height: 3px; top: 9px; background: #6B7280; }
.posicao-braco { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: .8rem; font-size: .8rem; color: var(--muted); }
.posicao-braco strong { color: var(--accent); }
.posicao-braco .btn-redondo { width: 32px; height: 32px; }
#rootSelector .chip { min-width: 44px; }

/* =====================================================================
   TECLADO INTERATIVO
   ===================================================================== */
.teclado-topo { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; margin-bottom: 1.25rem; }
.teclado-acorde h2 { font-size: 2.2rem; font-weight: 900; color: var(--accent); margin: .1rem 0 0; font-family: var(--mono); line-height: 1.1; }
.teclado-acorde p { margin: 0; font-size: .8rem; font-weight: 700; }
.teclado-notas { display: grid; gap: .5rem; background: var(--input); border: 1px solid var(--borda); border-radius: 16px; padding: .8rem 1rem; }
.teclado-notas .rotulo { margin-bottom: .1rem; }
.teclado-notas strong { font-family: var(--mono); color: #fff; font-size: 1rem; }
.teclado-botoes { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) {
    .teclado-topo { grid-template-columns: 1fr; gap: .8rem; }
    .teclado-botoes { justify-content: flex-start; }
    .teclado-botoes .btn { flex: 1; padding: .75rem .6rem; }
}

.teclado-moldura { overflow-x: auto; border-radius: 16px; background: #0B0C11; border: 1px solid var(--borda); padding: 14px 12px 12px; -webkit-overflow-scrolling: touch; }
.teclado { position: relative; height: 230px; min-width: 620px; user-select: none; -webkit-user-select: none; }
@media (max-width: 640px) { .teclado { height: 190px; min-width: 640px; } }
.tecla { position: absolute; top: 0; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-family: var(--fonte); transition: background .12s, transform .12s; }
.tecla.branca { height: 100%; background: linear-gradient(#FFFFFF, #E5E7EB); border: 1px solid #1F2937; border-radius: 0 0 8px 8px; z-index: 1; padding-bottom: 8px; }
.tecla.preta { height: 62%; background: linear-gradient(#374151, #0B0C11); border-radius: 0 0 6px 6px; z-index: 2; padding-bottom: 6px; box-shadow: 0 3px 6px rgba(0,0,0,.5); }
.tecla.branca:hover { background: linear-gradient(#FFFFFF, #D1D5DB); }
.tecla.preta:hover { background: linear-gradient(#4B5563, #111827); }
.nome-tecla { font-size: .66rem; font-weight: 800; color: #6B7280; }
.tecla.preta .nome-tecla { color: #D1D5DB; font-size: .58rem; }
.dedo-tecla { width: 24px; height: 24px; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: .75rem; font-weight: 900; color: #0F1117; background: #fff; margin-bottom: 6px; box-shadow: 0 2px 5px rgba(0,0,0,.3); }
.tecla.preta .dedo-tecla { width: 20px; height: 20px; font-size: .68rem; }
.dedo-tecla:not(:empty) { display: flex; }
.tecla.on-dir.branca { background: linear-gradient(rgba(var(--accent-rgb), .55), var(--accent)); }
.tecla.on-dir.preta { background: linear-gradient(rgba(var(--accent-rgb), .7), var(--accent)); }
.tecla.on-esq.branca { background: linear-gradient(#DDD6FE, #A78BFA); }
.tecla.on-esq.preta { background: linear-gradient(#C4B5FD, #8B5CF6); }
.tecla.on-dir .nome-tecla, .tecla.on-esq .nome-tecla { color: #0F1117; }
.tecla.soando { transform: translateY(3px); filter: brightness(1.15); }
.teclado-legenda { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .75rem; color: var(--muted); margin: .7rem 0 1.25rem; }
.teclado-legenda .leg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: .3rem; }
.leg-esq { background: #A78BFA; }
.leg-dir { background: var(--accent); }
.teclado-controles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .teclado-controles { grid-template-columns: 1fr; } }
/* Teclado no celular: teclas em tamanho confortável + rolagem + mapa */
.teclado-mapa, .dica-rolagem { display: none; }
@media (max-width: 760px) {
    .teclado-mapa { display: block; position: relative; height: 34px; margin-bottom: .35rem; border-radius: 8px; overflow: hidden;
        background: #0B0C11; border: 1px solid var(--borda); cursor: pointer; touch-action: none; }
    .mapa-teclas { position: absolute; inset: 3px; }
    .mini { position: absolute; top: 0; }
    .mini.branca { height: 100%; background: #E5E7EB; border-right: 1px solid #6B7280; }
    .mini.preta { height: 60%; background: #111827; z-index: 1; }
    .mini.on-dir { background: var(--accent); }
    .mini.on-esq { background: #A78BFA; }
    .mapa-janela { position: absolute; top: 0; bottom: 0; border: 2px solid var(--accent); border-radius: 6px; z-index: 2;
        background: rgba(var(--accent-rgb), .12); box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); pointer-events: none; }
    .dica-rolagem { display: block; font-size: .72rem; color: var(--muted); margin: 0 0 .5rem; }
    .teclado-moldura { padding: 10px 8px 6px; scroll-behavior: smooth; }
    .teclado { min-width: 780px; height: 210px; }
    .teclado-moldura::-webkit-scrollbar { height: 10px; }
    .teclado-moldura::-webkit-scrollbar-track { background: #1D202D; border-radius: 6px; }
    .teclado-moldura::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }
}
}

/* Importar cifras */
.zona-arquivos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; text-align: center; cursor: pointer;
    padding: 2rem 1rem; border: 2px dashed var(--borda-forte); border-radius: 18px; background: var(--input); transition: border-color .2s, background .2s; }
.zona-arquivos .ic { width: 34px; height: 34px; color: var(--accent); }
.zona-arquivos:hover, .zona-arquivos.arrastando { border-color: var(--accent); background: rgba(var(--accent-rgb), .06); }
.resultado-importacao.salvo { border-color: rgba(var(--marca-rgb), .4); }
.resultado-importacao .situacao { max-width: 60%; white-space: normal; text-align: right; }

/* Coleções de cifras */
.grade-colecoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.cartao-colecao { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(var(--accent-rgb), .06);
    border: 1px solid rgba(var(--accent-rgb), .25); color: var(--texto); text-decoration: none !important; transition: border-color .2s, transform .2s; }
.cartao-colecao:hover { border-color: var(--accent); transform: translateY(-1px); }
.cartao-colecao strong { display: block; color: #fff; }
.cartao-colecao small { color: var(--muted); font-size: .78rem; }
.cartao-colecao > .ic { margin-left: auto; color: var(--accent); }
.numero-hino { min-width: 40px; height: 40px; padding: 0 .4rem; border-radius: 12px; display: inline-grid; place-items: center; flex-shrink: 0;
    font-family: var(--mono); font-weight: 900; font-size: .9rem; color: var(--accent); background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .25); }
.colecao-link { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem; }
.navegacao-hinos { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--borda); }
.campo-lote select { width: auto; max-width: 220px; }
.campo-lote .colecao-nova { width: 220px; }

/* =====================================================================
   DESCOBRIR TONS - BUSCA AUTOMÁTICA
   ===================================================================== */
.painel-auto { border-color: rgba(var(--accent-rgb), .25); }
.painel-auto.ouvindo { box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .5), var(--sombra); }
.bloqueado-auto { padding: 1.25rem 1.5rem; }
.auto-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .auto-grade { grid-template-columns: 1fr; } }
.nota-agora { font-size: 3.2rem; font-weight: 900; font-family: var(--mono); color: var(--accent); text-align: center; line-height: 1.1; }
.afinador-barra { position: relative; height: 8px; margin: .7rem auto 0; max-width: 240px; border-radius: 999px;
    background: linear-gradient(90deg, #F87171, #FBBF24 30%, #4ADE80 45%, #4ADE80 55%, #FBBF24 70%, #F87171); opacity: .8; }
.afinador-centro { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: #fff; transform: translateX(-50%); }
.afinador-ponteiro { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #0F1117;
    transform: translate(-50%, -50%); transition: left .1s; }
.medidor { position: relative; height: 12px; border-radius: 999px; background: var(--input); border: 1px solid var(--borda); overflow: hidden; }
.medidor-nivel { height: 100%; width: 0; background: var(--muted2); transition: width .06s; }
.medidor-nivel.acima { background: var(--accent); }
.medidor-limite { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }
.histograma-auto { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 110px; margin-top: 1rem; padding-top: .5rem; border-top: 1px solid var(--borda); }
.histograma-auto .barra-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.histograma-auto .barra { width: 100%; height: 3%; background: rgba(var(--accent-rgb), .6); border-radius: 4px 4px 0 0; transition: height .15s; }
.histograma-auto span { font-size: .62rem; font-weight: 800; color: var(--muted); margin-top: 3px; }
.histograma-auto .agora .barra { background: #fff; }
.histograma-auto .agora span { color: #fff; }
.resultado-auto .tom-resultado { font-size: 2.2rem; }
.nota.ouvindo { box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(var(--accent-rgb), .6); }

/* Potenciômetros */
.knobs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: .5rem 0 .8rem; }
@media (max-width: 640px) { .knobs { grid-template-columns: repeat(2, 1fr); } }
.knob { display: flex; flex-direction: column; align-items: center; text-align: center; }
.knob-disco { width: 92px; height: 92px; cursor: ns-resize; touch-action: none; border-radius: 50%; outline: none; }
.knob-disco:focus-visible { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .5); }
.knob-disco svg { width: 100%; height: 100%; }
.knob-trilho { fill: none; stroke: var(--borda-forte); stroke-width: 7; stroke-linecap: round; }
.knob-arco { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), .5)); }
.knob-centro { fill: #1D202D; stroke: #353950; stroke-width: 2; }
.knob-ponteiro { stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.knob-valor { font-family: var(--mono); font-weight: 900; color: var(--accent); font-size: .95rem; margin-top: -.2rem; }
.knob-rotulo { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; margin-top: .15rem; }
.knob-dica { font-size: .7rem; color: var(--muted); margin-top: .2rem; max-width: 170px; line-height: 1.35; }
.relativo-info { color: var(--muted); border-left: 3px solid rgba(var(--accent-rgb), .5); padding-left: .6rem; }

/* Busca automática no celular: tudo dentro da tela, tom detectado no alto */
.auto-grade > * { min-width: 0; }
.histograma-auto { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 760px) {
    .auto-grade { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
    .resultado-auto { order: -1; padding: .9rem 1rem; }
    .resultado-auto .tom-resultado { font-size: 1.9rem; }
    .resultado-auto .muted.pequeno.mt-1 { display: none; }       /* dica longa */
    .painel-auto .card-interno { padding: .9rem 1rem; }
    .painel-auto .titulo-pagina { margin-bottom: .8rem; padding-bottom: .7rem; }
    .painel-auto .titulo-pagina h1 { font-size: 1.1rem; }
    .painel-auto .titulo-pagina p { display: none; }
    .painel-auto .titulo-pagina-extra { width: 100%; }
    .painel-auto .titulo-pagina-extra .btn { flex: 1; }
    .nota-agora { font-size: 2.4rem; }
    .histograma-auto { height: 70px; gap: 2px; margin-top: .7rem; }
    .histograma-auto span { font-size: .55rem; }
}
