:root {
  --black: #0b0b0b;
  --coal: #171615;
  --panel: #24211d;
  --paper: #f6f0e7;
  --paper-2: #fffaf2;
  --line: #ded4c3;
  --muted: #71695e;
  --gold: #c79a3b;
  --gold-2: #efd393;
  --sage: #7d927c;
  --wine: #783645;
  --text: #15120f;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(0, 0, 0, .2);
  --desktop-bg: #e9dfcf;
  --soft-button: #eee4d3;
  --soft-button-text: #3a3127;
  --empty-line: #cfc1ab;
  --focus-ring: rgba(239, 211, 147, .72);
}

/* Leitor mobile: prioriza a cifra e mantém as ferramentas acessíveis. */
@media (max-width: 640px) {
  body.screen-reader .app-shell,
  body.screen-reader .main-area,
  #view-reader.view.active { min-height: 100dvh; }

  #view-reader .reader-top {
    min-height: 68px;
    height: 68px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }

  #view-reader .reader-round {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  #view-reader .reader-title h2 {
    font-size: 17px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #view-reader .reader-title p {
    margin-top: 2px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #view-reader .reader-youtube-player,
  #view-reader .reader-media {
    margin: 6px 8px 0;
    padding: 7px;
    border-radius: 8px;
  }

  #view-reader .reader-youtube-player { max-height: none; overflow: visible; }

  #view-reader .reader-tools,
  .reader-tools {
    margin: 6px 8px 0;
    padding: 6px;
    gap: 5px !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    max-height: 106px;
    overflow-y: auto;
    border-radius: 8px;
  }

  #view-reader .reader-tools button,
  .reader-tools button {
    min-height: 32px !important;
    height: 32px;
    padding: 0 4px !important;
    border-radius: 999px;
    font-size: 10px !important;
  }

  #view-reader .reader-tools .instrument-toggle span,
  .reader-tools .instrument-toggle span { font-size: 12px !important; }

  #view-reader .reader-tools .instrument-toggle strong,
  .reader-tools .instrument-toggle strong { font-size: 10px !important; }

  #view-reader .yt-audio-input-row { gap: 4px; }
  #view-reader .yt-audio-url-input { min-width: 0; padding: 7px 8px; font-size: 11px; }
  #view-reader .yt-audio-load-btn,
  #view-reader .yt-seek-btn,
  #view-reader .yt-toggle-vis-btn { padding: 7px 8px; font-size: 10px; }

  #view-reader .chord-sheet {
    min-height: calc(100dvh - 196px);
    margin: 6px 4px max(8px, env(safe-area-inset-bottom));
    padding: 12px 10px;
    border-radius: 6px;
    font-size: clamp(13px, 3.65vw, 15px);
    line-height: 1.42;
  }

  #view-reader .chord-sheet pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 640px) {
  body.fullscreen-active #view-reader {
    padding: 6px 8px !important;
    height: 100dvh !important;
  }

  body.fullscreen-active #view-reader .reader-youtube-player {
    max-height: none;
    overflow: visible;
  }

  body.fullscreen-active #view-reader .chord-sheet {
    max-height: none !important;
    font-size: 1em !important;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --black: #05070b;
  --coal: #0f1624;
  --panel: #0c1220;
  --paper: #090f1a;
  --paper-2: #121b2b;
  --line: #263449;
  --muted: #a6b1c3;
  --gold: #e4b95f;
  --gold-2: #f4d990;
  --sage: #8fb08f;
  --wine: #ef8da2;
  --text: #f8efe2;
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(0, 0, 0, .42);
  --desktop-bg: #05070b;
  --soft-button: #1a2638;
  --soft-button-text: #f8efe2;
  --empty-line: #35445d;
  --focus-ring: rgba(244, 217, 144, .86);
}

/* Identidade visual comercial: o modo claro/escuro continua sendo independente
   do plano, enquanto estas variáveis definem a marca ativa. */
:root[data-plan="essential"] {
  --gold: #d96b32;
  --gold-2: #ffc08d;
  --sage: #7d927c;
  --wine: #9b3d31;
  --desktop-bg: #f0dfd2;
  --focus-ring: rgba(255, 155, 98, .72);
}

:root[data-plan="church"] {
  --gold: #c79a3b;
  --gold-2: #efd393;
  --sage: #7d927c;
  --wine: #783645;
  --desktop-bg: #e9dfcf;
  --focus-ring: rgba(239, 211, 147, .72);
}

:root[data-plan="pro"] {
  --gold: #6d8cff;
  --gold-2: #b7c6ff;
  --sage: #55c7b0;
  --wine: #8d6cff;
  --desktop-bg: #dfe7ff;
  --focus-ring: rgba(109, 140, 255, .72);
}

:root[data-theme="dark"][data-plan="essential"] {
  --gold: #ff9b62;
  --gold-2: #ffd0ad;
  --sage: #9ebd98;
  --wine: #ff927f;
  --desktop-bg: #211412;
}

:root[data-theme="dark"][data-plan="church"] {
  --gold: #e4b95f;
  --gold-2: #f4d990;
  --sage: #8fb08f;
  --wine: #ef8da2;
  --desktop-bg: #05070b;
}

:root[data-theme="dark"][data-plan="pro"] {
  --gold: #8fa8ff;
  --gold-2: #d1dbff;
  --sage: #72e0ca;
  --wine: #b7a6ff;
  --desktop-bg: #080d1e;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  color: var(--text);
  overflow-x: hidden;
  transition: background .22s ease, color .22s ease;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: min(100vw, 560px);
  min-height: 100vh;
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
}

.app-shell[hidden],
.login-screen[hidden],
.account-modal[hidden] {
  display: none;
}

.login-screen {
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(239, 211, 147, .18), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(77, 118, 201, .18), transparent 24%),
    linear-gradient(180deg, rgba(2, 6, 15, .24), rgba(0, 0, 0, .8)),
    var(--black);
  color: var(--white);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 380px);
  display: grid;
  gap: 14px;
  justify-items: stretch;
  padding: 22px 18px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 24, 39, .92), rgba(7, 11, 24, .96));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .34);
  backdrop-filter: blur(14px);
}

.login-logo {
  width: 108px;
  height: 108px;
  margin: 4px auto 2px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.login-heading {
  text-align: center;
}

.login-subtitle {
  margin-top: 8px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  line-height: 1.45;
}

.login-heading span,
.login-local-field span,
.login-password span,
.account-card label span,
.account-head span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-heading span {
  color: rgba(255, 255, 255, .72);
}

.login-users {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}

.login-users button,
.login-submit {
  min-height: 48px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 950;
}

.login-users button {
  background: rgba(255, 255, 255, .13);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .18);
}

.login-users button.active,
.login-submit {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #17120c;
}

.login-password {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, .76);
}

.login-local-field {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, .76);
}

.login-password input,
.login-local-field input,
.account-card input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  outline: 0;
  background: var(--paper-2);
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 850;
}

.login-password input:focus,
.login-local-field input:focus,
.account-card input:focus {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.login-local-field input::placeholder {
  color: rgba(255, 255, 255, .34);
}

.login-local-hint {
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}

.login-link {
  min-height: 20px;
  justify-self: center;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  border: 0;
  font-size: 12px;
  font-weight: 850;
}

.login-status,
.account-status {
  min-height: 18px;
  color: var(--gold-2);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 850;
  text-align: center;
}

.login-trial-message {
  margin: 8px 0 0;
  color: rgba(226, 238, 255, .82);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.login-trial-message a {
  color: #67e8ff;
  font-weight: 800;
  text-decoration: underline;
}

/* Adorar Pro - login neon */
.login-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(2, 5, 18, .86) 0%, rgba(5, 12, 36, .66) 48%, rgba(24, 8, 56, .54) 100%),
    url("/images/fundo.jpg") center / cover no-repeat fixed;
}

.login-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(21, 225, 255, .18), transparent 32%),
    radial-gradient(circle at 84% 78%, rgba(132, 65, 255, .2), transparent 34%);
}

.login-card {
  width: min(100%, 410px);
  padding: 26px 24px 22px;
  border-radius: 30px;
  border: 1px solid rgba(94, 224, 255, .28);
  background: linear-gradient(145deg, rgba(7, 17, 43, .9), rgba(17, 10, 43, .84));
  box-shadow:
    0 32px 80px rgba(0, 0, 0, .52),
    0 0 0 1px rgba(142, 92, 255, .08) inset,
    0 0 42px rgba(28, 189, 255, .1);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
}

.login-logo {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  background: #050814;
  border: 1px solid rgba(75, 231, 255, .58);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, .42),
    0 0 24px rgba(33, 211, 255, .22),
    0 0 0 5px rgba(69, 203, 255, .06);
}

.login-heading span,
.login-password span,
.login-local-field span {
  color: #69e9ff;
  letter-spacing: .1em;
}

.login-heading h1 {
  margin-top: 5px;
  color: #fff;
  text-shadow: 0 0 24px rgba(80, 214, 255, .26);
}

.login-subtitle {
  color: rgba(225, 237, 255, .76);
}

.login-users {
  padding: 5px;
  border-color: rgba(86, 217, 255, .18);
  background: rgba(4, 12, 34, .58);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18) inset;
}

.login-users button {
  border-color: rgba(115, 164, 225, .2);
  background: rgba(24, 40, 72, .72);
  color: rgba(235, 246, 255, .84);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.login-users button:hover {
  transform: translateY(-1px);
  border-color: rgba(89, 229, 255, .52);
}

.login-users button.active {
  color: #fff;
  border-color: rgba(110, 237, 255, .64);
  background: linear-gradient(135deg, #08b9e8, #386de9 52%, #7752dc);
  box-shadow: 0 8px 22px rgba(27, 146, 241, .28), 0 0 18px rgba(91, 222, 255, .14) inset;
}

.login-profile-card {
  border-color: rgba(86, 217, 255, .22);
  background: linear-gradient(135deg, rgba(13, 31, 66, .72), rgba(35, 19, 70, .58));
  box-shadow: 0 16px 34px rgba(0, 0, 0, .22), 0 0 24px rgba(74, 168, 255, .06) inset;
}

.login-profile-avatar {
  border: 1px solid rgba(92, 230, 255, .64);
  box-shadow: 0 0 18px rgba(51, 212, 255, .18);
}

.login-profile-copy span {
  color: rgba(218, 233, 255, .7);
}

.login-password input,
.login-local-field input {
  border: 1px solid rgba(82, 210, 255, .34);
  background: rgba(4, 14, 38, .78);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18) inset;
}

.login-password input:focus,
.login-local-field input:focus {
  border-color: #5ce7ff;
  box-shadow: 0 0 0 3px rgba(72, 211, 255, .16), 0 0 22px rgba(78, 181, 255, .14);
}

.login-submit {
  color: #fff;
  border: 1px solid rgba(119, 236, 255, .64);
  background: linear-gradient(110deg, #08b9e8, #316ce7 52%, #7652df);
  box-shadow: 0 14px 30px rgba(38, 121, 232, .28), 0 0 18px rgba(91, 222, 255, .13) inset;
  transition: transform .18s ease, box-shadow .18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 17px 34px rgba(38, 121, 232, .38), 0 0 22px rgba(91, 222, 255, .18) inset;
}

.login-link {
  color: rgba(210, 232, 255, .78);
}

.login-link:hover {
  color: #67e8ff;
}

.login-status {
  color: #77e9ff;
}

.cover {
  min-height: 280px;
  padding: 26px 16px 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .78)),
    var(--black);
  color: var(--white);
  display: grid;
  align-content: end;
  gap: 18px;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.brand-logo {
  width: 146px;
  height: 146px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .24);
  background: var(--white);
}

.eyebrow {
  display: block;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 950;
}

.search-box {
  min-height: 52px;
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
}

.search-box svg {
  width: 21px;
  height: 21px;
  color: #4f473e;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.search-box input::placeholder {
  color: #7c7368;
  opacity: 1;
}

.cover-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cover-action {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 22px;
  font-weight: 950;
}

.theme-icon {
  line-height: 1;
}

.cover-action[disabled] {
  cursor: default;
  opacity: .78;
}

.account-action {
  font-size: 14px;
}

.account-action > span:not([class]) {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  font-size: 12px;
  line-height: 1;
}

.account-avatar-shell,
.account-profile-copy,
.account-profile-copy strong,
.account-profile-copy small {
  width: auto;
  height: auto;
  background: transparent;
}

.install-prompt {
  margin: -6px 12px 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--text);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
}

.install-prompt[hidden] {
  display: none;
}

.install-prompt.visible {
  opacity: 1;
  transform: translateY(0);
}

.install-prompt-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--white);
}

.install-prompt-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.install-prompt-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 950;
}

.install-prompt-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
}

.install-prompt-action {
  min-height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #17120c;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 950;
}

.install-prompt-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--soft-button);
  color: var(--soft-button-text);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.account-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .56);
}

.account-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  min-height: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
}

.account-card::-webkit-scrollbar { width: 7px; }
.account-card::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .55); border-radius: 999px; }
.account-head { position: sticky; top: -16px; z-index: 2; padding-top: 2px; background: var(--paper); }

.account-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: start;
  gap: 10px;
}

.account-head h2 {
  margin-top: 3px;
  font-size: 22px;
  line-height: 1.05;
}

.account-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.account-head button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--soft-button);
  color: var(--soft-button-text);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.account-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
}

.account-save,
.account-logout {
  min-height: 44px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
}

.account-save {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #17120c;
}

.account-secondary-action {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border: 1px solid rgba(126, 93, 255, .5);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(126, 93, 255, .24), rgba(42, 52, 93, .8));
  color: #eeeaff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.account-secondary-action:hover {
  transform: translateY(-1px);
  border-color: #a98cff;
  background: linear-gradient(135deg, rgba(142, 92, 255, .42), rgba(42, 52, 93, .95));
}

.account-secondary-action[data-action="toggle-leader-musician-panel"] {
  border-color: rgba(36, 211, 164, .52);
  background: linear-gradient(135deg, rgba(36, 211, 164, .2), rgba(19, 72, 76, .82));
  color: #d8fff3;
}

.account-logout {
  background: var(--soft-button);
  color: var(--soft-button-text);
}

.developer-signature,
.screen-footer {
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
}

.quick-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 12px 12px 10px;
  background: var(--panel);
}

.quick-card {
  min-width: 0;
  min-height: 70px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .09);
  color: var(--white);
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 8px 4px;
  position: relative;
}

.quick-card svg {
  width: 22px;
  height: 22px;
  color: var(--gold-2);
}

.quick-card span {
  max-width: 100%;
  color: var(--white);
  font-size: 10px;
  line-height: 1.12;
  font-weight: 850;
  text-align: center;
}

.quick-card.active {
  background: var(--paper-2);
  color: var(--text);
}

.quick-card.active span {
  color: var(--text);
}

.quick-card.active svg {
  color: var(--gold);
}

.play-card {
  background: linear-gradient(180deg, rgba(199, 154, 59, .28), rgba(120, 54, 69, .22));
}

.play-card b {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  background: var(--gold);
  color: #16120d;
  display: grid;
  place-items: center;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
}

.main-area {
  min-height: calc(100vh - 362px);
  background: var(--paper);
  padding-bottom: 18px;
}

.screen-footer {
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--panel);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.view {
  display: none;
  padding: 14px 12px 18px;
}

.view.active {
  display: block;
}

.section-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 22px;
  line-height: 1.08;
  font-weight: 950;
}

.section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 750;
}

.icon-button,
.text-button {
  min-width: 42px;
  min-height: 42px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: #302a23;
  display: grid;
  place-items: center;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.text-button {
  padding: 0 13px;
  font-size: 12px;
  font-weight: 900;
}

.song-list {
  display: grid;
  gap: 9px;
}

.song-card,
.artist-card {
  min-height: 70px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.song-main,
.artist-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.song-main,
.artist-main {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.song-title,
.artist-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.18;
  font-weight: 950;
}

.song-meta,
.artist-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 750;
}

.song-actions,
.artist-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-action {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--soft-button);
  color: var(--soft-button-text);
  border: 1px solid rgba(0, 0, 0, .04);
  font-size: 15px;
  font-weight: 950;
}

.mini-action svg {
  width: 18px;
  height: 18px;
}

.mini-action.primary {
  background: var(--gold);
  color: #16120d;
}

.mini-action.danger {
  background: #f2dce0;
  color: var(--wine);
}

.mini-action.active {
  background: #2d2720;
  color: var(--gold-2);
}

.mini-action[disabled] {
  cursor: progress;
  opacity: .74;
}

.mini-action.locked[disabled] {
  cursor: default;
  background: var(--soft-button);
  color: var(--muted);
}

.artist-download.active {
  background: #dfe8d9;
  color: #557053;
}

.download-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: download-spin .72s linear infinite;
}

@keyframes download-spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  min-height: 120px;
  border: 1px dashed var(--empty-line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 750;
}

.play-banner {
  min-height: 48px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #171615;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  box-shadow: var(--shadow);
}

.play-banner svg {
  width: 22px;
  height: 22px;
  color: var(--gold-2);
}

.play-banner span {
  font-size: 14px;
  font-weight: 950;
}

.play-list .song-card {
  grid-template-columns: 34px 1fr auto;
}

.play-index {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eee4d3;
  color: #5f5447;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 950;
}

.reader-view {
  min-height: calc(100vh - 94px);
  background: #0d0d0d;
  color: var(--white);
  padding: 0;
}

.reader-top {
  min-height: 88px;
  background: #050505;
  border-bottom: 1px solid #302c27;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: 22px 12px 10px;
}

.reader-round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #181612;
  color: var(--gold-2);
  border: 1px solid #39342e;
  display: grid;
  place-items: center;
}

.reader-round svg {
  width: 20px;
  height: 20px;
}

.favorite-reader.active {
  background: var(--gold);
  border-color: rgba(255, 255, 255, .28);
  color: #17120c;
}

.favorite-reader.active svg {
  fill: currentColor;
}

.reader-title {
  min-width: 0;
  text-align: center;
}

.reader-title h2 {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 17px;
  line-height: 1.2;
}

.reader-title p {
  margin-top: 3px;
  color: #bcb3a9;
  font-size: 12px;
  font-weight: 750;
}

.reader-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 7px;
  padding: 9px 12px;
  background: #050505;
  border-bottom: 1px solid #302c27;
}


.reader-tools .instrument-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  min-width: 118px;
}

.reader-tools .instrument-toggle span {
  color: rgba(244, 217, 144, .72);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.reader-tools .instrument-toggle strong {
  color: inherit;
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
}

.reader-tools .instrument-toggle.active span {
  color: rgba(20, 15, 6, .62);
}

.brand-logo,
.login-logo,
.sidebar-brand-logo {
  cursor: pointer;
  user-select: none;
}

.reader-tools button {
  min-height: 38px;
  border-radius: 8px;
  background: #181612;
  color: var(--gold-2);
  border: 1px solid #39342e;
  font-size: 12px;
  font-weight: 950;
  min-width: 0;
  white-space: nowrap;
}

.tuner-panel[hidden] {
  display: none;
}

.tuner-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #080808;
  border-bottom: 1px solid #302c27;
  color: var(--white);
}

.tuner-readout {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 12px;
}

.tuner-readout span {
  color: #bcb3a9;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tuner-readout strong {
  min-width: 74px;
  color: var(--gold-2);
  font-size: 42px;
  line-height: .9;
  text-align: center;
}

.tuner-readout em {
  color: #ddd1bd;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.tuner-meter {
  position: relative;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(120, 54, 69, .88), rgba(199, 154, 59, .86) 42%, rgba(125, 146, 124, .95) 49%, rgba(125, 146, 124, .95) 51%, rgba(199, 154, 59, .86) 58%, rgba(120, 54, 69, .88));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}

.tuner-meter span {
  position: absolute;
  inset: 5px auto 5px 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, .72);
}

.tuner-meter i {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 4px;
  height: 42px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: var(--white);
  box-shadow: 0 0 14px rgba(255, 255, 255, .5);
  transition: left .08s linear;
}

.tuner-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.tuner-footer p {
  margin: 0;
  color: #ddd1bd;
  font-size: 13px;
  font-weight: 850;
}

.tuner-footer button {
  min-width: 88px;
  min-height: 38px;
  border-radius: 8px;
  background: var(--gold);
  color: #17120c;
  font-size: 12px;
  font-weight: 950;
}

.tuner-footer button.active {
  background: #f2dce0;
  color: var(--wine);
}

.chord-sheet {
  min-height: calc(100vh - 182px);
  padding: 14px 14px 30px;
  overflow: auto;
  background: #0d0d0d;
}

.chord-sheet.light-reader {
  background: var(--paper);
  color: var(--text);
}

.loader {
  color: #bdb5aa;
  font-size: 13px;
  font-weight: 800;
}

.chord-sheet pre {
  margin: 0;
  white-space: pre-wrap;
  color: inherit;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: var(--reader-font, 15px);
  line-height: 1.72;
}

.chord-sheet.singer-mode pre {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  line-height: 1.86;
}

.chord-sheet i,
.chord-sheet .chord {
  color: var(--gold-2);
  font-style: normal;
  font-weight: 950;
}

.chord-sheet.light-reader i,
.chord-sheet.light-reader .chord {
  color: #9a6e10;
}

.chord-sheet u,
.chord-sheet .part {
  color: #9eb49c;
  text-decoration: none;
  font-weight: 950;
}

.chord-sheet.light-reader u,
.chord-sheet.light-reader .part {
  color: #557053;
}

.chord-token {
  cursor: pointer;
  text-decoration: underline dotted currentColor;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.chord-token:focus-visible {
  outline: 2px solid rgba(212, 176, 100, .7);
  outline-offset: 2px;
  border-radius: 4px;
}

.chord-guide {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.chord-guide.open {
  opacity: 1;
  pointer-events: auto;
}

.chord-guide-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .48);
}

.chord-guide-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 16px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: #12100d;
  color: var(--white);
  border-top: 1px solid #373128;
  border-radius: 8px 8px 0 0;
  transform: translateY(100%);
  transition: transform .22s ease;
  box-shadow: 0 -18px 48px rgba(0, 0, 0, .36);
  max-height: min(78vh, 620px);
  overflow: auto;
}

.chord-guide.open .chord-guide-sheet {
  transform: translateY(0);
}

.chord-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chord-guide-kicker {
  color: #c4b7a8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chord-guide-head h3 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1;
}

.chord-guide-head p:last-child {
  margin-top: 6px;
  color: #cbb9a2;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.chord-guide-close {
  flex: 0 0 auto;
}

.chord-guide-body {
  display: grid;
  gap: 16px;
}

.chord-guide-diagram {
  display: grid;
  justify-items: center;
}

.chord-diagram-card {
  width: 100%;
  max-width: 300px;
  display: grid;
  gap: 10px;
  padding: 14px 12px 12px;
  border-radius: 8px;
  border: 1px solid #3a3329;
  background: #181511;
}

.chord-diagram-top,
.chord-string-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.chord-marker,
.chord-string-labels span {
  text-align: center;
}

.chord-marker {
  min-height: 18px;
  color: #887f75;
  font-size: 13px;
  font-weight: 900;
}

.chord-marker.open {
  color: var(--gold-2);
}

.chord-marker.muted {
  color: #9b9286;
  text-transform: uppercase;
}

.chord-diagram-body {
  position: relative;
  width: min(100%, 240px);
  margin: 0 auto 0 28px;
  aspect-ratio: 6 / 6.8;
  overflow: visible;
}

.chord-string-line,
.chord-fret-line,
.chord-barre,
.chord-dot,
.chord-base-fret {
  position: absolute;
}

.chord-string-line {
  top: 0;
  bottom: 0;
  left: calc(var(--string) * 20%);
  width: 1px;
  background: rgba(245, 239, 231, .34);
  transform: translateX(-50%);
}

.chord-fret-line {
  left: 0;
  right: 0;
  top: calc(var(--fret) * 20%);
  height: 1px;
  background: rgba(245, 239, 231, .34);
  transform: translateY(-50%);
}

.chord-fret-line.nut {
  height: 4px;
  background: #f1d08b;
}

.chord-dot {
  left: calc(var(--string) * 20%);
  top: calc((var(--fret) - .5) * 20%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 2px #181511;
  transform: translate(-50%, -50%);
}

.chord-barre {
  left: calc(var(--string-start) * 20%);
  right: calc((5 - var(--string-end)) * 20%);
  top: calc((var(--fret) - .5) * 20%);
  height: 16px;
  border-radius: 999px;
  background: var(--gold-2);
  box-shadow: 0 0 0 2px #181511;
  transform: translateY(-50%);
}

.chord-base-fret {
  top: 6%;
  left: -26px;
  color: #cdb999;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.chord-string-labels span {
  color: #b7aa99;
  font-size: 11px;
  font-weight: 800;
}

.chord-guide-section {
  display: grid;
  gap: 10px;
}

.chord-guide-section strong {
  font-size: 13px;
  line-height: 1.2;
}

.chord-guide-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chord-guide-notes span {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #463e33;
  background: #1c1813;
  color: #f4ece1;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
}

.chord-guide-hint,
.chord-guide-empty {
  color: #c9b8a2;
  font-size: 13px;
  line-height: 1.45;
}

.chord-guide-empty {
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  border: 1px dashed #4c4235;
  background: #181511;
  text-align: center;
}

@media (min-width: 760px) {
  body {
    background: var(--desktop-bg);
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    border-radius: 18px;
    overflow: hidden;
  }
}

body.screen-play,
body.screen-reader,
body.screen-admin {
  background: var(--paper);
}

body.chord-guide-open {
  overflow: hidden;
}

body.screen-play .cover,
body.screen-play .quick-cards,
body.screen-reader .cover,
body.screen-reader .quick-cards,
body.screen-admin .cover,
body.screen-admin .quick-cards {
  display: none;
}

body.screen-play .main-area,
body.screen-reader .main-area,
body.screen-admin .main-area {
  min-height: 100vh;
  padding-bottom: 0;
}

.mini-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, .26);
  flex: 0 0 auto;
}

.worship-view.active {
  min-height: 100vh;
  padding: 0;
  background: var(--paper);
}

.worship-hero {
  min-height: 216px;
  padding: 48px 24px 16px;
  background: var(--coal);
  color: var(--white);
  display: grid;
  gap: 14px;
}

.worship-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worship-nav .reader-round {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
  color: var(--white);
}

.worship-brand,
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.worship-brand strong,
.admin-brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 950;
}

.worship-brand span,
.admin-brand span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .54);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 850;
}

.worship-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.worship-title h2 {
  color: var(--white);
  font-size: 25px;
  line-height: 1.02;
  font-weight: 950;
}

.worship-title p {
  color: var(--white);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 950;
  text-align: right;
}

.worship-title p span {
  color: rgba(255, 255, 255, .82);
}

.worship-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}

.worship-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width .25s ease;
}

.worship-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.worship-actions button {
  min-height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--white);
  font-size: 12px;
  font-weight: 950;
}

.worship-actions button:disabled {
  opacity: .48;
  cursor: default;
}

.worship-list {
  display: grid;
  gap: 12px;
  padding: 16px 24px 24px;
}

.worship-list .empty-state {
  background: var(--paper-2);
}

.worship-song {
  min-height: 64px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.worship-index {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eee4d3;
  color: #6b5f51;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 950;
}

.worship-song-main {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 4px;
}

.worship-song-main strong,
.worship-song-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worship-song-main strong {
  font-size: 15px;
  line-height: 1.1;
  font-weight: 950;
}

.worship-song-main span {
  color: rgba(113, 105, 94, .38);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 850;
}

.tone-pill {
  min-width: 38px;
  height: 26px;
  border-radius: 999px;
  background: #f4ead7;
  color: #ddb755;
  display: grid;
  place-items: center;
  padding: 0 9px;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
}

.offline-badge {
  height: 26px;
  border-radius: 999px;
  background: #dfe8d9;
  color: #557053;
  display: grid;
  place-items: center;
  padding: 0 9px;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
}

@media (max-width: 420px) {
  .offline-badge {
    display: none;
  }
}

.worship-remove {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f2dce0;
  color: var(--wine);
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.reader-view.active {
  min-height: 100vh;
  padding: 0;
}

.reader-top {
  min-height: 88px;
  padding: 46px 24px 10px;
}

.reader-tools {
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 6px;
  padding: 9px 24px;
}

.reader-tools button.active {
  background: var(--gold);
  color: #17120c;
}

.chord-sheet {
  min-height: calc(100vh - 182px);
  padding: 14px 24px 30px;
}

.admin-view.active {
  min-height: 100vh;
  padding: 0;
  background: var(--paper);
}

.admin-hero {
  min-height: 180px;
  padding: 48px 24px 18px;
  background: #111111;
  color: var(--white);
  display: grid;
  align-content: start;
  gap: 14px;
}

.admin-hero h2 {
  margin-top: 4px;
  color: var(--white);
  font-size: 25px;
  line-height: 1.05;
  font-weight: 950;
}

.admin-hero p {
  color: var(--white);
  max-width: 280px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
}

.admin-panel {
  padding: 16px 24px 24px;
  display: grid;
  gap: 12px;
}

.admin-refresh {
  min-height: 49px;
  border-radius: 8px;
  background: var(--gold);
  color: #18130d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 950;
}

.admin-refresh svg {
  width: 20px;
  height: 20px;
}

.admin-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-refresh.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-metrics div,
.admin-source-list article,
.admin-public {
  min-height: 68px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 11px;
}

.admin-metrics strong {
  display: block;
  color: var(--text);
  font-size: 23px;
  line-height: 1;
  font-weight: 950;
}

.admin-metrics span,
.admin-source-list span,
.admin-public span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 850;
}

.admin-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.admin-section-title button,
.admin-section-title span {
  padding: 0;
  background: transparent;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
}

.admin-source-list {
  display: grid;
  gap: 8px;
}

.admin-source-list article,
.admin-public {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.admin-source-list strong,
.admin-public strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
  font-weight: 950;
}

.admin-source-list b,
.admin-public b {
  min-width: 36px;
  height: 28px;
  border-radius: 999px;
  background: #f4ead7;
  color: #ddb755;
  display: grid;
  place-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 950;
}

:root[data-theme="dark"] .app-shell {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 26px 70px rgba(0, 0, 0, .46);
}

:root[data-theme="dark"] .cover {
  background:
    radial-gradient(circle at 50% 10%, rgba(228, 185, 95, .18), transparent 34%),
    linear-gradient(180deg, rgba(7, 10, 16, .08), rgba(2, 4, 8, .92)),
    var(--black);
}

:root[data-theme="dark"] .brand-logo,
:root[data-theme="dark"] .mini-logo,
:root[data-theme="dark"] .install-prompt-logo {
  background: #0f1624;
  border-color: rgba(244, 217, 144, .24);
}

:root[data-theme="dark"] .search-box {
  background: rgba(18, 27, 43, .96);
  border: 1px solid rgba(244, 217, 144, .18);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .38);
}

:root[data-theme="dark"] .search-box svg {
  color: var(--gold-2);
}

:root[data-theme="dark"] .search-box input::placeholder {
  color: #b4bdcc;
}

:root[data-theme="dark"] .quick-card.active,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .text-button,
:root[data-theme="dark"] .song-card,
:root[data-theme="dark"] .artist-card,
:root[data-theme="dark"] .worship-song,
:root[data-theme="dark"] .admin-metrics div,
:root[data-theme="dark"] .admin-source-list article,
:root[data-theme="dark"] .admin-public {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

:root[data-theme="dark"] .quick-card.active {
  background: var(--paper-2);
  color: var(--text);
}

:root[data-theme="dark"] .mini-action {
  border-color: rgba(255, 255, 255, .08);
}

:root[data-theme="dark"] .install-prompt {
  background: rgba(18, 27, 43, .98);
  border-color: rgba(244, 217, 144, .18);
}

:root[data-theme="dark"] .mini-action.active {
  background: rgba(228, 185, 95, .16);
  color: var(--gold-2);
  border-color: rgba(244, 217, 144, .28);
}

:root[data-theme="dark"] .artist-download.active {
  background: rgba(143, 176, 143, .16);
  color: #b8d2b7;
  border-color: rgba(143, 176, 143, .28);
}

:root[data-theme="dark"] .play-index,
:root[data-theme="dark"] .worship-index {
  background: #1a2638;
  color: #d7e0ee;
}

:root[data-theme="dark"] .tone-pill,
:root[data-theme="dark"] .admin-source-list b,
:root[data-theme="dark"] .admin-public b {
  background: rgba(228, 185, 95, .14);
  color: var(--gold-2);
}

:root[data-theme="dark"] .offline-badge {
  background: rgba(143, 176, 143, .16);
  color: #b8d2b7;
}

:root[data-theme="dark"] .worship-song-main span {
  color: var(--muted);
}

:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .worship-list .empty-state {
  background: rgba(18, 27, 43, .62);
}

:root[data-theme="dark"] .chord-sheet.light-reader {
  background: var(--paper);
  color: var(--text);
}

:root[data-theme="dark"] .chord-sheet.light-reader i,
:root[data-theme="dark"] .chord-sheet.light-reader .chord {
  color: var(--gold-2);
}

@media (max-width: 420px) {
  .install-prompt {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .install-prompt-logo {
    width: 38px;
    height: 38px;
  }

  .install-prompt-close {
    display: none;
  }

  .worship-hero,
  .worship-list,
  .reader-top,
  .reader-tools,
  .tuner-panel,
  .chord-sheet,
  .admin-hero,
  .admin-panel {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Neon dashboard refresh */
:root {
  --neon-bg: #070711;
  --neon-panel: rgba(20, 18, 38, .82);
  --neon-panel-2: rgba(32, 28, 58, .78);
  --neon-line: rgba(255, 255, 255, .13);
  --neon-text: #f7f5ff;
  --neon-muted: #a7a2bc;
  --neon-cyan: #4de6ff;
  --neon-purple: #a855f7;
  --neon-amber: #ffad1f;
}

body {
  background:
    linear-gradient(135deg, #070711 0%, #111024 48%, #070711 100%);
}

.app-shell {
  background: var(--neon-bg);
  color: var(--neon-text);
}

.cover {
  min-height: 218px;
  background:
    linear-gradient(135deg, rgba(125, 54, 255, .35), rgba(20, 228, 255, .16) 52%, rgba(0, 0, 0, .92)),
    #070711;
  border-bottom: 1px solid var(--neon-line);
}

.brand-logo {
  box-shadow: 0 0 26px rgba(168, 85, 247, .46);
}

.search-box,
.install-prompt,
.account-card,
.song-card,
.artist-card,
.empty-state {
  background: rgba(255, 255, 255, .06);
  border-color: var(--neon-line);
  color: var(--neon-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 46px rgba(0, 0, 0, .24);
  backdrop-filter: blur(18px);
}

.search-box input,
.search-box input::placeholder {
  color: var(--neon-text);
}

.main-area,
.view,
.admin-view.active,
.worship-view.active {
  background: transparent;
}

.section-head h2,
.song-title,
.artist-title {
  color: var(--neon-text);
}

.section-head p,
.song-meta,
.artist-meta {
  color: var(--neon-muted);
}

.dashboard-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.today-card,
.top-artists-card,
.dashboard-shortcuts button {
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035)),
    rgba(18, 16, 36, .86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 46px rgba(0, 0, 0, .28);
  backdrop-filter: blur(20px);
}

.today-card {
  min-height: 210px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .38), rgba(77, 230, 255, .18) 46%, rgba(10, 9, 22, .92)),
    #111024;
}

.dashboard-kicker {
  display: block;
  color: #dcd6ff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.today-card h2 {
  margin-top: 12px;
  color: var(--neon-text);
  font-size: 34px;
  line-height: 1;
}

.today-card p {
  margin-top: 8px;
  color: #c9c4da;
  font-size: 14px;
  font-weight: 800;
}

.today-card strong {
  display: block;
  margin-top: 16px;
  color: var(--neon-amber);
  font-size: 38px;
  line-height: 1;
  font-weight: 950;
}

.dashboard-play {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd05a, #ff9515);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 42px rgba(255, 173, 31, .42);
}

.dashboard-play svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
  stroke: none;
  transform: translateX(3px);
}

.top-artists-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.top-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-card-head h3 {
  margin: 0;
  color: var(--neon-text);
  font-size: 20px;
}

.top-card-head span {
  color: var(--neon-amber);
  font-weight: 950;
}

.top-artist-stack {
  display: flex;
  align-items: center;
  min-height: 56px;
}

.top-artist-avatar {
  position: relative;
  width: 58px;
  height: 58px;
  margin-right: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .72);
  background: linear-gradient(135deg, rgba(168, 85, 247, .82), rgba(77, 230, 255, .58));
  color: #fff;
  display: grid;
  place-items: center;
  overflow: visible;
  font-size: 15px;
  font-weight: 950;
}

.top-artist-avatar img,
.artist-thumb img,
.song-cover img,
.reader-cover img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.top-artist-avatar b {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  background: var(--neon-amber);
  color: #140f06;
  display: grid;
  place-items: center;
  padding: 0 5px;
  font-size: 10px;
}

.top-artist-empty {
  color: var(--neon-muted);
  font-weight: 900;
}

.top-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.top-stats span {
  color: var(--neon-muted);
  font-size: 12px;
  font-weight: 850;
}

.top-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--neon-text);
  font-size: 24px;
}

.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-shortcuts button {
  min-height: 84px;
  padding: 14px;
  color: var(--neon-text);
  text-align: left;
  display: grid;
  align-content: space-between;
}

.dashboard-shortcut-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.dashboard-shortcut-icon svg {
  width: 18px;
  height: 18px;
}

.dashboard-shortcut-icon.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.dashboard-shortcut-icon.blue { background: linear-gradient(135deg, #4f7cff, #3158d8); }
.dashboard-shortcut-icon.green { background: linear-gradient(135deg, #22c55e, #15803d); }
.dashboard-shortcut-icon.orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
.dashboard-shortcut-icon.pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.dashboard-shortcut-icon.cyan { background: linear-gradient(135deg, #06b6d4, #0e7490); }

.dashboard-shortcuts span {
  color: var(--neon-muted);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-shortcuts strong {
  color: var(--neon-text);
  font-size: 24px;
}

.song-card {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 84px;
  overflow: hidden;
}

.song-cover,
.artist-thumb,
.reader-cover {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .86), rgba(77, 230, 255, .56)),
    #17142a;
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 950;
}

.song-cover {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, .16);
}

.artist-card {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

.artist-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
}

.song-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-action {
  background: rgba(255, 255, 255, .08);
  color: var(--neon-text);
  border-color: rgba(255, 255, 255, .11);
}

.mini-action.primary,
.reader-tools button.active {
  background: linear-gradient(135deg, #ffd05a, #ff9515);
  color: #140f06;
}

.mini-action.audio-ready {
  background: rgba(77, 230, 255, .18);
  color: #c8f8ff;
}

.reader-media {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 24px;
  background: #070711;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.reader-media[hidden] {
  display: none;
}

.reader-cover {
  width: 52px;
  height: 52px;
}

.reader-media-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.reader-media-copy strong,
.reader-media-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-media-copy strong {
  color: var(--neon-text);
  font-size: 14px;
}

.reader-media-copy span {
  color: var(--neon-muted);
  font-size: 12px;
  font-weight: 800;
}

.reader-media button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .1);
  color: var(--neon-text);
  font-size: 12px;
  font-weight: 950;
}

.reader-media audio {
  grid-column: 1 / -1;
  width: 100%;
}

.reader-media audio[hidden] {
  display: none;
}

@media (min-width: 760px) {
  .dashboard-hero {
    grid-template-columns: minmax(0, 2fr) minmax(250px, .78fr);
  }

  .dashboard-shortcuts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  body {
    padding: 24px;
  }

  .app-shell {
    width: min(100%, 1180px);
    max-width: 1180px;
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "cover cover"
      "nav main"
      "footer footer";
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
  }

  .cover {
    grid-area: cover;
    min-height: 104px;
    padding: 18px 28px;
    display: grid;
    grid-template-columns: minmax(240px, auto) minmax(280px, 1fr) auto;
    align-items: center;
    align-content: center;
    gap: 18px;
  }

  .brand {
    grid-template-columns: 54px auto;
    justify-items: start;
    text-align: left;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  h1 {
    font-size: 22px;
  }

  .cover-actions {
    justify-content: flex-end;
  }

  .developer-signature {
    display: none;
  }

  .quick-cards {
    grid-area: nav;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 16px;
    padding: 28px 14px;
    background: rgba(8, 8, 20, .92);
    border-right: 1px solid rgba(255, 255, 255, .09);
  }

  .quick-card {
    min-height: 58px;
    border-radius: 8px;
  }

  .quick-card span,
  .play-card b {
    display: none;
  }

  .main-area {
    grid-area: main;
    min-height: 0;
    overflow: auto;
  }

  .view {
    padding: 28px;
  }

  .song-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .song-card {
    min-height: 132px;
    grid-template-columns: 1fr auto;
    align-content: end;
    position: relative;
    padding: 14px;
  }

  .song-cover {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 8px;
    opacity: .52;
  }

  .song-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 7, 17, .08), rgba(7, 7, 17, .84));
  }

  .song-cover span,
  .song-cover img {
    filter: blur(1px);
    transform: scale(1.04);
  }

  .song-main,
  .song-actions {
    position: relative;
    z-index: 1;
  }

  .screen-footer {
    grid-area: footer;
  }
}

/* Neon reader refresh */
body.screen-reader {
  background:
    linear-gradient(135deg, #070711 0%, #111024 48%, #070711 100%);
}

body.screen-reader .app-shell {
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .2), rgba(77, 230, 255, .08) 44%, rgba(7, 7, 17, .98)),
    var(--neon-bg);
}

body.screen-reader .main-area {
  background: transparent;
}

#view-reader.view.active {
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .16), rgba(77, 230, 255, .07) 42%, rgba(7, 7, 17, .94)),
    var(--neon-bg);
}

#view-reader .reader-top {
  min-height: 112px;
  padding: 28px 18px 14px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .34), rgba(77, 230, 255, .14) 52%, rgba(7, 7, 17, .92)),
    #111024;
  border-bottom: 1px solid var(--neon-line);
  color: var(--neon-text);
}

#view-reader .reader-title {
  min-width: 0;
}

#view-reader .reader-title h2 {
  color: var(--neon-text);
  font-size: 22px;
  line-height: 1.08;
}

#view-reader .reader-title p {
  margin-top: 4px;
  color: var(--neon-muted);
}

#view-reader .reader-round,
#view-reader .reader-action {
  background: rgba(255, 255, 255, .1);
  color: var(--neon-text);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

#view-reader .reader-action.active,
#view-reader .reader-round:active,
#view-reader .reader-action:active {
  background: linear-gradient(135deg, #ffd05a, #ff9515);
  color: #140f06;
}

#view-reader .reader-media {
  margin: 12px 14px 0;
  padding: 12px;
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035)),
    rgba(18, 16, 36, .86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 34px rgba(0, 0, 0, .24);
  backdrop-filter: blur(18px);
}

#view-reader .reader-media button {
  background: rgba(77, 230, 255, .14);
  color: #d6fbff;
  border: 1px solid rgba(77, 230, 255, .22);
}

#view-reader .reader-tools {
  margin: 12px 14px 0;
  padding: 10px;
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background: rgba(8, 8, 20, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px);
}


#view-reader .reader-tools .instrument-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  min-width: 118px;
}

#view-reader .reader-tools .instrument-toggle span {
  color: rgba(214, 251, 255, .72);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
}

#view-reader .reader-tools .instrument-toggle strong {
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
}

#view-reader .reader-tools .instrument-toggle.active span {
  color: rgba(20, 15, 6, .62);
}

#view-reader .reader-tools button {
  background: rgba(255, 255, 255, .08);
  color: var(--neon-text);
  border-color: rgba(255, 255, 255, .12);
}

#view-reader .reader-tools button.active {
  background: linear-gradient(135deg, #ffd05a, #ff9515);
  color: #140f06;
}

#view-reader .chord-sheet {
  min-height: calc(100vh - 246px);
  margin: 12px 14px 18px;
  padding: 18px;
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)),
    rgba(9, 10, 22, .88);
  color: #f2efff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 46px rgba(0, 0, 0, .24);
  backdrop-filter: blur(16px);
}

#view-reader .chord-sheet.light-reader {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(239, 244, 255, .9)),
    #f8f6ff;
  color: #181625;
}

#view-reader .chord-sheet i,
#view-reader .chord-sheet .chord {
  color: #ffd05a;
  text-shadow: 0 0 18px rgba(255, 173, 31, .24);
}

#view-reader .chord-sheet.light-reader i,
#view-reader .chord-sheet.light-reader .chord {
  color: #9a6e10;
  text-shadow: none;
}

#view-reader .chord-sheet u,
#view-reader .chord-sheet .part {
  color: #7feaff;
}

#view-reader .chord-sheet.light-reader u,
#view-reader .chord-sheet.light-reader .part {
  color: #386e78;
}

body.screen-reader .screen-footer {
  background: #070711;
  color: rgba(247, 245, 255, .42);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

@media (min-width: 760px) {
  #view-reader.view.active {
    padding: 22px;
  }

  #view-reader .reader-top,
  #view-reader .reader-media,
  #view-reader .reader-tools,
  #view-reader .chord-sheet {
    width: min(100%, 940px);
    margin-left: auto;
    margin-right: auto;
  }

  #view-reader .reader-top {
    border: 1px solid var(--neon-line);
    border-radius: 8px;
    padding: 22px;
    min-height: 96px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 46px rgba(0, 0, 0, .28);
  }

  #view-reader .chord-sheet {
    padding: 24px;
  }
}

@media (min-width: 960px) {
  body.screen-reader {
    padding: 24px;
  }

  body.screen-reader .app-shell {
    width: min(100%, 1180px);
    max-width: 1180px;
    min-height: calc(100vh - 48px);
    display: block;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    overflow: hidden;
  }

  body.screen-reader .main-area {
    min-height: calc(100vh - 48px);
  }

  #view-reader.view.active {
    min-height: calc(100vh - 48px);
  }
}

/* Neon worship play refresh */
body.screen-play {
  background:
    linear-gradient(135deg, #070711 0%, #111024 48%, #070711 100%);
}

body.screen-play .app-shell {
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .2), rgba(77, 230, 255, .08) 44%, rgba(7, 7, 17, .98)),
    var(--neon-bg);
}

body.screen-play .main-area {
  background: transparent;
}

#view-play.worship-view.active {
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .16), rgba(77, 230, 255, .07) 42%, rgba(7, 7, 17, .94)),
    var(--neon-bg);
}

#view-play .worship-hero {
  min-height: 280px;
  padding: 28px 18px 18px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .36), rgba(77, 230, 255, .16) 52%, rgba(7, 7, 17, .92)),
    #111024;
  border-bottom: 1px solid var(--neon-line);
  color: var(--neon-text);
  gap: 18px;
}

#view-play .worship-nav .reader-round {
  background: rgba(255, 255, 255, .1);
  color: var(--neon-text);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

#view-play .worship-brand {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 8px;
  background: rgba(8, 8, 20, .44);
}

#view-play .mini-logo {
  box-shadow: 0 0 24px rgba(168, 85, 247, .36);
}

#view-play .worship-brand strong,
#view-play .worship-title h2 {
  color: var(--neon-text);
}

#view-play .worship-brand span,
#view-play .worship-title p span {
  color: var(--neon-muted);
}

#view-play .worship-title {
  align-items: center;
}

#view-play .worship-title h2 {
  font-size: 34px;
  line-height: 1;
}

#view-play .worship-title p {
  min-width: 92px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: var(--neon-text);
  text-align: center;
}

#view-play .worship-title p strong {
  display: block;
  color: var(--neon-amber);
  font-size: 28px;
  line-height: 1;
}

#view-play .worship-progress {
  height: 9px;
  background: rgba(255, 255, 255, .12);
}

#view-play .worship-progress span {
  background: linear-gradient(90deg, #ffd05a, #ff9515);
  box-shadow: 0 0 24px rgba(255, 173, 31, .44);
}

#view-play .worship-actions {
  gap: 10px;
}

#view-play .worship-actions button {
  background: rgba(255, 255, 255, .1);
  color: var(--neon-text);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

#view-play .worship-actions button:first-child {
  background: linear-gradient(135deg, #ffd05a, #ff9515);
  color: #140f06;
}

#view-play .worship-list {
  padding: 16px 14px 24px;
  gap: 12px;
}

#view-play .worship-list .empty-state {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)),
    rgba(18, 16, 36, .82);
  border-color: var(--neon-line);
  color: var(--neon-muted);
}

#view-play .worship-song {
  min-height: 74px;
  grid-template-columns: 50px 32px minmax(0, 1fr) auto auto auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--neon-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .032)),
    rgba(18, 16, 36, .86);
  color: var(--neon-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 14px 34px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
}

#view-play .worship-cover {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .86), rgba(77, 230, 255, .56)),
    #17142a;
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 13px;
  font-weight: 950;
}

#view-play .worship-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#view-play .worship-index {
  background: rgba(255, 255, 255, .08);
  color: var(--neon-muted);
}

#view-play .worship-song-main {
  color: var(--neon-text);
}

#view-play .worship-song-main strong {
  color: var(--neon-text);
}

#view-play .worship-song-main span {
  color: var(--neon-muted);
}

#view-play .tone-pill,
#view-play .offline-badge,
#view-play .local-audio-badge {
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 950;
}

#view-play .tone-pill {
  background: rgba(255, 173, 31, .15);
  color: #ffd05a;
  border: 1px solid rgba(255, 173, 31, .22);
}

#view-play .offline-badge {
  background: rgba(111, 235, 168, .13);
  color: #b8ffd7;
  border: 1px solid rgba(111, 235, 168, .2);
}

#view-play .local-audio-badge {
  background: rgba(77, 230, 255, .14);
  color: #d6fbff;
  border: 1px solid rgba(77, 230, 255, .22);
}

#view-play .worship-remove {
  background: rgba(239, 141, 162, .14);
  color: #ffd0da;
  border: 1px solid rgba(239, 141, 162, .22);
}

body.screen-play .screen-footer {
  background: #070711;
  color: rgba(247, 245, 255, .42);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

@media (max-width: 520px) {
  #view-play .worship-song {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  #view-play .worship-index {
    display: none;
  }

  #view-play .offline-badge,
  #view-play .local-audio-badge {
    display: none;
  }
}

/* Tela cheia de teleprompter: somente a cifra e o botão de retorno. */
body.fullscreen-active #view-reader {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  padding: 0 !important;
  background: var(--paper, #090f1a) !important;
}

body.fullscreen-active #view-reader .reader-top,
body.fullscreen-active #view-reader .reader-media,
body.fullscreen-active #view-reader .reader-tools,
body.fullscreen-active #view-reader .tuner-panel,
body.fullscreen-active #view-reader .chord-guide {
  display: none !important;
}

body.fullscreen-active #view-reader .fullscreen-exit-btn {
  display: inline-flex !important;
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  z-index: 100001;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
}

body.fullscreen-active #view-reader .chord-sheet {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: max(62px, calc(env(safe-area-inset-top) + 54px)) max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.fullscreen-exit-btn { display: none; }

.fullscreen-scroll-controls { display: none; }

body.fullscreen-active #view-reader .fullscreen-scroll-controls {
  display: inline-flex;
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 100001;
  gap: 6px;
}

body.fullscreen-active #view-reader .fullscreen-scroll-controls button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(18, 27, 43, .92);
  color: var(--gold-2);
  font-size: 20px;
  font-weight: 950;
}

body.fullscreen-active #view-reader .fullscreen-scroll-controls #fullscreenAutoButton {
  width: auto;
  padding: 0 12px;
  font-size: 12px;
}

body.fullscreen-active #view-reader .fullscreen-scroll-controls #fullscreenAutoButton.active {
  background: var(--gold);
  color: #17120c;
}

body.fullscreen-active #view-reader .fullscreen-scroll-controls button:active {
  transform: scale(.94);
}

@media (min-width: 760px) {
  #view-play.worship-view.active {
    padding: 22px;
  }

  #view-play .worship-hero,
  #view-play .worship-list {
    width: min(100%, 940px);
    margin-left: auto;
    margin-right: auto;
  }

  #view-play .worship-hero {
    min-height: 248px;
    border: 1px solid var(--neon-line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 46px rgba(0, 0, 0, .28);
  }

  #view-play .worship-list {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 960px) {
  body.screen-play {
    padding: 24px;
  }

  body.screen-play .app-shell {
    width: min(100%, 1180px);
    max-width: 1180px;
    min-height: calc(100vh - 48px);
    display: block;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    overflow: hidden;
  }

  body.screen-play .main-area {
    min-height: calc(100vh - 48px);
  }

  #view-play.worship-view.active {
    min-height: calc(100vh - 48px);
  }
}

/* Neon tuner card refresh */
#view-reader .tuner-panel {
  width: auto;
  margin: 12px 14px 0;
  padding: 0;
  display: grid;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--neon-text);
}

#view-reader .tuner-panel[hidden] {
  display: none;
}

#view-reader .tuner-hero {
  min-height: 168px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .46), rgba(77, 230, 255, .18) 48%, rgba(10, 9, 22, .92)),
    #111024;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 46px rgba(0, 0, 0, .28);
  overflow: hidden;
}

#view-reader .tuner-readout {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
}

#view-reader .tuner-readout span {
  color: #dcd6ff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

#view-reader .tuner-readout strong {
  min-width: 0;
  color: var(--neon-text);
  font-size: 72px;
  line-height: .88;
  text-align: left;
  font-weight: 950;
}

#view-reader .tuner-readout em {
  color: var(--neon-amber);
  font-size: 34px;
  line-height: 1;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

#view-reader .tuner-readout p {
  margin: 4px 0 0;
  color: #d9d5ea;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
}

#view-reader .tuner-orb {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffd05a, #ff9515);
  color: #140f06;
  box-shadow: 0 0 42px rgba(255, 173, 31, .42);
  font-size: 13px;
  font-weight: 950;
}

#view-reader .tuner-orb.active {
  background: rgba(77, 230, 255, .16);
  color: #d6fbff;
  border: 1px solid rgba(77, 230, 255, .32);
  box-shadow: 0 0 34px rgba(77, 230, 255, .22);
}

#view-reader .tuner-meter {
  height: 42px;
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(239, 141, 162, .42), rgba(255, 173, 31, .48) 42%, rgba(111, 235, 168, .66) 49%, rgba(111, 235, 168, .66) 51%, rgba(255, 173, 31, .48) 58%, rgba(239, 141, 162, .42)),
    rgba(8, 8, 20, .74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

#view-reader .tuner-meter span {
  inset: 7px auto 7px 50%;
  width: 2px;
  background: rgba(255, 255, 255, .86);
}

#view-reader .tuner-meter i {
  top: 5px;
  width: 18px;
  height: 30px;
  margin-left: -9px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 24px rgba(255, 255, 255, .42);
}

@media (max-width: 460px) {
  #view-reader .tuner-hero {
    grid-template-columns: minmax(0, 1fr) 84px;
    min-height: 148px;
    padding: 18px;
  }

  #view-reader .tuner-readout strong {
    font-size: 58px;
  }

  #view-reader .tuner-readout em {
    font-size: 27px;
  }

  #view-reader .tuner-orb {
    width: 78px;
    height: 78px;
    font-size: 12px;
  }
}

@media (min-width: 760px) {
  #view-reader .tuner-panel {
    width: min(100%, 940px);
    margin-left: auto;
    margin-right: auto;
  }
}

/* Global tuner modal */
.tuner-panel[hidden] {
  display: none;
}

.tuner-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 0;
  background: rgba(7, 7, 17, .78);
  color: var(--neon-text);
  backdrop-filter: blur(14px);
}

.tuner-shell {
  width: min(100%, 520px);
  display: grid;
  gap: 10px;
}

.tuner-panel .tuner-hero {
  position: relative;
  min-height: 178px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 16px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .46), rgba(77, 230, 255, .18) 48%, rgba(10, 9, 22, .92)),
    #111024;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 54px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.tuner-panel .tuner-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--neon-text);
  border: 1px solid rgba(255, 255, 255, .15);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.tuner-panel .tuner-readout {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
}

.tuner-panel .tuner-readout span {
  color: #dcd6ff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.tuner-panel .tuner-readout strong {
  min-width: 0;
  color: var(--neon-text);
  font-size: 78px;
  line-height: .88;
  text-align: left;
  font-weight: 950;
}

.tuner-panel .tuner-readout em {
  color: var(--neon-amber);
  font-size: 36px;
  line-height: 1;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.tuner-panel .tuner-readout p {
  margin: 4px 0 0;
  color: #d9d5ea;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
}

.tuner-panel .tuner-orb {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffd05a, #ff9515);
  color: #140f06;
  box-shadow: 0 0 42px rgba(255, 173, 31, .42);
  font-size: 13px;
  font-weight: 950;
}

.tuner-panel .tuner-orb.active {
  background: rgba(77, 230, 255, .16);
  color: #d6fbff;
  border: 1px solid rgba(77, 230, 255, .32);
  box-shadow: 0 0 34px rgba(77, 230, 255, .22);
}

.tuner-panel .tuner-meter {
  height: 42px;
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(239, 141, 162, .42), rgba(255, 173, 31, .48) 42%, rgba(111, 235, 168, .66) 49%, rgba(111, 235, 168, .66) 51%, rgba(255, 173, 31, .48) 58%, rgba(239, 141, 162, .42)),
    rgba(8, 8, 20, .74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 36px rgba(0, 0, 0, .2);
}

.tuner-panel .tuner-meter span {
  inset: 7px auto 7px 50%;
  width: 2px;
  background: rgba(255, 255, 255, .86);
}

.tuner-panel .tuner-meter i {
  top: 5px;
  width: 18px;
  height: 30px;
  margin-left: -9px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 24px rgba(255, 255, 255, .42);
}

@media (max-width: 460px) {
  .tuner-panel .tuner-hero {
    grid-template-columns: minmax(0, 1fr) 84px;
    min-height: 152px;
    padding: 20px;
  }

  .tuner-panel .tuner-readout strong {
    font-size: 60px;
  }

  .tuner-panel .tuner-readout em {
    font-size: 28px;
  }

  .tuner-panel .tuner-orb {
    width: 78px;
    height: 78px;
    font-size: 12px;
  }
}


/* Dev mode hidden workspace */
body.screen-dev { background: linear-gradient(135deg, #070711 0%, #111024 48%, #070711 100%); }
body.screen-dev .cover, body.screen-dev .quick-cards { display: grid; }
body.screen-dev .main-area { min-height: 0; padding-bottom: 18px; }
.dev-view.active { min-height: 100vh; padding: 0; background: radial-gradient(circle at top left, rgba(168, 85, 247, .22), transparent 34%), linear-gradient(135deg, rgba(77, 230, 255, .08), rgba(7, 7, 17, .96)), var(--neon-bg); color: var(--neon-text); }
.dev-hero { min-height: 190px; padding: 48px 24px 18px; display: grid; align-content: start; gap: 14px; color: var(--white); background: linear-gradient(135deg, rgba(168, 85, 247, .34), rgba(77, 230, 255, .14) 52%, rgba(7, 7, 17, .92)), #111024; border-bottom: 1px solid var(--neon-line); }
.dev-hero h2 { margin: 4px 0 0; font-size: 28px; line-height: 1; font-weight: 950; }
.dev-hero p { max-width: 720px; color: var(--neon-muted); font-size: 13px; line-height: 1.45; font-weight: 850; }
.dev-panel { padding: 16px 24px 24px; display: grid; gap: 14px; }
.dev-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dev-card, .dev-actions-row button, .dev-preview-tools button, .dev-song-list button, .dev-chord-list button, .dev-chord-string-modes button { border: 1px solid var(--neon-line); border-radius: 8px; background: rgba(255, 255, 255, .07); color: var(--neon-text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.dev-card { min-height: 82px; padding: 14px; display: grid; align-content: space-between; text-align: left; }
.dev-card span, .dev-field span, .dev-preview-head span { color: var(--neon-muted); font-size: 11px; line-height: 1.1; font-weight: 950; text-transform: uppercase; }
.dev-card strong, .dev-preview-head strong { color: var(--neon-text); font-size: 18px; line-height: 1.1; font-weight: 950; }
.dev-card.active, .dev-actions-row button.primary { background: linear-gradient(135deg, #ffd05a, #ff9515); color: #140f06; }
.dev-card.active span, .dev-card.active strong, .dev-actions-row button.primary { color: #140f06; }
.dev-tab { display: none; } .dev-tab.active { display: block; }
.dev-editor-layout, .dev-chord-layout { display: grid; gap: 12px; }
.dev-song-browser, .dev-chord-browser, .dev-editor-card, .dev-preview-card { border: 1px solid var(--neon-line); border-radius: 8px; background: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035)), rgba(18, 16, 36, .86); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 46px rgba(0, 0, 0, .22); backdrop-filter: blur(18px); padding: 12px; min-width: 0; }
.dev-field { display: grid; gap: 7px; color: var(--neon-muted); }
.dev-field input, .dev-field textarea { width: 100%; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; outline: 0; background: rgba(0, 0, 0, .22); color: var(--neon-text); padding: 11px 12px; font: inherit; font-weight: 850; }
.dev-field textarea { min-height: 360px; resize: vertical; font-family: "Cascadia Mono", Consolas, monospace; line-height: 1.55; font-size: 13px; }
.dev-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .dev-field-editor { margin-top: 10px; }
.dev-song-list, .dev-chord-list { max-height: 520px; overflow: auto; display: grid; gap: 8px; margin-top: 10px; }
.dev-song-list button, .dev-chord-list button { min-height: 58px; padding: 10px; text-align: left; display: grid; gap: 4px; }
.dev-song-list button.active, .dev-chord-list button.active { border-color: rgba(255, 208, 90, .74); background: rgba(255, 173, 31, .16); }
.dev-song-list strong, .dev-chord-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dev-song-list span, .dev-chord-list span, .dev-status, .dev-empty { color: var(--neon-muted); font-size: 12px; font-weight: 800; }
.dev-search-hint { margin: 8px 0 0; color: var(--neon-muted); font-size: 12px; line-height: 1.35; font-weight: 800; }
.dev-song-search-results {
  max-height: 240px;
  margin-top: 8px;
  margin-bottom: 12px;
}
.dev-actions-row, .dev-preview-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dev-actions-row button, .dev-preview-tools button { min-height: 38px; padding: 0 12px; font-size: 12px; font-weight: 950; }
.dev-preview-head { margin-bottom: 10px; }
.dev-chord-preview { margin-top: 10px; min-height: 440px; overflow: auto; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .22); padding: 14px; color: #f2efff; }
.dev-chord-preview pre { margin: 0; white-space: pre-wrap; font-family: "Cascadia Mono", Consolas, monospace; line-height: 1.65; }
.dev-chord-preview i, .dev-chord-preview .chord { color: #ffd05a; font-style: normal; font-weight: 950; }
.dev-chord-editor-grid { position: relative; width: min(100%, 310px); aspect-ratio: 6 / 5.9; margin: 18px auto 10px; }
.dev-chord-grid-lines, .dev-string-line, .dev-fret-line, .dev-fret-dot { position: absolute; } .dev-chord-grid-lines { inset: 0; }
.dev-string-line { top: 0; bottom: 0; left: calc(var(--string) * 20%); width: 1px; background: rgba(245, 239, 231, .34); transform: translateX(-50%); }
.dev-fret-line { left: 0; right: 0; top: calc(var(--fret) * 20%); height: 1px; background: rgba(245, 239, 231, .34); transform: translateY(-50%); }
.dev-fret-dot { left: calc(var(--string) * 20%); top: calc((var(--fret) - .5) * 20%); width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); transform: translate(-50%, -50%); }
.dev-fret-dot.active { background: #ffd05a; box-shadow: 0 0 0 3px rgba(255, 173, 31, .18), 0 0 22px rgba(255, 173, 31, .35); }
.dev-chord-string-modes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.dev-chord-string-modes button { min-height: 36px; font-size: 11px; font-weight: 950; }
.dev-chord-string-modes button.open { background: rgba(143, 176, 143, .16); color: #b8d2b7; }
.dev-chord-string-modes button.muted { background: rgba(239, 141, 162, .13); color: #ffc5d0; }
.dev-chord-preview-diagram .chord-diagram-card { margin: 0 auto; }
.chord-dev-edit { margin-left: 8px; min-height: 30px; border-radius: 999px; padding: 0 10px; background: linear-gradient(135deg, #ffd05a, #ff9515); color: #140f06; font-size: 11px; font-weight: 950; }
@media (min-width: 960px) { body.screen-dev { padding: 24px; } body.screen-dev .app-shell { width: min(100%, 1180px); max-width: 1180px; min-height: calc(100vh - 48px); display: block; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; overflow: hidden; } .dev-editor-layout { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); } .dev-chord-layout { grid-template-columns: 240px minmax(0, 1fr) 320px; } }
@media (max-width: 760px) { .dev-grid-2, .dev-cards, .dev-chord-string-modes { grid-template-columns: 1fr; } }

/* Dev fixes: sair/conferir, preview scroll and clickable chord editing */
.dev-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.dev-hero-actions button { min-height: 40px; border-radius: 8px; padding: 0 14px; border: 1px solid var(--neon-line); background: rgba(255,255,255,.08); color: var(--neon-text); font-size: 12px; font-weight: 950; }
.dev-hero-actions button.danger { background: rgba(239, 141, 162, .14); color: #ffc5d0; border-color: rgba(239, 141, 162, .26); }
.dev-chord-preview { max-height: min(58vh, 620px); overflow: auto; scrollbar-width: thin; }
.dev-chord-preview .chord-token, .dev-chord-preview [data-chord] { cursor: pointer; }
.dev-chord-preview .chord-token:hover, .dev-chord-preview [data-chord]:hover { filter: brightness(1.25); text-decoration: underline; }
body:not(.role-dev) .dev-only, body:not(.role-dev) .dev-only-card { display: none !important; }
@media (min-width: 960px) { .dev-preview-card { max-height: calc(100vh - 260px); overflow: hidden; } .dev-chord-preview { height: calc(100vh - 430px); min-height: 360px; } }


/* Dev exact layout refinement: dashboard stays visible; editors attach below it */
body.screen-dev #view-acervo .section-head,
body.screen-dev #view-acervo #songList {
  display: none !important;
}
body.screen-dev #view-acervo {
  padding-bottom: 0;
}
body.screen-dev .dev-view.active {
  display: block;
  min-height: auto;
  padding: 0 28px 28px;
  background: transparent;
  color: var(--neon-text);
}
.dev-inline-shell {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1fr);
  gap: 14px;
  margin: 0 0 14px;
}
.dev-access-card,
.dev-tools-card {
  border: 1px solid var(--neon-line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.035)), rgba(18,16,36,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 46px rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
  padding: 18px;
}
.dev-access-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
}
.dev-access-card strong,
.dev-tools-card h3 {
  color: var(--neon-text);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 950;
  margin: 0;
}
.dev-access-card span,
.dev-tools-card button span {
  display: block;
  margin-top: 4px;
  color: var(--neon-muted);
  font-size: 12px;
  font-weight: 800;
}
.dev-access-card b {
  border-radius: 999px;
  background: rgba(34, 197, 94, .16);
  color: #a8ffbe;
  border: 1px solid rgba(34,197,94,.24);
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 950;
}
.dev-access-card button,
.dev-tools-card button {
  grid-column: 1 / -1;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(168,85,247,.32);
  background: linear-gradient(135deg, rgba(124,58,237,.78), rgba(88,28,135,.72));
  color: var(--neon-text);
  font-size: 12px;
  font-weight: 950;
}
.dev-access-card button.secondary {
  background: rgba(255,255,255,.08);
  border-color: var(--neon-line);
}
.dev-tools-card {
  display: grid;
  gap: 10px;
}
.dev-tools-card button {
  text-align: left;
  padding: 12px 14px;
  background: rgba(255,255,255,.06);
  border-color: var(--neon-line);
}
.dev-tools-card button strong {
  color: var(--neon-amber);
  display: block;
  font-size: 14px;
}
.dev-panel {
  padding: 0;
}
.dev-tab.active {
  display: block;
}
.dev-editor-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
}
.dev-chord-layout {
  grid-template-columns: 240px minmax(0, 1fr) 320px;
}
.dev-song-browser {
  display: none !important;
}
.dev-song-browser, .dev-chord-browser, .dev-editor-card, .dev-preview-card {
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.035)), rgba(18,16,36,.86);
}
.dev-chord-preview {
  height: clamp(360px, 42vh, 560px);
  max-height: clamp(360px, 42vh, 560px);
  overflow: auto !important;
}
.dev-chord-preview .chord-token,
.dev-chord-preview [data-chord] {
  cursor: pointer;
  text-decoration: underline dotted currentColor;
  text-underline-offset: 3px;
}
.dev-chord-preview .chord-token:hover,
.dev-chord-preview [data-chord]:hover {
  color: #fff1a8;
}
@media (min-width: 960px) {
  body.screen-dev { padding: 24px; }
  body.screen-dev .app-shell {
    width: min(100%, 1180px);
    max-width: 1180px;
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 88px minmax(0,1fr);
    grid-template-rows: auto minmax(0,1fr) auto;
    grid-template-areas:
      "cover cover"
      "nav main"
      "footer footer";
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    overflow: hidden;
  }
}
@media (max-width: 960px) {
  .dev-inline-shell,
  .dev-editor-layout,
  .dev-chord-layout {
    grid-template-columns: 1fr;
  }
  body.screen-dev .dev-view.active {
    padding: 0 12px 18px;
  }
}

/* Exact desktop refresh */
.login-profile-card,
.sidebar-brand,
.sidebar-block,
.sidebar-install-card,
.sidebar-profile-card,
.home-rail,
.account-profile-copy,
.account-profile-caret,
.account-profile-editor {
  display: none;
}

.sidebar-nav {
  display: contents;
}

.exact-login-card {
  gap: 18px;
}

.login-profile-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
}

.login-profile-avatar,
.account-profile-avatar,
.sidebar-profile-avatar,
.account-avatar-shell {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, .92), rgba(251, 191, 36, .92));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 22px;
  border: 1px solid rgba(255, 255, 255, .12);
}

.login-profile-avatar {
  cursor: pointer;
}

.account-avatar-shell {
  width: 46px;
  height: 46px;
  font-size: 16px;
  flex: 0 0 auto;
}

.login-profile-avatar img,
.account-profile-avatar img,
.sidebar-profile-avatar img,
.account-avatar-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-profile-copy,
.account-profile-copy,
.sidebar-profile-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.login-profile-copy strong,
.account-profile-copy strong,
.sidebar-profile-copy strong {
  font-size: 15px;
  font-weight: 900;
}

.login-profile-copy span,
.account-profile-copy span,
.sidebar-profile-copy small {
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  line-height: 1.35;
}

.login-profile-panel {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
}

.login-profile-meta {
  display: grid;
  gap: 8px;
}

.login-profile-change {
  justify-self: start;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 208, 107, .28);
  background: rgba(246, 208, 107, .08);
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.account-profile-editor {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.account-device-divider {
  display: grid;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.account-device-divider strong {
  font-size: 14px;
  font-weight: 900;
}

.account-device-divider span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.account-device-editor {
  margin-top: -4px;
}

.account-profile-avatar {
  display: grid;
}

.account-profile-trigger {
  width: auto;
  height: auto;
  min-height: 58px;
  padding: 0 14px;
  border-radius: 18px;
  display: inline-grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: center;
  column-gap: 12px;
  min-width: 0;
  max-width: 228px;
}

.account-profile-copy {
  text-align: left;
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 2px;
}

.account-profile-copy strong {
  color: var(--white);
  font-size: 15px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-profile-copy small {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-profile-caret {
  width: 18px;
  height: 18px;
  opacity: .7;
}

.hero-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.hero-progress-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.hero-progress-bar b {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.hero-progress small {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, .78);
}

.library-toolbar {
  display: none;
}

.home-layout {
  display: block;
}

.home-rail {
  display: none;
}

.rail-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(11, 16, 32, .94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .24);
  padding: 20px;
}

.rail-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.rail-card-head h3 {
  margin: 0;
  font-size: 18px;
}

.rail-card-head button {
  background: transparent;
  color: #8b5cf6;
  font-size: 13px;
  font-weight: 900;
  padding: 0;
}

.song-key-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 25, .86);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 14px;
  font-weight: 900;
}

.rail-cta {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  margin-top: 18px;
  background: transparent;
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, .24);
  font-weight: 900;
}

.shortcut-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.shortcut-list button,
.activity-list article {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.shortcut-list button:last-child,
.activity-list article:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.shortcut-list button span,
.activity-list strong {
  text-align: left;
  color: var(--text);
  font-weight: 800;
}

.shortcut-list button svg {
  width: 18px;
  height: 18px;
}

.shortcut-list button svg:first-child {
  color: rgba(255, 255, 255, .76);
}

.shortcut-list button svg:last-child,
.activity-list article svg {
  color: rgba(255, 255, 255, .46);
}

.activity-list article {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.activity-list small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.activity-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.activity-dot.green { background: #22c55e; box-shadow: 0 0 0 8px rgba(34, 197, 94, .12); }
.activity-dot.purple { background: #8b5cf6; box-shadow: 0 0 0 8px rgba(139, 92, 246, .14); }
.activity-dot.blue { background: #3b82f6; box-shadow: 0 0 0 8px rgba(59, 130, 246, .12); }

.exact-top-artist-stack {
  display: grid;
  gap: 12px;
}

.exact-top-artist-stack .top-artist-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
}

.exact-top-artist-stack .top-artist-rank {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .84);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
}

.exact-top-artist-stack .top-artist-avatar {
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
  padding: 0;
}

.exact-top-artist-stack .top-artist-avatar img,
.exact-top-artist-stack .top-artist-avatar span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
  font-weight: 900;
}

.exact-top-artist-stack .top-artist-name {
  color: var(--text);
  font-weight: 900;
  text-align: left;
}

.exact-top-artist-stack .top-artist-count {
  min-width: 52px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(99, 47, 201, .5);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body {
    min-height: 100vh;
    padding: 0;
    background:
      radial-gradient(circle at top left, rgba(105, 56, 239, .22), transparent 24%),
      radial-gradient(circle at 92% 0%, rgba(236, 72, 153, .08), transparent 22%),
      #060913;
    overflow: hidden;
  }

  .app-shell {
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 332px minmax(0, 1fr);
    grid-template-rows: 88px minmax(0, 1fr);
    grid-template-areas:
      "nav cover"
      "nav main";
    border: 0;
    border-radius: 0;
    background: #050914;
    box-shadow: none;
  }

  .screen-footer,
  .install-prompt,
  .cover .brand {
    display: none !important;
  }

  .cover {
    grid-area: cover;
    min-height: 88px;
    padding: 18px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background: rgba(5, 9, 20, .92);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    backdrop-filter: blur(18px);
  }

  .search-box {
    min-height: 52px;
    max-width: 780px;
    border-radius: 14px;
    background: rgba(17, 24, 39, .82);
    border: 1px solid rgba(255, 255, 255, .08);
  }

  .cover-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .cover-action {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
  }

  .account-profile-trigger {
    flex: 0 0 auto;
    width: 214px;
    max-width: 214px;
  }

  .quick-cards {
    grid-area: nav;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 16px;
    padding: 20px 20px 24px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(5, 9, 20, .98), rgba(8, 11, 24, .95));
    border-right: 1px solid rgba(255, 255, 255, .08);
  }

  .sidebar-brand,
  .sidebar-block,
  .sidebar-install-card,
  .sidebar-profile-card {
    display: grid;
  }

  .sidebar-brand {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 6px;
  }

  .sidebar-brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #fff;
  }

  .sidebar-brand span {
    display: block;
    color: rgba(255, 255, 255, .66);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sidebar-brand strong {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.1;
  }

  .sidebar-nav {
    display: grid;
    gap: 6px;
  }

  .quick-card {
    min-height: 48px;
    padding: 0 14px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    justify-content: start;
    gap: 12px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
  }

  .quick-card span,
  .play-card b {
    display: block;
    text-align: left;
  }

  .quick-card span {
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 850;
  }

  .quick-card.active {
    background: linear-gradient(135deg, rgba(84, 35, 176, .92), rgba(60, 23, 122, .72));
    border-color: rgba(139, 92, 246, .36);
  }

  .sidebar-block h3 {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
  }

  .sidebar-live-card,
  .sidebar-install-card,
  .sidebar-profile-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(17, 23, 40, .9);
    padding: 18px;
    gap: 16px;
  }

  .sidebar-live-card {
    position: relative;
    overflow: hidden;
    background:
      radial-gradient(circle at 84% 16%, rgba(139, 92, 246, .22), transparent 28%),
      linear-gradient(180deg, rgba(20, 28, 48, .98), rgba(17, 23, 40, .96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 16px 42px rgba(0, 0, 0, .18);
  }

  .sidebar-live-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
  }

  .sidebar-live-wave {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-top: 4px;
  }

  .sidebar-live-wave i {
    display: block;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #c084fc, #8b5cf6);
    box-shadow: 0 0 12px rgba(139, 92, 246, .32);
  }

  .sidebar-live-wave i:nth-child(1),
  .sidebar-live-wave i:nth-child(5) {
    height: 10px;
    opacity: .8;
  }

  .sidebar-live-wave i:nth-child(2),
  .sidebar-live-wave i:nth-child(4) {
    height: 18px;
  }

  .sidebar-live-wave i:nth-child(3) {
    height: 26px;
  }

  .sidebar-live-head strong,
  .sidebar-install-card strong,
  .sidebar-profile-copy strong {
    color: #fff;
    font-size: 15px;
  }

  .sidebar-live-head span,
  .sidebar-install-card span,
  .sidebar-profile-copy small {
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
  }

  .sidebar-live-time {
    color: #f59e0b;
    font-size: 26px;
    line-height: 1;
    font-weight: 950;
  }

  .sidebar-live-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
  }

  .sidebar-live-center {
    display: grid;
    justify-items: center;
    gap: 10px;
  }

  .sidebar-live-controls button,
  .sidebar-live-link,
  .sidebar-live-reset,
  .sidebar-install-card button {
    min-height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, .08);
  }

  .sidebar-live-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #f4d990;
    min-width: 148px;
    padding: 0 16px;
  }

  .sidebar-live-reset {
    width: 100%;
    margin-top: 12px;
    color: rgba(255, 255, 255, .82);
  }

  .sidebar-live-controls button {
    width: 44px;
    min-width: 44px;
  }

  .sidebar-live-play {
    width: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    color: #fff;
  }

  .sidebar-profile-card {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    text-align: left;
  }

  .sidebar-profile-avatar {
    display: grid;
  }

  .main-area {
    grid-area: main;
    min-height: 0;
    overflow: auto;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .01), transparent 18%),
      #070b16;
  }

  .view {
    padding: 18px 28px 28px;
  }

  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
  }

  .home-main {
    min-width: 0;
  }

  .home-rail {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 0;
    align-content: start;
  }

  .dashboard-hero {
    margin-bottom: 18px;
  }

  .today-card {
    min-height: 188px;
    padding: 24px 28px;
    border-radius: 22px;
    grid-template-columns: minmax(0, 1fr) 150px;
    background:
      radial-gradient(circle at 86% 50%, rgba(251, 191, 36, .14), transparent 24%),
      linear-gradient(135deg, rgba(88, 28, 135, .96), rgba(40, 29, 86, .88) 52%, rgba(12, 18, 36, .96));
    border: 1px solid rgba(139, 92, 246, .28);
  }

  .today-card h2 {
    font-size: 44px;
    line-height: 1;
    letter-spacing: 0;
  }

  .dashboard-shortcuts {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
  }

  .dashboard-shortcuts button {
    min-height: 94px;
    border-radius: 16px;
    background: rgba(15, 21, 36, .92);
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 14px;
  }

  .dashboard-shortcuts button span {
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 800;
  }

  .dashboard-shortcuts button strong {
    font-size: 18px;
    margin-top: 6px;
  }

  .dashboard-shortcuts button small {
    color: rgba(255, 255, 255, .68);
    margin-top: 4px;
  }

  .section-head.library-head {
    margin-bottom: 16px;
  }

  .library-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }

  .library-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .library-tabs button,
  .library-sort-chip,
  .library-view-chip {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .08);
    font-weight: 850;
  }

  .library-tabs button.active {
    background: linear-gradient(135deg, rgba(99, 47, 201, .9), rgba(76, 29, 149, .82));
    color: #fff;
  }

  .library-sort-chip {
    min-width: 156px;
    justify-content: center;
  }

  .library-view-tools {
    display: flex;
    gap: 10px;
  }

  .song-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .song-card {
    min-height: 168px;
    aspect-ratio: 1 / 1;
    padding: 14px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(14, 19, 34, .92);
  }

  .song-cover {
    border-radius: 16px;
    opacity: .82;
  }

  .song-cover::after {
    background: linear-gradient(180deg, rgba(7, 11, 22, .03), rgba(7, 11, 22, .8));
  }

  .song-cover span,
  .song-cover img {
    filter: none;
    transform: none;
  }

  .song-title {
    font-size: 16px;
  }

  .song-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, .76);
  }

  .mini-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
  }

  .dev-view.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
    padding: 18px 28px 28px;
    background: transparent;
  }

  .dev-panel {
    grid-column: 1;
  }

  .dev-inline-shell {
    grid-column: 2;
    display: grid;
    gap: 18px;
    position: sticky;
    top: 0;
    align-content: start;
  }
}

@media (max-width: 1099px) {
  .account-profile-trigger {
    padding: 0;
  }

  .account-profile-trigger .account-profile-copy,
  .account-profile-trigger .account-profile-caret {
    display: none;
  }
}

/* Final responsive/scroll overrides to keep the reference layout intact */
html,
body {
  min-height: 100%;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
}

.main-area {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.view,
.reader-view,
.worship-view.active,
.admin-view.active,
.dev-view.active {
  min-height: auto;
}

.main-area::-webkit-scrollbar,
.quick-cards::-webkit-scrollbar {
  width: 10px;
}

.main-area::-webkit-scrollbar-track,
.quick-cards::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .04);
}

.main-area::-webkit-scrollbar-thumb,
.quick-cards::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, .42);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

@media (max-width: 959px) {
  .app-shell {
    width: 100%;
    max-width: 100%;
  }

  .view {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
}

@media (min-width: 960px) {
  .app-shell {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    overflow: hidden;
  }

  .main-area,
  .quick-cards {
    overflow-y: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .account-profile-trigger {
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-content: center;
    gap: 0;
  }

  .account-profile-trigger.account-action {
    font-size: 0;
  }

  .account-profile-trigger .account-avatar-shell {
    width: 38px;
    height: 38px;
    border: 0;
    box-shadow: none;
  }

  .account-profile-trigger .account-profile-copy,
  .account-profile-trigger .account-profile-caret {
    display: none !important;
  }

  .sidebar-brand,
  .sidebar-block,
  .sidebar-install-card,
  .sidebar-profile-card,
  .home-rail {
    display: none !important;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
  }

  .quick-cards {
    display: block;
    padding: 12px 12px 10px;
    overflow-x: hidden;
  }

  .quick-card {
    min-height: 72px;
  }

  .login-screen {
    padding: 14px;
    place-items: center;
    background-position: 62% center;
    background-attachment: scroll;
  }

  .login-card {
    width: min(100%, 420px);
    margin: 0 auto;
    gap: 12px;
    padding: 20px 17px 18px;
    border-radius: 26px;
  }

  .login-logo {
    width: 92px;
    height: 92px;
    border-radius: 21px;
  }

  .login-heading span,
  .login-local-field span,
  .login-password span {
    font-size: 10px;
    letter-spacing: .06em;
  }

  .login-subtitle {
    font-size: 12px;
  }

  .login-users button,
  .login-submit {
    min-height: 46px;
    font-size: 13px;
  }

  .login-profile-panel {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 12px;
  }

  .login-profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 20px;
  }

  .login-profile-copy strong {
    font-size: 14px;
  }

  .login-profile-copy span,
  .login-local-hint,
  .login-status {
    font-size: 11px;
  }

  .login-local-field input,
  .login-password input {
    min-height: 46px;
    font-size: 14px;
  }
}

@media (max-width: 640px) and (hover: none), (max-width: 640px) and (pointer: coarse) {
  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-cards {
    padding: 10px 10px 8px;
  }

  .quick-card {
    min-height: 68px;
    padding: 8px 4px;
  }
}

@media (min-width: 960px) and (hover: none), (min-width: 960px) and (pointer: coarse) {
  .app-shell {
    width: min(100%, 1280px);
    max-width: 1280px;
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "cover cover"
      "nav main"
      "footer footer";
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
  }

  .cover {
    min-height: 104px;
    padding: 18px 28px;
    display: grid;
    grid-template-columns: minmax(240px, auto) minmax(280px, 1fr) auto;
    align-items: center;
    align-content: center;
    gap: 18px;
  }

  .brand {
    grid-template-columns: 54px auto;
    justify-items: start;
    text-align: left;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  h1 {
    font-size: 22px;
  }

  .cover-actions {
    justify-content: flex-end;
  }

  .developer-signature {
    display: none;
  }

  .quick-cards {
    display: grid;
    grid-area: nav;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 18px;
    padding: 20px 16px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    background:
      radial-gradient(circle at top left, rgba(96, 45, 184, .18), transparent 28%),
      linear-gradient(180deg, rgba(6, 9, 18, .99), rgba(9, 12, 24, .97));
    border-right: 1px solid rgba(255, 255, 255, .09);
  }

  .sidebar-brand,
  .sidebar-block,
  .sidebar-install-card,
  .sidebar-profile-card {
    display: grid !important;
  }

  .sidebar-brand {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .sidebar-brand-logo {
    width: 60px;
    height: 60px;
  }

  .sidebar-brand span {
    font-size: 11px;
    color: rgba(255, 255, 255, .62);
    text-transform: uppercase;
    font-weight: 900;
  }

  .sidebar-brand strong {
    font-size: 17px;
    line-height: 1.1;
    color: #fff;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .quick-card {
    min-height: 54px;
    padding: 0 16px;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    justify-content: start;
    gap: 14px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
  }

  .quick-card span,
  .play-card b {
    display: block;
  }

  .quick-card svg {
    width: 18px;
    height: 18px;
  }

  .quick-card span {
    text-align: left;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 800;
  }

  .quick-card.active {
    background: linear-gradient(135deg, rgba(72, 32, 138, .88), rgba(48, 23, 102, .72));
    border-color: rgba(139, 92, 246, .42);
  }

  .play-card b {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .sidebar-block h3 {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .sidebar-live-card {
    padding: 18px 16px 16px;
  }

  .sidebar-live-head strong {
    font-size: 15px;
  }

  .sidebar-live-head span {
    display: block;
    margin-top: 6px;
    line-height: 1.35;
  }

  .sidebar-live-time {
    font-size: 22px;
  }

  .sidebar-live-controls {
    gap: 14px;
  }

  .sidebar-live-controls button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  .sidebar-live-play {
    width: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
  }

  .sidebar-live-link {
    width: 100%;
  }

  .sidebar-install-card {
    background:
      linear-gradient(135deg, rgba(37, 25, 74, .96), rgba(18, 23, 44, .95));
  }

  .sidebar-profile-card {
    min-height: 78px;
  }

  .dashboard-hero {
    display: block;
  }

  .today-card {
    width: 100%;
    min-height: 188px;
    grid-template-columns: minmax(0, 1fr) 144px;
    padding: 24px 26px;
  }

  .hero-progress {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero-progress-bar {
    width: 100%;
  }
}

/* Tablets em paisagem: mantém o player do ensaio legível e evita o rodapé sobreposto. */
@media (min-width: 960px) and (max-width: 1400px) and (pointer: coarse) {
  .app-shell {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 100dvh;
    grid-template-columns: minmax(320px, 340px) minmax(0, 1fr);
    overflow: visible;
  }

  .quick-cards,
  .main-area {
    min-height: calc(100dvh - 104px);
  }

  .main-area {
    overflow: visible;
    padding-bottom: 32px;
  }

  .screen-footer {
    position: static;
    grid-area: footer;
  }

  .sidebar-live-card {
    padding: 16px 14px;
  }

  .sidebar-live-controls {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .sidebar-live-link,
  .sidebar-live-reset {
    max-width: 100%;
    white-space: normal;
  }
}

@media (min-width: 1180px) and (hover: none) and (orientation: landscape), (min-width: 1180px) and (pointer: coarse) and (orientation: landscape) {
  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
  }

  .home-main {
    min-width: 0;
  }

  .home-rail {
    display: grid !important;
    gap: 16px;
    align-content: start;
    position: sticky;
    top: 0;
  }

  .rail-card {
    padding: 18px;
  }

  .rail-card-head h3 {
    font-size: 17px;
  }
}


/* Ajuste final dos botões do leitor: evita sobreposição no PC e deixa Violão/Teclado claro */
.reader-tools,
#view-reader .reader-tools {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
}

.reader-tools button,
#view-reader .reader-tools button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 12px !important;
}

.reader-tools .instrument-toggle,
#view-reader .reader-tools .instrument-toggle {
  min-width: 0 !important;
  width: 100% !important;
  gap: 5px !important;
  padding: 0 6px !important;
}

.reader-tools .instrument-toggle span,
#view-reader .reader-tools .instrument-toggle span {
  flex: 0 0 auto !important;
  font-size: 15px !important;
  line-height: 1 !important;
  color: inherit !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.reader-tools .instrument-toggle strong,
#view-reader .reader-tools .instrument-toggle strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

@media (max-width: 420px) {
  .reader-tools,
  #view-reader .reader-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Correção do layout do teclado/piano no guia de acordes */
.chord-layout-stack {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
}

/* Alternativas de posicao no violao — exibe em linha com scroll */
.chord-layout-stack.has-alternatives {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.chord-layout-stack.has-alternatives .chord-diagram-card {
  flex: 0 0 auto;
  width: 160px;
  min-width: 0;
  max-width: 160px;
  padding: 10px 8px 8px;
}

.chord-layout-stack.has-alternatives .chord-layout-label {
  font-size: 10px;
  opacity: .7;
}

.chord-layout-stack.has-alternatives .chord-diagram-body {
  width: min(100%, 110px);
  margin: 0 auto 0 22px;
  aspect-ratio: 5 / 6;
}

.chord-layout-stack.has-alternatives .chord-diagram-top,
.chord-layout-stack.has-alternatives .chord-string-labels {
  padding-left: 22px;
}

.chord-layout-stack.has-alternatives .chord-dot {
  width: 14px;
  height: 14px;
}

.chord-layout-stack.has-alternatives .chord-base-fret {
  font-size: 11px;
  left: -20px;
}

.piano-card {
  width: min(100%, 520px);
  display: grid;
  gap: 12px;
  padding: 14px 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.chord-layout-label {
  color: #f4ece1;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 950;
  text-align: center;
}

.piano-keyboard {
  position: relative;
  width: 100%;
  min-height: 150px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: stretch;
  overflow: visible;
  padding-top: 0;
  border-radius: 10px;
}

.piano-key {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.piano-key b {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 24px;
  margin-bottom: 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.02em;
}

.piano-key.white {
  height: 150px;
  background: linear-gradient(180deg, #ffffff 0%, #f4efe7 100%);
  border: 1px solid #c9c0b3;
  border-left-width: 0;
  color: #211d18;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, .08);
}

.piano-key.white:first-child {
  border-left-width: 1px;
  border-radius: 10px 0 0 10px;
}

.piano-key.white:nth-last-of-type(1) {
  border-radius: 0 10px 10px 0;
}

.piano-key.black {
  position: absolute;
  z-index: 4;
  top: 0;
  left: calc(((var(--key) + 1) * (100% / 7)) - 18px);
  width: clamp(26px, 7.5vw, 36px);
  height: 92px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #161616 0%, #050505 100%);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .5);
}

.piano-key.black b {
  margin-bottom: 7px;
  min-width: 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, .08);
}

.piano-key.white.active {
  background: linear-gradient(180deg, #ffe7a3 0%, #e4b95f 100%);
  border-color: #f4d990;
  box-shadow: 0 0 0 2px rgba(244, 217, 144, .25), inset 0 -10px 18px rgba(0, 0, 0, .12);
}

.piano-key.black.active {
  background: linear-gradient(180deg, #ffd36a 0%, #a855f7 100%);
  border-color: #f4d990;
  box-shadow: 0 0 0 2px rgba(244, 217, 144, .35), 0 12px 22px rgba(0, 0, 0, .55);
}

.piano-key.active b {
  background: rgba(18, 16, 13, .88);
  color: #fff8e8;
}

.piano-hint {
  color: #c9b8a2;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 480px) {
  .piano-card {
    padding: 12px 8px 10px;
  }

  .piano-keyboard {
    min-height: 126px;
  }

  .piano-key.white {
    height: 126px;
  }

  .piano-key.black {
    left: calc(((var(--key) + 1) * (100% / 7)) - 14px);
    width: 28px;
    height: 78px;
  }

  .piano-key b {
    min-width: 22px;
    min-height: 21px;
    font-size: 10px;
  }
}

/* Correção: rolagem do guia de acordes/teclado */
.chord-guide {
  overflow: hidden;
}

.chord-guide.open {
  display: block;
}

.chord-guide-sheet {
  max-height: calc(100dvh - 18px) !important;
  height: auto;
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important;
}

.chord-guide-body {
  min-height: 0;
  padding-bottom: 18px;
}

.chord-guide-diagram {
  min-height: 0;
}

.chord-guide-section,
.chord-guide-hint {
  width: 100%;
}

@media (min-width: 760px) {
  .chord-guide-sheet {
    left: 50% !important;
    right: auto !important;
    bottom: 18px !important;
    width: min(94vw, 760px);
    max-height: calc(100dvh - 56px) !important;
    border-radius: 18px !important;
    transform: translate(-50%, calc(100% + 32px));
  }

  .chord-guide.open .chord-guide-sheet {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 520px) {
  .chord-guide-sheet {
    max-height: calc(100dvh - 8px) !important;
  }
}

/* =========================================================
   CORREÇÃO FINAL - ROLAGEM DA TELA DE CIFRA
   Mantém o layout atual e cria rolagem própria somente na cifra.
   ========================================================= */
body.screen-reader {
  overflow: hidden;
}

body.screen-reader .app-shell,
body.screen-reader .main-area {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

#view-reader.view.active {
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

#view-reader .reader-top,
#view-reader .reader-media,
#view-reader .reader-tools,
#view-reader .tuner-panel {
  flex: 0 0 auto;
}

#view-reader .chord-sheet {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 96px;
}

#view-reader .chord-sheet pre {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.auto-scroll-speed {
  display: contents;
}

.auto-scroll-speed span,
.auto-scroll-speed button,
.auto-scroll-speed strong {
  min-width: 0;
  box-sizing: border-box;
}

.auto-scroll-speed span,
.auto-scroll-speed strong {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid #39342e;
  border-radius: 8px;
  background: #181612;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.auto-scroll-speed span { font-size: 10px; opacity: .78; }
.auto-scroll-speed button { min-height: 38px; height: 38px; padding: 0 4px; border-radius: 8px; font-size: 14px; }
.auto-scroll-speed button:disabled { opacity: .38; cursor: not-allowed; }

#view-reader .chord-sheet {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .58) rgba(255, 255, 255, .08);
}

#view-reader .chord-sheet::-webkit-scrollbar { width: 12px; }
#view-reader .chord-sheet::-webkit-scrollbar-track { background: rgba(255, 255, 255, .08); }
#view-reader .chord-sheet::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .58); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }

@media (min-width: 521px) {
  #view-reader .reader-tools { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  #view-reader .chord-sheet {
    padding-left: 12px;
    padding-right: 12px;
  }

  #view-reader .chord-sheet pre {
    font-size: clamp(12px, 3.6vw, var(--reader-font, 15px));
    line-height: 1.64;
  }

  #view-reader .reader-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    max-height: 150px;
    overflow-y: visible;
  }

  #view-reader .auto-scroll-speed {
    display: contents;
  }

  #view-reader .auto-scroll-speed button,
  #view-reader .auto-scroll-speed span,
  #view-reader .auto-scroll-speed strong { min-height: 32px; height: 32px; padding-left: 3px; padding-right: 3px; border-radius: 999px; font-size: 10px; }
  #view-reader .auto-scroll-speed span { overflow: hidden; text-overflow: ellipsis; }
}

@media (min-width: 760px) {
  #view-reader.view.active {
    height: calc(100vh - 44px);
    max-height: calc(100vh - 44px);
  }

  #view-reader .chord-sheet {
    margin-bottom: 0;
  }
}

@media (min-width: 960px) {
  body.screen-reader {
    overflow: hidden;
  }

  body.screen-reader .app-shell,
  body.screen-reader .main-area {
    height: calc(100vh - 48px);
    min-height: calc(100vh - 48px);
  }

  #view-reader.view.active {
    height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
  }
}

/* ─── Dev Piano Editor ──────────────────────────────────── */
.dev-chord-keyboard-hint {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0 2px;
}

/* Abas de variação do acorde */
.dev-chord-var-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.dev-chord-var-tab {
  flex: 1;
  padding: 6px 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
}

.dev-chord-var-tab.active {
  background: rgba(199,154,59,.15);
  border-color: var(--gold);
  color: var(--gold);
}

.dev-chord-var-tab.has-data::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Botão de alternância violão/teclado dentro do editor dev */
.dev-chord-mode-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.dev-chord-mode-toggle button {
  flex: 1;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.dev-chord-mode-toggle button.active {
  background: var(--gold);
  color: #1a1200;
  border-color: var(--gold);
}

/* Piano editor — layout correto com teclas absolutas */
/* Adorar Pro - identidade visual interna */
body,
body.screen-play,
body.screen-reader,
body.screen-admin,
body.screen-dev {
  background:
    linear-gradient(125deg, rgba(2, 7, 22, .78), rgba(8, 14, 39, .62) 48%, rgba(27, 8, 57, .58)),
    url("/images/fundo.jpg") center / cover fixed no-repeat;
}

.app-shell,
body.screen-play .app-shell,
body.screen-reader .app-shell,
body.screen-admin .app-shell,
body.screen-dev .app-shell {
  background:
    linear-gradient(125deg, rgba(4, 10, 28, .72), rgba(10, 12, 35, .62) 50%, rgba(28, 10, 55, .58)),
    url("/images/fundo.jpg") center / cover fixed no-repeat;
}

.main-area {
  background: rgba(3, 8, 24, .32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

@media (min-width: 960px) {
  .sidebar-brand {
    grid-template-columns: 1fr !important;
    justify-items: center;
    align-items: center;
    gap: 10px !important;
    text-align: center;
    padding: 4px 0 20px;
  }

  .sidebar-brand > div {
    width: 100%;
    text-align: center;
  }

  .sidebar-brand-logo {
    width: 94px !important;
    height: 94px !important;
    border-radius: 22px !important;
    object-fit: cover;
    background: #050814 !important;
    border: 1px solid rgba(83, 228, 255, .48);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .38), 0 0 24px rgba(42, 210, 255, .17);
  }

  .sidebar-brand span,
  .sidebar-brand strong {
    text-align: center;
  }

  .quick-cards {
    background: linear-gradient(180deg, rgba(3, 9, 25, .86), rgba(12, 8, 31, .78)) !important;
    -webkit-backdrop-filter: blur(20px) saturate(125%);
    backdrop-filter: blur(20px) saturate(125%);
  }

  .cover {
    background: rgba(4, 10, 28, .76) !important;
    -webkit-backdrop-filter: blur(20px) saturate(125%);
    backdrop-filter: blur(20px) saturate(125%);
  }
}

@media (max-width: 959px) {
  .app-shell,
  body.screen-play .app-shell,
  body.screen-reader .app-shell,
  body.screen-admin .app-shell,
  body.screen-dev .app-shell {
    background-position: 62% center;
    background-attachment: fixed;
  }
}

.dev-piano-editor {
  position: relative;
  width: 100%;
  height: 130px;
  margin: 8px 0;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}

.dev-piano-white-keys {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 2px;
  padding: 0 2px;
}

.dev-piano-key.white {
  flex: 1;
  position: relative;
  background: #f0e8d6;
  color: #444;
  border: none;
  border-radius: 0 0 5px 5px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  z-index: 1;
  transition: background .1s;
  -webkit-tap-highlight-color: transparent;
}

.dev-piano-key.white b {
  font-size: 9px;
  font-weight: 700;
  pointer-events: none;
}

.dev-piano-key.white.active {
  background: var(--gold-2);
  color: #1a1200;
}

.dev-piano-key.white:hover { background: #e0d8c6; }
.dev-piano-key.white.active:hover { background: #f4d082; }
.dev-piano-key.white:active { transform: scaleY(0.98); transform-origin: top; }

.dev-piano-black-keys {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 62%;
  pointer-events: none;
}

.dev-piano-key.black {
  position: absolute;
  width: calc(100% / 7 * 0.6);
  height: 100%;
  background: #1c1c1c;
  color: #aaa;
  border: none;
  border-radius: 0 0 4px 4px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  z-index: 2;
  pointer-events: all;
  transition: background .1s;
  -webkit-tap-highlight-color: transparent;
}

.dev-piano-key.black b {
  font-size: 8px;
  font-weight: 700;
  pointer-events: none;
}

.dev-piano-key.black.active { background: var(--gold); color: #1a1200; }
.dev-piano-key.black:hover { background: #333; }
.dev-piano-key.black.active:hover { background: #c79a3b; }
.dev-piano-key.black:active { transform: scaleY(0.97); transform-origin: top; }

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: var(--coal);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  animation: toast-in .18s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Adorar Pro - estrutura mobile 2026 */
@media (max-width: 959px) {
  body {
    padding: 0;
    background-position: 62% center;
  }

  .app-shell {
    width: 100%;
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .cover {
    min-height: auto;
    padding: calc(14px + env(safe-area-inset-top)) 14px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 13px 10px;
    background: linear-gradient(135deg, rgba(5, 16, 40, .92), rgba(20, 9, 48, .88)) !important;
    border-bottom: 1px solid rgba(74, 220, 255, .2);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    backdrop-filter: blur(22px) saturate(135%);
  }

  .cover .brand {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    gap: 11px;
    min-width: 0;
    text-align: left;
  }

  .cover .brand-logo {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    object-fit: cover;
    background: #050814;
    border: 1px solid rgba(80, 230, 255, .48);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .32), 0 0 20px rgba(41, 207, 255, .16);
  }

  .cover .brand > div {
    min-width: 0;
  }

  .cover .brand .eyebrow {
    margin: 0 0 3px;
    color: #68e8ff;
    font-size: 9px;
    letter-spacing: .08em;
    text-align: left;
  }

  .cover .brand h1 {
    margin: 0;
    color: #fff;
    font-size: 21px;
    line-height: 1.05;
    text-align: left;
  }

  .cover-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .cover-action,
  .account-profile-trigger {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 14px;
    background: rgba(15, 30, 61, .8);
    border: 1px solid rgba(95, 213, 255, .2);
  }

  .account-profile-trigger .account-avatar-shell {
    width: 36px;
    height: 36px;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    min-height: 50px;
    margin: 0;
    border-radius: 15px;
    background: rgba(5, 15, 39, .76);
    border: 1px solid rgba(78, 216, 255, .25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .17) inset;
  }

  .search-box input {
    color: #fff;
    font-size: 14px;
  }

  .developer-signature {
    display: none;
  }

  .quick-cards {
    position: sticky;
    top: 0;
    z-index: 18;
    display: block;
    padding: 10px 10px 11px;
    overflow: visible;
    background: linear-gradient(180deg, rgba(5, 12, 31, .96), rgba(13, 9, 34, .94)) !important;
    border-bottom: 1px solid rgba(82, 220, 255, .18);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    backdrop-filter: blur(20px) saturate(130%);
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-card {
    min-width: 0;
    min-height: 70px;
    padding: 8px 3px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 26px auto;
    place-items: center;
    align-content: center;
    gap: 6px;
    border-radius: 15px;
    background: rgba(19, 31, 59, .7);
    border: 1px solid rgba(113, 167, 224, .15);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  }

  .quick-card svg {
    width: 23px;
    height: 23px;
    color: #65e7ff;
    stroke: currentColor;
  }

  .quick-card span {
    color: rgba(237, 246, 255, .84);
    font-size: 10px;
    line-height: 1.12;
    font-weight: 850;
    text-align: center;
  }

  .quick-card.active {
    background: linear-gradient(135deg, rgba(10, 185, 231, .9), rgba(58, 106, 231, .9) 52%, rgba(117, 75, 220, .9));
    border-color: rgba(112, 237, 255, .52);
    box-shadow: 0 10px 24px rgba(31, 123, 227, .22), inset 0 1px rgba(255, 255, 255, .16);
  }

  .quick-card.active svg,
  .quick-card.active span {
    color: #fff;
  }

  .play-card b {
    top: 5px;
    right: 6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: #19cbea;
    color: #05101e;
  }

  .main-area {
    min-height: calc(100dvh - 238px);
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    background: rgba(3, 8, 24, .2);
  }

  .view {
    padding: 18px 14px 24px;
  }

  .section-head {
    margin-bottom: 15px;
  }

  .section-head h2 {
    font-size: 23px;
  }
}

@media (max-width: 390px) {
  .cover .brand {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .cover .brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .cover .brand h1 {
    font-size: 19px;
  }

  .sidebar-nav {
    gap: 6px;
  }

  .quick-card {
    min-height: 66px;
  }

  .quick-card span {
    font-size: 9px;
  }
}

/* Sobre o produto */
.about-view {
  padding: 22px;
}

.about-view.active {
  display: grid;
  gap: 18px;
}

.about-hero {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 24px;
  border: 1px solid rgba(77, 230, 255, .22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 10%, rgba(77, 230, 255, .2), transparent 38%),
    linear-gradient(135deg, rgba(45, 25, 104, .94), rgba(8, 29, 52, .95));
  box-shadow: 0 22px 54px rgba(0, 0, 0, .26);
}

.about-hero img {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(77, 230, 255, .55);
  box-shadow: 0 0 30px rgba(77, 230, 255, .22);
}

.about-hero div {
  display: grid;
  gap: 7px;
}

.about-hero span {
  color: #6eeeff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.about-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}

.about-hero p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
  line-height: 1.55;
}

.about-product-copy {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--neon-line);
  border-radius: 20px;
  background: rgba(11, 18, 37, .84);
}

.about-product-copy p {
  margin: 0;
  color: var(--neon-muted);
  font-size: 15px;
  line-height: 1.72;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-feature-grid article {
  min-height: 128px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--neon-line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .12), rgba(77, 230, 255, .06)),
    rgba(15, 20, 41, .86);
}

.about-feature-grid strong {
  color: #fff;
  font-size: 16px;
}

.about-feature-grid span {
  color: var(--neon-muted);
  font-size: 13px;
  line-height: 1.5;
}

.about-contact-card {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 24px;
  border: 1px solid rgba(77, 230, 255, .28);
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(135deg, rgba(33, 174, 225, .16), rgba(139, 92, 246, .18));
}

.about-contact-card > span {
  color: var(--neon-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.about-contact-card strong {
  color: #fff;
  font-size: 24px;
}

.about-contact-card a {
  color: #6eeeff;
  font-size: 19px;
  font-weight: 950;
  text-decoration: none;
}

.about-contact-card small {
  margin-top: 7px;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
}

@media (max-width: 959px) {
  .sidebar-nav .quick-card[data-view="about"] {
    grid-column: 1 / -1;
    min-height: 54px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
  }

  .sidebar-nav .quick-card[data-view="about"] svg {
    width: 22px;
    height: 22px;
  }

  .about-view {
    padding: 14px;
  }

  .about-hero {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
  }

  .about-hero img {
    width: 78px;
    height: 78px;
    border-radius: 17px;
  }

  .about-hero h2 {
    font-size: 23px;
  }

  .about-hero p {
    font-size: 12px;
    line-height: 1.45;
  }

  .about-feature-grid {
    grid-template-columns: 1fr;
  }

  .about-product-copy,
  .about-feature-grid article,
  .about-contact-card {
    padding: 16px;
  }
}

/* ── LIGHT THEME OVERRIDES ── */
:root[data-theme="light"] {
  color-scheme: light;
  --black: #ffffff;
  --coal: #f8fafc;
  --panel: #ffffff;
  --paper: #ffffff;
  --paper-2: #f8fafc;
  --line: #e2e8f0;
  --muted: #64748b;
  --gold: #d97706;
  --gold-2: #b45309;
  --sage: #15803d;
  --wine: #be123c;
  --text: #0f172a;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .06);
  --desktop-bg: #f1f5f9;
  --soft-button: #e2e8f0;
  --soft-button-text: #0f172a;
  --empty-line: #cbd5e1;
  --focus-ring: rgba(37, 99, 235, .4);
}

[data-theme="light"] body {
  background: #f8fafc !important;
  color: #0f172a !important;
}

[data-theme="light"] .login-screen {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
}

[data-theme="light"] .login-card,
[data-theme="light"] .exact-login-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .login-heading h1,
[data-theme="light"] .login-profile-copy strong,
[data-theme="light"] .login-password span {
  color: #0f172a !important;
}

[data-theme="light"] .login-subtitle,
[data-theme="light"] .login-profile-copy span,
[data-theme="light"] .login-tenant-field label {
  color: #475569 !important;
}

[data-theme="light"] .login-tenant-select,
[data-theme="light"] .login-password input {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] header.cover,
[data-theme="light"] .sidebar-brand,
[data-theme="light"] .quick-cards,
[data-theme="light"] .worship-hero,
[data-theme="light"] .about-hero,
[data-theme="light"] .reader-top,
[data-theme="light"] .reader-tools,
[data-theme="light"] .chord-sheet,
[data-theme="light"] .rail-card,
[data-theme="light"] .today-card,
[data-theme="light"] .sidebar-live-card,
[data-theme="light"] .sidebar-install-card,
[data-theme="light"] .reader-youtube-player {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.05) !important;
}

[data-theme="light"] .brand h1,
[data-theme="light"] .sidebar-brand strong,
[data-theme="light"] .reader-title h2,
[data-theme="light"] .section-head h2,
[data-theme="light"] .rail-card-head h3,
[data-theme="light"] .chord-sheet pre,
[data-theme="light"] .chord-sheet {
  color: #0f172a !important;
}

[data-theme="light"] .search-box input,
[data-theme="light"] .artist-song-search-input {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .tenant-badge {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .app-shell,
[data-theme="light"] .main-area { background: #eef2f7 !important; color: #172033 !important; }
[data-theme="light"] .quick-cards,
[data-theme="light"] .sidebar-brand,
[data-theme="light"] .sidebar-block,
[data-theme="light"] .sidebar-profile-card { background: #ffffff !important; color: #172033 !important; border-color: #d5dce8 !important; }
[data-theme="light"] .quick-card,
[data-theme="light"] .sidebar-nav button,
[data-theme="light"] .sidebar-block h3,
[data-theme="light"] .sidebar-profile-copy strong,
[data-theme="light"] .sidebar-profile-copy small { color: #334155 !important; }
[data-theme="light"] .quick-card.active,
[data-theme="light"] .quick-card:hover { background: #e8eef8 !important; color: #1d4ed8 !important; }
[data-theme="light"] .dashboard-shortcuts > button,
[data-theme="light"] .song-card,
[data-theme="light"] .artist-card,
[data-theme="light"] .rail-card,
[data-theme="light"] .admin-commercial-card,
[data-theme="light"] .admin-tenant-item { background: #ffffff !important; color: #172033 !important; border-color: #d5dce8 !important; }
[data-theme="light"] .dashboard-shortcuts > button span,
[data-theme="light"] .dashboard-shortcuts > button small,
[data-theme="light"] .song-card span,
[data-theme="light"] .artist-card span,
[data-theme="light"] .rail-card span { color: #475569 !important; }
[data-theme="light"] .search-box { background: #ffffff !important; border-color: #cbd5e1 !important; }
[data-theme="light"] .search-box input::placeholder { color: #64748b !important; }
[data-theme="light"] button { text-shadow: none; }
[data-theme="light"] .song-cover img,
[data-theme="light"] .artist-thumb img,
[data-theme="light"] .top-artist-avatar img,
[data-theme="light"] .reader-cover img { opacity: 1 !important; filter: none !important; visibility: visible !important; }
[data-theme="light"] .song-card strong,
[data-theme="light"] .artist-card strong,
[data-theme="light"] .song-card h3,
[data-theme="light"] .artist-card h3,
[data-theme="light"] .song-card p,
[data-theme="light"] .artist-card p,
[data-theme="light"] .top-artist-avatar strong { color: #172033 !important; text-shadow: none !important; }
[data-theme="light"] .song-cover,
[data-theme="light"] .artist-thumb { background: #dbe4f0 !important; }

[data-theme="light"] .chord-sheet i {
  color: #2563eb !important;
  font-weight: 700;
}

/* ── FULLSCREEN READER MODE ── */
body.fullscreen-active {
  overflow: hidden !important;
  background: var(--paper, #090f1a) !important;
}

body.fullscreen-active .app-shell,
body.fullscreen-active .main-area {
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 99999 !important;
  background: var(--paper, #090f1a) !important;
  box-shadow: none !important;
  border: none !important;
}

body.fullscreen-active header.cover,
body.fullscreen-active .quick-cards,
body.fullscreen-active .sidebar-brand,
body.fullscreen-active .sidebar-block,
body.fullscreen-active .sidebar-install-card,
body.fullscreen-active .mobile-bottom-nav,
body.fullscreen-active .sidebar-profile-card {
  display: none !important;
}

body.fullscreen-active #view-reader {
  display: flex !important;
  flex-direction: column !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  padding: 16px 24px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

body.fullscreen-active .chord-sheet {
  flex: 1 !important;
  width: 100% !important;
  max-height: calc(100vh - 120px) !important;
  overflow-y: auto !important;
  font-size: 1.35em !important;
}

.fullscreen-exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: #ef4444;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transition: transform .15s ease;
}

.fullscreen-exit-btn:hover {
  transform: scale(1.04);
}

/* ── YOUTUBE AUDIO PLAYER ── */
.reader-youtube-player {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  background: var(--paper-2, #111b2b);
  border: 1px solid var(--line, #23334d);
  border-radius: 14px;
  color: var(--text, #fff);
}

.yt-player-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-player-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ff0000;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.yt-player-title svg {
  width: 24px;
  height: 24px;
  fill: #ff0000;
}

.yt-audio-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.yt-audio-url-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line, #28374d);
  background: var(--paper, #0c1220);
  color: var(--text, #ffffff);
  font-size: 13px;
  outline: none;
  transition: border-color .18s ease;
}

.yt-audio-url-input:focus {
  border-color: #2563eb;
}

.yt-audio-load-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}

.yt-audio-load-btn:hover {
  background: #1d4ed8;
}

.yt-seek-btn,
.yt-toggle-vis-btn {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line, #28374d);
  background: var(--soft-button, #1a2638);
  color: var(--text, #ffffff);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.yt-seek-btn:hover,
.yt-toggle-vis-btn:hover { background: #334155; }

.admin-commercial-card {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}

.admin-tenant-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(120px, 1fr)) auto auto;
  gap: 8px;
  align-items: center;
}

.admin-tenant-form input,
.admin-tenant-form select,
.admin-tenant-form button {
  min-height: 38px;
  border: 1px solid var(--line, #334155);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--paper, #0f172a);
  color: var(--text, #fff);
}

.admin-tenant-form button { cursor: pointer; font-weight: 700; }
.admin-tenant-form button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.admin-tenant-form input[type="date"] {
  color-scheme: dark;
  color: #f8efe2;
  -webkit-text-fill-color: #f8efe2;
}
.admin-tenant-form input[type="date"]::-webkit-datetime-edit,
.admin-tenant-form input[type="date"]::-webkit-datetime-edit-text,
.admin-tenant-form input[type="date"]::-webkit-datetime-edit-month-field,
.admin-tenant-form input[type="date"]::-webkit-datetime-edit-day-field,
.admin-tenant-form input[type="date"]::-webkit-datetime-edit-year-field {
  color: #f8efe2;
}
.admin-tenant-form input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.25);
  opacity: .95;
}

.admin-tenant-list { display: grid; gap: 8px; margin-top: 12px; }
.admin-tenant-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 214px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
}
.admin-tenant-item div { min-width: 0; display: grid; gap: 3px; }
.admin-tenant-item > div:first-child { flex: 1 1 auto; }
.admin-tenant-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 214px; justify-content: stretch; align-items: center; gap: 8px !important; }
.admin-tenant-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-tenant-item span { color: var(--muted, #94a3b8); font-size: 12px; }
.admin-tenant-item small { color: var(--muted, #94a3b8); font-size: 11px; }
.admin-tenant-item button { border: 0; border-radius: 7px; min-width: 94px; padding: 8px 10px; cursor: pointer; color: #fff; background: #334155; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; }
.admin-tenant-item button.danger { background: #b42318; }
.dev-commercial-button { margin-top: 8px; width: 100%; }
.admin-musician-card { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-musician-card > strong { display: block; margin-bottom: 8px; }
.admin-musician-form { display: grid; grid-template-columns: 1.2fr 1.2fr 1.2fr 1fr auto; gap: 8px; margin-top: 8px; }
.admin-musician-form input, .admin-musician-form select, .admin-musician-form button { min-height: 38px; border: 1px solid var(--line, #334155); border-radius: 8px; padding: 0 10px; background: var(--paper, #0f172a); color: var(--text, #fff); }
.admin-musician-form button { cursor: pointer; font-weight: 700; }
.admin-musician-form button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }

@media (max-width: 760px) {
  body.screen-admin .main-area { padding: 12px 10px 28px; overflow-x: hidden; }
  body.screen-admin .admin-view { padding: 0; width: 100%; min-width: 0; }
  body.screen-admin .admin-hero,
  body.screen-admin .admin-panel,
  body.screen-admin .admin-commercial-card { width: 100%; min-width: 0; box-sizing: border-box; }
  body.screen-admin .admin-hero { padding: 16px 12px; }
  body.screen-admin .admin-hero h2 { font-size: 25px; line-height: 1.08; }
  .admin-section-title { gap: 8px; align-items: center; }
  .admin-section-title button { flex: 0 0 auto; }
  .admin-tenant-form,
  .admin-musician-form { grid-template-columns: 1fr; gap: 8px; }
  .admin-tenant-form input,
  .admin-tenant-form select,
  .admin-tenant-form button,
  .admin-musician-form input,
  .admin-musician-form select,
  .admin-musician-form button { grid-column: 1; width: 100%; min-width: 0; box-sizing: border-box; }
  .admin-actions-row,
  .admin-metrics { grid-template-columns: 1fr; gap: 10px; }
  .admin-refresh { width: 100%; min-width: 0; }
  .admin-tenant-item { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .admin-tenant-item { grid-template-columns: 1fr; }
  .admin-tenant-actions { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-tenant-actions button { width: 100%; }
  .admin-source-list { grid-template-columns: 1fr; }
}
.leader-musician-registration { display: grid; gap: 8px; margin: 14px 0; padding: 14px; border: 1px solid rgba(37,99,235,.35); border-radius: 10px; background: rgba(37,99,235,.08); }
.leader-musician-registration strong { font-size: 14px; }
.leader-musician-registration > span { color: var(--muted, #94a3b8); font-size: 12px; }
.leader-musician-registration input { min-height: 38px; border: 1px solid var(--line, #334155); border-radius: 8px; padding: 0 10px; background: var(--paper, #0f172a); color: var(--text, #fff); }

@media (max-width: 760px) {
  .admin-tenant-form { grid-template-columns: 1fr 1fr; }
  .admin-tenant-form input:first-child { grid-column: 1 / -1; }
  .admin-tenant-form button.primary { grid-column: 1; }
  .admin-musician-form { grid-template-columns: 1fr 1fr; }
  .admin-musician-form button { grid-column: 1 / -1; }
}

.yt-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #000000;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}

.yt-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.reader-youtube-player .yt-audio-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s ease;
}

.reader-youtube-player .yt-audio-play-btn:hover {
  transform: scale(1.08);
}

.yt-hidden-iframe {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
}

/* ── ARTIST SONG SEARCH ── */
.artist-song-search-box {
  margin: 14px 0 18px 0;
  position: relative;
}

.artist-song-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 12px;
  border: 1px solid #28374d;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease;
}

.artist-song-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.artist-song-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: #64748b;
  fill: none;
  pointer-events: none;
}

/* ── MOBILE BOTTOM NAVIGATION MENU ── */
.mobile-bottom-nav {
  display: none;
}

.reader-tools {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
  gap: 6px !important;
  padding: 8px 16px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none;
}

.reader-tools::-webkit-scrollbar {
  display: none;
}

.reader-tools button {
  flex-shrink: 0 !important;
  padding: 6px 12px !important;
  min-height: 38px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
}

.yt-toggle-vis-btn {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.18));
  color: var(--text, #ffffff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}

.yt-toggle-vis-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.reader-youtube-player.yt-video-collapsed .yt-video-wrapper {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: var(--paper-2, #0c1220);
    border-top: 1px solid var(--line, #1e293b);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
  }

  .mobile-bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--muted, #94a3b8);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 0;
    transition: color .15s ease, transform .15s ease;
  }

  .mobile-bottom-nav button.active,
  .mobile-bottom-nav button:active {
    color: #3b82f6 !important;
    transform: scale(1.05);
  }

  .mobile-bottom-nav button svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
  }

  .main-area {
    padding-bottom: 74px !important;
  }

  .yt-video-wrapper {
    padding-bottom: 0 !important;
    height: 180px !important;
  }

  .reader-top {
    min-height: 56px !important;
    padding: 16px 16px 6px !important;
  }

  .chord-sheet {
    padding: 10px 16px 40px !important;
  }
}

/* ── PRINT & PDF EXPORT STYLES ── */
@media print {
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
  }

  body > *:not(#printablePdfContainer) {
    display: none !important;
  }

  #printablePdfContainer {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 20px !important;
  }

  .print-pdf-header {
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 18px;
  }

  .print-pdf-header h1 {
    font-size: 20pt;
    font-family: sans-serif;
    font-weight: bold;
    margin: 0 0 4px 0;
    color: #000000;
  }

  .print-pdf-header p {
    font-size: 11pt;
    font-family: sans-serif;
    margin: 0;
    color: #444444;
  }

  .print-text-sheet {
    font-family: "Courier New", Courier, monospace !important;
    font-size: 12pt !important;
    line-height: 1.55 !important;
    white-space: pre-wrap !important;
    color: #000000 !important;
    margin: 18px 0 !important;
    background: #ffffff !important;
    border: none !important;
    padding: 0 !important;
    text-decoration: none !important;
  }

  .print-text-sheet *,
  .print-text-sheet i,
  .print-text-sheet u,
  .print-text-sheet span {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }

  .print-text-sheet i {
    color: #0044cc !important;
    font-weight: bold !important;
    font-style: normal !important;
    text-decoration: none !important;
  }

  .print-pdf-footer {
    border-top: 1px solid #cccccc;
    padding-top: 10px;
    margin-top: 24px;
    font-size: 9.5pt;
    font-family: sans-serif;
    color: #666666;
    text-align: center;
  }
}

/* Planos de assinatura na tela */
.billing-plans { margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(8, 13, 38, .82); }
.billing-plans .section-head { margin: 0 0 14px; }
.billing-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.billing-plan-card { display: grid; gap: 8px; padding: 20px; border: 1px solid rgba(129, 105, 220, .45); border-radius: 16px; background: linear-gradient(145deg, rgba(35, 30, 77, .96), rgba(13, 23, 51, .96)); color: var(--text); }
.billing-plan-card.featured { border-color: #ffc038; box-shadow: 0 0 0 1px rgba(255,192,56,.25), 0 12px 28px rgba(0,0,0,.18); }
.billing-plan-card > span { color: #8fcaff; font-weight: 900; font-size: 17px; }
.billing-plan-card strong { font-size: 28px; color: #fff; }.billing-plan-card strong small { font-size: 13px; color: #aeb6d0; font-weight: 500; }.billing-plan-card em { color: #aeb6d0; font-size: 12px; font-style: normal; }
.billing-plan-card button { min-height: 40px; border: 0; border-radius: 9px; background: #ffc038; color: #151126; font-weight: 900; cursor: pointer; transition: transform .2s, filter .2s; }.billing-plan-card button:hover { transform: translateY(-1px); filter: brightness(1.08); }.billing-plan-card button.secondary { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); }
@media (max-width: 760px) { .billing-plan-grid { grid-template-columns: 1fr; } }
#loginTenantSelect {
  display: none !important;
}
#adminTenantList .payment-indicator {
  display: block;
  padding: 3px 7px;
  border-radius: 5px;
  width: fit-content;
  margin-top: 3px;
  font-weight: 700;
}

.admin-tenant-filters {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.admin-tenant-filters label { color: var(--muted); font-weight: 700; }

.admin-tenant-filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--text);
  padding: 0 12px;
}

@media (max-width: 620px) {
  .admin-tenant-filters { grid-template-columns: 1fr; }
}
#adminTenantList .payment-paid { color: #86efac; background: rgba(34, 197, 94, .15); }
#adminTenantList .payment-pending { color: #facc15; background: rgba(234, 179, 8, .15); }
#adminTenantList .payment-overdue { color: #facc15; background: rgba(234, 179, 8, .18); animation: paymentBlink 1s infinite; }
#adminTenantList .payment-cancelled { color: #f87171; background: rgba(239, 68, 68, .18); animation: paymentBlink 1s infinite; }
.trial-countdown { display: inline-block; margin-left: 6px; color: #facc15; }
.trial-expired { color: #f87171; animation: paymentBlink 1s infinite; }
@keyframes paymentBlink { 50% { opacity: .35; } }

/* Painel administrativo no modo PWA/celular */
@media (max-width: 760px) {
  body.screen-admin .admin-tenant-form,
  body.screen-admin .admin-musician-form { grid-template-columns: 1fr !important; }
  body.screen-admin .admin-tenant-form > *,
  body.screen-admin .admin-musician-form > * { grid-column: 1 / -1 !important; width: 100%; min-width: 0; }
  body.screen-admin .admin-tenant-filters { grid-template-columns: 1fr auto !important; gap: 8px; }
  body.screen-admin .admin-tenant-filters label { grid-column: 1 / -1; }
  body.screen-admin .admin-tenant-filters select { width: 100%; min-width: 0; }
  body.screen-admin .admin-tenant-filters button { min-height: 38px; padding: 0 16px; border: 1px solid #8b5cff; border-radius: 9px; background: linear-gradient(135deg, #9b62ff, #5932d0); color: #fff; font-weight: 800; box-shadow: 0 5px 14px rgba(89,50,208,.28); }
}

.admin-tenant-filters button { min-height: 38px; padding: 0 18px; border: 1px solid #8b5cff; border-radius: 9px; background: linear-gradient(135deg, #9b62ff, #5932d0); color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 5px 14px rgba(89,50,208,.25); }
.admin-tenant-filters button:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* Tablets: evita que o formulário administrativo ultrapasse a largura da tela. */
@media (min-width: 761px) and (max-width: 1200px) {
  body.screen-admin .main-area { padding: 18px 20px 34px; overflow-x: hidden; }
  body.screen-admin .admin-view,
  body.screen-admin .admin-panel,
  body.screen-admin .admin-commercial-card { width: 100%; min-width: 0; box-sizing: border-box; }
  body.screen-admin .admin-tenant-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.screen-admin .admin-tenant-form > *,
  body.screen-admin .admin-musician-form > * { min-width: 0; width: 100%; box-sizing: border-box; }
  body.screen-admin .admin-tenant-form button.primary { grid-column: 1; }
  body.screen-admin .admin-tenant-filters { grid-template-columns: auto minmax(0, 1fr) auto; }
  body.screen-admin .admin-tenant-list { min-width: 0; }
  body.screen-admin .admin-tenant-item { min-width: 0; }
}
#loginPlanField { display: none !important; }
.scale-calendar { display: grid; gap: 10px; margin-top: 18px; }
.scale-history-tools { display: flex; gap: 10px; align-items: end; margin-top: 16px; }
.scale-history-tools label { display: grid; gap: 5px; color: var(--muted); font-weight: 800; }
.scale-history-tools input { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--paper); color: var(--text); }
.scale-history-tools button { min-height: 40px; padding: 0 14px; border-radius: 8px; background: var(--gold); color: #111; font-weight: 800; }
.scale-entry { display: grid; grid-template-columns: 110px 70px 1fr auto auto; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--text); }
.scale-entry small { color: var(--muted); }
.scale-pdf-brand,.scale-pdf-period,.scale-pdf-grid,.scale-pdf-card,.scale-pdf-empty,#printableScalePdf footer { display: none; }
.billing-plans { margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.billing-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.billing-plan-card { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--soft-paper, #11182e); color: var(--text); }
.billing-plan-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255,192,56,.25); }
.billing-plan-card span { color: var(--accent); font-weight: 900; font-size: 17px; }
.billing-plan-card strong { font-size: 27px; }.billing-plan-card strong small { font-size: 13px; color: var(--muted); }.billing-plan-card em { color: var(--muted); font-size: 12px; font-style: normal; }
.billing-plan-card button { min-height: 38px; border: 0; border-radius: 8px; background: var(--gold); color: #111; font-weight: 800; cursor: pointer; }.billing-plan-card button.secondary { background: var(--soft-button); color: var(--soft-button-text); }
@media (max-width: 760px) { .billing-plan-grid { grid-template-columns: 1fr; } }
.scale-entry button { min-width: 90px; min-height: 36px; padding: 7px 12px; border-radius: 8px; background: var(--soft-button); color: var(--soft-button-text); }
.scale-entry button[data-scale-remove] { background: #7f1d1d; color: #fecaca; border: 1px solid #b91c1c; }
.scale-entry button[data-scale-remove]:hover { background: #991b1b; color: #fff; }
@media (max-width: 760px) {
  .scale-view { padding: 14px 12px calc(92px + env(safe-area-inset-bottom)); }
  .scale-view .section-head h2 { font-size: 22px; }
  .scale-view #scaleForm { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .scale-view #scaleForm input,
  .scale-view #scaleForm button { min-height: 46px; width: 100%; }
  .scale-history-tools { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .scale-history-tools input,
  .scale-history-tools button { width: 100%; min-height: 46px; }
  .scale-entry { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
  .scale-entry strong { font-size: 14px; }
  .scale-entry em,
  .scale-entry b,
  .scale-entry small { grid-column: 1 / -1; }
  .scale-entry button { min-width: 0; width: 100%; min-height: 42px; }
}
@media (max-width: 650px) { .scale-entry { grid-template-columns: 1fr 1fr; } .scale-entry b, .scale-entry small { grid-column: 1 / -1; } }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #f7f8fc !important; color: #111827 !important; }
  body > * { visibility: hidden !important; }
  #view-escala, #view-escala * { visibility: visible !important; }
  #view-escala { display: block !important; position: absolute; inset: 0; padding: 0; background: #f7f8fc !important; color: #111827 !important; }
  #view-escala::before { content: "ADORARPRO  |  ESCALA DO LOUVOR"; display: block; padding: 18px 22px 10px; color: #4c1d95; font-size: 22px; font-weight: 900; letter-spacing: .04em; }
  #view-escala::after { content: "Equipe de louvor • documento de serviço"; display: block; position: absolute; top: 50px; left: 22px; color: #6b7280; font-size: 11px; }
  #view-escala .section-head { padding: 30px 22px 12px; border-bottom: 2px solid #7c3aed; }
  #view-escala .section-head h2 { color: #111827 !important; font-size: 24px; margin: 0; }
  #view-escala .section-head p { color: #6b7280 !important; margin: 4px 0 0; }
  #scaleForm, .scale-history-tools, .mobile-bottom-nav, .quick-cards, .scale-entry button { display: none !important; }
  .scale-calendar { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px 22px; }
  .scale-entry { display: grid !important; grid-template-columns: 88px 1fr; gap: 4px 12px; min-height: 86px; padding: 14px 16px; border: 0 !important; border-left: 5px solid #7c3aed !important; border-radius: 12px; background: #fff !important; color: #111827 !important; box-shadow: 0 3px 12px rgba(31, 24, 67, .10); break-inside: avoid; }
  .scale-entry strong { color: #4c1d95 !important; font-size: 14px; }
  .scale-entry span { color: #6b7280 !important; font-size: 12px; }
  .scale-entry em { grid-column: 1 / -1; color: #7c3aed !important; font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
  .scale-entry b { grid-column: 1 / -1; color: #111827 !important; font-size: 17px; }
  .scale-entry small { grid-column: 1 / -1; color: #6b7280 !important; font-size: 12px; }
  .scale-calendar .empty-state { grid-column: 1 / -1; padding: 30px; text-align: center; color: #6b7280 !important; background: #fff; border-radius: 12px; }
  #printableScalePdf, #printableScalePdf * { visibility: visible !important; }
  #printableScalePdf { display: block !important; position: absolute; inset: 0; padding: 18mm; background: #f7f8fc; color: #111827; font-family: Arial, Helvetica, sans-serif; }
  #printableScalePdf .scale-pdf-brand { display: block; color: #4c1d95; font-size: 24px; font-weight: 900; letter-spacing: .04em; }
  #printableScalePdf .scale-pdf-brand span { color: #6b7280; font-size: 10px; letter-spacing: .12em; margin-left: 8px; }
  #printableScalePdf h1 { margin: 30px 0 3px; font-size: 30px; color: #111827; }
  #printableScalePdf .scale-pdf-period { display: block; margin: 0 0 20px; color: #6b7280; font-size: 13px; }
  #printableScalePdf .scale-pdf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  #printableScalePdf .scale-pdf-card { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; min-height: 92px; padding: 15px; border-left: 5px solid #7c3aed; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(31, 24, 67, .10); break-inside: avoid; }
  #printableScalePdf .scale-pdf-date { color: #4c1d95; font-size: 14px; font-weight: 900; }
  #printableScalePdf .scale-pdf-date small { display: block; margin-top: 4px; color: #6b7280; font-size: 11px; font-weight: 400; }
  #printableScalePdf .scale-pdf-cult { grid-column: 2; color: #7c3aed; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
  #printableScalePdf strong { grid-column: 1 / -1; color: #111827; font-size: 17px; }
  #printableScalePdf .scale-pdf-card > span { grid-column: 1 / -1; color: #6b7280; font-size: 12px; }
  #printableScalePdf .scale-pdf-empty { display: block; grid-column: 1 / -1; padding: 35px; text-align: center; color: #6b7280; background: #fff; border-radius: 12px; }
  #printableScalePdf footer { display: block; position: absolute; bottom: 12mm; left: 18mm; right: 18mm; padding-top: 7px; border-top: 1px solid #d1d5db; color: #6b7280; font-size: 10px; }
}

/* Tema claro: contraste final e imagens sempre visíveis. */
:root[data-theme="light"] .main-area,
:root[data-theme="light"] .app-shell { color: #172033 !important; }
:root[data-theme="light"] .song-card,
:root[data-theme="light"] .artist-card,
:root[data-theme="light"] .dashboard-shortcuts > button { background: #ffffff !important; color: #172033 !important; border: 1px solid #cbd5e1 !important; }
:root[data-theme="light"] .song-card *,
:root[data-theme="light"] .artist-card *,
:root[data-theme="light"] .dashboard-shortcuts > button * { color: #172033 !important; text-shadow: none !important; }
:root[data-theme="light"] .song-meta,
:root[data-theme="light"] .artist-meta,
:root[data-theme="light"] .dashboard-shortcuts small { color: #475569 !important; }
:root[data-theme="light"] .song-cover,
:root[data-theme="light"] .artist-thumb { background: #dbeafe !important; opacity: 1 !important; }
:root[data-theme="light"] .song-cover img,
:root[data-theme="light"] .artist-thumb img,
:root[data-theme="light"] .top-artist-avatar img { display: block !important; opacity: 1 !important; visibility: visible !important; filter: none !important; }
:root[data-theme="light"] .today-card,
:root[data-theme="light"] .today-card h2,
:root[data-theme="light"] .today-card p,
:root[data-theme="light"] .today-card span,
:root[data-theme="light"] .sidebar-live-card,
:root[data-theme="light"] .sidebar-live-card strong,
:root[data-theme="light"] .sidebar-live-card span,
:root[data-theme="light"] .sidebar-install-card,
:root[data-theme="light"] .sidebar-install-card strong,
:root[data-theme="light"] .sidebar-install-card span,
:root[data-theme="light"] .sidebar-profile-card,
:root[data-theme="light"] .sidebar-profile-card strong,
:root[data-theme="light"] .sidebar-profile-card small { color: #172033 !important; text-shadow: none !important; }
:root[data-theme="light"] .today-card h2 { color: #1e293b !important; }
:root[data-theme="light"] .today-card p,
:root[data-theme="light"] .sidebar-live-card span,
:root[data-theme="light"] .sidebar-install-card span { color: #475569 !important; }
:root[data-theme="light"] .sidebar-live-card,
:root[data-theme="light"] .sidebar-install-card,
:root[data-theme="light"] .sidebar-profile-card { background: #ffffff !important; border-color: #cbd5e1 !important; }
.leader-musician-list { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border: 1px solid rgba(37,99,235,.35); border-radius: 10px; }
.leader-musician-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.leader-musician-row div { display: grid; gap: 2px; min-width: 0; }
.leader-musician-row span { font-size: 11px; color: var(--muted, #94a3b8); overflow: hidden; text-overflow: ellipsis; }
.leader-musician-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.leader-musician-action:hover { transform: translateY(-1px); filter: brightness(1.12); }
.leader-musician-action:focus-visible { outline: 2px solid #67e8f9; outline-offset: 2px; }
.leader-musician-action span { font-size: 16px; line-height: 0; color: inherit; }
.leader-musician-edit {
  border-color: rgba(96, 165, 250, .45);
  background: rgba(37, 99, 235, .22);
  color: #bfdbfe;
}
.leader-musician-delete {
  border-color: rgba(248, 113, 113, .42);
  background: rgba(185, 28, 28, .2);
  color: #fecaca;
}

@media (max-width: 520px) {
  .leader-musician-list { padding: 10px; }
  .leader-musician-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px; padding: 9px 0; }
  .leader-musician-action { min-width: 34px; min-height: 34px; padding: 0 8px; }
  .leader-musician-action span { font-size: 17px; }
}

/* O botão de retorno e os controles do teleprompter só existem visualmente na tela cheia. */
.fullscreen-exit-btn,
.fullscreen-scroll-controls {
  display: none !important;
}

body.fullscreen-active #view-reader .fullscreen-exit-btn {
  display: inline-flex !important;
}

body.fullscreen-active #view-reader .fullscreen-scroll-controls {
  display: inline-flex !important;
}

/* Leitor mobile: todos os controles devem permanecer acessíveis, inclusive o + da velocidade. */
@media (max-width: 520px) {
  #view-reader .reader-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #view-reader .reader-tools > * {
    min-width: 0;
  }

  #view-reader .reader-media,
  #view-reader .reader-tools,
  #view-reader .tuner-panel {
    transition: max-height .24s ease, opacity .2s ease, padding .24s ease, margin .24s ease, border-width .24s ease;
  }

  #view-reader.reader-controls-collapsed .reader-media,
  #view-reader.reader-controls-collapsed .reader-tools,
  #view-reader.reader-controls-collapsed .tuner-panel {
    max-height: 0 !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    opacity: 0;
    overflow: hidden !important;
    pointer-events: none;
  }
}
