body {
  font-family: 'DM Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #171717;
}
::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ff9200;
}

@keyframes pulse-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.beating {
  animation: pulse-beat 0.2s ease-out;
}

/* iOS: sem isso, o cabeçalho e o topo do menu lateral ficam colados sob
   o notch/status bar (viewport-fit=cover deixa o app desenhar por baixo
   dessa área, então quem desenha precisa empurrar o conteúdo pra baixo). */
.safe-top {
  padding-top: env(safe-area-inset-top, 0px);
}

@keyframes aviso-glow {
  0%, 100% { box-shadow: 0 0 0px 0px rgba(255, 152, 0, 0.55); }
  50% { box-shadow: 0 0 35px 8px rgba(255, 152, 0, 0.55); }
}
.aviso-pulsing {
  animation: aviso-glow 1.8s ease-in-out infinite;
}

/* Impressão / "Salvar como PDF" — esconde tudo, exceto o painel marcado
   como .print-area-active (ver js/print-helper.js), e força cores claras
   pra não gastar tinta imprimindo fundo escuro. */
@media print {
  body * {
    visibility: hidden;
  }
  .print-area-active,
  .print-area-active * {
    visibility: visible;
  }
  .print-area-active {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 16px;
    background: #0a0a0a;
  }
  .no-print {
    display: none !important;
  }
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #262626;
  border-radius: 9999px;
  height: 8px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff9800;
  cursor: pointer;
  transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.piano-key-white {
  background: #f5f5f5;
  border: 1px solid #d4d4d4;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  height: 140px;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  box-shadow: 0 4px 0 #d4d4d4;
}
.piano-key-white:active, .piano-key-white.active {
  background: #ff9800 !important;
  box-shadow: 0 2px 0 #b45309;
  transform: translateY(2px);
}
.piano-key-black {
  background: #171717;
  height: 90px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  box-shadow: 0 4px 0 #000;
}
.piano-key-black:active, .piano-key-black.active {
  background: #ec8800 !important;
  box-shadow: 0 2px 0 #78350f;
  transform: translateY(2px);
}

.btn-nav-active {
  background-color: rgba(255, 152, 0, 0.12) !important;
  color: #ff9800 !important;
  border-left: 4px solid #ff9800;
}

.fret-marker-active {
  background-color: #ff9800 !important;
  color: #000 !important;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
}

@keyframes expand-breath {
  0%, 100% { transform: scale(1); background-color: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.4); }
  50% { transform: scale(1.35); background-color: rgba(255, 152, 0, 0.15); border-color: rgba(255, 152, 0, 0.5); }
}
.breathing-guide-active {
  animation: expand-breath 4s infinite ease-in-out;
}
/* ==========================================================================
   Padrão visual do portal Oficina Ministerial (oficina-ministerial.web.app)
   Tokens: --ink #161616 · --panel #222222 · --panel-soft #2c2c2c ·
           --line rgba(255,255,255,.14) · laranja #ff9800 / #ec8800 / #ffa424
   ========================================================================== */
body.bg-neutral-950 {
  background-color: #161616;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}
header.bg-neutral-950\/90 { background-color: rgba(22, 22, 22, .88); }
#sidebar { background-color: #1b1b1b; }

/* Cartões: painel #222, linha clara, raio 16px e o brilho laranja do canto (como os cartões do portal) */
main .rounded-3xl.bg-neutral-900,
main section.rounded-3xl {
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.12);
  background-image: radial-gradient(120% 90% at 100% 0%, rgba(255, 152, 0, 0.07), transparent 60%);
  transition: border-color .25s ease;
}
main .rounded-3xl.bg-neutral-900:hover { border-color: rgba(255, 152, 0, 0.45); }
main .rounded-2xl.bg-neutral-900, main .rounded-2xl.bg-neutral-950 { border-color: rgba(255, 255, 255, 0.1); }

/* Títulos de seção do menu: laranja com o tracinho, como os rótulos (eyebrow) do portal */
#sidebar nav > p.uppercase {
  display: flex; align-items: center; gap: 8px;
  color: #ff9800; letter-spacing: .16em;
}
#sidebar nav > p.uppercase::before { content: ""; width: 14px; height: 2px; background: #ff9800; flex-shrink: 0; }
#sidebar nav > p.uppercase svg { display: none; }

/* Item ativo do menu no laranja do portal */
.btn-nav-active {
  background-color: rgba(255, 152, 0, 0.12) !important;
  color: #ff9800 !important;
  border-left-color: #ff9800 !important;
}
