/* Stage 3 interaction and responsive corrections. */
.filter-panel[hidden] { display: none !important; }
.more-button[hidden] { display: none; }
.ranking-workspace { min-height: 0; }
body[data-page="ranking"] .ranking-workspace { min-height: 500px; }
.site-footer a, .site-footer .footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.data-notice [data-retry] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  vertical-align: middle;
}
.data-notice [data-retry]:hover { border-color: var(--accent); }
body.filter-open { overflow: hidden; }

/* FF-49 2026-08-31: keep the intro animation on a child so interaction transforms stay authoritative. */
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 16px;
  transform: translateZ(0);
  transition: transform 180ms ease-out;
}
.brand-intro {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: inherit;
  border: 0;
  padding: 0;
  animation: brand-intro 220ms cubic-bezier(.22, 1, .36, 1) both;
}
.brand-mark {
  font: inherit;
  font-size: 18px;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .brand:hover { transform: translateY(-1px); }
}
.brand:active { transform: translateY(0); }
.brand:focus-visible:not(:active) { transform: translateY(-1px); }
@keyframes brand-intro {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .brand { transition: none; transform: none; }
  .brand-intro { animation: none; transform: none; }
  .brand:hover, .brand:focus-visible, .brand:active,
  .brand:focus-visible:not(:active) { transform: none; }
}
@media (max-width: 800px) {
  .ranking-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; padding: 14px 0; }
  .rank-rail { font-size: 15px; padding-left: 6px; }
  .rank-rail small { display: none; }
  .row-copy { grid-column: 2 / 4; min-width: 0; }
  .info-list { grid-column: 2; min-width: 0; }
  .row-action { grid-column: 3; grid-row: 3; min-height: 44px; display: flex; align-items: center; }
  .row-action a, .row-action button, .tool-name { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding: 0 4px; }
  .row-action a, .row-action button { min-width: 44px; justify-content: center; }
  .description { overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  body { overflow-x: hidden; }
  .icon-button { width: 44px; height: 44px; }
  .site-header nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .view-tabs button, .filter-trigger { min-height: 44px; }
  .filter-panel:not([hidden]) {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    margin: 0;
    padding: 20px max(16px, calc((100vw - 560px) / 2)) 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -12px 36px var(--shadow);
    max-height: 80vh;
    overflow: auto;
  }
  .filter-panel button { min-height: 44px; padding: 8px 12px; }
  .filter-panel select { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
  .filter-panel .text-button { min-height: 44px; margin-left: 0; justify-self: start; }
  body.filter-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(0, 0, 0, .5);
  }
  .method-note a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer div { gap: 4px 12px; }
}
@media (max-width: 420px) {
  .header-inner { gap: 6px; }
  .brand { flex: 0 0 auto; font-size: 15px; }
  .brand-mark { font-size: 16px; }
  .site-header nav { gap: 2px; }
  .site-header nav a { padding-inline: 2px; font-size: 13px; }
  .header-actions { gap: 4px; }
}
