/* Crave Games shell: the look of everything around the games.
   Built on the kit's tokens (kit.css); every class here starts with s-.

   Contents
     1. Frame and navigation     6. Rules card and rules screen   11. Profile
     2. Shared bits              7. Play: top bar and overlays    12. Settings
     3. The front door           8. Reactions                     13. Host console
     4. Home                     9. Results                       14. Session overlays
     5. Lobby                   10. Leaderboard                   15. Small windows   */

/* 1. Frame and navigation */
.s-noscript {
  margin: 20vh auto;
  max-width: 30em;
  padding: 0 1em;
  text-align: center;
}

.s-page {
  --nav-h: clamp(48px, 9vmin, 62px);
}

.s-nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--sp-3);
  height: var(--nav-h);
  padding: 0 var(--sp-4);
  border-bottom: 2px solid var(--rule);
  background: rgba(0, 0, 0, 0.72);
}

.s-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-right: auto;
  color: var(--text);
  font: 800 var(--fs-h3) / 1 var(--font-head);
  letter-spacing: -0.03em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.s-brand b {
  color: var(--lime);
  font-weight: 800;
}

.s-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.s-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  height: 36px;
  padding: 0 0.85em;
  border-radius: var(--r-pill);
  color: var(--text-2);
  font: 600 var(--fs-label) / 1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease-out, color 120ms ease-out, transform 240ms var(--ease-spring);
}

.s-nav__link:hover {
  background: var(--card-2);
  color: var(--text);
}

.s-nav__link:active {
  transform: scale(0.94);
}

.s-nav__link.is-active {
  background: var(--lime);
  color: #000000;
  font-weight: 700;
}

.s-nav__me {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  max-width: 11em;
  padding: 2px 0.8em 2px 3px;
  border: 1.5px solid var(--rule);
  border-radius: var(--r-pill);
  color: var(--text);
  font: 600 var(--fs-label) / 1 var(--font-body);
  text-decoration: none;
}

.s-nav__me:hover {
  border-color: var(--lime);
}

.s-main {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: var(--sp-4);
  width: min(100%, 1360px);
  min-height: 0;
  margin: 0 auto;
  padding: var(--sp-4);
}

.s-plain {
  padding: var(--sp-4);
}

/* 2. Shared bits */
.s-pagetitle {
  font: 800 var(--fs-h1) / 1.05 var(--font-head);
  letter-spacing: -0.04em;
}

.s-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 0;
  margin: auto;
  padding: var(--sp-4);
  text-align: center;
}

.s-empty__text {
  max-width: 24em;
  font: 700 var(--fs-h3) / 1.2 var(--font-head);
  letter-spacing: -0.02em;
}

.s-live {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--green);
  font-weight: 700;
}

.s-live i {
  display: block;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: var(--green);
  animation: s-live 1.4s ease-out infinite;
  animation-play-state: var(--k-loop);
}

@keyframes s-live {
  0% {
    box-shadow: 0 0 0 0 rgba(55, 254, 117, 0.7);
  }
  100% {
    box-shadow: 0 0 0 0.75em rgba(55, 254, 117, 0);
  }
}

.s-textlink {
  color: var(--lime);
  font-weight: 600;
}

.s-linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.2em;
  border-radius: 6px;
  color: var(--text-2);
  font: 600 var(--fs-label) / 1.1 var(--font-body);
  text-decoration: none;
}

.s-linkbtn:hover {
  color: var(--lime);
}

.s-rowlink {
  display: block;
  border-radius: var(--r-3);
  color: inherit;
  text-decoration: none;
}

.s-rowlink:hover .k-score {
  border-color: #5C5C5C;
}

.s-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  padding: 4px 0;
  border-top: 1px solid #262626;
  color: var(--text-2);
}

.s-stat b {
  color: var(--text);
}

.s-stat .k-icon {
  margin-right: 0.35em;
  color: var(--muted);
  font-size: 0.85em;
}

.k-label .k-icon {
  font-size: 0.95em;
}

.s-sec {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
}

.s-sec__head {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.s-sec__head h2 {
  font: 700 var(--fs-h3) / 1.1 var(--font-head);
  letter-spacing: -0.02em;
}

.s-sec__head .k-icon {
  color: var(--accent);
}

.s-sec__more {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--fs-label);
  text-align: right;
}

.s-award {
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
  padding: 4px 0;
}

.s-award__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: color-mix(in srgb, var(--lime) 16%, transparent);
  color: var(--lime);
}

.s-award__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.s-award__title {
  display: block;
  color: var(--lime);
  font: 700 var(--fs-body) / 1.2 var(--font-head);
  letter-spacing: -0.02em;
}

.s-award__line {
  color: var(--text-2);
}

.s-award.is-waiting {
  visibility: hidden;
}

.s-award.is-mine .s-award__icon {
  background: var(--lime);
  box-shadow: 0 0 22px -4px var(--lime);
  color: #000000;
}

/* the switch: a track and a knob that springs across */
.s-setting {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 9px 0;
  border-top: 1px solid #262626;
  cursor: pointer;
}

.s-setting__icon {
  display: inline-flex;
  flex: none;
  color: var(--muted);
}

.s-setting__text {
  flex: 1;
  min-width: 0;
}

.s-setting__label {
  font-weight: 600;
}

.s-setting__sub {
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.3;
}

.s-setting.is-on .s-setting__label {
  color: var(--lime);
}

.s-setting--tight {
  padding: 2px 0;
  border-top: 0;
}

.s-switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: #2E2E2E;
  box-shadow: inset 0 0 0 2px var(--rule);
  cursor: pointer;
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out;
}

.s-switch__knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-2);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  transition: transform 300ms var(--ease-spring), background-color 160ms ease-out;
}

.s-switch[aria-checked='true'] {
  background: var(--lime);
  box-shadow: inset 0 0 0 2px transparent, 0 0 18px -4px var(--lime);
}

.s-switch[aria-checked='true'] .s-switch__knob {
  background: #000000;
  transform: translateX(22px);
}

.k-btn.is-armed {
  animation: s-armed 0.7s ease-in-out infinite;
  animation-play-state: var(--k-loop);
}

@keyframes s-armed {
  50% {
    filter: brightness(1.25);
  }
}

/* 3. The front door */
.s-door {
  align-items: center;
  justify-content: center;
  justify-content: safe center;
}

.s-door__mid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  width: min(92vw, 580px);
  padding-bottom: clamp(84px, 20vh, 190px);
  text-align: center;
}

.s-door__kicker {
  color: var(--lime);
  font: 700 var(--fs-label) / 1 var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.s-door__title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.28em;
  font: 800 clamp(46px, 13vmin, 118px) / 0.92 var(--font-head);
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.s-door__title b {
  color: var(--lime);
  font-weight: 800;
  text-shadow: 0 0 60px rgba(220, 255, 0, 0.35);
}

.s-door__lead {
  max-width: 30em;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.35;
}

.s-door__card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  margin-top: var(--sp-2);
  padding: var(--sp-4);
  border: 2px solid var(--rule);
  border-radius: var(--r-5);
  background: rgba(20, 20, 20, 0.94);
  box-shadow: 0 0 80px -30px var(--lime);
}

.s-door__dev {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-align: left;
}

.s-door__quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.s-door__who {
  --btn-h: 38px;
  --btn-lip-h: 4px;
  border-radius: var(--r-pill);
  font-size: var(--fs-label);
}

.s-door__who .k-btn__face {
  gap: 0.45em;
  padding: 0.2em 0.9em 0.2em 0.35em;
}

.s-door__note {
  color: var(--muted);
  font-size: var(--fs-label);
}

.s-door__why {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  color: var(--warn);
  font-weight: 600;
}

.s-door__crowd {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(110px, 27vh, 230px);
  pointer-events: none;
}

/* 4. Home */
.s-hero {
  position: relative;
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  min-height: clamp(200px, 41vh, 340px);
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--rule));
  border-radius: var(--r-5);
  background:
    radial-gradient(120% 150% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
    var(--card);
  transition: box-shadow 400ms ease-out;
}

.s-hero.is-live {
  box-shadow: 0 0 70px -22px var(--accent);
}

.s-hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-2);
  min-width: 0;
  padding: var(--sp-5);
}

.s-hero__kicker {
  display: flex;
  align-items: center;
  gap: 0.9em;
  color: var(--accent);
  font: 700 var(--fs-label) / 1 var(--font-head);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.s-hero__week {
  color: var(--text-2);
}

.s-hero__name {
  color: var(--accent);
  font: 800 clamp(30px, 8vmin, 78px) / 0.95 var(--font-head);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-wrap: balance;
}

.s-hero__tag {
  max-width: 30em;
  font-size: var(--fs-lead);
  line-height: 1.3;
}

.s-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.s-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-2);
}

.s-hero__join {
  animation: s-beckon 1.7s ease-in-out infinite;
  animation-play-state: var(--k-loop);
}

@keyframes s-beckon {
  50% {
    filter: drop-shadow(0 0 16px rgba(220, 255, 0, 0.7));
  }
}

.s-hero__here {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
  color: var(--text-2);
  font-weight: 600;
}

.s-hero__count {
  color: var(--text);
  font-size: var(--fs-h1);
  line-height: 1;
}

.s-hero__hint {
  max-width: 24em;
  color: var(--muted);
  font-size: var(--fs-label);
}

.s-hero__art {
  position: relative;
  min-width: 0;
}

.s-season {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 0;
}

.s-season__head {
  display: flex;
  align-items: baseline;
  flex: none;
  gap: var(--sp-3);
}

.s-season__title {
  font: 700 var(--fs-h3) / 1.1 var(--font-head);
  letter-spacing: -0.02em;
}

.s-season__last {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-left: auto;
  color: var(--text-2);
  font: 600 var(--fs-label) / 1.1 var(--font-body);
  text-decoration: none;
}

.s-season__last:hover {
  color: var(--lime);
}

.s-season__grid {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 23vmin, 214px), 1fr));
  align-content: start;
  gap: var(--sp-2);
  min-height: 0;
  padding: 3px 6px 10px 3px;
}

.s-game {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  min-height: clamp(104px, 17vmin, 136px);
  margin: 0;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) calc(var(--sp-3) + 5px);
  overflow: hidden;
  border: 2px solid var(--rule);
  border-radius: var(--r-3);
  background: var(--card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 260ms var(--ease-spring), border-color 140ms ease-out, background-color 140ms ease-out;
}

.s-game::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

@media (hover: hover) {
  .s-game:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 7%, var(--card));
    transform: translateY(-3px);
  }
}

.s-game:active {
  transform: translateY(2px) scale(0.98);
  transition-duration: 60ms;
}

.s-game__week {
  color: var(--accent);
  font-size: var(--fs-h3);
  line-height: 1;
}

.s-game__name {
  font: 700 var(--fs-body) / 1.15 var(--font-head);
  letter-spacing: -0.025em;
}

.s-game__tag {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.s-game__state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: auto;
  padding-top: 4px;
  font-size: var(--fs-label);
}

.s-game__you {
  color: var(--lime);
  font-weight: 700;
  white-space: nowrap;
}

.s-game.is-played .s-game__tag {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.s-game__done {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: var(--green);
  font-weight: 600;
}

.s-game.is-played:not(.is-now) .s-game__name {
  color: var(--text-2);
}

.s-game.is-now {
  border-color: var(--lime);
  box-shadow: 0 0 26px -10px var(--lime);
}

.s-game.is-live {
  border-color: var(--green);
}

.s-gamecard {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  color: var(--text);
}

/* 5. Lobby */
.s-lobby {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: var(--sp-4);
}

.s-lobby__head {
  display: flex;
  align-items: flex-end;
  flex: none;
  justify-content: space-between;
  gap: var(--sp-4);
}

.s-lobby__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.s-lobby__name {
  color: var(--accent);
  font: 800 var(--fs-h1) / 1 var(--font-head);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.s-lobby__tag {
  color: var(--text-2);
}

.s-lobby__count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  gap: 2px;
}

.s-lobby__count .k-num {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 0.86;
}

.s-lobby__count .k-label {
  white-space: nowrap;
}

.s-lobby__body {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: minmax(0, 1fr) clamp(236px, 29vw, 350px);
  gap: var(--sp-3);
  min-height: 0;
}

.s-lobby__room {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 0;
  padding: var(--sp-3);
  background:
    radial-gradient(90% 70% at 50% 100%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    var(--card);
}

.s-lobby__grid {
  display: flex;
  flex: 1 1 0;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: var(--cell-gap, 8px);
  min-height: 0;
  overflow: hidden;
}

.s-who {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: var(--cell, 72px);
  min-width: 0;
}

.s-who__av {
  position: relative;
  display: inline-flex;
  transition: opacity 200ms ease-out;
}

.s-who__name {
  display: none;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-2);
  font: 600 var(--fs-label) / 1.3 var(--font-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-lobby__grid.is-named .s-who__name {
  display: block;
}

.s-who.is-you .s-who__name {
  color: var(--lime);
  font-weight: 700;
}

.s-who.is-you .s-who__av::after {
  content: '';
  position: absolute;
  right: 12%;
  bottom: -3px;
  left: 12%;
  height: 3px;
  border-radius: 2px;
  background: var(--lime);
}

/* the host's crown sits on the critter, not beside it */
.s-who__crown {
  position: absolute;
  top: -4px;
  right: 2px;
  display: none;
  color: var(--warn);
  font-size: 15px;
  filter: drop-shadow(0 1px 0 #000000);
  rotate: 18deg;
}

/* critters too small for a name carry their initials, so fifty in a small window are still fifty people */
.s-who__chip {
  display: none;
  padding: 0 0.4em;
  border-radius: var(--r-pill);
  background: var(--card-2);
  color: var(--text-2);
  font: 700 12px / 1.3 var(--font-body);
  letter-spacing: 0.02em;
}

.s-lobby__grid.is-chipped .s-who__chip {
  display: block;
}

.s-who.is-you .s-who__chip {
  background: var(--lime);
  color: #000000;
}

.s-who:focus-visible {
  border-radius: 8px;
  outline-offset: 0;
}

/* who a critter is, the moment the pointer is on it */
.s-lobby__tip {
  position: absolute;
  z-index: 3;
  max-width: 92%;
  overflow: hidden;
  padding: 0.3em 0.75em;
  border: 1.5px solid var(--rule);
  border-radius: var(--r-pill);
  background: var(--card-2);
  box-shadow: 0 4px 18px -4px #000000;
  color: var(--text);
  font: 600 var(--fs-label) / 1.2 var(--font-body);
  pointer-events: none;
  text-overflow: ellipsis;
  translate: -50% 0;
  white-space: nowrap;
}

.s-who.is-host .s-who__crown {
  display: block;
}

.s-who.is-checking .s-who__av {
  opacity: 0.5;
}

.s-who.is-watching .s-who__name::after {
  content: ' (host)';
  color: var(--muted);
}

.s-lobby__foot {
  display: flex;
  align-items: center;
  flex: none;
  justify-content: center;
}

.s-lobby__side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 0;
  padding: 2px 4px 2px 2px;
}

.s-lobby__side > .k-card {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
}

.s-lobby__side .k-btn:not(.k-btn--big),
.s-rulesbar .k-btn:not(.k-btn--big) {
  --btn-h: 36px;
  --btn-lip-h: 4px;
  border-radius: var(--r-2);
  font-size: var(--fs-label);
}

.s-lobby__ready {
  color: var(--text-2);
  font-size: var(--fs-label);
  line-height: 1.3;
}

.s-lobby__bots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.s-lobby__bots .k-label {
  margin-right: auto;
}

.s-lobby__hostfoot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}

.s-lobby__checkhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
}

.s-check__verdict {
  color: var(--warn);
  font: 700 var(--fs-label) / 1.1 var(--font-body);
}

.s-check__verdict.is-ok {
  color: var(--green);
}

.s-check {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--text-2);
  font-size: var(--fs-label);
  line-height: 1.25;
}

.s-check__icon {
  display: inline-flex;
  flex: none;
  color: var(--muted);
}

.s-check__text {
  flex: 1;
  min-width: 0;
}

.s-check__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--card-2);
  color: var(--muted);
}

.s-check__mark .k-icon {
  width: 1.1em;
  height: 1.1em;
  stroke-width: 3.2;
}

.s-check__mark .k-dots i {
  width: 3px;
  height: 3px;
}

.s-check__mark .k-dots {
  gap: 2px;
}

.s-check[data-state='ok'] .s-check__mark {
  background: var(--green);
  color: #000000;
}

.s-check[data-state='warn'] .s-check__mark {
  background: var(--warn);
  color: #000000;
}

.s-check[data-state='bad'] .s-check__mark {
  background: var(--danger);
  color: #000000;
}

.s-check[data-state='bad'] .s-check__text,
.s-check[data-state='warn'] .s-check__text {
  color: var(--text);
}

.s-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  color: var(--text-2);
  font-size: var(--fs-label);
  line-height: 1.32;
}

.s-tip__icon {
  display: inline-flex;
  flex: none;
  margin-top: 1px;
  color: var(--accent);
}

.s-tips__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.s-tips__dots {
  display: none;
  gap: 4px;
}

.s-tips__dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rule);
}

.s-tips__dots i.is-on {
  background: var(--accent);
}

/* what a game asks its players before play: private ticks and choices */
.s-opt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid #262626;
}

.s-opt__label {
  font-weight: 600;
}

.s-opt__does {
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.3;
}

.s-opt__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.s-opts .k-btn {
  --btn-h: 32px;
  --btn-lip-h: 4px;
  border-radius: var(--r-2);
  font-size: var(--fs-label);
}

.s-opts .k-btn.is-selected {
  --btn-face: var(--lime);
  --btn-ink: #000000;
  --btn-edge: transparent;
  font-weight: 700;
}

.s-opts .k-btn.is-selected .k-btn__face {
  box-shadow: inset 0 3px 0 -1px rgba(255, 255, 255, 0.5);
}

/* a game that asks something needs the room: the tips turn their pages one at a time */
.s-lobby__side:has(.s-opts) .s-lobby__tips .s-tip:not(.is-on) {
  display: none;
}

.s-lobby__side:has(.s-opts) .s-tips__dots {
  display: flex;
}

.s-lobby__side:has(.s-opts) .s-lobby__tips {
  cursor: pointer;
}

/* so does a host who is also playing: the host card and the ready check come first */
.s-lobby__side.is-host:has(.s-lobby__checks) .s-lobby__tips .s-tip:not(.is-on) {
  display: none;
}

.s-lobby__side.is-host:has(.s-lobby__checks) .s-tips__dots {
  display: flex;
}

.s-lobby__side.is-host:has(.s-lobby__checks) .s-lobby__tips {
  cursor: pointer;
}

/* ...and in a laptop-height window the ready check keeps only the lines that still need
   something done, so the tips are not cut off at the foot of the column */
@media (max-height: 760px) {
  .s-lobby__side.is-host .s-check[data-state='ok'] {
    display: none;
  }
}

.s-lobby__url {
  color: var(--lime);
  font: 800 var(--fs-h2) / 1.1 var(--font-head);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.s-lobby--stage .s-lobby__body {
  grid-template-columns: minmax(0, 1fr) clamp(240px, 26vw, 380px);
}

/* 6. Rules card and rules screen */
.s-rules {
  --accent: var(--lime);
  --accent-ink: #000000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-height: 0;
  padding: var(--sp-5);
  border: 2px solid var(--accent);
  border-radius: var(--r-5);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 11%, var(--card)), var(--card) 48%);
  box-shadow: 0 0 80px -26px var(--accent);
  color: var(--text);
}

.s-rules--compact {
  gap: var(--sp-3);
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.s-rules__head {
  display: flex;
  align-items: flex-end;
  flex: none;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
}

.s-rules__name {
  color: var(--accent);
  font: 800 var(--fs-h1) / 1 var(--font-head);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.k-modal__title.s-rules__name {
  font-size: var(--fs-h2);
}

.s-rules__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.s-rules__body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--sp-5);
}

.s-rules__lines {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.s-rules__lines li {
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
  font-size: clamp(16px, calc(8px + 1.6vmin), 24px);
  font-weight: 500;
  line-height: 1.3;
}

.s-rules__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.75em;
  height: 1.75em;
  margin-top: -0.12em;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.82em;
  font-weight: 800;
}

.s-rules__side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

.s-rules__block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.s-rules__ctl {
  display: flex;
  align-items: center;
  gap: 0.65em;
  line-height: 1.25;
}

.s-rules__keys {
  display: inline-flex;
  flex: none;
  gap: 4px;
}

.s-rules__signs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.s-rules__kind {
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.3;
}

.s-rules__try {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
  padding-top: var(--sp-3);
  border-top: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--rule));
}

.s-rules__practice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.s-rulesscreen {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: var(--sp-4);
}

.s-rulesbar {
  display: flex;
  align-items: center;
  flex: none;
  justify-content: space-between;
  gap: var(--sp-3);
}

.s-rulesbar__clock {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.s-rulesbar__when {
  font: 700 var(--fs-h3) / 1.1 var(--font-head);
  letter-spacing: -0.02em;
}

.s-rulesbar__sub {
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.3;
}

.s-rulesbar__host {
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--sp-2);
}

.s-rulesbar__late {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.5em;
  padding: 0.5em 0.9em;
  border: 2px solid var(--lavender);
  border-radius: var(--r-3);
  background: color-mix(in srgb, var(--lavender) 12%, transparent);
  font-weight: 600;
}

.s-rulesscreen__card {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  min-height: 0;
  margin: auto 0;
}

.s-rulesscreen__card > .s-rules {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-color: var(--rule) transparent;
  scrollbar-width: thin;
}

/* a few of the people about to play stand on the card's top edge: the screen is never still */
.s-rulesscreen__perch {
  position: absolute;
  right: clamp(20px, 7vw, 96px);
  bottom: calc(100% - 11px);
  z-index: 1;
  width: 150px;
  height: 52px;
  pointer-events: none;
}

/* the choices a game asks for, still open on the rules screen: one slim row */
.s-rulesscreen > .s-opts {
  display: flex;
  align-items: center;
  flex: none;
  flex-flow: row wrap;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-2) var(--sp-3);
}

.s-rulesscreen > .s-opts .s-opt,
.s-rulesscreen > .s-opts .s-setting {
  flex-direction: row;
  align-items: center;
  gap: var(--sp-2);
  padding: 0;
  border: 0;
}

.s-rulesscreen > .s-opts .s-opt__does,
.s-rulesscreen > .s-opts .s-setting__sub,
.s-rulesscreen > .s-opts .s-opts__only {
  display: none;
}

/* "practice": "tall" in game.json (a steer, an aim, a drawing pad): the card takes all the
   height there is, and the try-it gets everything the rules leave. Nothing is pushed out of view. */
.s-rulesscreen__card:has(> .s-rules--tall .s-rules__try:not(.k-hide)) {
  flex: 1 1 auto;
  margin: 34px 0 0;
}

.s-rulesscreen__card > .s-rules--tall:has(.s-rules__try:not(.k-hide)) {
  flex: 1 1 auto;
}

.s-rules--tall {
  gap: var(--sp-3);
}

.s-rules--tall .s-rules__kind {
  display: none;
}

.s-rules--tall .s-rules__try {
  flex: 1 1 0;
  min-height: 0;
}

.s-rules--tall .s-rules__practice {
  flex: 1 1 0;
  min-height: 130px;
}

/* In a wide window the tall try-it stands beside the rules, top to bottom: about a third of
   the card, and as tall as the card is. (A narrow, tall window keeps it under the rules; a
   short one is laid out at the end of this file.) */
@media (min-width: 1000px) and (min-height: 621px) {
  .s-rules--tall:has(.s-rules__try:not(.k-hide)) {
    display: grid;
    grid-template-areas: 'head head' 'body try';
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--sp-3) var(--sp-5);
  }

  .s-rules--tall:has(.s-rules__try:not(.k-hide)) .s-rules__head {
    grid-area: head;
  }

  .s-rules--tall:has(.s-rules__try:not(.k-hide)) .s-rules__body {
    align-content: start;
    grid-area: body;
    min-height: 0;
    overflow: auto;
    scrollbar-color: var(--rule) transparent;
    scrollbar-width: thin;
  }

  .s-rules--tall:has(.s-rules__try:not(.k-hide)) .s-rules__try {
    grid-area: try;
    padding: 0 0 0 var(--sp-5);
    border-top: 0;
    border-left: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--rule));
  }
}

/* the stage is read from across a call: say it larger */
.s-rulesscreen--stage .s-rules__lines li {
  font-size: clamp(17px, calc(7px + 2.3vmin), 32px);
}

.s-rulesscreen--stage .s-rules__ctl,
.s-rulesscreen--stage .s-rules__sign {
  font-size: var(--fs-lead);
}

/* 7. Play: top bar and overlays */
.s-play {
  --top-h: clamp(60px, 10.6vmin, 84px);
  display: flex;
  flex-direction: column;
}

.s-top {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--sp-3);
  height: var(--top-h);
  padding: 0 var(--sp-3) 0 var(--sp-4);
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 50%, var(--rule));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 15%, #0A0A0A), #0A0A0A);
}

.s-top__game {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: 24%;
}

.s-top__game:has(.s-top__round:empty) .s-top__round {
  display: none;
}

.s-top__name {
  color: var(--accent);
  font: 800 var(--fs-label) / 1.1 var(--font-head);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.s-top__round {
  color: var(--text-2);
  font: 600 var(--fs-label) / 1.1 var(--font-body);
  white-space: nowrap;
}

.s-top__phase {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-left: var(--sp-3);
  border-left: 2px solid color-mix(in srgb, var(--accent) 30%, var(--rule));
}

.s-top__title {
  display: -webkit-box;
  overflow: hidden;
  font: 800 var(--fs-h3) / 1.1 var(--font-head);
  letter-spacing: -0.03em;
  transform-origin: 0 50%;
  transition: color 200ms ease-out, transform 320ms var(--ease-spring);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* the clock has a pulse: in the last five seconds the title leans in */
.s-top.is-urgent .s-top__title {
  color: var(--warn);
  transform: skewX(calc(-9deg * var(--k-motion))) scale(calc(1 + 0.05 * var(--k-motion)));
}

.s-top__note {
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-label);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-top__note:empty {
  display: none;
}

/* the note carries what cannot be missed: microphones locked, a prompt being replayed */
.s-top__note.is-warn {
  color: var(--warn);
  font-weight: 600;
}

.s-top__right {
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--sp-2);
}

.s-top .k-timer {
  --timer: clamp(44px, 8.1vmin, 62px);
}

.s-top__btn {
  --btn-h: 34px;
  --btn-lip-h: 4px;
  border-radius: var(--r-2);
  font-size: var(--fs-label);
}

.s-top__btn .k-btn__face {
  gap: 0.4em;
  padding: 0.2em 0.75em;
}

.s-top__hostbtn .k-icon {
  color: var(--warn);
}

.s-play--stage .s-top__btn {
  display: none;
}

.s-play--stage .s-top__title {
  font-size: var(--fs-h2);
}

.s-play__body {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
}

.s-play__area {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  transition: filter 300ms ease-out;
}

.s-play__layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
}

/* "Microphones are locked": said once, for a moment, as it happens. After that the call sign
   and the top bar's note carry it, so nothing stands over the game. */
.s-play__mics {
  position: absolute;
  top: 8px;
  right: 0;
  left: 0;
  display: flex;
  justify-content: center;
}

.s-play__micspill {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 1em;
  border-radius: var(--r-pill);
  background: var(--warn);
  box-shadow: 0 0 26px -6px var(--warn);
  color: #000000;
  font: 700 var(--fs-label) / 1.1 var(--font-body);
  white-space: nowrap;
}

/* the last seconds: a bar that drains along the top edge of the play area */
.s-play__drain {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--warn);
  box-shadow: 0 0 12px 0 var(--warn);
  transform-origin: 0 50%;
}

.s-play__paused {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  /* one even veil: the game behind it is dimmed and softened, never half shown */
  background: rgb(0 0 0 / 0.84);
  -webkit-backdrop-filter: blur(6px) saturate(0.6);
  backdrop-filter: blur(6px) saturate(0.6);
  pointer-events: auto;
}

.s-play__pausedcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-2);
  text-align: center;
}

.s-play__pausedtitle {
  color: var(--accent);
  font: 800 var(--fs-hero) / 1 var(--font-head);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.s-play__cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: var(--sp-4);
  /* never flat black: the same faint grid and glow as every other screen */
  background:
    radial-gradient(120% 75% at 50% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 62%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
  pointer-events: auto;
  scrollbar-color: var(--rule) transparent;
  scrollbar-width: thin;
}

.s-play__late {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  width: min(100%, 780px);
  margin: auto 0;
  padding: var(--sp-4);
  border: 2px solid var(--accent);
  border-radius: var(--r-5);
  background: var(--card);
}

.s-play__latehead {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.s-play__latehead > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 8. Reactions */
.s-react {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.s-react__btn {
  --btn-h: 38px;
  --btn-lip-h: 4px;
  border-radius: var(--r-pill);
  font-size: var(--fs-label);
}

.s-react__btn .k-btn__face {
  gap: 0.4em;
  padding: 0.15em 0.85em 0.15em 0.3em;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 55%, var(--rule)), inset 0 3px 0 -1px rgba(255, 255, 255, 0.1);
}

.s-react__toggle {
  --btn-h: 36px;
  --btn-lip-h: 4px;
  border-radius: var(--r-pill);
  font-size: var(--fs-label);
}

.s-react__toggle .k-btn__face {
  gap: 0.4em;
  padding: 0.15em 0.85em 0.15em 0.3em;
}

/* over a game: one small button in the corner that opens upwards into the four */
.s-react--fold {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  opacity: 0.88;
  transition: opacity 140ms ease-out;
}

.s-react--fold:hover,
.s-react--fold:focus-within,
.s-react--fold.is-open {
  opacity: 1;
}

.s-react--fold .s-react__btn {
  display: none;
}

.s-react--fold.is-open .s-react__btn {
  display: inline-flex;
}

.s-react--fold.is-open .s-react__toggle .k-btn__face {
  box-shadow: inset 0 0 0 2px var(--lime);
}

.s-floats {
  position: absolute;
  top: 8%;
  bottom: 56px;
  left: 12px;
  width: 280px;
  pointer-events: none;
}

/* over a game they rise clear of the open React strip in the corner */
.s-play__layer .s-floats {
  left: 124px;
}

.s-float {
  --c: var(--lime);
  position: absolute;
  bottom: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 2px 0.85em 2px 3px;
  border: 2px solid var(--c);
  border-radius: var(--r-pill);
  background: rgba(18, 18, 18, 0.94);
  box-shadow: 0 0 20px -6px var(--c);
  font-weight: 600;
  white-space: nowrap;
}

.s-float b {
  color: var(--c);
  font: 800 0.92em / 1 var(--font-head);
  letter-spacing: -0.02em;
}

.s-float__name {
  max-width: 8em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 9. Results */
.s-results {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: min(100%, 1400px);
  margin: 0 auto;
  padding: var(--sp-4);
}

.s-results__head {
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--sp-3);
}

.s-results__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin-right: auto;
}

.s-results__name {
  overflow: hidden;
  color: var(--accent);
  font: 800 var(--fs-h1) / 1 var(--font-head);
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.s-results__chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px var(--sp-3);
}

.s-results__chips > .s-react .s-react__btn {
  --btn-h: 32px;
}

/* how many finished: a chip in a wide window, a few words in the title line in a narrow one */
.s-results__count {
  display: none;
}

.s-results__go {
  display: flex;
  flex: none;
  gap: var(--sp-2);
}

.s-results__go .k-btn {
  --btn-h: clamp(36px, 6.6vmin, 46px);
}

.s-results__body {
  display: grid;
  flex: 1 1 0;
  grid-template-areas: 'pod top side';
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--sp-3);
  min-height: 0;
}

/* the podium's column: in a wide window the talking points stand over it */
.s-results__left {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  grid-area: pod;
  min-width: 0;
  min-height: 0;
}

.s-results__highslot {
  flex: none;
  min-height: 0;
}

.s-results__highslot:empty {
  display: none;
}

.s-results__podium {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  border-radius: var(--r-4);
  background: radial-gradient(75% 70% at 50% 100%, color-mix(in srgb, var(--accent) 17%, transparent), transparent 72%);
}

.s-results__podium .k-podium {
  transform-origin: 50% 100%;
}

@media (min-width: 1000px) and (min-height: 640px) {
  .s-results__podium .k-podium {
    width: 74%;
    scale: 1.34;
  }
}

@media (min-width: 1500px) and (min-height: 820px) {
  .s-results__podium .k-podium {
    width: 60%;
    scale: 1.62;
  }
}

/* The podium's moment. Before anything else names a place the podium plays alone, in the
   middle of the page and large; then it steps back to its column and the rest comes in. */
.s-results__body.is-intro .s-results__left {
  grid-row: 1 / -1;
  grid-column: 1 / -1;
}

.s-results__body.is-intro .s-results__top,
.s-results__body.is-intro .s-results__side {
  visibility: hidden;
}

.s-results__body.is-intro .s-results__highslot {
  display: none;
}

.s-results__body.is-intro .s-results__podium {
  align-items: center;
  background: radial-gradient(48% 62% at 50% 62%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 74%);
}

.s-results__body.is-intro .k-podium {
  width: 62.5%;
  scale: 1.6;
  transform-origin: 50% 50%;
}

@media (min-width: 1500px) and (min-height: 820px) {
  .s-results__body.is-intro .k-podium {
    width: 50%;
    scale: 2;
  }
}

.s-results__top {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  grid-area: top;
  min-height: 0;
  padding: var(--sp-3);
}

.s-results__list {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  padding-right: 4px;
}

/* ten rows fit a window 720 high: one line each, the points in small type before the score */
.s-results__list .k-score {
  min-height: 44px;
  padding: 2px var(--sp-3) 2px 5px;
}

.s-results__pts {
  flex: none;
  color: var(--muted);
  font-size: var(--fs-label);
  white-space: nowrap;
}

/* a row that has not been read out yet is a shimmering bar: it gives nothing away */
.s-results__slot {
  position: relative;
}

.s-results__slot.is-waiting .k-score {
  visibility: hidden;
}

.s-results__bar {
  position: absolute;
  inset: 0;
  border-radius: var(--r-3);
  background: var(--card-2);
  opacity: 0.7;
}

.s-results__side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  grid-area: side;
  min-height: 0;
  padding: 2px 4px 2px 2px;
}

.s-results__side > .k-card,
.s-results__high {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
  padding: var(--sp-3);
}

.s-results__you {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 2px 0 6px;
}

.s-results__place {
  min-width: 1.6em;
  border-radius: var(--r-2);
  color: var(--text);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 0.95;
}

.s-results__tied {
  margin-left: 0.4em;
  color: var(--muted);
  font: 600 var(--fs-label) / 1 var(--font-body);
  letter-spacing: 0;
}

.s-results__pointsbox {
  text-align: right;
}

.s-results__points,
.s-results__plus {
  color: var(--lime);
  font: 800 var(--fs-h1) / 1 var(--font-head);
  letter-spacing: -0.03em;
}

.s-results__points.k-shimmer {
  min-width: 1.1em;
  border-radius: var(--r-1);
  text-align: center;
}

.s-results__note {
  font-weight: 600;
}

/* Outside the top ten the page does not shout the place. What went right leads, the points
   are the big number, and the place is one quiet line. */
.s-results__kind {
  color: var(--text);
  text-wrap: balance;
}

.s-results__you--kind {
  justify-content: flex-start;
  padding: 0;
}

.s-results__mine--kind .s-results__pointsbox {
  text-align: left;
}

.s-results__mine--kind .s-results__points,
.s-results__mine--kind .s-results__plus {
  font-size: var(--fs-hero);
  line-height: 0.95;
}

.s-results__placeline {
  width: fit-content;
  min-width: 5em;
  border-radius: var(--r-1);
  color: var(--text-2);
  font: 700 var(--fs-h3) / 1.25 var(--font-head);
  letter-spacing: -0.02em;
}

.s-award__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.s-award__who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.s-high {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding-left: 1.15em;
  color: var(--text-2);
  line-height: 1.3;
}

.s-high li::marker {
  color: var(--accent);
}

.s-results > .s-floats {
  top: 20%;
  bottom: var(--sp-4);
  left: var(--sp-4);
}

.s-results--stage .s-results__body {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
}

/* the stage is read out from: its talking points are set larger */
.s-results--stage .s-high {
  font-size: var(--fs-lead);
}

/* 10. Leaderboard */
.s-board__head {
  display: flex;
  align-items: center;
  flex: none;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
}

.s-board__tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.s-tabs {
  display: flex;
  gap: 6px;
}

.s-tabs .k-btn {
  --btn-h: 38px;
  --btn-lip-h: 4px;
  border-radius: var(--r-2);
}

.s-tabs .k-btn.is-selected {
  --btn-face: var(--lime);
  --btn-ink: #000000;
  --btn-edge: transparent;
  font-weight: 700;
}

.s-tabs .k-btn.is-selected .k-btn__face {
  box-shadow: inset 0 3px 0 -1px rgba(255, 255, 255, 0.5);
}

.s-select {
  height: 42px;
  max-width: 15em;
  padding: 0 0.7em;
  border: 2px solid var(--rule);
  border-radius: var(--r-2);
  background: var(--card-2);
  color: var(--text);
  font-weight: 600;
}

.s-board__body {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--sp-3);
  min-height: 0;
}

.s-board__table {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 0;
  padding: var(--sp-3);
}

.s-board__titles {
  display: flex;
  flex: 1 1 280px;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.s-board__caption {
  flex: none;
  color: var(--text-2);
  font-size: var(--fs-label);
  line-height: 1.3;
}

.s-board__list {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  padding-right: 4px;
}

/* one line a row; the top three stand out; a thin bar shows each against the leader */
.s-board__list .k-list {
  gap: 3px;
}

.s-board__list .k-score {
  position: relative;
  min-height: 38px;
  padding: 0 var(--sp-3) 5px 5px;
}

.s-board__list .k-score .k-tag {
  padding-block: 1px;
}

.s-board__list .k-score[data-medal] {
  min-height: 44px;
}

.s-board__list .k-score[data-medal] .k-score__place {
  width: 2.5em;
  height: 2.5em;
  color: #000000;
}

.s-board__list .k-score[data-medal='1'] .k-score__place {
  background: var(--lime);
}

.s-board__list .k-score[data-medal='2'] .k-score__place {
  background: var(--p-white);
}

.s-board__list .k-score[data-medal='3'] .k-score__place {
  background: var(--p-sand);
}

.s-board__sub {
  flex: none;
  color: var(--muted);
  font-size: var(--fs-label);
  white-space: nowrap;
}

.s-board__bar {
  position: absolute;
  right: 12px;
  bottom: 3px;
  left: 12px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.s-board__bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  opacity: 0.5;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 520ms var(--ease-spring);
}

.s-board__list .k-score[data-medal='1'] .s-board__bar i {
  opacity: 1;
}

.s-board__more {
  display: flex;
  align-items: center;
  flex: none;
  justify-content: space-between;
  gap: var(--sp-2);
}

.s-board__more .k-btn {
  --btn-h: 34px;
  --btn-lip-h: 4px;
  border-radius: var(--r-2);
  font-size: var(--fs-label);
}

.s-board__me {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.s-board__mine {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-height: 100%;
  min-height: 0;
  padding: var(--sp-3);
}

.s-board__rank {
  color: var(--lime);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1;
}

.s-board__pts {
  font-size: var(--fs-lead);
  font-weight: 600;
}

.s-board__around {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 4px;
}

/* 11. Profile */
.s-profile__head {
  display: flex;
  align-items: center;
  flex: none;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
}

.s-profile__who {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-right: auto;
}

.s-profile__btn {
  --btn-h: 30px;
  --btn-lip-h: 3px;
  border-radius: var(--r-pill);
  font-size: var(--fs-label);
}

.s-profile__btn .k-btn__face {
  padding: 0.1em 0.9em;
}

.s-profile__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: var(--sp-2);
}

.s-tile {
  min-width: 5.6em;
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid var(--rule);
  border-radius: var(--r-3);
  background: var(--card);
  text-align: center;
}

.s-tile__n {
  font-size: var(--fs-h2);
  line-height: 1.15;
}

.s-tile.is-key {
  border-color: var(--lime);
}

.s-tile.is-key .s-tile__n {
  color: var(--lime);
}

.s-profile__body {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: var(--sp-3);
  min-height: 0;
  padding: 2px 6px 6px 2px;
}

.s-sess {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.7em;
  padding: 6px 12px 6px 6px;
  border: 2px solid var(--rule);
  border-radius: var(--r-3);
  background: #0E0E0E;
  color: var(--text);
  text-decoration: none;
}

.s-sess:hover,
.s-mate:hover {
  border-color: #5C5C5C;
}

.s-sess__week {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: var(--card-2);
  font-size: var(--fs-label);
}

.s-sess__game {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.s-sess__game b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s-sess__game span,
.s-sess__place {
  font-size: var(--fs-label);
}

.s-sess__place {
  color: var(--text-2);
  white-space: nowrap;
}

.s-sess__pts {
  color: var(--lime);
  font-size: var(--fs-lead);
}

.s-stats {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.s-stats__name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  padding-bottom: 2px;
}

.s-stats__name span {
  font-size: var(--fs-label);
}

.s-mate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  padding: 7px 12px;
  border: 2px solid var(--rule);
  border-radius: var(--r-3);
  background: #0E0E0E;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.s-mate span:last-child {
  font-size: var(--fs-label);
  font-weight: 500;
}

/* 12. Settings */
.s-settings__head {
  display: flex;
  align-items: center;
  flex: none;
  justify-content: space-between;
  gap: var(--sp-3);
}

.s-settings__saved {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--muted);
  font: 600 var(--fs-label) / 1 var(--font-body);
  transition: color 200ms ease-out;
}

.s-settings__saved.is-fresh {
  color: var(--green);
}

.s-settings__body {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--sp-3);
  min-height: 0;
  padding: 2px 6px 6px 2px;
}

/* these pages fold between two cards, where a fade shows nothing: a plain mark says there is more */
.s-settings__body::after,
.s-profile__body::after {
  position: sticky;
  bottom: 2px;
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: calc(-1 * var(--sp-3) - 28px);
  padding: 5px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card-2);
  box-shadow: 0 0 10px 4px var(--bg);
  color: var(--text-2);
  content: 'More below';
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.s-settings__body.is-more::after,
.s-profile__body.is-more::after {
  opacity: 1;
}

.s-settings__body.is-more,
.s-profile__body.is-more {
  -webkit-mask-image: none;
  mask-image: none;
}

.s-settings__col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}

.s-settings .s-sec .s-setting:first-of-type {
  border-top: 0;
}

.s-settings .k-btn {
  --btn-h: 38px;
  --btn-lip-h: 4px;
  border-radius: var(--r-2);
}

/* 13. Host console */
.s-host {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-height: calc(100% - 24px);
  pointer-events: none;
}

.s-host > * {
  pointer-events: auto;
}

.s-host__panel {
  display: none;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 8px;
  width: min(312px, calc(100vw - 24px));
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  border: 2px solid var(--warn);
  border-radius: var(--r-4);
  background: #0E0E0E;
  box-shadow: 0 0 54px -16px var(--warn);
}

.s-host.is-open .s-host__panel {
  display: flex;
}

.s-host__head {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.5em;
}

.s-host__state {
  margin-left: auto;
  padding: 0.25em 0.7em;
  border-radius: var(--r-pill);
  background: var(--card-2);
  color: var(--text-2);
  font: 700 12px / 1.1 var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.s-host__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--card-2);
  color: var(--text-2);
  cursor: pointer;
}

.s-host__close:hover {
  color: var(--text);
}

.s-host__counts {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 4px;
}

/* a line from the game for whoever is hosting */
.s-host__note {
  display: flex;
  align-items: flex-start;
  flex: none;
  gap: 0.5em;
  padding: 7px 9px;
  border: 2px solid var(--warn);
  border-radius: var(--r-2);
  background: color-mix(in srgb, var(--warn) 14%, #0E0E0E);
  color: var(--text);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.3;
}

.s-host__note .k-icon {
  flex: none;
  margin-top: 0.1em;
  color: var(--warn);
}

.s-host__note span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow-wrap: anywhere;
}

/* and a dot on the Host button while the panel is shut */
html[data-host-note] .s-top__hostbtn::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 10px 0 var(--warn);
}

.s-host__mid {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 0 4px 2px 0;
}

.s-host__cmds {
  display: grid;
  flex: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.s-host__cmds .k-btn--primary {
  grid-column: 1 / -1;
}

/* a button left alone on its row takes the row */
.s-host__cmds .s-host__lone {
  grid-column: 1 / -1;
}

.s-host__asks {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 4px;
}

.s-host__asks:empty {
  display: none;
}

.s-host .k-btn {
  --btn-h: 34px;
  --btn-lip-h: 4px;
  border-radius: var(--r-2);
  font-size: var(--fs-label);
}

.s-host .k-btn__face {
  padding: 0.2em 0.7em;
}

.s-host__hint {
  flex: none;
  color: var(--warn);
  font-size: 12px;
  line-height: 1.3;
}

.s-host__bots {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
}

.s-host__bots .k-label {
  margin-right: auto;
}

/* dev mode: quick counts, and a field for any count */
.s-bots {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.s-bots__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.s-bots__row > :first-child {
  margin-right: auto;
}

.s-bots__n {
  width: 4.6em;
  height: 34px;
  padding: 0 0.5em;
  border: 2px solid var(--rule);
  border-radius: var(--r-2);
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.s-bots__n:focus-visible {
  border-color: var(--lime);
  outline: none;
}

.s-bots__n:disabled {
  opacity: 0.5;
}

.s-host__game {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 5px;
}

.s-host__game:empty {
  display: none;
}

.s-host__gcmd {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.s-host__picks {
  display: flex;
  gap: 5px;
}

.s-host__pick {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: none;
  height: 32px;
  font-size: var(--fs-label);
}

.s-host__entries {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 3px;
}

.s-host__entries:empty {
  display: none;
}

.s-host__people {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
}

.s-host__who {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.5em;
  min-height: 28px;
  font-size: var(--fs-label);
  font-weight: 600;
}

.s-host__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.s-host__who.is-away .s-host__dot {
  background: var(--warn);
}

.s-host__who.is-away {
  color: var(--warn);
}

.s-host__who.is-waiting .s-host__dot {
  background: var(--lavender);
}

.s-host__flag {
  flex: none;
  padding: 0.1em 0.55em;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.s-host .s-host__remove {
  --btn-h: 22px;
  --btn-lip-h: 3px;
  margin-left: auto;
  border-radius: 8px;
  font-size: 12px;
}

.s-host__who .s-host__flag + .s-host__flag,
.s-host__who .k-clip + .s-host__flag:last-child {
  margin-left: auto;
}

.s-host__foot {
  display: flex;
  align-items: center;
  flex: none;
  justify-content: space-between;
  gap: 6px;
}

.s-host__foot .s-linkbtn {
  white-space: nowrap;
}

.s-host__log {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
  min-height: 2.7em;
  padding-top: 7px;
  border-top: 2px solid var(--rule);
  font-size: var(--fs-label);
  line-height: 1.3;
}

.s-host__log:empty::before {
  content: 'What each command did appears here.';
  color: var(--muted);
}

.s-host__line {
  display: none;
  color: var(--muted);
}

.s-host__line:nth-last-child(-n + 2) {
  display: block;
}

.s-host__line.is-latest {
  color: var(--text);
  font-weight: 600;
}

.s-host__line.is-latest.is-good {
  color: var(--green);
}

.s-host__line.is-latest.is-bad {
  color: var(--danger);
}

.s-host__line.is-latest.is-warn {
  color: var(--warn);
}

/* during play the Host button in the top bar opens it, and it hangs below the bar */
.s-session[data-screen='play'] .s-host {
  top: calc(clamp(60px, 10.6vmin, 84px) + 8px);
  bottom: auto;
  max-height: calc(100% - clamp(60px, 10.6vmin, 84px) - 20px);
}

.s-takeover {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 800;
}

/* 14. Session overlays */
.s-session__view {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
}

.s-session__view > * {
  flex: 1 1 0;
  min-height: 0;
}

.s-session__plain {
  padding: var(--sp-4);
}

.s-session__link {
  position: absolute;
  top: 10px;
  right: 0;
  left: 0;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 0.7em;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
  padding: 0.5em 1.1em;
  border: 2px solid var(--warn);
  border-radius: var(--r-pill);
  background: #141414;
  box-shadow: 0 0 26px -8px var(--warn);
  font: 600 var(--fs-label) / 1.2 var(--font-body);
}

.s-session__link .k-dots i {
  background: var(--warn);
}

.s-session.is-offline .s-play__area {
  filter: saturate(0.4) brightness(0.75);
}

/* the focus guard: this window is not getting the keys */
.s-guard {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(0, 0, 0, 0.74);
  cursor: pointer;
}

.s-guard::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 4px dashed var(--lime);
  border-radius: var(--r-5);
  animation: k-beckon 1.4s ease-in-out infinite;
  animation-play-state: var(--k-loop);
  pointer-events: none;
}


.s-guard__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
  font-size: var(--fs-lead);
  font-weight: 600;
  text-align: center;
}

.s-guard__icon {
  display: inline-flex;
  color: var(--lime);
  font-size: clamp(40px, 9vmin, 76px);
  animation: s-nudge 1.1s ease-in-out infinite;
  animation-play-state: var(--k-loop);
}

.s-guard__title {
  color: var(--lime);
  font: 800 var(--fs-hero) / 1 var(--font-head);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

@keyframes s-nudge {
  50% {
    transform: translate(calc(-6px * var(--k-motion)), calc(-6px * var(--k-motion)));
  }
}

/* 15. Small windows: everything still fits at 620 by 540 */
@media (max-width: 760px) {
  .s-brand__word,
  .s-nav__me > .k-clip {
    display: none;
  }

  .s-nav__me {
    padding: 2px;
  }

  .s-hero {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  }

  .s-top__name,
  .s-top__btn .k-btn__label {
    display: none;
  }

  .s-top__btn .k-btn__face {
    padding: 0.2em 0.55em;
  }

  .s-top__game {
    max-width: none;
  }

  /* with the name hidden and no round to show, nothing stands left of the title: no divider */
  .s-top__game:has(.s-top__round:empty) {
    display: none;
  }

  .s-top__game:has(.s-top__round:empty) + .s-top__phase {
    padding-left: 0;
    border-left: 0;
  }

  .s-top__title {
    font-size: 15px;
  }

  .s-top__phase {
    gap: 2px;
  }

  .s-profile__body,
  .s-settings__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .s-rules__body {
    gap: var(--sp-4);
  }

  /* the lobby's strip keeps its words (four faces alone look alike): under the face, small */
  .s-lobby__foot .s-react__btn {
    --btn-h: 50px;
    border-radius: var(--r-3);
    font-size: 12px;
  }

  .s-lobby__foot .s-react__btn .k-btn__face {
    flex-direction: column;
    gap: 0;
    padding: 2px 0.75em 4px;
  }

  .s-lobby__foot .s-react__btn .k-btn__label {
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  /* a host who is only hosting: the crown says it, there is no room for the words */
  .s-who.is-watching .s-who__name::after {
    content: '';
  }
}

@media (max-width: 900px) {
  .s-results__body,
  .s-results--stage .s-results__body {
    grid-template-areas: 'pod side' 'top side';
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .s-results__podium {
    flex: 0 0 auto;
  }

  .s-results__countchip {
    display: none;
  }

  .s-results__count {
    display: inline;
  }

  .s-results__body.is-intro .s-results__podium {
    flex: 1 1 auto;
  }

  /* lower blocks and slimmer rows, so more of the list is in view under the podium */
  .s-results__podium .k-podium__block {
    padding-top: 3px;
  }

  .s-results__podium .k-podium__col--1 .k-podium__block {
    height: 64px;
  }

  .s-results__podium .k-podium__col--2 .k-podium__block {
    height: 46px;
  }

  .s-results__podium .k-podium__col--3 .k-podium__block {
    height: 32px;
  }

  .s-results__podium .k-podium__place {
    font-size: var(--fs-h3);
  }

  .s-results__podium .k-podium__col--1 .k-podium__place {
    font-size: var(--fs-h2);
  }

  .s-results__list .k-list {
    gap: 4px;
  }

  .s-results__list .k-score {
    min-height: 36px;
    padding-block: 0;
  }

  .s-results__list .k-score .k-tag {
    padding-block: 1px;
  }

  .s-results__list .k-score .k-avatar {
    width: 24px;
    height: 24px;
  }

  .s-results__head {
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-3);
  }

  /* the name gets a line to itself; the rest shares the next */
  .s-results__title {
    flex: 1 1 100%;
  }

  .s-results__chips {
    flex: 1 1 auto;
    justify-content: flex-start;
  }
}

@media (max-height: 620px) {
  .s-hero__chips,
  .s-lobby__tag,
  .s-setting--tight .s-setting__sub {
    display: none;
  }

  .s-hero__text {
    padding: var(--sp-4);
  }

  .s-door--both .s-door__lead,
  .s-door--both .s-door__note {
    display: none;
  }

  .s-door--both .s-door__mid {
    padding-bottom: 70px;
  }

  .s-lobby__side.is-host .s-lobby__tips {
    display: none;
  }

  /* one tip at a time */
  .s-lobby__tips .s-tip:not(.is-on) {
    display: none;
  }

  .s-tips__dots {
    display: flex;
  }

  .s-lobby__tips {
    cursor: pointer;
  }

  .s-rules:not(.s-rules--compact) {
    display: grid;
    grid-template-areas: 'head head' 'lines side' 'lines try';
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    gap: var(--sp-3) var(--sp-4);
    padding: var(--sp-4);
  }

  .s-rules:not(.s-rules--compact) .s-rules__body {
    display: contents;
  }

  .s-rules:not(.s-rules--compact) .s-rules__head {
    grid-area: head;
  }

  .s-rules:not(.s-rules--compact) .s-rules__lines {
    grid-area: lines;
    gap: var(--sp-2);
  }

  .s-rules:not(.s-rules--compact) .s-rules__lines li {
    font-size: 15px;
  }

  .s-rules:not(.s-rules--compact) .s-rules__side {
    grid-area: side;
    gap: var(--sp-3);
  }

  .s-rules:not(.s-rules--compact) .s-rules__try {
    align-self: start;
    grid-area: try;
    padding-top: var(--sp-2);
  }

  .s-rules:not(.s-rules--compact) .s-rules__practice {
    min-height: 50px;
  }

  .s-rules:not(.s-rules--compact) .s-rules__meta {
    display: none;
  }

  /* no room above the card: the critters stand in its head, where the chips were */
  .s-rulesscreen__perch {
    top: 8px;
    right: 14px;
    bottom: auto;
    height: 44px;
  }

  /* The tall try-it takes the right-hand side from top to bottom. The rules read down the
     left, and scroll there if they must: the try-it never leaves the window. */
  .s-rulesscreen__card:has(> .s-rules--tall .s-rules__try:not(.k-hide)) {
    margin: 0;
  }

  .s-rules--tall:not(.s-rules--compact):has(.s-rules__try:not(.k-hide)) {
    grid-template-areas: 'head head' 'body try';
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .s-rules--tall:not(.s-rules--compact):has(.s-rules__try:not(.k-hide)) .s-rules__body {
    display: flex;
    flex-direction: column;
    grid-area: body;
    gap: var(--sp-3);
    min-height: 0;
    overflow: auto;
    scrollbar-color: var(--rule) transparent;
    scrollbar-width: thin;
  }

  .s-rules--tall:not(.s-rules--compact):has(.s-rules__try:not(.k-hide)) .s-rules__try {
    align-self: stretch;
    min-height: 0;
    padding: 0 0 0 var(--sp-3);
    border-top: 0;
    border-left: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--rule));
  }

  .s-rules--tall:not(.s-rules--compact) .s-rules__practice {
    flex: 1 1 0;
    min-height: 0;
  }

  .s-rules--tall:not(.s-rules--compact) .s-rules__lines li {
    font-size: 14px;
  }

  /* What a game asks before play stays in view without scrolling: the small print goes and
     the buttons shrink. In the lobby the tips step aside for it. */
  .s-opts__only,
  .s-opts .s-opt__does {
    display: none;
  }

  .s-opts .k-btn {
    --btn-h: 28px;
    font-size: 12px;
  }

  .s-opts .k-btn .k-btn__face {
    padding-inline: 0.65em;
  }

  .s-lobby__side:has(.s-opts) .s-lobby__tips {
    display: none;
  }

  /* ...and the ready check keeps only the lines that still need something done */
  .s-lobby__side:has(.s-opts) .s-check[data-state='ok'] {
    display: none;
  }

  /* beside a tall try-it the keys and the call signs speak for themselves */
  .s-rules--tall:not(.s-rules--compact):has(.s-rules__try:not(.k-hide)) .s-rules__block > .k-label {
    display: none;
  }

  .s-rules__kind {
    display: none;
  }
}
