/* ═══════════════════════════════════════════════════════════════
   RESPONSIVO — Media queries agrupadas
   ═══════════════════════════════════════════════════════════════ */

/* ─── MOBILE ESTREITO (até 600px) ─── */
@media (min-width: 600px) {
  .btn-tempo .tempo-cidade { display: inline; }
}

@media (max-width: 600px) {
  .header-tools { top: 10px; left: 10px; right: 10px; }
  .btn-tempo { padding: 5px 10px; font-size: 11px; }
  .btn-tempo .tempo-emoji { font-size: 14px; }
  .btn-tempo .tempo-temp { font-size: 12px; }
  .btn-relogio { padding: 5px 9px; font-size: 11px; }
  .btn-notif { padding: 5px 10px; font-size: 11px; }
  .btn-notif #notif-txt { display: none; }
  .saudacao { font-size: 12px; margin-top: 4px; }

  header .logo-radio { max-width: 280px; margin-bottom: 12px; margin-top: 10px; }
  header .nome-radio { font-size: 13px; letter-spacing: 2px; }
  header .nome-cidade {
    font-size: clamp(12px, 5.5vw, 32px);
    letter-spacing: clamp(0.5px, 0.4vw, 2px);
    white-space: nowrap;
  }
  #back-to-top { width: 46px; height: 46px; font-size: 20px; bottom: 40px; right: 20px; }

  .ms-sudoku-grid { max-width: 100%; }
  .ms-sudoku-cell { font-size: clamp(12px, 4.5vw, 18px); }
  .ms-dito-letra { width: 40px; height: 48px; font-size: 20px; }
  .ms-dito-input { font-size: 16px; letter-spacing: 2px; }
  .ms-caca-cell { font-size: clamp(9px, 2.5vw, 14px); }
  .ms-transito-frame { height: 260px; }
}

/* ─── TABLET/DESKTOP (a partir 769px) ─── */
@media (min-width: 769px) {
  .ms-sudoku-grid { max-width: 320px; }
  .ms-jogo-card { max-width: 600px; margin-left: auto; margin-right: auto; }
  .ms-caca-wrap { max-width: 420px; }
  .ms-caca-grid { max-width: 420px; margin-left: auto; margin-right: auto; }
}

/* ─── MOBILE TABS + TICKER (até 768px) ─── */
@media (max-width: 768px) {
  #ms-ticker-wrap .ms-tabs-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    padding: 8px;
    mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  }
  #ms-ticker-wrap .ms-tabs-bar::-webkit-scrollbar { display: none; }
  #ms-ticker-wrap .ms-tabs-bar.dragging { cursor: grabbing; }
  #ms-ticker-wrap .ms-tab-btn {
    flex: 0 0 auto !important;
    max-width: none !important;
    width: auto;
    min-height: 60px;
    padding: 8px 14px;
    font-size: 11px;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    flex-direction: column !important;
  }
  #ms-ticker-wrap .ms-tab-btn .ms-tab-icon { font-size: 40px; }
  #ms-ticker-wrap .ms-tab-btn > span:last-child { font-size: 10px; }
  #ms-ticker-wrap .ms-tab-btn:nth-child(n+9) { flex: 0 0 auto !important; max-width: none !important; }

  #ms-ticker-wrap .ticker-content-wrapper { flex-direction: column; min-height: auto; }
  #ms-ticker-wrap .ticker-prefix {
    padding: 12px 10px !important;
    justify-content: center !important;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    min-height: 70px;
    width: 100%;
    gap: 8px;
    flex-direction: row;
  }
  #ms-ticker-wrap .mjc-logo { height: 50px; max-width: 80px; }
  #ms-ticker-wrap .flash-upgrade { font-size: 14px !important; }
  #ms-ticker-wrap .brand-text { font-size: 9px; }
  #ms-ticker-wrap .live-dot { margin-top: 0; }
  #ms-ticker-wrap .thumb-wrapper {
    width: 100%;
    height: 300px !important;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  #ms-ticker-wrap .news-stage { min-height: 300px; display: block; }
  #ms-ticker-wrap .news-entry { position: relative; display: none !important; inset: auto; }
  #ms-ticker-wrap .news-entry.active { display: flex !important; flex-direction: column; position: relative; inset: auto; }
  #ms-ticker-wrap .news-headline {
    padding: 14px 16px 20px 16px;
    min-height: 300px;
    height: auto;
    gap: 6px;
    justify-content: flex-start;
    overflow: visible !important;
  }
  #ms-ticker-wrap .line-2 { font-size: 1.45rem !important; text-align: left !important; line-height: 1.35 !important; -webkit-line-clamp: 4 !important; }
  #ms-ticker-wrap .line-news-body { font-size: 1.1rem !important; line-height: 1.6 !important; -webkit-line-clamp: 4 !important; }
  #ms-ticker-wrap .news-date-time { margin-left: 0; }
  #ms-ticker-wrap .ms-grid-body { padding: 12px; gap: 12px; }
  #ms-ticker-wrap .ms-grid-item { gap: 12px; padding: 10px; }
  #ms-ticker-wrap .ms-grid-item img { width: 90px; height: 90px; }
  #ms-ticker-wrap .ms-grid-item-title { font-size: 1rem !important; -webkit-line-clamp: 4 !important; }
  #ms-ticker-wrap .ms-grid-item-meta { font-size: 0.8rem !important; }
  #ms-ticker-wrap .ms-loteria-item { padding: 16px 14px; }
  #ms-ticker-wrap .ms-loteria-name { font-size: 1.05rem !important; }
  #ms-ticker-wrap .ms-loteria-dezena { min-width: 40px; height: 40px; font-size: 0.92rem !important; }
  .ms-news-modal { max-height: 92vh; border-radius: 14px; }
  .ms-news-modal-image { height: 200px; }
  .ms-news-modal-body { padding: 18px 18px 24px 18px; }
  .ms-news-modal-title { font-size: 1.15rem; }
  .ms-news-modal-text { font-size: 1.02rem; line-height: 1.65; padding: 14px 14px; }

  #ms-grid-evento .ms-grid-item { padding: 8px !important; gap: 10px !important; }
  #ms-grid-evento .ms-grid-item img {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
  }
  #ms-grid-evento .ms-grid-item-title { font-size: 1rem !important; -webkit-line-clamp: 4 !important; }
  #ms-grid-evento .ms-grid-item-meta { font-size: 0.8rem !important; }
}

/* ─── MOBILE MUITO ESTREITO (até 480px) ─── */
@media (max-width: 480px) {
  #ms-ticker-wrap .thumb-wrapper { height: 260px !important; }
  #ms-ticker-wrap .news-stage { min-height: 260px; }
  #ms-ticker-wrap .news-headline { padding: 12px 12px 16px 12px; min-height: 260px; }
  #ms-ticker-wrap .line-2 { font-size: 1.3rem !important; line-height: 1.35 !important; }
  #ms-ticker-wrap .line-news-body { font-size: 1.05rem !important; line-height: 1.6 !important; }
  #ms-ticker-wrap .mjc-logo { height: 36px; max-width: 70px; }
  #ms-ticker-wrap .flash-upgrade { font-size: 13px !important; }
  #ms-ticker-wrap .ms-grid-item img { width: 80px; height: 80px; }
  #ms-ticker-wrap .ms-grid-item-title { font-size: 0.95rem !important; line-height: 1.38 !important; }
  #ms-ticker-wrap .ms-grid-item-meta { font-size: 0.78rem !important; }
  #ms-ticker-wrap .ms-loteria-name { font-size: 1rem !important; }
  #ms-ticker-wrap .ms-loteria-dezena { min-width: 36px; height: 36px; font-size: 0.88rem !important; }
  .ms-news-modal { max-height: 94vh; }
  .ms-news-modal-image { height: 160px; }
  .ms-news-modal-body { padding: 16px 14px 20px 14px; }
  .ms-news-modal-title { font-size: 1.05rem; }
  .ms-news-modal-text { font-size: 1rem; line-height: 1.65; }
  .ms-news-modal-close { top: 10px; right: 10px; width: 32px; height: 32px; font-size: 18px; }

  #ms-grid-evento .ms-grid-item img {
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
  }
  #ms-grid-evento .ms-grid-item-title { font-size: 0.95rem !important; line-height: 1.38 !important; }
  #ms-grid-evento .ms-grid-item-meta { font-size: 0.78rem !important; }
}

/* ─── MOBILE — Aproveitar melhor a tela ─── */
@media (max-width: 600px) {
  .container {
    padding: 0 8px;
  }
  .secao {
    padding: 12px;
  }
  .player-card {
    padding: 12px;
  }
  .now-playing {
    padding: 12px 14px;
  }
  .secao h2 {
    font-size: 20px;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
}