/* ========================================================================
   LIBRARY HEADER (with "+ Свій матеріал" button)
   ======================================================================== */
.library-header {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ========================================================================
   UNIVERSAL FEEDBACK BUTTON (every screen, fixed bottom-right)
   ======================================================================== */
.feedback-fab {
  position: fixed; right: 0.9rem; bottom: 0.9rem; z-index: 1000;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 0.85rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--card-bg); color: var(--fg);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08); opacity: 0.78;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}
.feedback-fab:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.feedback-fab svg { opacity: 0.7; }
/* Mobile: smaller footprint, lifted off the bottom toolbar so it doesnt cover
   the audio controls on the practice page. */
@media (max-width: 480px) {
  .feedback-fab { bottom: 4.5rem; right: 0.5rem; padding: 0.4rem 0.55rem; opacity: 0.55; }
  .feedback-fab span { display: none; }
}
.feedback-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1001;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.feedback-modal-box {
  background: var(--card-bg); border-radius: 12px; padding: 1.25rem 1.1rem 1.1rem;
  max-width: 440px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.feedback-modal-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.25rem; }
.feedback-modal-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.feedback-modal textarea {
  width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; resize: vertical; min-height: 84px;
}
.feedback-modal-row { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }
.feedback-thanks { margin-top: 0.75rem; text-align: center; color: var(--success); font-weight: 600; }

.game-help-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1001; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.game-help-box { position: relative; max-width: 420px; width: 100%; background: var(--card-bg, #fff); color: var(--fg); border-radius: 12px; padding: 1.2rem 1.1rem; box-shadow: 0 8px 32px rgba(0,0,0,0.25); max-height: 80vh; overflow-y: auto; }
.game-help-close { position: absolute; top: 4px; right: 10px; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; }
.game-help-title { margin: 0 0 0.6rem; font-size: 1.05rem; }
.game-help-body h4 { margin: 0.7rem 0 0.25rem; font-size: 0.95rem; }
.game-help-body p { margin: 0 0 0.5rem; font-size: 0.88rem; line-height: 1.4; }
.game-help-body .game-help-tag { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #fff; margin-right: 0.35rem; }
.game-help-body .game-help-tag.g0 { background: #ef4444; }
.game-help-body .game-help-tag.g1 { background: #3b82f6; }
.game-help-body .game-help-tag.g2 { background: #22c55e; }
