.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head p,
.eyebrow {
  margin: 0;
  color: var(--muted);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2vw, 2.3rem);
}

#updates-genre .section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "title arrows"
    "controls controls";
  align-items: center;
}

#updates-genre .section-head > div:first-child {
  grid-area: title;
}

#updates-genre .section-head > .scroll-actions {
  grid-area: arrows;
  justify-self: end;
}

#updates-genre .section-head > .genre-header-actions {
  grid-area: controls;
  justify-self: end;
}

.scroll-actions {
  display: flex;
  gap: 10px;
}

.scroll-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  border: 0;
  background: var(--surface-soft);
  color: var(--blue-700);
  line-height: 1;
  vertical-align: middle;
}

.empty {
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px dashed rgba(59, 167, 248, 0.2);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
}

.title-tooltip-shell,
.update-title-shell {
  display: block;
  cursor: help;
}

.themed-title-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  max-width: min(320px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(59, 167, 248, 0.16);
  box-shadow: 0 18px 34px rgba(45, 97, 146, 0.14);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: normal;
  pointer-events: none;
  z-index: 80;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.themed-title-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

body.dark-theme .section-head p,
body.dark-theme .eyebrow {
  color: #9fb4d5;
}

body.dark-theme .scroll-actions button {
  background: rgba(29, 51, 82, 0.7);
  color: #d6e7ff;
}

body.dark-theme .themed-title-tooltip {
  background: rgba(18, 32, 51, 0.94);
  border-color: rgba(147, 167, 199, 0.14);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  color: #edf4ff;
}

body.dark-theme .empty {
  background: rgba(18, 32, 51, 0.8);
  color: #cbdaf0;
  border-color: rgba(147, 167, 199, 0.12);
}

@media (max-width: 767.98px) {
  .section-head {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 16px;
  }

  .section-head > :last-child {
    margin-left: auto;
  }

  #updates-genre .section-head {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "title arrows"
      "controls controls";
    align-items: center;
  }

  #updates-genre .section-head > div:first-child {
    grid-area: title;
  }

  #updates-genre .section-head > .scroll-actions {
    grid-area: arrows;
    justify-self: end;
  }

  #updates-genre .section-head > .genre-header-actions {
    grid-area: controls;
    margin-left: 0;
  }

  .section-head > div:first-child {
    flex: 0 0 auto;
    min-width: 0;
  }

  .section-head h2 {
    font-size: clamp(0.96rem, 4.5vw, 1.2rem);
    line-height: 1.08;
    white-space: nowrap;
  }

  .section-head .scroll-actions {
    flex: 0 0 auto;
  }

  .scroll-actions {
    gap: 6px;
  }

  .scroll-actions button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.9rem;
  }
}
