/* LETROU 1.38.22 — ajustes pontuais da interface.
   Os anúncios, o player, a transcrição e o Modo Palco não recebem mudanças de lógica. */

/* 1. Publicidade: centralizar o container, inclusive slots responsivos/injetados. */
body.lt15-site.lt15-home .lt15-content > .letrou-ad,
body.lt15-site.lt15-home .lt15-content > .google-auto-placed,
body.lt15-site.lt15-home .lt15-content > .adsbygoogle,
body.lt15-site.lt15-home .lt15-content > .ad-container,
body.lt15-site.lt15-home .lt15-content > [data-slot],
body.lt15-site.lt15-home .letrou-ad[data-slot="home_after_tool"],
body.lt15-site.lt15-home .letrou-ad[data-slot="home_mid"] {
    grid-column: 1 / -1;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    justify-self: center;
}
body.lt15-site.lt15-home .lt15-content .google-auto-placed {
    max-width:100%;margin-left:auto!important;margin-right:auto!important;text-align:center;
}
body.lt15-site.lt15-home :is(.letrou-ad,.google-auto-placed) > :is(ins,div,iframe),
body.lt15-site.lt15-home .letrou-ad ins.adsbygoogle {
    margin-left: auto !important;
    margin-right: auto !important;
}
/* Preserve provider-supplied heights, ad sizes, scripts and visibility. */

/* 2. Footer: show original unfiltered photograph. Override historic gradients
   from both reference.css and pagespeed-v1389.css for desktop and mobile. */
body.lt15-site .lt15-footer-scene,
body.lt15-site.lt15-home .lt15-footer-scene {
    background-image: var(--lt15-footer) !important;
    background-blend-mode: normal !important;
    filter: none !important;
}
body.lt15-site .lt15-footer-scene::before,
body.lt15-site .lt15-footer-scene::after {
    /* Do not place a dark veil on top of the photograph. */
    background-color: transparent !important;
    background-image: none !important;
}
body.lt15-site .lt15-footer-scene :is(h2,p,strong,small),
body.lt15-site .lt15-footer-note { text-shadow: 0 1px 3px rgba(0,16,35,.7); }

/* 3. Minimal, accessible sun/moon theme switch in the site header.
   Keep only one symbol visible. app.js changes moon -> sun when switching themes. */
body.lt15-site .lt15-account .lt15-theme-switch {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; min-width: 36px; min-height: 36px;
    flex: 0 0 36px; padding: 0; box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.48); border-radius: 50%;
    background: rgba(5,28,60,.42); color: #fff;
    cursor: pointer; box-shadow: none;
    transition: background-color .18s ease, border-color .18s ease;
}
body.lt15-site .lt15-account .lt15-theme-switch:hover,
body.lt15-site .lt15-account .lt15-theme-switch:focus-visible {
    background: rgba(5,49,101,.78); border-color: #fff; color: #fff;
}
body.lt15-site .lt15-theme-switch .lt15-theme-icon {
    display: block; font: 400 22px/1 Arial,Helvetica,sans-serif;
    width: 24px; height: 24px; text-align: center;
}
/* Defensive: no text is displayed even if an old header template is cached. */
body.lt15-site .lt15-account .lt15-theme-switch .lt15-theme-label { display: none !important; }
html[data-letrou-theme="dark"] body.lt15-site .lt15-theme-switch {
    background: rgba(255,214,130,.16); color: #ffdc90; border-color: rgba(255,220,144,.7);
}
html[data-letrou-theme="dark"] body.lt15-site .lt15-theme-switch:hover {
    background: rgba(255,214,130,.28); color: #ffdc90;
}
body.lt15-site .letrou-theme-toggle:focus-visible {
    outline: 3px solid #f8ce65; outline-offset: 3px;
}
@media (max-width: 480px) {
    body.lt15-site .lt15-account .lt15-theme-switch {
        width: 34px; height: 34px; min-width: 34px; min-height: 34px; flex-basis: 34px;
    }
    body.lt15-site .lt15-account .lt15-theme-switch .lt15-theme-icon { font-size: 20px; }
}

/* 4. Dedicated error page: same house style as LETROU, no WordPress default. */
body.lt15-site.lt15-internal.letrou-page-404 .letrou-404-main {
    width: 100%; min-height: 480px; display: flex; align-items: center;
    padding: 48px 22px 38px !important; box-sizing: border-box;
}
body.letrou-page-404 .lt15-404-panel {
    width: min(1140px,100%); margin: 0 auto; box-sizing: border-box;
    border: 1px solid #dbe8f7; border-radius: 26px;
    background: linear-gradient(140deg,#fff 0%,#f7fbff 70%,#ebf4ff 100%);
    box-shadow: 0 15px 60px rgba(29,73,133,.09);
    padding: clamp(24px,4vw,58px); display: grid;
    grid-template-columns: minmax(190px,.75fr) minmax(0,1.25fr);
    gap: clamp(16px,4vw,65px); align-items: center;
}
body.letrou-page-404 .lt15-404-illustration {
    min-height: 260px; border-radius: 22px; display: grid; place-items: center;
    position: relative; overflow: hidden;
    background: radial-gradient(circle at 35% 15%,#287fe0 0%,#0953a8 46%,#071f46 100%);
}
body.letrou-page-404 .lt15-404-illustration::after {
    content: ''; position: absolute; width: 290px; height: 290px;
    border: 1px solid rgba(255,255,255,.15); border-radius: 50%;
    top: -160px; right: -110px; pointer-events: none;
}
body.letrou-page-404 .lt15-404-record {
    width: 205px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
    background: repeating-radial-gradient(circle at center,#122640 0 6px,#0b1d32 7px 10px,#172e49 11px 13px);
    box-shadow: 12px 16px 28px rgba(0,0,0,.3), inset 0 0 0 3px rgba(255,255,255,.12);
    transform: rotate(-15deg);
}
body.letrou-page-404 .lt15-404-label {
    width: 104px;aspect-ratio:1;display:grid;place-items:center;border-radius:50%;
    border:6px solid #0c2544; background:#e5f0ff;color:#0055b7;
    font-size:42px;font-weight:800;line-height:1;
}
body.letrou-page-404 .lt15-404-note {
    position:absolute; top:19%;right:14%;font-size:40px;color:#fff;transform:rotate(14deg);
}
body.letrou-page-404 .lt15-404-kicker {font-size:12px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase;color:#0064c9;}
body.letrou-page-404 .lt15-404-copy h1 {
    font: 700 clamp(30px,4vw,49px)/1.12 Georgia,'Times New Roman',serif;
    letter-spacing:-.8px;color:#0e294b;margin:13px 0 17px;
}
body.letrou-page-404 .lt15-404-copy p {color:#49627f;font-size:17px;line-height:1.65;max-width:550px;margin:0 0 26px;}
body.letrou-page-404 .lt15-404-search {display:flex;flex-wrap:wrap;gap:10px;max-width:590px;}
body.letrou-page-404 .lt15-404-search input[type=search] {
    flex:1 1 225px;min-width:0;padding:14px 17px;
    background:#fff!important;border:1px solid #bed2e9!important;
    border-radius:12px!important;color:#102a49!important;
    box-sizing:border-box; font-size:15px;
}
body.letrou-page-404 .lt15-404-search button,
body.letrou-page-404 .lt15-404-primary {
    background:#006aff;color:#fff;border:1px solid #006aff;
    padding:13px 20px;border-radius:12px;font-weight:700;
    text-decoration:none;cursor:pointer;box-sizing:border-box;
}
body.letrou-page-404 .lt15-404-search button:hover,
body.letrou-page-404 .lt15-404-primary:hover {background:#0055cc;color:#fff;}
body.letrou-page-404 .lt15-404-actions {display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:18px;}
body.letrou-page-404 .lt15-404-secondary {color:#005bb6;font-weight:700;text-decoration:underline;text-underline-offset:3px;}
body.letrou-page-404 .lt15-404-secondary:hover {color:#00458e;}
@media(max-width:720px) {
    body.lt15-site.lt15-internal.letrou-page-404 .letrou-404-main {min-height:0;padding:25px 14px 12px!important;}
    body.letrou-page-404 .lt15-404-panel {grid-template-columns:1fr;padding:20px;gap:22px;border-radius:18px;}
    body.letrou-page-404 .lt15-404-illustration {min-height:175px;}
    body.letrou-page-404 .lt15-404-record {width:140px;}
    body.letrou-page-404 .lt15-404-label {width:71px;font-size:29px;border-width:4px;}
    body.letrou-page-404 .lt15-404-copy p {font-size:15px;}
    body.letrou-page-404 .lt15-404-search button {flex:1 0 auto;}
}

/* 5. True dark theme. All selectors are scoped to the saved dark preference;
   keep media photos and AdSense containers unfiltered. */
html[data-letrou-theme="dark"] {color-scheme: dark;}
html[data-letrou-theme="dark"] body.lt15-site {
    background:#0b1628!important;color:#f0f6ff!important;
    --letrou-background:#0b1628;--lt170-ink:#eef5ff;--lt18-ink:#eef5ff;
    --lt170-muted:#b6c8dd;--lt18-muted:#b6c8dd;--lt18-line:#29435e;
    --lt18-soft:#172b43;
}
html[data-letrou-theme="dark"] body.lt15-site :is(.letrou-app-shell,.lt15-shell) {
    background-color:#0b1628!important;
}
html[data-letrou-theme="dark"] body.lt15-site.lt15-home .lt15-content {
    background:#0b1628!important;color:#edf5ff!important;
}
html[data-letrou-theme="dark"] body.lt15-site.lt15-internal .letrou-main {
    background:#0b1628!important;color:#edf5ff!important;
}
html[data-letrou-theme="dark"] body.lt15-site.lt15-internal:is(.letrou-page-estudar,.letrou-page-guide) .letrou-main {
    background:#0b1628!important;
}
html[data-letrou-theme="dark"] body.lt15-site :is(.letrou-page-hero,.letrou-reading-head,.letrou-song-hero-v170) {
    background:linear-gradient(180deg,#132942,#0b1628)!important;
}
/* Actual panels in pages, guides, song listings, repertoire, tools and search. */
html[data-letrou-theme="dark"] body.lt15-site :is(
    .lt15-song,.lt15-resource-grid>a,.lt15-resource-thumb,.lt15-artist-carousel>button,
    .letrou-reading-body,.letrou-song-row,.letrou-rank-song,.letrou-guide-card,
    .letrou-study-related-card-v1350,.letrou-learning-note,.letrou-empty-premium,
    .letrou-tool-card-wide,.letrou-target-result,.letrou-song-list,
    .letrou-vocal-tool,.letrou-tool-card-wide,.letrou-artist-card,.letrou-song-extra-card-v170,
    .letrou-lyrics-card-v170,.letrou-study-hero-pills-v1350 span,.letrou-study-tip,
    .letrou-study-questions>div,.letrou-study-related-v1350,.letrou-harmony-hub-v1370,
    .letrou-harmony-readout-v1370>div,.letrou-study-example,.letrou-harmony-chips-v1370 span,
    .letrou-triad-notes-v1370 button,.letrou-note-pad button,.letrou-artist-empty,
    .letrou-song-lyrics-v170,.letrou-lyrics-toolbar-v170,.letrou-song-details-v170,
    .letrou-tool-card,.letrou-guide-card-v170,.lt15-catalog-search,
    .lt15-directory-avatar,.letrou-song-artist-avatar-v170,.lt15-avatar,
    .lt-catalog-floating-results,.lt-unified-results,.letrou-suggestions,.letrou-search-suggestions
) {
    background:#152a43!important;
    background-image:none!important;
    color:#eef5ff!important;
    border-color:#29435e!important;
}
/* Make labels inside dark panels actually readable (some legacy rules use dark ink). */
html[data-letrou-theme="dark"] body.lt15-site :is(
    .lt15-tool,.letrou-transcriber,.letrou-reading-body,.letrou-learning-note,
    .letrou-study-tip,.letrou-study-questions,.letrou-harmony-hub-v1370,
    .letrou-harmony-readout-v1370,.letrou-vocal-tool,.letrou-tool-card-wide
) :is(label,strong,h2,h3,h4,small,.lt15-unified-label,.lt15-unified-help,.lt15-choice-or,.letrou-form-note,.lt15-upload-copy) {
    color:#eff6ff!important;
}
/* White controls need dark ink when white by design, blue controls need white. */
html[data-letrou-theme="dark"] body.lt15-site :is(
    .letrou-secondary-btn,.letrou-toolbar-button-v170,.letrou-song-actions-top-v170 button,
    .letrou-tool-preview span,.letrou-range>div,.lt15-pagination a,.lt15-resource-icon,
    .letrou-tool-icon,.letrou-guide-icon,.letrou-song-avatar,.letrou-harmony-controls-v1370 select,
    .letrou-study-questions label,.lt15-more>div
) {
    background:#1b3654!important;color:#dbeaff!important;border-color:#3a5976!important;
}
html[data-letrou-theme="dark"] body.lt15-site :is(
    .letrou-primary-btn,.letrou-stage-launch-v170,.letrou-search button,
    .letrou-source-tabs button.is-active,.lt15-choose,.lt15-card-button
) {background:#1674e9!important;color:#fff!important;border-color:#338fff!important;}
html[data-letrou-theme="dark"] body.lt15-site :is(.lt15-tool,.lt15-search-control,.lt15-unified-field,
    .lt15-transcriber .letrou-dropzone,.letrou-transcriber,.letrou-transcript-result,
    .lt15-transcriber .letrou-transcript-result textarea,
    .letrou-dropzone,.letrou-source-panel,.lt15-search-control .lt15-clear-search,
    .lt-unified-results .lt-unified-empty) {
    background:#152a43!important;color:#eff6ff!important;border-color:#365675!important;
}
html[data-letrou-theme="dark"] body.lt15-site input:not([type=checkbox]):not([type=radio]):not([type=file]),
html[data-letrou-theme="dark"] body.lt15-site select,
html[data-letrou-theme="dark"] body.lt15-site textarea {
    background:#0e2035!important;color:#f3f8ff!important;border-color:#496582!important;
    caret-color:#fff;
}
html[data-letrou-theme="dark"] body.lt15-site input::placeholder,
html[data-letrou-theme="dark"] body.lt15-site textarea::placeholder {
    color:#b5c7d9!important;opacity:1;
}
html[data-letrou-theme="dark"] body.lt15-site :is(
    .lt15-section-head h2,.lt15-resource-grid strong,.lt15-song-copy strong,
    .lt15-artist-track strong,.letrou-page-hero h1,.letrou-reading-head h1,
    .letrou-reading-body h1,.letrou-reading-body h2,.letrou-reading-body h3,
    .letrou-song-header-copy-v170 h1,.letrou-lyrics,.letrou-lyrics-heading-v170 h2,
    .letrou-guide-card h2,.letrou-guide-card h3,.letrou-artist-card strong,
    .letrou-tool-card h3,.letrou-harmony-hub-v1370 h2,.letrou-harmony-hub-v1370 h3,
    .letrou-study-tip strong,.letrou-study-questions strong,.letrou-section-title-v140 h2,
    .letrou-section-head h2,.letrou-study-related-v1350 h2,
    .lt15-resource-grid a,.letrou-vocal-tool h2,.letrou-vocal-tool h3
) {color:#f2f7ff!important;}
html[data-letrou-theme="dark"] body.lt15-site :is(
    .lt15-song-copy small,.lt15-song-copy em,.lt15-resource-grid small,
    .lt15-section-head>a,.letrou-page-hero p,.letrou-reading-head p,
    .letrou-song-artist-name-v170,.letrou-breadcrumb,.letrou-guide-card p,
    .letrou-artist-card small,.letrou-vocal-tool p,.letrou-study-tip p,
    .letrou-study-questions p,.letrou-song-extra-card-v170 p,
    .letrou-study-related-v1350 p,.letrou-harmony-hub-v1370 p
) {color:#bbcee3!important;}
html[data-letrou-theme="dark"] body.lt15-site :is(.lt15-more>div,.lt-catalog-floating-results) a {
    color:#e6f1ff!important;
}
html[data-letrou-theme="dark"] body.lt15-site .lt15-more select {
    background:#122b49!important;color:#f2f7ff!important;
}
html[data-letrou-theme="dark"] body.lt15-site :is(.lt15-mobile-nav,#letrou-mobile-navigation) {
    background:#12253bea!important;border-color:#355477!important;
}
html[data-letrou-theme="dark"] body.lt15-site :is(.lt15-mobile-nav,#letrou-mobile-navigation) :is(a,button,span) {
    color:#eef5ff!important;
}
/* Keep photo-rich hero, featured cards, original footer image and stage visuals untouched. */
html[data-letrou-theme="dark"] body.lt15-site .lt15-photo-card {
    color:#fff;
}
html[data-letrou-theme="dark"] body.lt15-site .lt15-404-panel {
    background:linear-gradient(140deg,#152a43,#102139)!important;
    border-color:#35516f!important;box-shadow:0 10px 30px rgba(0,0,0,.22);
}
html[data-letrou-theme="dark"] body.lt15-site .lt15-404-copy h1 {color:#f1f7ff!important;}
html[data-letrou-theme="dark"] body.lt15-site .lt15-404-copy p {color:#c6d8ec!important;}
html[data-letrou-theme="dark"] body.lt15-site .lt15-404-kicker,
html[data-letrou-theme="dark"] body.lt15-site .lt15-404-secondary {color:#8bc1ff!important;}
html[data-letrou-theme="dark"] body.lt15-site .lt15-404-search input[type=search] {
    background:#0c2037!important;color:#fff!important;border-color:#496582!important;
}
/* Stage always retains its own dark color system and does not inherit card rules. */
@media (prefers-reduced-motion:reduce){body.lt15-site .lt15-theme-switch{transition:none;}}
