/* Marks: what a member thinks of a title (a status, a few words, and the score
   their finished lists give it). The sheet of one title, the search that leads
   to any title, the shelf of marks on a profile, and the picture of how a
   list's tiers become scores. Colours come from the theme's own inks, so
   every theme and both appearances are served by one sheet. */

/* ---------- a score beside a name ---------- */

.mark-score {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font: 700 12.5px / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}

/* ---------- the sheet of one title ---------- */

.ts-rank { justify-self: start; }
.dialog.rank-title-dialog { width: min(560px, calc(100vw - 24px)); }
.rank-title-body { display: flex; flex-direction: column; gap: 16px; }
.rank-source { display: flex; align-items: center; gap: 16px; }
.rank-source > div { min-width: 0; }
.rank-source b { display: block; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.rank-source small { display: block; color: var(--ink-2); margin-top: 4px; font-size: 13px; }
.rank-source-art { flex: 0 0 52px; height: 72px; border-radius: 4px; overflow: hidden; background: var(--panel); }
.rank-source-art img, .rank-list-art img { width: 100%; height: 100%; object-fit: cover; }
.rank-message { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.rank-message:empty { display: none; }
.rank-destinations { display: flex; flex-direction: column; gap: 4px; }
.rank-destination { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.rank-destination:hover, .rank-destination:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rank-destination:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rank-list-art { flex: 0 0 36px; height: 48px; overflow: hidden; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.rank-destination > span:last-child { min-width: 0; }
.rank-destination b { display: block; font: 600 15px / 1.35 var(--font-ui); overflow-wrap: anywhere; }
.rank-destination small { display: block; color: var(--ink-2); font: 400 13px / 1.4 var(--font-ui); margin-top: 3px; }
.rank-create, .rank-create label { display: flex; flex-direction: column; gap: 10px; }
.rank-create-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.rank-create-actions > .btn { flex: 1; }

.dialog.title-dialog {
  width: min(880px, calc(100vw - 32px));
}

/* the name is the sheet's own heading; of the dialog's bar only the way out is kept, in the corner */
.title-dialog .dialog-head {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 8px;
  border: 0;
  background: none;
}

.title-dialog .dialog-head .icon-only { width: 44px; height: 44px; }

.title-dialog .dialog-head h2 {
  display: none;
}

.title-dialog .dialog-body {
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 48px);
  padding: 32px;
  overflow: auto;
}

.title-sheet {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 24px 32px;
  align-items: start;
}

.ts-art { grid-row: span 2; }
.ts-heading { padding-right: 24px; }
.ts-content { grid-column: 2; }

.ts-cover {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.75);
}

.ts-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.ts-cover b,
.mark-cover b,
.rate-cover b {
  display: -webkit-box;
  height: 100%;
  padding: 10% 10% 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  background: linear-gradient(160deg, hsl(var(--hue) 46% 30%), hsl(var(--hue) 48% 14%));
  color: #f2f4f2;
  font: 650 14px / 1.12 var(--font-display);
  letter-spacing: -0.02em;
}

.ts-cover b {
  aspect-ratio: 2 / 3;
  font-size: 22px;
}
.ts-cover[data-aspect='square'] b { aspect-ratio: 1; }
.ts-cover[data-aspect='wide'] b { aspect-ratio: 16 / 9; }

.ts-heading, .ts-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ts-more {
  justify-self: start;
}

.ts-kind {
  color: var(--ink-2);
  font: 400 14px / 1.5 var(--font-ui);
}

.ts-name {
  font: 700 clamp(26px, 3.4vw, 40px) / 1.04 var(--font-display);
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.ts-original {
  color: var(--ink-3);
  font-size: 14.5px;
}

.ts-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.ts-tags span {
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink-2);
  font-size: 12.5px;
}

.ts-content > section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.ts-content > section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.ts-content h3 {
  color: var(--ink-2);
  font: 650 13.5px / 1 var(--font-ui);
}

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

.ts-saved {
  color: var(--ink-3);
  font-size: 12.5px;
}

/* the four statuses: one may be held, or none */
.ts-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ts-status button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--ink-2);
  cursor: pointer;
  font: 600 14px / 1 var(--font-ui);
  transition: background-color 0.2s, color 0.2s;
}

.ts-status button:hover {
  color: var(--ink);
}

.ts-status button[aria-pressed='true'] {
  background: var(--ink);
  box-shadow: none;
  color: var(--bg);
}

/* the score: read from the list the title stands in, so it is a figure, not a control */
.ts-scored {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 18px;
  align-items: center;
}

.ts-score-n {
  grid-row: span 2;
  min-width: 1.6ch;
  font: 700 56px / 0.9 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.ts-score-from {
  display: grid;
  gap: 3px;
  align-self: end;
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.35;
}

.ts-score-from span:first-child {
  color: var(--ink);
  font-weight: 650;
  font-size: 15px;
}

.ts-score-from a,
.ts-noscore a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 34%, transparent);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.ts-noscore {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.ts-noscore p {
  margin: 0;
  max-width: 56ch;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.45;
}

.ts-how {
  align-self: start;
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  font: 500 13px / 1.2 var(--font-ui);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 26%, transparent);
  text-underline-offset: 3px;
}

.ts-how:hover {
  color: var(--ink);
}

.ts-status button:focus-visible,
.ts-how:focus-visible,
.rate-row:focus-visible,
.mark-tile:focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 2px;
}

.ts-review {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  line-height: 1.45;
}

.ts-review-label { display: grid; gap: 8px; color: var(--ink-2); font-size: 13.5px; }
.ts-ranking { display: grid; gap: 10px; padding-top: 6px; }
/* just finished and in no list: the ranking area asks, quietly */
.ts-ranking.is-asked { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--fill); }
.ts-rank-nudge { margin: 0; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.ts-rank-nudge[hidden] { display: none; }
.ts-save-error { display: grid; gap: 10px; font-size: 14px; line-height: 1.5; }
.ts-save-error[hidden] { display: none; }
.ts-recovery { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-guest { justify-items: start; }
.ts-join p { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.ts-join a, .ts-browse { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-underline-offset: 4px; }
.ts-loading { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; min-height: 220px; }
.ts-loading-art, .ts-loading-line { display: block; border-radius: 8px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ts-loading-art { aspect-ratio: 2 / 3; }
.ts-loading-line { height: 12px; width: 75%; margin-top: 16px; }
.ts-load-error { display: grid; justify-items: start; gap: 20px; min-height: 160px; align-content: center; padding-right: 24px; }

/* what is to come, in the shape of it: four statuses and two lines, quietly lit from the side */
.ts-pending { display: grid; gap: 14px; }
.ts-pending-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-pending-pill, .ts-pending-line {
  position: relative;
  display: block;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.ts-pending-pill { flex: 1 1 0; min-width: 72px; max-width: 150px; height: 44px; border-radius: 999px; }
.ts-pending-line { height: 12px; width: 70%; border-radius: 6px; }
.ts-pending-line + .ts-pending-line { width: 45%; }
.ts-pending-pill::after, .ts-pending-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 9%, transparent), transparent);
  transform: translateX(-100%);
  animation: ts-shimmer 1.6s ease-in-out infinite;
}
@keyframes ts-shimmer { to { transform: translateX(100%); } }

/* the cover flies from its card: a copy of the sheet's own cover, its box moved frame by frame from the card's to where the sheet's cover really is */
.ts-art.is-flying .ts-cover { visibility: hidden; }
.ts-flight { position: fixed; z-index: 3; margin: 0; pointer-events: none; }
.ts-flight img { width: 100%; height: 100%; object-fit: cover; }
.ts-flight b { aspect-ratio: auto; height: 100%; padding: 8% 8% 0; }

/* the personal part arrives: each section rises into place a moment after the one above it */
.ts-content.is-entering > .is-in { animation: ts-rise 0.26s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes ts-rise { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .ts-pending-pill::after, .ts-pending-line::after { animation: none; display: none; }
  .ts-content.is-entering > .is-in { animation: none; }
}

/* friends, and what they said */
.ts-friends {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ts-friend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
}

.ts-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.ts-who .profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
}

.ts-said {
  display: flex;
  align-items: center;
  color: var(--ink-3);
  font-size: 13px;
}

.ts-words {
  grid-column: 1 / -1;
  padding-left: 42px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* numbers from elsewhere: the site's own average first, then public scores */
.ts-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 16px;
}

.ts-number {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.ts-number b {
  font: 700 22px / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.ts-number small {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.4;
}

.ts-lists {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ts-lists a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  font-size: 13.5px;
  text-decoration: none;
}

.ts-lists a b {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
}

.ts-lists a small {
  padding-right: 8px;
  color: var(--ink-3);
}

/* ---------- finding any title ---------- */

.dialog.rate-dialog {
  width: min(640px, calc(100vw - 32px));
}

.rate-form {
  display: grid;
  gap: 14px;
}

.rate-results {
  display: grid;
  gap: 18px;
  min-height: 220px;
  max-height: min(56vh, 520px);
  overflow: auto;
  align-content: start;
}

.rate-group {
  display: grid;
  gap: 4px;
}

.rate-group h3 {
  margin-bottom: 4px;
  color: var(--ink-3);
  font: 600 12px / 1 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rate-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 8px 10px 8px 8px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.rate-row:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.rate-row:disabled {
  opacity: 0.55;
}

.rate-row > .i {
  rotate: -90deg;
  color: var(--ink-3);
}

.rate-cover {
  display: block;
  width: 44px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.rate-cover img,
.mark-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rate-cover b {
  padding: 8% 8% 0;
  font-size: 8px;
}

.rate-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rate-text b {
  overflow: hidden;
  font: 600 15px / 1.25 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rate-text small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* the second step of "Log a completion": the picked title, the day, maybe a list */
.rate-form[hidden],
.rate-log[hidden] {
  display: none;
}

.rate-log {
  display: grid;
  gap: 18px;
}

.rate-picked {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.rate-log-lists {
  display: grid;
  gap: 18px;
}

.rate-log-lists:empty {
  display: none;
}

.rate-log-field {
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.rate-log-field .field {
  width: 100%;
  min-height: 44px;
}

.rate-day {
  max-width: 240px;
  font: 500 14px / 1 var(--font-mono);
  color-scheme: inherit;
}

:root[data-appearance='light'] .rate-day {
  color-scheme: light;
}

:root:not([data-appearance='light']) .rate-day {
  color-scheme: dark;
}

.rate-log-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rate-log-actions > .btn {
  flex: 1;
  min-height: 48px;
}

@media (min-width: 520px) {
  .rate-log-actions {
    justify-content: flex-end;
  }

  .rate-log-actions > .btn {
    flex: none;
    min-width: 132px;
  }
}

/* ---------- the shelf of marks on a profile ---------- */

.marks-line {
  color: var(--ink-3);
  font-size: 14px;
}

/* the count and the average, and beside them how the scores fall: kept together, not pushed to the far edge */
.marks-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin: -6px 0 6px;
}

/* above the world and below it: two groups in one line while they fit, each as wide as what it holds */
.marks-apart {
  display: flex;
  flex-wrap: wrap;
  gap: 0 44px;
}

.marks-group .marks-row {
  grid-template-columns: repeat(var(--n, 6), 132px);
}

.marks-group:only-child {
  flex: 1 1 100%;
}

.marks-group:only-child .marks-row {
  grid-template-columns: repeat(auto-fill, minmax(104px, 132px));
}

/* how the ratings fall: ten bars, 1 to 10 */
.mark-spread {
  display: grid;
  grid-template-columns: repeat(10, 14px);
  gap: 3px;
  align-items: end;
  height: 30px;
}

.mark-spread span {
  min-height: 2px;
  height: calc(var(--share) * 100%);
  border-radius: 3px 3px 1px 1px;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
}

.marks-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 18px 12px;
}

.marks-section h3 {
  margin: 26px 0 12px;
  color: var(--ink-2);
  font: 650 15px / 1 var(--font-ui);
}

.mark-tile {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.mark-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: 0 14px 24px -16px rgba(0, 0, 0, 0.7);
  transition: transform 0.3s var(--ease, ease);
}

.mark-tile:hover .mark-cover {
  transform: translateY(-3px);
}

.mark-tile .mark-score {
  position: absolute;
  top: 6px;
  right: 6px;
  margin: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.mark-name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.mark-flag {
  color: var(--ink-3);
  font-size: 12px;
}

/* a review: the cover, the name with its rating, and the words */
.mark-reviews {
  display: grid;
  gap: 10px;
}

.mark-review {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 0;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.mark-review .mark-cover {
  box-shadow: none;
}

.mark-review b {
  font: 600 15px / 1.3 var(--font-ui);
}

.mark-review p {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

@media (max-width: 700px) {
  .title-dialog .dialog-body { padding: 24px 20px; }
  .title-sheet {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 24px 16px;
  }

  .ts-art {
    grid-row: 1;
  }

  .ts-heading { padding-right: 16px; padding-top: 12px; }
  .ts-content { grid-column: 1 / -1; }
  .ts-name { font-size: clamp(22px, 6vw, 30px); line-height: 1.1; letter-spacing: -0.03em; }
  .ts-original, .ts-kind { font-size: 13px; }
  .ts-tags { grid-column: 1 / -1; gap: 4px; }
  .ts-tags span { padding: 4px 7px; font-size: 12px; }
  .ts-cover { border-radius: 6px; }
  .ts-cover b { font-size: 14px; }

  /* four statuses: two rows of two, not three and a straggler */
  .ts-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ts-status button {
    padding: 0 12px;
  }

  .ts-score-n {
    font-size: 48px;
  }

  .marks-row,
  .marks-group .marks-row,
  .marks-group:only-child .marks-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .marks-group {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark-tile:hover .mark-cover {
    transform: none;
  }
}

/* a row of the history opens its title: the cover and the name are the way in */
.history-open,
.history-name {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.history-open {
  flex: none;
  border-radius: 6px;
}

.history-open img {
  display: block;
  width: 48px;
  height: 64px;
  border-radius: 6px;
  background: var(--bg-2);
  object-fit: cover;
}

.history-name {
  display: flex;
  align-items: center;
  max-width: 100%;
}

.history-name b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-name:hover b {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:is(.history-open, .history-name):focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 2px;
}

/* ---------- every mark of one member ---------- */

.dialog.allmarks-dialog {
  width: min(980px, calc(100vw - 32px));
}

.allmarks {
  display: grid;
  gap: 18px;
}

.allmarks-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.allmarks-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink-2);
  cursor: pointer;
  font: 600 13.5px / 1 var(--font-ui);
}

.allmarks-tabs button small {
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.allmarks-tabs button[aria-selected='true'] {
  background: var(--ink);
  color: var(--bg);
}

.allmarks-tabs button[aria-selected='true'] small {
  color: color-mix(in srgb, var(--bg) 70%, var(--ink));
}

.allmarks-tabs button:focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 2px;
}

.allmarks-grid {
  max-height: min(60vh, 620px);
  padding: 4px 2px 2px;
  overflow: auto;
  align-content: start;
}

/* ---------- how a list's tiers become scores ---------- */

.dialog.scores-dialog {
  width: min(560px, calc(100vw - 32px));
}

.scores-explain {
  display: grid;
  gap: 16px;
}

.scores-explain > p {
  margin: 0;
  line-height: 1.5;
}

/* a small tier list of numbers: a row a tier, each title the score its place gives */
.score-ladder {
  display: grid;
  gap: 4px;
}

.sl-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 4px 12px 4px 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.sl-tier {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 32px;
  padding: 0 6px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  font: 700 14px / 1.1 var(--font-ui);
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.sl-n {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  font: 650 13px / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

/* the first of a tier is its highest: it is the one that stands out */
.sl-n:first-child {
  background: var(--ink);
  color: var(--bg);
}

.sl-gap,
.sl-count,
.sl-scores small {
  color: var(--ink-3);
  font-size: 12.5px;
}

.sl-row.is-empty .sl-tier {
  color: var(--ink-3);
}

.scores-rules {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.scores-counts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  cursor: pointer;
}

.scores-counts span {
  display: grid;
  gap: 3px;
}

.scores-counts b {
  font-weight: 650;
}

.scores-counts small {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.4;
}

/* the way to the explanation stands apart from the two answers */
.scores-dialog .scores-how {
  margin-right: auto;
}

@media (max-width: 520px) {
  .scores-dialog .scores-how {
    display: none;
  }
}

/* ---------- talk: what friends say under a take ---------- */

/* how much stands under a take, small beside a name */
.said {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-3);
  font: 600 12px / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.said span {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.said .i {
  width: 13px;
  height: 13px;
}

.mark-tile > .said {
  margin-top: 2px;
}

.mark-review b .said {
  margin-left: 10px;
  vertical-align: 1px;
}

/* the way into a friend's thread, at the end of their line */
.ts-talk {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 36px;
  min-height: 36px;
  margin-left: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.ts-talk > .i {
  width: 17px;
  height: 17px;
}

.ts-talk:hover,
.ts-talk[aria-expanded='true'] {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  color: var(--ink);
}

.ts-talk-count {
  font: 600 12.5px / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.ts-talk-count:empty {
  display: none;
}

.ts-talk:focus-visible,
.talk-like:focus-visible,
.talk-send:focus-visible,
.talk-remove:focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 2px;
}

/* whose take one came for */
.ts-theirs {
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.ts-friend > .talk {
  grid-column: 1 / -1;
  padding-left: 42px;
}

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

.talk[hidden] {
  display: none;
}

.ts-mine > .talk {
  margin-top: 2px;
}

.talk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--ink-3);
  font-size: 13px;
}

.talk-bar:empty {
  display: none;
}

.talk-like,
.talk-likes {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 13px 0 11px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink-2);
  font: 600 13px / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.talk-like {
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.talk-like:hover:not(:disabled) {
  color: var(--ink);
}

.talk-like:disabled {
  cursor: default;
  opacity: 0.6;
}

:is(.talk-like, .talk-likes) .i {
  width: 16px;
  height: 16px;
}

/* liked: the heart fills, with one small beat */
.talk-like[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}

.talk-like[aria-pressed='true'] .i {
  fill: currentColor;
  animation: talk-beat 0.36s cubic-bezier(0.3, 1.5, 0.5, 1);
}

@keyframes talk-beat {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

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

.talk-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.talk-who .profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 12.5px;
}

.talk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  font-size: 13px;
}

.talk-meta time {
  color: var(--ink-3);
  font-size: 12px;
}

.talk-text {
  margin: 2px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.talk-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background-color 0.15s;
}

.talk-remove .i {
  width: 14px;
  height: 14px;
}

.talk-item:hover .talk-remove,
.talk-remove:focus-visible {
  opacity: 1;
}

.talk-remove:hover {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  color: var(--ink);
}

.talk-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.talk-input {
  min-height: 40px;
  border-radius: 999px;
  padding-inline: 16px;
}

.talk-send {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
}

.talk-send:disabled {
  opacity: 0.5;
}

.talk-send .i {
  width: 17px;
  height: 17px;
}

/* a comment quoted in the feed */
.feed-quote {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (hover: none) {
  .talk-remove {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .ts-friend > .talk {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .talk-like[aria-pressed='true'] .i {
    animation: none;
  }
}

/* a like given from a line of the feed */
.feed-like {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  margin-left: 6px;
  padding: 0 9px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  font: 600 12.5px / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.18s, color 0.18s;
}

.feed-like .i {
  width: 17px;
  height: 17px;
}

.feed-like span:empty {
  display: none;
}

.feed-like:hover {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  color: var(--ink);
}

.feed-like[aria-pressed='true'] {
  color: var(--ink);
}

.feed-like[aria-pressed='true'] .i {
  fill: currentColor;
  animation: talk-beat 0.36s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.feed-like:focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 2px;
}

.feed-thumbs {
  align-items: center;
}

.feed-what .said {
  margin-left: 10px;
  vertical-align: 1px;
}

/* a list's thread: under somebody's board, and in a dialog for one's own */
.list-talk.is-under {
  width: min(720px, 100%);
  margin: 44px auto 28px;
  padding: 22px 24px 24px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg-2) 86%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
}

.list-talk h2 {
  margin: 0 0 12px;
  font: 650 18px / 1.2 var(--font-display);
}

.dialog.list-talk-dialog {
  width: min(560px, calc(100vw - 32px));
}

.list-talk-name {
  margin: 0 0 6px;
  color: var(--ink-3);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.talk-empty {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.list-meta .said,
.shared-card-info h3 .said {
  margin-left: 10px;
  vertical-align: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .feed-like[aria-pressed='true'] .i {
    animation: none;
  }
}

/* a list's thread, folded under its board: one quiet line until it is asked for */
.list-talk-fold {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: 600 15px / 1 var(--font-ui);
  text-align: left;
}

.list-talk-fold > .i {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}

.list-talk-fold > .i:last-child {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.list-talk-fold[aria-expanded='true'] > .i:last-child {
  transform: rotate(180deg);
}

.fold-count {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink-3);
  font: 600 13px / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.fold-likes {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.fold-likes .i {
  width: 14px;
  height: 14px;
}

.list-talk.is-under > .talk {
  margin-top: 12px;
}

.list-talk.is-under:has(> .list-talk-fold) {
  padding-block: 10px;
}

.list-talk-fold:focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 4px;
  border-radius: 8px;
}

/* the public page of a member: its tiles are pictures, not buttons, and the address of the page in the profile's settings */
.public-profile .mark-tile {
  cursor: default;
}

.public-link {
  display: block;
  margin: -6px 0 4px 58px;
  color: var(--ink-2);
  font: 500 13.5px / 1.3 var(--font-mono, monospace);
  overflow-wrap: anywhere;
}

.public-link[hidden] {
  display: none;
}

/* what can be done with a comment: shown to the site's owner, or taken back */
.talk-tools {
  display: flex;
  gap: 2px;
}

.talk-earlier {
  justify-self: start;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  font: 600 13px / 1.2 var(--font-ui);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 26%, transparent);
  text-underline-offset: 3px;
}

.talk-earlier:hover {
  color: var(--ink);
}

.talk-earlier:focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 3px;
  border-radius: 6px;
}

/* whether one has it, and whether one means to buy it: switches, not a status,
   so a chosen one is a lighter pane with an ink ring and a tick, never solid */
.ts-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ts-flags button {
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
  color: var(--ink-2); font: 500 14px / 1 var(--font-ui);
}
.ts-flags button:hover { color: var(--ink); }
.ts-flags button:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
.ts-flags button[aria-pressed='true'] { background: color-mix(in srgb, var(--ink) 10%, transparent); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); font-weight: 650; }
.ts-flags button[aria-pressed='true']::before { content: '✓ '; }

.rate-search-error { display: grid; justify-items: start; gap: 8px; }
.rate-search-error p { margin: 0; color: var(--ink-2); font-size: 14px; }
.rate-search-error .btn { min-height: 44px; }

/* The next episode of a series in progress, ticked in one tap (js/next-episode.js) */
.nextep { display: grid; gap: 6px; min-width: 0; margin-top: 6px; }
.nextep[hidden] { display: none; }
.nextep.is-loading { min-height: 44px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nextep-line { min-width: 0; overflow: hidden; color: var(--ink-2); font: 500 12.5px/1.3 var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
.nextep-meter { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nextep-meter .nextep-bar { flex: 1; min-width: 0; }
.nextep-count { flex: none; color: var(--ink-3); font: 500 12px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
:root[data-theme] .btn.ghost.nextep-plus { justify-content: center; width: 100%; min-height: 44px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); font-weight: 650; }
:root[data-theme] .btn.ghost.nextep-plus:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); }
.nextep-plus[hidden] { display: none; }
.nextep-bar { height: 3px; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--ink) 11%, transparent); }
.nextep-bar i { display: block; height: 100%; background: var(--ink-2); transition: width .4s var(--ease); }
@media (prefers-reduced-motion: reduce) { .nextep-bar i { transition: none; } }

/* ---------- a ranking beside the list it was made from ---------- */

/* one quiet line under the title of a list made by "Rank these yourself": the title gives way, never the button */
.rank-from { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 4px; color: var(--ink-3); font-size: 13px; line-height: 1.3; }
.rank-from-text { display: flex; min-width: 0; flex: 0 1 auto; white-space: pre; }
.rank-from-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-from .rank-from-btn { flex: none; min-height: 32px; padding: 0 12px; font-size: 13px; }

.dialog.rank-compare-dialog { width: min(560px, calc(100vw - 32px)); }
.rank-compare { display: grid; gap: 10px; }
.rank-compare p { margin: 0; line-height: 1.5; }
.rc-note, .rc-from { color: var(--ink-2); }
.rc-summary { font-weight: 700; }
.rc-open { color: var(--ink-2); }
.rc-rows { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.rc-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; padding: 6px 10px 6px 6px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rc-row.is-agree { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.rc-cover { width: 36px; height: 48px; border-radius: 6px; object-fit: cover; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.rc-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; line-height: 1.25; }
.rc-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.rc-chip { display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 6px; max-width: 150px; min-height: 26px; padding: 0 9px; border-radius: 999px; background: var(--tc, color-mix(in srgb, var(--ink) 12%, transparent)); color: var(--tc-ink, var(--ink-2)); font-size: 12px; line-height: 1; }
.rc-chip small { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.rc-chip b { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) {
  .rc-row { grid-template-columns: 36px minmax(0, 1fr); }
  .rc-chips { grid-column: 2; justify-content: flex-start; }
}
