/* ── FIRELINK SHRINE — RESPONSIVE (mobile additions) ── */

/* ── MOBILE: até 600px ── */
@media (max-width: 600px) {

  /* Padding lateral */
  .page {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* Título principal */
  .h-title {
    font-size: clamp(20px, 7vw, 32px) !important;
    letter-spacing: 0.08em !important;
  }

  /* Oath */
  .oath {
    padding: 1.75rem 1.25rem !important;
  }
  .oath-title {
    font-size: clamp(15px, 5vw, 20px) !important;
  }
  .lore {
    flex-direction: column !important;
    gap: 8px !important;
    text-align: center !important;
  }
  .lore-line { display: none !important; }

  /* Card grid (index) — 2 colunas */
  .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Semester grid (estacio) — 2 colunas */
  .sem-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── DONT YOU DARE GO HOLLOW — leituras: 1 coluna no mobile ── */
  .reading-grid {
    grid-template-columns: 1fr !important;
  }
  .reading-card {
    padding: 1.1rem 1rem !important;
  }

  /* rotina_referencia — anchors e moments: 1 coluna */
  .anchors-row {
    grid-template-columns: 1fr !important;
  }
  .moments-row {
    grid-template-columns: 1fr !important;
  }

  /* week-grid: scroll horizontal */
  .week-grid {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 0 !important;
  }
  .day-col {
    min-width: 110px !important;
    flex-shrink: 0 !important;
  }

  /* plano_estudos — disciplinas: 2 colunas */
  .disc-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* week-body calendário: scroll horizontal */
  .week-body {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .week-body > * {
    min-width: 90px !important;
    flex-shrink: 0 !important;
  }
  /* check-row: 2 colunas */
  .check-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* rules-row: 1 coluna */
  .rules-row {
    grid-template-columns: 1fr !important;
  }
  /* maint-grid: 2 colunas */
  .maint-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── ROTINA DA CASA — calendário: scroll horizontal ── */
  /* CORRIGIDO: era .cal-week mas a classe real é .cal-week-row */
  .cal-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .cal-header-row,
  .cal-week-row {
    min-width: 540px !important;
  }

  /* Legend */
  .legend {
    flex-wrap: wrap !important;
    gap: 6px 14px !important;
  }
  /* Footer bar */
  .footer-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  /* h-meta */
  .h-meta {
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* Botão de voltar (shrine-back.js) */
  #shrine-back {
    padding: 7px 10px !important;
  }

  /* Textos secundários */
  .section-title { font-size: 12px !important; }
  .card-tag, .sem-tag { font-size: 11px !important; }
}

/* ── TABLET: 601–768px ── */
@media (min-width: 601px) and (max-width: 768px) {
  .page {
    padding-left: 1.75rem !important;
    padding-right: 1.75rem !important;
  }
  .sem-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .disc-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .anchors-row,
  .moments-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  /* leituras: 2 colunas no tablet */
  .reading-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cal-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .cal-header-row,
  .cal-week-row {
    min-width: 540px !important;
  }
  .week-grid {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}
