:root {
  color-scheme: light dark;
  --bg: #f4f5f1;
  --panel: #ffffff;
  --panel-soft: #f8f9f5;
  --side-panel: #fbfcf8;
  --control: #ffffff;
  --ink: #171914;
  --brand-ink: #171914;
  --brand-contrast: #ffffff;
  --badge-ink: #ffffff;
  --muted: #62685b;
  --line: #d9ddd1;
  --active-bg: #e8f3ee;
  --active-ink: #0f4f3a;
  --hover-line: #8fbba8;
  --poster-bg: #dfe4d8;
  --detail-copy: #30342d;
  --green: #287a5d;
  --teal: #0f766e;
  --blue: #326ca8;
  --amber: #a76618;
  --common-bg: #fbf0dc;
  --common-ink: #6b3f08;
  --common-label-ink: #fff;
  --red: #b64343;
  --shadow: 0 10px 32px rgba(25, 29, 20, 0.08);
  --row-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111417;
    --panel: #1a1f24;
    --panel-soft: #232a30;
    --side-panel: #151a1e;
    --control: #171d22;
    --ink: #f0f3ef;
    --brand-ink: #f0f3ef;
    --brand-contrast: #101316;
    --badge-ink: #101316;
    --muted: #a5ada6;
    --line: #343d44;
    --active-bg: #163a31;
    --active-ink: #b9ead9;
    --hover-line: #4a806e;
    --poster-bg: #2a3238;
    --detail-copy: #d4d9d3;
    --green: #52b58e;
    --teal: #41b7aa;
    --blue: #6aa1dd;
    --amber: #d19545;
    --common-bg: #3a2c16;
    --common-ink: #f1cf98;
    --common-label-ink: #1a1408;
    --red: #ee7777;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    --row-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
a,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.filter-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: var(--side-panel);
}

.brand-row,
.toolbar,
.feed-header,
.release-main,
.meta-row,
.range-row,
.toolbar-actions,
.summary-item,
.detail-title-row {
  display: flex;
  align-items: center;
}

.brand-row {
  gap: 12px;
  margin-bottom: 24px;
}

/* The logo (direction 5, 2026-10-15) keeps its dark tile in both themes; source: favicon.svg. */
.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.1;
}

.brand-row p,
.eyebrow,
.field span,
.filter-section h2,
.feed-header,
.active-filters,
.release-meta,
.detail-meta,
.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.field,
.filter-section {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field span,
.filter-section h2 {
  font-weight: 700;
  text-transform: uppercase;
}

.input-shell {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}

.input-shell svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

/* Search box: the magnifier becomes a spinner while a search is in flight. */
.search-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.search-icon > * {
  grid-area: 1 / 1;
}

.search-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: search-spin 0.8s linear infinite;
}

.is-searching .search-spinner {
  display: block;
}

.is-searching .search-icon svg {
  visibility: hidden;
}

@keyframes search-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .search-spinner { animation-duration: 2.4s; }
}

.search-status {
  min-height: 16px;
  margin: -12px 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.search-status:empty {
  display: none;
}

.search-status.warning {
  color: var(--amber);
}

.search-status[data-phase="error"] {
  color: var(--red);
}

input[type="search"],
input[type="date"],
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
}

input[type="search"] {
  border: 0;
  outline: 0;
}

select {
  height: 40px;
  padding: 0 10px;
}

input[type="date"] {
  height: 40px;
  padding: 0 10px;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compact-field {
  margin-bottom: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.segmented.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented button,
.chip,
.filter-pill {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  cursor: pointer;
}

.segmented button.active,
.chip.active {
  border-color: var(--green);
  background: var(--active-bg);
  color: var(--active-ink);
  font-weight: 700;
}

.range-row {
  gap: 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

output {
  width: 34px;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 9px;
  font-size: 13px;
}

.release-workspace {
  min-width: 0;
  padding: 22px;
}

.toolbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.toolbar h2 {
  margin-top: 2px;
  font-size: 28px;
  line-height: 1.1;
}

.toolbar-actions {
  gap: 8px;
}

.user-chip {
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: 160px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

/* FOMO picks / Everything, above the summary on the releases timeline. */
.picks-toggle {
  max-width: 320px;
  margin-bottom: 12px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary-item {
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.active-filters {
  min-height: 28px;
  margin-bottom: 12px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  margin: 0 6px 6px 0;
  padding: 3px 8px;
  background: var(--control);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.feed-panel,
.detail-panel {
  min-width: 0;
}

.feed-header {
  justify-content: space-between;
  padding: 0 2px 8px;
}

.release-list {
  display: grid;
  gap: 8px;
}

.date-break {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.release-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 82px;
  gap: 12px;
  min-height: 116px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--row-shadow);
  cursor: pointer;
}

.person-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 72px;
  gap: 12px;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--row-shadow);
  cursor: pointer;
}

.release-row:hover,
.release-row.selected,
.person-row:hover,
.person-row.selected {
  border-color: var(--hover-line);
  box-shadow: var(--shadow);
}

.person-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--active-bg);
  color: var(--active-ink);
  font-weight: 900;
}

.person-avatar.large {
  width: 64px;
  height: 64px;
  font-size: 26px;
}

.person-row-main {
  min-width: 0;
}

.poster {
  width: 76px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--poster-bg);
}

.release-main {
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.release-title {
  min-width: 0;
}

.release-title h3 {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.type-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--badge-ink);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.type-movie {
  background: var(--green);
}

.type-tv {
  background: var(--blue);
}

.type-music {
  background: var(--amber);
}

.type-book {
  background: var(--teal);
}

.type-person {
  background: var(--green);
}

.muted-badge {
  background: var(--muted);
}

.meta-row {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.detail-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.review-label-panel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.review-reason-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.review-label-panel textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
}

.review-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-action-row button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.review-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* People graph review: a record's group letters, evidence links that can be marked wrong. */
.credit-list.review-list {
  max-height: none;
}

.review-record strong {
  white-space: normal;
}

.review-groups {
  margin-top: 8px;
}

.review-edge {
  cursor: pointer;
}

.credit-row .review-edge-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  white-space: nowrap;
}

.meta-token {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.person-link {
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.person-link:hover,
.person-link:focus-visible {
  border-color: var(--green);
  background: var(--active-bg);
  color: var(--active-ink);
}

/* Groupings, dates, sources and credits open the matching view (see navLink in app.js). */
a.token-link,
button.token-link {
  text-decoration: none;
  cursor: pointer;
}

.meta-token.token-link {
  border: 1px solid transparent;
  font: inherit;
  font-size: 12px;
}

.meta-token.token-link:hover,
.meta-token.token-link:focus-visible {
  border-color: var(--green);
  background: var(--active-bg);
  color: var(--active-ink);
}

.inline-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--green);
  text-decoration-color: currentColor;
}

a.type-badge:hover,
a.type-badge:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.detail-hero-link {
  display: block;
  cursor: zoom-in;
}

.score-stack {
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: right;
}

.score {
  font-size: 24px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.score.good {
  color: var(--green);
}

.score.hot {
  color: var(--red);
}

.release-meta {
  display: grid;
  gap: 4px;
}

.dense .release-row {
  grid-template-columns: 44px minmax(0, 1fr) 72px;
  min-height: 72px;
}

.dense .poster {
  width: 44px;
  height: 52px;
}

/* Why a release scores: the strongest signals ("Directed by …", "Part of …"). */
.score-reasons {
  margin-top: 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.score-why {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--active-bg);
}

.score-why ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--active-ink);
  font-size: 14px;
  line-height: 1.45;
}

.dense .overview,
.dense .meta-row {
  display: none;
}

/* Pinned beside the list, so it scrolls on its own when taller than the window. */
.detail-panel {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.person-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-detail-header h3 {
  font-size: 20px;
  line-height: 1.15;
}

.detail-hero {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--poster-bg);
}

.detail-title-row {
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.detail-title-row h3 {
  font-size: 20px;
  line-height: 1.15;
}

.detail-meta {
  margin-top: 6px;
}

.detail-overview {
  margin-top: 12px;
  color: var(--detail-copy);
  font-size: 14px;
  line-height: 1.5;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.stat {
  padding: 10px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.stat-value {
  display: block;
  margin-top: 3px;
  font-weight: 800;
}

.stat-value small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.external-links a {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.external-links a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.credit-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 48vh;
  overflow: auto;
}

.credit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.credit-row strong,
.credit-row span {
  display: block;
}

.credit-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.auth-body {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.auth-panel {
  width: min(100%, 390px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-brand {
  margin-bottom: 22px;
}

.login-form {
  display: grid;
  gap: 2px;
}

.login-form .input-shell {
  grid-template-columns: 18px minmax(0, 1fr);
}

/* Fields without an icon must not be squeezed into the 18px icon column. */
.input-shell > input:only-child {
  grid-column: 1 / -1;
}

.login-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: var(--badge-ink);
  cursor: pointer;
  font-weight: 800;
}

.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.google-button svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.hidden {
  display: none !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button svg {
  width: 18px;
  height: 18px;
}

.auth-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.auth-message.error {
  color: var(--red);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-panel {
    position: static;
    max-height: none;
  }
}

.sheet-backdrop,
.sheet-close {
  display: none;
}

/* Narrow screens: the detail panel is a bottom sheet over the list. */
@media (max-width: 1120px) {
  .content-grid .detail-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: 88vh;
    height: 88dvh;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 60px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }

  body.detail-open .content-grid .detail-panel {
    transform: none;
    visibility: visible;
    transition: transform 0.22s ease;
  }

  body.detail-open {
    overflow: hidden;
  }

  body.detail-open .sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(0, 0, 0, 0.45);
  }

  body.detail-open .sheet-close {
    display: inline-flex;
    position: fixed;
    top: calc(12vh + 10px);
    top: calc(12dvh + 10px);
    right: 14px;
    z-index: 41;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-grid .detail-panel {
    transition: none !important;
  }
}

/* Phones only: the Filters button and the "Show results" button at the panel's end. */
.filters-toggle,
.filters-done {
  display: none;
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  /* The list comes first: logo, search and the view switch stay; the other filters
     fold behind the Filters button (app.js renderFiltersToggle). */
  .filter-panel {
    padding: 14px 16px 12px;
  }

  .filter-panel .brand-row {
    margin-bottom: 12px;
  }

  .filter-panel:not(.filters-open) > :not(.brand-row, .search-field, .search-status, .view-section, .filters-toggle) {
    display: none;
  }

  .search-field > span,
  .view-section h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .search-field,
  .view-section {
    margin-bottom: 10px;
  }

  .view-section .segmented {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }

  .filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--control);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
  }

  .filters-toggle svg {
    width: 16px;
    height: 16px;
  }

  .filter-panel.filters-open .filters-toggle {
    margin-bottom: 18px;
    border-color: var(--green);
    background: var(--active-bg);
    color: var(--active-ink);
  }

  .filters-count {
    margin-left: auto;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--green);
    color: var(--badge-ink);
    font-size: 12px;
    text-align: center;
  }

  .filter-panel.filters-open .filters-done {
    display: block;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: var(--brand-contrast);
    font-weight: 700;
    cursor: pointer;
  }

  /* The account chip and icons wrap under the title instead of widening the page. */
  .toolbar {
    flex-wrap: wrap;
  }

  .toolbar-actions {
    flex-wrap: wrap;
    min-width: 0;
  }

  .user-chip {
    max-width: 140px;
  }

  .filter-panel {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .release-workspace {
    padding: 16px;
  }

  /* Summary counts: one compact row that scrolls sideways. */
  .summary-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .summary-item {
    flex: 0 0 auto;
    gap: 8px;
    min-height: 0;
    padding: 6px 10px;
  }

  .summary-value {
    font-size: 16px;
  }

  .release-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .poster {
    width: 58px;
    height: 78px;
  }

  .score-stack {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: space-between;
    text-align: left;
  }

  .toolbar h2 {
    font-size: 24px;
  }
}

.feedback-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.feedback-dialog::backdrop {
  background: rgba(10, 12, 9, 0.45);
}

.feedback-dialog h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.feedback-hint,
.feedback-footer {
  color: var(--muted);
  font-size: 13px;
}

.feedback-hint {
  margin: 0 0 12px;
}

.feedback-dialog textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.feedback-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.feedback-status.error {
  color: var(--red);
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.account-methods {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.account-method {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.account-method-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.account-method-head span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-method input {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
}

.account-method .chip {
  justify-self: start;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.link-banner {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hover-line);
  border-radius: 8px;
  background: var(--active-bg);
  color: var(--active-ink);
}

.link-banner p {
  margin: 0;
}

/* Following: whose follow put an entry on the timeline, follow controls and sharing. */
.follow-badge {
  display: flex;
  gap: 6px;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  width: fit-content;
}

.follow-badge strong {
  flex: 0 0 auto;
}

/* One line; the full list is in the tooltip and the detail panel. */
.follow-badge span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follow-badge.follow-you {
  background: var(--active-bg);
  color: var(--active-ink);
  border-color: var(--green);
}

.follow-badge.follow-shared {
  background: var(--panel-soft);
  color: var(--ink);
  border-style: dashed;
}

/* In common: you and a friend both follow something on it. Amber, so it reads apart
   from your own (green) and a friend's (dashed) entries. */
.follow-badge.follow-both {
  background: var(--common-bg);
  color: var(--common-ink);
  border: 1px solid var(--amber);
  font-weight: 600;
}

.in-common-label {
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--common-label-ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.release-row.in-common {
  border-color: var(--amber);
  background: linear-gradient(90deg, var(--common-bg), var(--panel) 45%);
  box-shadow: inset 4px 0 0 var(--amber), var(--row-shadow);
}

.release-row.in-common:hover,
.release-row.in-common.selected {
  box-shadow: inset 4px 0 0 var(--amber), var(--shadow);
}

.follow-reasons {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
}

.follow-controls {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.follow-actions,
.share-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.share-form input,
.username-form input {
  flex: 1 1 200px;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
}

.follow-status {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.follow-status.error {
  color: var(--danger, #b3261e);
}

.follow-manager {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.follow-manager summary {
  cursor: pointer;
  font-weight: 700;
}

.follow-manager h4 {
  margin: 14px 0 4px;
  font-size: 13px;
}

.follow-hint {
  margin: 6px 0;
  font-size: 12px;
  color: var(--muted);
}

.follow-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.follow-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.follow-roles {
  color: var(--muted);
  font-size: 12px;
}

.timeline-more {
  display: block;
  margin: 8px auto;
}

.timeline-today {
  margin: 12px 0 4px;
  padding: 4px 0;
  border-top: 2px solid var(--green);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.credit-filter-label {
  display: block;
  margin-top: 14px;
}

.inline-follow {
  display: inline-flex;
  margin-left: 8px;
}

/* Bands and artists matching a search, and the header of an artist's releases. */
.artist-strip {
  margin-bottom: 12px;
}

.artist-strip h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.artist-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.artist-card {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.artist-card .artist-name {
  font-weight: 800;
  font-size: 15px;
}

.artist-heading h3 {
  font-size: 22px;
}

.artist-meta,
.artist-comment {
  color: var(--muted);
  font-size: 12px;
}

.artist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.artist-actions .inline-follow {
  margin-left: 0;
}

/* The logo goes home (the default view); the × clears the search. */
.brand-home {
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}

.brand-home:hover h1,
.brand-home:focus-visible h1 {
  color: var(--green);
}

#searchShell {
  grid-template-columns: 18px minmax(0, 1fr) auto;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-clear:hover,
.search-clear:focus-visible {
  background: var(--panel-soft);
  color: var(--ink);
}

.search-clear.hidden {
  display: none;
}

/* Our own × replaces the browser's search cancel button where there is one. */
#searchInput::-webkit-search-cancel-button {
  display: none;
}

/* Per-person share scope (Everything / In common) and the invite form's choice. */
.scope-choice {
  display: inline-flex;
  gap: 4px;
}

.share-form select {
  min-width: 0;
  max-width: 100%;
}

.scope-fieldset {
  display: grid;
  gap: 6px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.scope-fieldset legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.scope-fieldset label {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

/* Following: medium / whose follows / one follow, above the timeline. */
.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 8px 0 12px;
}

/* Chips sized to their labels, so both groups read as one bar and stay on one line each on a phone. */
.timeline-filters .segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-filters .segmented button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  white-space: nowrap;
}

/* "How the score works": a quiet text button that opens the score dialog. */
.picks-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.score-help {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
  cursor: pointer;
}

.picks-row .score-help {
  margin-bottom: 12px;
}

.score-help:hover,
.score-help:focus-visible {
  color: var(--green);
  text-decoration-color: currentColor;
}

.score-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
}

.score-explainer {
  font-size: 14px;
  line-height: 1.5;
}

.score-explainer h3 {
  margin: 16px 0 4px;
  font-size: 15px;
}

.score-explainer p,
.score-explainer ul {
  margin: 0 0 8px;
}

.score-explainer ul {
  padding-left: 18px;
}

.score-explainer li + li {
  margin-top: 4px;
}

.score-table {
  margin: 4px 0 8px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.score-table th,
.score-table td {
  padding: 3px 14px 3px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.score-table th {
  color: var(--muted);
  font-weight: 600;
}

.score-explainer .formula {
  font-weight: 600;
  white-space: nowrap;
}

/* Friends: toolbar button (with a count of invites waiting) and its dialog. */
.icon-button {
  position: relative;
}

.icon-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.friends-dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
}

.friends-dialog h3 {
  margin: 16px 0 6px;
  font-size: 15px;
}

.friend-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.friend {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.friend-row,
.friend-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.friend-name {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.friend select {
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.username-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

