/* Mobile science library: compact two-column view with an explicit standard fallback. */

.sc-view-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.sc-view-row .sc-search-count { margin: 0; }
.sc-view-switch { display: none; flex: none; margin-left: auto; gap: 2px; padding: 2px; border: 1px solid #d9e1cf; border-radius: 20px; background: #eff2e7; }
.sc-view-switch button { min-height: 32px; padding: 4px 10px; border: 0; border-radius: 16px; background: transparent; color: #64745a; font: inherit; font-size: 11px; line-height: 1.4; cursor: pointer; }
.sc-view-switch button[aria-pressed="true"] { background: #4d7159; color: #fff; }
.sc-view-switch button:focus-visible { outline: 2px solid #ad572d; outline-offset: 2px; }

@media (max-width: 760px) {
  .sc-view-row { flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
  .sc-view-switch { display: inline-flex; }

  html.science-compact .sc-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  html.science-compact .sc-article-card { position: relative; min-height: 0; padding: 11px 11px 10px; border-radius: 14px; }
  html.science-compact .sc-article-top { min-height: 17px; margin-bottom: 6px; gap: 4px; }
  html.science-compact .sc-tag,
  html.science-compact .sc-featured,
  html.science-compact .sc-audio { padding: 1px 5px; font-size: 8.5px; line-height: 1.55; }
  html.science-compact .sc-article-card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; margin: 0 0 5px; font-size: 13px; line-height: 1.45; }
  html.science-compact .sc-article-card .sc-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0 0 7px; color: #727b68; font-size: 11px; line-height: 1.5; }
  html.science-compact .sc-article-meta { display: flex; flex-wrap: wrap; gap: 1px 5px; padding: 0 38px 0 0; color: #7a816f; font-size: 9px; line-height: 1.45; }
  html.science-compact .sc-article-meta time { display: inline; }
  html.science-compact .sc-article-actions { position: absolute; right: 4px; bottom: 4px; top: auto; margin: 0; padding: 0; border: 0; gap: 0; }
  html.science-compact .sc-article-actions > a { display: none; }
  html.science-compact .sc-article-actions .fav-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #6b7d5e; font-size: 0; }
  html.science-compact .sc-article-actions .fav-btn::before { content: "☆"; display: block; font-size: 19px; line-height: 1; }
  html.science-compact .sc-article-actions .fav-btn.on { border: 0; background: transparent; color: #a4742e; }
  html.science-compact .sc-article-actions .fav-btn.on::before { content: "★"; }
  html.science-compact .sc-article-card .article-card-link { min-width: 0; }
}

@media (min-width: 600px) and (max-width: 760px) {
  html.science-compact .sc-article-card { padding: 14px; }
  html.science-compact .sc-article-card h3 { font-size: 15px; }
  html.science-compact .sc-article-card .sc-summary { font-size: 12px; }
  html.science-compact .sc-tag,
  html.science-compact .sc-featured,
  html.science-compact .sc-audio { font-size: 9px; }
  html.science-compact .sc-article-meta { font-size: 10px; }
}

@media (max-width: 359px) {
  html.science-compact .sc-article-grid { gap: 8px; }
  html.science-compact .sc-article-card { padding: 10px 10px 9px; }
  html.science-compact .sc-article-card h3 { font-size: 12.5px; line-height: 1.4; -webkit-line-clamp: 7; }
  html.science-compact .sc-article-card .sc-summary { font-size: 10.5px; line-height: 1.45; }
  html.science-compact .sc-tag,
  html.science-compact .sc-featured,
  html.science-compact .sc-audio { font-size: 8px; }
  html.science-compact .sc-article-meta { padding-right: 34px; font-size: 8.5px; }
  html.science-compact .sc-article-actions .fav-btn { width: 36px; height: 36px; min-height: 36px; }
}
