.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background:
    radial-gradient(1100px 520px at 50% -10%, var(--glow), transparent 70%),
    var(--bg-abyss);
}

.login__card {
  width: min(420px, 100%);
  background: var(--bg-canvas);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-high);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  text-align: center;
}

.login__title {
  font-size: var(--step-3);
}

.login__body {
  color: var(--text-muted);
  font-size: var(--step--1);
  margin-top: var(--space-2);
}

.login .button {
  min-height: 44px;
  font-size: var(--step-0);
}

.login__note {
  font-size: var(--step--2);
  color: var(--text-faint);
}

.login__greeting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.login__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-input);
}

.login__avatar--initial {
  display: grid;
  place-items: center;
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--text-muted);
}

.login__greeting .login__title {
  font-size: var(--step-2);
  overflow-wrap: anywhere;
}

.login__notyou {
  margin-top: calc(var(--space-4) * -1);
}

.down {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: var(--space-6) var(--space-5);
}

.down--page {
  background: var(--bg-abyss);
}

.down__card {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.down__face {
  width: 104px;
  height: 104px;
  color: var(--line-strong);
}

.down__title {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-normal);
}

.down__body {
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 46ch;
}

.down__note {
  font-size: var(--step--2);
  color: var(--text-faint);
}

.down__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.shell {
  height: 100%;
  display: grid;
  grid-template-columns: var(--rail-width) 1fr;
  background: var(--bg-canvas);
}

.rail {
  background: var(--bg-sidebar);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}

.rail__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-4) var(--space-3);
  box-shadow: 0 1px 0 var(--shadow-hairline);
}

.rail__headings {
  flex: 1;
  min-width: 0;
}

.rail__head > .button {
  display: none;
}

.rail__title {
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rail__subtitle {
  font-size: var(--step--2);
  color: var(--text-faint);
  margin-top: 2px;
}

.rail__scroll {
  overflow-y: auto;
  padding: var(--space-3) var(--space-2);
  min-height: 0;
}

.rail__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2) var(--space-1);
}

.rail__group:first-child {
  padding-top: var(--space-1);
}

.rail__group--toggle {
  width: 100%;
  justify-content: flex-start;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.rail__group--toggle:hover .rail__group-label {
  color: var(--text-muted);
}

.rail__group-count {
  margin-left: auto;
  font-size: var(--step--2);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.rail__group-chevron {
  width: 12px;
  height: 12px;
  color: var(--text-faint);
  transition: transform .15s ease;
}

.rail__group--toggle[aria-expanded="true"] .rail__group-chevron {
  transform: rotate(90deg);
}

.rail__group-label {
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.rail__add {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  aspect-ratio: 1;
  padding: 0;
  line-height: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: background 0.12s var(--ease-out), color 0.12s var(--ease-out);
}

.rail__add .icon {
  display: block;
  width: 16px;
  height: 16px;
}

.rail__add:hover {
  color: var(--text-strong);
  background: var(--bg-raised);
}

.rail__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px var(--space-2);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  font-size: var(--step--1);
  font-weight: 500;
  transition: background-color 0.12s var(--ease-out);
}

.rail__item:hover {
  background: var(--wash-1);
  color: var(--text-normal);
}

.rail__item[aria-current="true"] {
  background: color-mix(in srgb, var(--event, #ffffff) 16%, var(--wash-2));
  color: var(--text-strong);
}

.rail__item .icon {
  color: var(--text-faint);
}

.rail__item[aria-current="true"] .icon {
  color: var(--text-muted);
}

.rail__item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail__item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.rail__item-dot[data-stage="draft"] {
  background: var(--text-faint);
}

.rail__item-dot[data-stage="submissions"] {
  background: var(--accent);
}

.rail__item-dot[data-stage="judging"] {
  background: var(--caution);
}

.rail__item-dot[data-stage="public"] {
  background: var(--positive);
}

.rail__item-dot[data-stage="complete"] {
  background: var(--line-strong);
}

.rail__foot {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--bg-rail);
}

.rail__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  display: grid;
  place-items: center;
  font-size: var(--step--1);
  font-weight: 700;
  flex: none;
  object-fit: cover;
}

.rail__identity {
  flex: 1;
  min-width: 0;
}

.rail__name {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail__role {
  font-size: var(--step--2);
  color: var(--text-faint);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-5);
  height: 52px;
  box-shadow:
    0 1px 0 var(--shadow-topbar),
    inset 0 -2px 0 var(--event, transparent);
  background: var(--bg-canvas);
}

.topbar__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.topbar__name {
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tabs {
  display: flex;
  gap: var(--space-1);
  padding: 0 var(--space-5);
  background: var(--bg-canvas);
  box-shadow: inset 0 -1px 0 var(--line-soft);
  overflow-x: auto;
}

.tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 12px var(--space-3);
  font-size: var(--step--1);
  font-weight: 600;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text-normal);
}

.tab[aria-selected="true"] {
  color: var(--text-strong);
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 8px -1px 8px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--event, var(--accent));
}

.tab__count {
  margin-left: 6px;
  font-size: var(--step--2);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.scroller {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.topbar,
.tabbar {
  flex: none;
}

.view {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 1180px;
}

.stage-rail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.stage-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.stage-step__bar {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
}

.stage-step[data-state="done"] .stage-step__bar {
  background: var(--accent);
}

.stage-step[data-state="current"] .stage-step__bar {
  background: var(--accent);
  animation: stage-pulse 2.4s var(--ease-out) infinite;
}

@keyframes stage-pulse {
  50% {
    opacity: 0.55;
  }
}

.stage-step__label {
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stage-step[data-state="current"] .stage-step__label,
.stage-step[data-state="done"] .stage-step__label {
  color: var(--text-muted);
}

.stage-step[data-state="current"] .stage-step__label {
  color: var(--accent-text);
}

.overview > * {
  min-width: 0;
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat__value {
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.judge-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.judge-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-3);
  align-items: center;
}

.judge-row__name {
  font-size: var(--step--1);
  color: var(--text-normal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.judge-row__count {
  font-size: var(--step--1);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.judge-row .meter {
  grid-column: 1 / -1;
}

.scheduled {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  font-size: var(--step--1);
  color: var(--text-normal);
}

.scheduled .icon {
  flex: none;
  color: var(--text-faint);
}

.scheduled strong {
  color: var(--text-strong);
}

.activity {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.activity__item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: var(--step--1);
}

.activity__line {
  color: var(--text-normal);
}

.activity__actor {
  color: var(--text-strong);
  font-weight: 600;
}

.activity__time {
  font-size: var(--step--2);
  color: var(--text-faint);
}

.entries-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.entries-head .switch--inline {
  margin-left: auto;
}

.switch--inline .field__label {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
  font-weight: 500;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}

.entry {
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--art, transparent) 22%, transparent),
    0 10px 26px -18px color-mix(in srgb, var(--art, transparent) 80%, transparent);
  transition: box-shadow 0.18s var(--ease-out);
}

.entry:hover {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--art, transparent) 42%, transparent),
    0 14px 34px -16px color-mix(in srgb, var(--art, transparent) 90%, transparent);
}

.entry[data-removed="true"] {
  opacity: 0.55;
}

.entry__figure {
  aspect-ratio: 4 / 3;
  background: var(--bg-input);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.entry__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry__body {
  padding: var(--space-3) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.entry__title {
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.entry__id {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--text-faint);
}

.entry__description {
  font-size: var(--step--1);
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry__foot {
  margin-top: auto;
  padding-top: var(--space-2);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.entry__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
}

.entry__actions .button--danger-ghost:nth-child(2) {
  margin-left: auto;
}

.entry__open {
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.entry__open-hint {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-strong);
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.14s var(--ease-out);
}

.entry__open:hover .entry__open-hint,
.entry__open:focus-visible .entry__open-hint {
  opacity: 1;
}

.entry-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.shared-by {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-quiet);
}

.shared-by__avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-input);
}

.shared-by__avatar--initial {
  display: grid;
  place-items: center;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text-muted);
}

.shared-by__who {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.shared-by__name {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-strong);
}

.shared-by__when {
  font-size: var(--step--2);
  color: var(--text-faint);
}

.entry-detail__figure {
  display: block;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.entry-detail__figure img {
  display: block;
  width: 100%;
  height: auto;
}

.entry-detail__side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.entry-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.entry-detail__description {
  color: var(--text-normal);
  overflow-wrap: anywhere;
}

.entry-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.entry-detail__actions .button:last-child {
  margin-left: auto;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fact__label {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.fact__value {
  font-size: var(--step--1);
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.share-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.opened {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.opened__faces {
  display: flex;
  flex: none;
}

.opened__face {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-input);
  box-shadow: 0 0 0 2px var(--bg-canvas);
}

.opened__face + .opened__face {
  margin-left: -6px;
}

.opened__face--initial {
  display: grid;
  place-items: center;
  font-size: var(--step--2);
  font-weight: 700;
  color: var(--text-muted);
}

.opened__said {
  font-size: var(--step--2);
  color: var(--text-faint);
}

.share {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.share__link {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--step--2);
}

.share .button {
  flex: none;
}

.dialog--entry {
  width: min(940px, 100%);
  max-height: min(820px, 100%);
}

@media (max-width: 860px) {
  .entry-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .fact-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .entry__open-hint {
    opacity: 1;
  }

  .share {
    flex-wrap: wrap;
  }

  .share__link {
    flex-basis: 100%;
  }
}

.judge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-5);
  align-items: start;
}

.judge__stage {
  min-width: 0;
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.judge__figure {
  background: var(--bg-input);
  display: grid;
  place-items: center;
  min-width: 0;
  max-height: 58vh;
  min-height: 260px;
}

.judge__figure img {
  max-width: 100%;
  max-height: 58vh;
  width: auto;
  object-fit: contain;
}

.judge__meta {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.judge__title {
  font-size: var(--step-2);
}

.judge__description {
  color: var(--text-muted);
  font-size: var(--step--1);
  max-width: 70ch;
}

.judge__side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: sticky;
  top: 0;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}

.score-button {
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: var(--step-0);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition:
    background-color 0.14s var(--ease-out),
    color 0.14s var(--ease-out),
    border-color 0.14s var(--ease-out);
}

.score-button:hover:not(:disabled) {
  border-color: var(--accent-line);
  color: var(--text-strong);
}

.score-button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}

.score-button:disabled {
  opacity: 0.45;
}

.score-scale {
  display: flex;
  justify-content: space-between;
  font-size: var(--step--2);
  color: var(--text-faint);
}

.judge__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.judge__position {
  font-size: var(--step--1);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

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

.filmstrip-dot {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-faint);
  font-size: var(--step--2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}

.filmstrip-dot[data-scored="true"] {
  background: var(--accent-quiet);
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.filmstrip-dot[aria-current="true"] {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.results {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.result {
  display: grid;
  grid-template-columns: 34px 64px minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
}

.result__rank {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.result[data-rank="1"] .result__rank {
  color: var(--gold);
}

.result__thumb {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-input);
}

.result__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result__title {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result__votes {
  font-size: var(--step--1);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}

.settings-section {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.settings-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
}

.settings-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
}

.settings-card__head h3 {
  font-size: var(--step-0);
  color: var(--text-strong);
}

.settings-card > .field__hint {
  margin-top: calc(var(--space-3) * -1);
}

.settings-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4) var(--space-5);
  align-items: start;
}

.settings-section__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
}

.announce {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.announce__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.announce__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.color-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.dev-grid {
  columns: 320px 3;
  column-gap: var(--space-4);
}

.dev-grid > .panel {
  break-inside: avoid;
  margin-bottom: var(--space-4);
}

.dev-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.dev-group__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-muted);
}

.dev-group__head .icon {
  align-self: center;
}

.dev-group__title {
  font-size: var(--step-0);
  font-weight: 650;
  color: var(--text-strong);
}

.dev-group__hint {
  font-size: var(--step--1);
  color: var(--text-faint);
}

.dev-stage-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--space-2);
}

.dev-stage {
  aspect-ratio: auto;
  min-height: 38px;
  padding: 0 var(--space-2);
  font-size: var(--step--2);
  font-weight: 600;
}

.dev-stage[data-direction="back"]:not(:disabled):hover {
  border-color: var(--caution);
  color: var(--caution-text);
}

.dev-stage[aria-pressed="true"] {
  background: var(--bg-raised);
  border-color: var(--line-strong);
  color: var(--text-strong);
}

.dev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.loading-line {
  font-size: var(--step--1);
  color: var(--text-faint);
  margin-bottom: var(--space-2);
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--bg-raised) 50%, var(--bg-sunken) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1080px) {
  .overview,
  .judge,
  .announce {
    grid-template-columns: minmax(0, 1fr);
  }

  .judge__side {
    position: static;
  }
}

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

  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(var(--rail-width), 84vw);
    transform: translateX(-100%);
    transition: transform 0.2s var(--ease-out);
    box-shadow: var(--shadow-high);
    max-height: none;
  }

  body[data-nav="open"] .rail {
    transform: translateX(0);
  }

  .rail__head > .button {
    display: inline-flex;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    border: 0;
    background: var(--bg-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease-out);
  }

  body[data-nav="open"] .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .topbar__title {
    flex: 1;
  }

  .topbar__actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .tabs {
    padding: 0 var(--space-3);
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .view {
    padding: var(--space-4) var(--space-3);
    gap: var(--space-4);
  }

  .settings-grid,
  .analytics__grid,
  .overview,
  .entries-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.entries-head .switch--inline {
  margin-left: auto;
}

.switch--inline .field__label {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
  font-weight: 500;
}

.entry-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  .dev-grid {
    columns: 1;
  }

  .panel {
    padding: var(--space-4);
  }

  .stat-row {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

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

  .barchart__row {
    grid-template-columns: minmax(0, 5.5rem) 1fr auto;
    gap: var(--space-2);
  }

  .unsaved {
    flex-wrap: wrap;
    bottom: var(--space-2);
  }

  .unsaved__text {
    flex-basis: 100%;
  }

  .unsaved__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .dialog--wide {
    max-height: calc(100vh - 32px);
  }

  .embed--thumbed {
    padding-right: var(--space-4);
  }

  .embed__thumbnail {
    position: static;
    width: 100%;
    height: auto;
    max-height: 160px;
    order: -1;
  }
}

@media (min-width: 861px) {
  .topbar__title > .button[title="Open the menu"] {
    display: none;
  }

  .nav-scrim {
    display: none;
  }
}

.ban-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ban {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
}

.ban[data-active="false"] {
  opacity: 0.7;
}

.ban__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ban__user {
  font-weight: 600;
  color: var(--text-strong);
}

.ban__time {
  margin-left: auto;
  font-size: var(--step--2);
  color: var(--text-faint);
}

.ban__reason {
  color: var(--text-normal);
  overflow-wrap: anywhere;
}

.ban__meta {
  font-size: var(--step--1);
  color: var(--text-faint);
}

.ban__appeal {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  color: var(--text-normal);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.evidence {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.evidence__summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
}

.evidence__summary::-webkit-details-marker {
  display: none;
}

.evidence__summary:hover {
  color: var(--text-strong);
}

.evidence__summary .icon {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}

.evidence__image {
  max-width: min(100%, 420px);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
}

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-7) var(--space-5);
  text-align: center;
}

.notfound__code {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--line-strong);
  font-variant-numeric: tabular-nums;
}

.notfound__title {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--text-strong);
}

.notfound__body {
  font-size: var(--step--1);
  color: var(--text-faint);
  max-width: 52ch;
  overflow-wrap: anywhere;
}

.notfound__path {
  margin-top: var(--space-1);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.analytics__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-5);
}

.stat__hint {
  font-size: var(--step--2);
  color: var(--text-faint);
}

.chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chart__plot {
  position: relative;
}

.chart__svg {
  width: 100%;
  height: 220px;
  overflow: visible;
  touch-action: none;
}

.chart__grid {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.chart__axis {
  fill: var(--text-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart__cursor {
  stroke: var(--text-faint);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.chart__tooltip[hidden] {
  display: none;
}

.chart__tooltip {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-abyss);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-high);
  font-size: var(--step--2);
  color: var(--text-normal);
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

.chart__tooltip strong {
  color: var(--text-strong);
  margin-bottom: 2px;
}

.chart__tooltip span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart__tooltip i,
.chart__legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--step--2);
  color: var(--text-muted);
}

.chart__legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.barchart {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.barchart__row {
  display: grid;
  grid-template-columns: minmax(0, 8rem) 1fr auto;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--step--1);
}

.barchart__label {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.barchart__track {
  height: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.barchart__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  min-width: 2px;
}

.barchart__value {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-size: var(--step--2);
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  counter-reset: rule;
  list-style: none;
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  counter-increment: rule;
}

.rule::before {
  content: counter(rule);
  flex: none;
  min-width: 1.5rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.rule--editing {
  display: block;
}

.rule--editing::before {
  content: none;
}

.rule__main {
  flex: 1;
  min-width: 0;
}

.rule__title {
  font-weight: 600;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.rule__body {
  margin-top: var(--space-1);
  font-size: var(--step--1);
  color: var(--text-faint);
  overflow-wrap: anywhere;
}

.rule__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rule-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.rule-picks {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.rule-pick {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s var(--ease-out);
}

.rule-pick:hover {
  background: var(--bg-raised);
}

.rule-pick input {
  margin-top: 2px;
  flex: none;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.rule-pick__title {
  display: block;
  font-size: var(--step--1);
  color: var(--text-strong);
}

.rule-pick__body {
  display: block;
  margin-top: 2px;
  font-size: var(--step--2);
  color: var(--text-faint);
}

.lookup__form {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.lookup__form .input {
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

.lookup {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.lookup__identity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
}

.lookup__avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  background: var(--bg-input);
}

.lookup__avatar--blank {
  display: grid;
  place-items: center;
  color: var(--text-faint);
}

.lookup__who {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.lookup__who h3 {
  font-size: var(--step-1);
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.lookup__flags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-left: auto;
  justify-content: flex-end;
}

.lookup__totals {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-2);
}

.lookup__total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3);
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
}

.lookup__total-value {
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.lookup__total[data-warn="true"] .lookup__total-value {
  color: var(--danger);
}

.lookup__total-label {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.history {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.history__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.history__head h4 {
  font-size: var(--step-0);
  color: var(--text-strong);
}

.history__entries {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.history-entry {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
}

.history-entry[data-removed="true"] .history-entry__thumb {
  opacity: 0.5;
}

.history-entry__thumb {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-input);
}

.history-entry__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.history-entry__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.history-entry__title {
  font-weight: 600;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.history-entry__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.history-entry__removal {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--danger-quiet);
  border-radius: var(--radius-sm);
}

.history-entry__removal-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--danger-text);
}

.history-entry__rules {
  margin: 0;
  padding-left: var(--space-5);
  font-size: var(--step--1);
  color: var(--text-normal);
}

.history-entry__reason {
  font-size: var(--step--1);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .lookup__totals {
    grid-template-columns: repeat(3, 1fr);
  }

  .lookup__identity {
    flex-wrap: wrap;
  }

  .lookup__flags {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .history-entry {
    flex-direction: column;
  }

  .history-entry__thumb {
    width: 100%;
    height: 160px;
  }
}

.perm {
  display: grid;
  max-width: 920px;
  grid-template-columns: minmax(0, 1fr) repeat(2, 168px);
  align-items: center;
  column-gap: var(--space-3);
}

.perm__head,
.perm__row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  min-height: 44px;
}

.perm__head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: var(--space-2);
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--line-soft);
}

.perm__row + .perm__row {
  border-top: 1px solid var(--line-soft);
}

.perm__role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  white-space: nowrap;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.perm__role > .icon {
  display: none;
}

.perm__locked {
  display: inline-flex;
  color: var(--text-faint);
}

.perm__what {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) 0;
  min-width: 0;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.perm__group {
  grid-column: 1 / -1;
  margin-top: var(--space-4);
  padding-bottom: var(--space-1);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.perm__label {
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-normal);
}

.perm__hint {
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-faint);
}

.perm__switch {
  justify-content: center;
}

@media (max-width: 860px) {
  .perm {
    grid-template-columns: 1fr 64px 64px;
    column-gap: var(--space-2);
  }

  .perm__role > .icon {
    display: block;
  }

  .perm__role span:not(.perm__locked) {
    display: none;
  }

  .perm__hint {
    display: none;
  }
}

.tabpick {
  display: none;
}

.tabpick__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: none;
  background: var(--bg-canvas);
  color: var(--text-strong);
  font-size: var(--step-0);
  font-weight: 600;
  text-align: left;
  box-shadow: inset 0 -1px 0 var(--line-soft);
}

.tabpick__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabpick__meta {
  margin-left: auto;
  font-size: var(--step--2);
  font-weight: 500;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.tabpick__caret {
  flex: none;
  color: var(--text-faint);
  transform: rotate(90deg);
  transition: transform 0.16s var(--ease-out);
}

.tabpick__trigger[aria-expanded="true"] .tabpick__caret {
  transform: rotate(-90deg);
}

.tabpick__panel {
  width: calc(100vw - 16px);
  max-height: min(72vh, 560px);
  overflow-y: auto;
  padding: var(--space-1);
}

.tabpick__option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-normal);
  font-size: var(--step-0);
  text-align: left;
}

.tabpick__option:hover {
  background: var(--bg-raised);
}

.tabpick__option[aria-selected="true"] {
  color: var(--text-strong);
  font-weight: 600;
}

.tabpick__option[aria-selected="true"] .icon {
  margin-left: auto;
  color: var(--accent);
}

.tabpick__option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .tabbar > .tabs {
    display: none;
  }

  .tabpick {
    display: block;
  }
}

.diag {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.diag__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
}

.diag__row[data-ok="true"] .icon {
  color: var(--positive);
}

.diag__row[data-ok="false"] .icon {
  color: var(--danger);
}

.diag__name {
  font-weight: 600;
  color: var(--text-strong);
  min-width: 84px;
}

.diag__detail {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-muted);
}

.storage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.storage__used {
  font-size: var(--step-3);
  font-weight: 650;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.storage__of {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.storage__share {
  font-size: var(--step--1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.storage__share[data-tone="warn"] {
  color: var(--gold);
}

.storage__share[data-tone="danger"] {
  color: var(--danger);
}

.meter--tall {
  height: 10px;
}

.meter__fill[data-tone="warn"] {
  background: var(--gold);
}

.meter__fill[data-tone="danger"] {
  background: var(--danger);
}

.storage__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.storage__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.storage__labels {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step--1);
}

.storage__name {
  font-weight: 600;
  color: var(--text-strong);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage__size {
  margin-left: auto;
  flex: none;
  color: var(--text-normal);
  font-variant-numeric: tabular-nums;
}

.storage__meta {
  font-size: var(--step--2);
  color: var(--text-muted);
}

.activity__controls {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.activity__controls .select {
  width: auto;
  max-width: 40%;
}

.activity__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip--button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: var(--step--2);
  font-weight: 600;
  transition: background 0.12s var(--ease-out), color 0.12s var(--ease-out);
}

.chip--button:hover {
  color: var(--text-strong);
}

.chip--button[aria-pressed="true"] {
  background: var(--accent-quiet);
  color: var(--accent-text);
}

.activity--scroll {
  height: min(48vh, 380px);
  overflow-y: auto;
  padding-right: var(--space-2);
}

.activity__pager {
  display: flex;
  justify-content: center;
  padding-top: var(--space-2);
  border-top: 1px solid var(--line-soft);
}

.activity__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--step--1);
}

.activity__item + .activity__item {
  border-top: 1px solid var(--line-soft);
}

.activity__face {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
}

.activity__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-sunken);
}

.activity__avatar--initial {
  display: grid;
  place-items: center;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text-muted);
}

.activity__badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--text-muted);
  box-shadow: 0 0 0 2px var(--bg-canvas);
}

.activity__badge .icon {
  width: 10px;
  height: 10px;
}

.activity__item[data-tone="danger"] .activity__badge {
  background: var(--danger);
  color: var(--text-on-accent);
}

.activity__item[data-tone="positive"] .activity__badge {
  background: var(--positive);
  color: var(--text-on-accent);
}

.activity__body {
  min-width: 0;
}

.activity__detail {
  margin-top: 2px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.activity__time {
  white-space: nowrap;
  font-size: var(--step--2);
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .activity__controls {
    flex-wrap: wrap;
  }

  .activity__controls .input {
    flex: 1 1 100%;
  }

  .activity__controls .select {
    max-width: none;
    flex: 1;
  }

  .activity--scroll {
    height: min(52vh, 420px);
  }
}

.history-entry__thumb-link,
.result__thumb-link {
  flex: none;
  border-radius: var(--radius-sm);
}

.history-entry__thumb-link .history-entry__thumb,
.result__thumb-link .result__thumb {
  display: block;
}
