/* ---------------------------------------------------------------------------
   friends.css — the Friends view: game night.

   The room is the wall's, and so is the rule: the chrome is achromatic, and
   every saturated pixel belongs to a game (its cover, its --g-* colours).
   The one addition is the session's four seat colours (--seat), used only
   where a seat or a player is meant: the table, the steps, the emblem.
--------------------------------------------------------------------------- */

body.has-sheet {
  overflow: hidden;
}

.friends {
  --wide: var(--pad-x);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.friends main {
  flex: 1;
}

/* --- the head ---------------------------------------------------------------- */

.friends-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  padding: 1rem var(--wide);
  --views-bg: rgba(12, 9, 16, 0.6);
  --views-line: var(--hair-bright);
  --views-on-bg: var(--light);
  --views-on-ink: var(--room-deep);
}

.friends-head__brand {
  font-variation-settings: 'wdth' 100, 'wght' 800;
  letter-spacing: 0.01em;
}

.friends-head__brand span {
  color: var(--dust);
  font-variation-settings: 'wdth' 100, 'wght' 500;
}

.friends-head__side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem 0.9rem;
  min-width: 0;
}

/* --- the party: host, join, try ------------------------------------------------ */

.party {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(1.5rem, 1rem + 3vw, 4.5rem);
  padding: clamp(1.5rem, 1rem + 3vw, 4.5rem) var(--wide) clamp(2rem, 1.2rem + 3vw, 4rem);
}

.party__eyebrow {
  color: var(--dust);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-variation-settings: 'wdth' 110, 'wght' 700;
}

.party__title {
  margin: 0.4rem 0 1rem;
  font-size: clamp(2.7rem, 1.1rem + 6vw, 6.6rem);
  line-height: 0.88;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-variation-settings: 'wdth' 112, 'wght' 900;
  text-wrap: balance;
  text-shadow: 0 0 2.5rem rgba(243, 238, 247, 0.16);
}

.party__blurb {
  max-width: 36rem;
  color: var(--dust);
  font-size: var(--step-1);
  line-height: 1.5;
}

.party__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 1.8rem;
}

.party__local {
  margin-top: 1.2rem;
  color: var(--dust);
  font-size: var(--step--1);
}

.party__local a,
.friends-foot a,
.sheet__wall {
  color: var(--light);
  text-decoration: underline;
  text-decoration-color: var(--hair-bright);
  text-underline-offset: 0.2em;
}

.party__local a:hover,
.friends-foot a:hover,
.sheet__wall:hover {
  text-decoration-color: currentColor;
}

/* The big light button: the one thing to do here. */
.party-host {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 4rem;
  padding-block: 0.8rem 0.8rem; padding-inline: 1.05rem 1.4rem;
  border-radius: 1rem;
  background: var(--light);
  color: var(--room-deep);
  text-align: start;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 0.9rem 2.4rem rgba(0, 0, 0, 0.45),
    0 0 3rem rgba(243, 238, 247, 0.12);
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    background-color 0.15s var(--ease);
}

.party-host:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 1.1rem 2.8rem rgba(0, 0, 0, 0.5),
    0 0 3.5rem rgba(243, 238, 247, 0.2);
}

.party-host:active {
  transform: translateY(0);
}

.party-host:focus-visible {
  outline-offset: 4px;
}

.party-host__emblem {
  flex: none;
  padding: 0.35rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--room-deep);
}

.party-host > svg:not(.party-host__emblem) {
  flex: none;
}

.party-host__text {
  display: grid;
  gap: 0.1rem;
}

.party-host__label {
  font-size: var(--step-1);
  line-height: 1.15;
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.party-host__sub {
  font-size: var(--step--1);
  opacity: 0.72;
  font-variation-settings: 'wdth' 100, 'wght' 520;
}

/* Paste a link or a code. */
.join-code {
  display: grid;
  gap: 0.35rem;
  flex: 1 1 18rem;
  max-width: 26rem;
}

.join-code__label {
  color: var(--dust);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-variation-settings: 'wdth' 105, 'wght' 700;
}

.join-code__field {
  display: flex;
  min-height: 3.2rem;
  border-radius: 0.8rem;
  background: var(--riser);
  border: 1px solid var(--hair-bright);
  overflow: hidden;
  transition: border-color 0.15s var(--ease);
}

.join-code__field:focus-within {
  border-color: var(--light);
}

.join-code.is-wrong .join-code__field {
  border-color: #f87171;
}

.join-code input {
  flex: 1;
  min-width: 0;
  padding: 0 0.9rem;
  border: 0;
  background: transparent;
  outline: none;
}

.join-code input::placeholder {
  color: var(--dust-dim);
}

.join-code__go {
  flex: none;
  padding: 0 1.2rem;
  background: var(--riser-lit);
  border-inline-start: 1px solid var(--hair-bright);
  font-variation-settings: 'wdth' 100, 'wght' 760;
  transition: background-color 0.15s var(--ease);
}

.join-code__go:hover {
  background: var(--edge);
}

.join-code__note {
  min-height: 1.3em;
  color: var(--dust-dim);
  font-size: var(--step--1);
}

.join-code.is-wrong .join-code__note {
  color: #fca5a5;
}

/* --- the table before anyone sits down ------------------------------------------ */

.party__table {
  position: relative;
  padding: clamp(1rem, 0.7rem + 1vw, 1.6rem);
  border-radius: 1.4rem;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(243, 238, 247, 0.07), transparent 70%),
    var(--riser);
  border: 1px solid var(--hair);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.45);
}

.table-seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.table-seat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.8rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 1rem;
  background: color-mix(in oklab, var(--seat) 9%, var(--room));
  border: 1px solid color-mix(in oklab, var(--seat) 34%, transparent);
}

.table-seat__puck {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--seat);
  color: var(--room-deep);
  font-variation-settings: 'wdth' 100, 'wght' 860;
  box-shadow: 0 0 1.4rem color-mix(in oklab, var(--seat) 45%, transparent);
}

.table-seat__name {
  font-variation-settings: 'wdth' 100, 'wght' 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-seat__tag {
  color: var(--dust);
  font-size: var(--step--1);
}

.table-seat.is-open {
  background: transparent;
  border-style: dashed;
  border-color: var(--hair-bright);
}

.table-seat.is-open .table-seat__puck {
  background: transparent;
  color: var(--dust);
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--seat) 70%, transparent);
  animation: seat-wait 2.4s var(--ease) infinite;
}

.table-seat.is-open .table-seat__name {
  color: var(--dust);
}

@keyframes seat-wait {
  0%,
  100% {
    box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--seat) 70%, transparent), 0 0 0 0 color-mix(in oklab, var(--seat) 40%, transparent);
  }
  50% {
    box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--seat) 70%, transparent), 0 0 0 0.5rem transparent;
  }
}

.table-note {
  margin-top: 0.9rem;
  color: var(--dust);
  font-size: var(--step--1);
  text-align: center;
}

/* --- sections ---------------------------------------------------------------- */

.spot,
.steps,
.together,
.formats {
  padding: 0 var(--wide);
  margin-bottom: clamp(2.5rem, 1.6rem + 3vw, 5rem);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1.5rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--hair);
}

.section-head__title {
  font-size: var(--step-2);
  line-height: 1.1;
  font-variation-settings: 'wdth' 106, 'wght' 820;
}

.section-head__note {
  color: var(--dust);
  font-size: var(--step--1);
}

/* --- the picks ----------------------------------------------------------------- */

.spot__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tile-gap);
}

/* --- how it goes ---------------------------------------------------------------- */

.steps__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tile-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: 0.25rem;
  padding: 1.2rem;
  border-radius: 1rem;
  background: var(--riser);
  border: 1px solid var(--hair);
}

.step__n {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--seat);
  color: var(--room-deep);
  font-variation-settings: 'wdth' 100, 'wght' 860;
}

.step__title {
  margin: 0;
  font-size: var(--step-1);
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.step__text {
  color: var(--dust);
  font-size: var(--step--1);
  line-height: 1.5;
}

/* --- the toolbar ------------------------------------------------------------------ */

.together {
  scroll-margin-top: 1rem;
}

.together:focus {
  outline: none;
}

.together__bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem 1.2rem;
  margin: 0 calc(-1 * var(--wide)) 1.2rem;
  padding: 0.8rem var(--wide);
  background: rgba(12, 9, 16, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--hair);
}

.together__search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 16rem;
  max-width: 24rem;
  min-height: 2.6rem;
  padding: 0 0.85rem;
  border-radius: 0.7rem;
  background: var(--riser);
  border: 1px solid var(--hair-bright);
  color: var(--dust);
}

.together__search:focus-within {
  border-color: var(--light);
  color: var(--light);
}

.together__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--light);
}

.together__search input::placeholder {
  color: var(--dust-dim);
}

.together__choices {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem 1.1rem;
  min-width: 0;
}

.seg {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.seg__label {
  color: var(--dust-dim);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-variation-settings: 'wdth' 105, 'wght' 700;
}

.seg__options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 0.7rem;
  background: var(--riser);
  border: 1px solid var(--hair);
}

.seg__option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0 0.7rem;
  border-radius: 0.5rem;
  color: var(--dust);
  font-size: var(--step--1);
  font-variation-settings: 'wdth' 100, 'wght' 620;
  white-space: nowrap;
  transition:
    color 0.15s var(--ease),
    background-color 0.15s var(--ease);
}

.seg__option:hover:not(:disabled) {
  color: var(--light);
  background: var(--riser-lit);
}

.seg__option[aria-checked='true'] {
  background: var(--light);
  color: var(--room-deep);
}

.seg__option:disabled {
  opacity: 0.35;
  cursor: default;
}

.seg__count {
  font-size: var(--step--2);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.together__reset,
.together__more,
.trow__all,
.link {
  color: var(--light);
  text-decoration: underline;
  text-decoration-color: var(--hair-bright);
  text-underline-offset: 0.2em;
}

.together__reset {
  align-self: center;
  font-size: var(--step--1);
}

.together__reset:hover,
.trow__all:hover,
.link:hover {
  text-decoration-color: currentColor;
}

.together__notice {
  margin: -0.4rem 0 1.2rem;
  padding: 0.65rem 0.9rem;
  border-inline-start: 3px solid var(--dust-dim);
  background: var(--riser);
  color: var(--dust);
  font-size: var(--step--1);
}

.together__way {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  color: var(--dust);
}

.together__way strong {
  color: var(--light);
  font-variation-settings: 'wdth' 100, 'wght' 760;
}

.together__empty {
  padding: 2rem 0;
  color: var(--dust);
}

.together__more {
  display: block;
  margin: 1.6rem auto 0;
  padding: 0.7rem 1.2rem;
  border-radius: 0.7rem;
  background: var(--riser);
  border: 1px solid var(--hair-bright);
  text-decoration: none;
}

.together__more:hover {
  background: var(--riser-lit);
}

/* --- rows of games, by the way they play ----------------------------------------------- */

.trow + .trow {
  margin-top: clamp(1.8rem, 1.2rem + 2vw, 3rem);
}

.trow__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.2rem 1rem;
  margin-bottom: 0.8rem;
}

.trow__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: var(--step-1);
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.trow__blurb {
  grid-column: 1;
  color: var(--dust);
  font-size: var(--step--1);
}

.trow__blurb strong {
  color: var(--light);
  font-variation-settings: 'wdth' 100, 'wght' 700;
}

.trow__all {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--step--1);
  white-space: nowrap;
}

.trow__strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(14.5rem, 11rem + 9vw, 19rem);
  gap: var(--tile-gap);
  margin: 0 calc(-1 * var(--wide));
  padding: 0.8rem var(--wide) 1.1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--wide);
  scrollbar-width: thin;
  scrollbar-color: var(--edge) transparent;
}

.trow__strip > * {
  scroll-snap-align: start;
}

.trow__more {
  display: grid;
  place-content: center;
  gap: 0.2rem;
  border-radius: 0.9rem;
  border: 1px dashed var(--hair-bright);
  color: var(--dust);
  font-size: var(--step--1);
  text-align: center;
  transition:
    color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.trow__more span:first-child {
  color: var(--light);
  font-size: var(--step-2);
  font-variation-settings: 'wdth' 100, 'wght' 800;
}

.trow__more:hover {
  color: var(--light);
  border-color: var(--light);
}

.tgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--tile-gap);
}

/* --- a game, as a card ---------------------------------------------------------------- */

.tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 0.9rem;
  background: var(--riser);
  border: 1px solid var(--hair);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.tcard:hover,
.tcard:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--g-light) 70%, transparent);
  box-shadow:
    0 1rem 2.2rem rgba(0, 0, 0, 0.45),
    0 0 2rem color-mix(in oklab, var(--g-glow) 45%, transparent);
}

.tcard:focus-visible {
  outline-offset: 2px;
}

/* With a controller (ui/padnav.js), as on a TV's home screen: the card in
   focus lifts and grows over its row, ringed in its own game's colour, and
   the party's button grows when the pad begins on it. */
html.is-pad .tcard:focus {
  z-index: 1;
  transform: translateY(-4px) scale(1.045);
  outline: 3px solid var(--g-light);
  outline-offset: 3px;
}
html.is-pad .party-host:focus {
  transform: scale(1.04);
}

.tcard__shot,
.sheet__shot {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(80% 90% at 30% 20%, color-mix(in oklab, var(--g-glow) 55%, transparent), transparent 70%),
    var(--g-deep);
  overflow: hidden;
}

.tcard__shot img,
.sheet__shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tcard__shot__fallback,
.sheet__shot__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--g-light);
  font-size: 2.4rem;
  font-variation-settings: 'wdth' 120, 'wght' 900;
  letter-spacing: 0.04em;
}

.tcard__way {
  position: absolute;
  top: 0.6rem;
  inset-inline-start: 0.6rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 2rem;
  background: rgba(12, 9, 16, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(243, 238, 247, 0.14);
  font-size: var(--step--2);
  font-variation-settings: 'wdth' 100, 'wght' 700;
  letter-spacing: 0.02em;
}

.tcard__body {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem 0.95rem;
  flex: 1;
}

.tcard__name {
  font-size: var(--step-1);
  line-height: 1.2;
  font-variation-settings: 'wdth' 100, 'wght' 760;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tcard__meta {
  color: var(--dust);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

.tcard__goal {
  margin-top: 0.2rem;
  color: color-mix(in oklab, var(--light) 78%, transparent);
  font-size: var(--step--1);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tcard__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.tcard__badges:empty {
  display: none;
}

.badge {
  padding: 0.1rem 0.45rem;
  border-radius: 0.3rem;
  border: 1px solid var(--hair-bright);
  color: var(--dust);
  font-size: var(--step--2);
  font-variation-settings: 'wdth' 100, 'wght' 650;
}

.badge--warn {
  border-color: rgba(252, 165, 165, 0.45);
  color: #fca5a5;
}

.tcard--big .tcard__shot {
  aspect-ratio: 16 / 9;
}

.tcard--big .tcard__name {
  font-size: var(--step-2);
  font-variation-settings: 'wdth' 104, 'wght' 820;
}

.way-glyph {
  flex: none;
}

/* --- ways to win ---------------------------------------------------------------- */

.formats__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--tile-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.format-card {
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--hair);
  background: linear-gradient(180deg, var(--riser), transparent);
}

.format-card__name {
  margin: 0 0 0.3rem;
  font-size: var(--step-1);
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.format-card__blurb {
  color: var(--dust);
  font-size: var(--step--1);
}

.friends-foot {
  padding: 1.5rem var(--wide) 2.5rem;
  border-top: 1px solid var(--hair);
  color: var(--dust-dim);
  font-size: var(--step--1);
}

/* --- a game's page ------------------------------------------------------------------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 1rem;
}

.sheet[hidden] {
  display: none;
}

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 9, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: default;
  animation: sheet-fade 0.2s var(--ease);
}

.sheet__panel {
  position: relative;
  width: min(100%, 46rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 1.3rem;
  background:
    radial-gradient(90% 40% at 50% 0%, color-mix(in oklab, var(--g-glow) 24%, transparent), transparent 70%),
    var(--room);
  border: 1px solid var(--hair-bright);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.6);
  animation: sheet-in 0.26s var(--ease);
}

.sheet__shot {
  aspect-ratio: 16 / 8;
}

.sheet__shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--room) 100%);
}

.sheet__close {
  position: absolute;
  top: 0.8rem;
  inset-inline-end: 0.8rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(12, 9, 16, 0.72);
  border: 1px solid var(--hair-bright);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sheet__close svg {
  width: 18px;
  height: 18px;
}

.sheet__close:hover {
  background: var(--riser-lit);
}

.sheet__body {
  position: relative;
  display: grid;
  gap: 0.7rem;
  padding: 0 clamp(1.1rem, 0.6rem + 2vw, 2rem) clamp(1.3rem, 0.8rem + 2vw, 2rem);
  margin-top: -1.6rem;
}

.sheet__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--g-light);
  font-size: var(--step--1);
  font-variation-settings: 'wdth' 104, 'wght' 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sheet__name {
  font-size: clamp(1.9rem, 1.1rem + 3vw, 3rem);
  line-height: 1;
  font-variation-settings: 'wdth' 100, 'wght' 860;
  text-wrap: balance;
}

.sheet__tagline {
  color: var(--dust);
  font-size: var(--step-1);
  margin-top: -0.2rem;
}

.sheet__way {
  color: var(--dust);
}

.sheet__way strong {
  color: var(--light);
  font-variation-settings: 'wdth' 100, 'wght' 760;
}

.sheet__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: 0.4rem 0 0.1rem;
}

.sheet__action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.1rem;
  border-radius: 0.8rem;
  background: var(--riser);
  border: 1px solid var(--hair-bright);
  font-variation-settings: 'wdth' 100, 'wght' 700;
  transition: background-color 0.15s var(--ease);
}

.sheet__action:hover {
  background: var(--riser-lit);
}

.sheet__hint {
  color: var(--dust-dim);
  font-size: var(--step--1);
}

.sheet__facts {
  display: grid;
  gap: 0;
  margin: 0.4rem 0 0;
  border-top: 1px solid var(--hair);
}

.sheet__fact {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--hair);
}

.sheet__fact dt {
  color: var(--dust);
  font-size: var(--step--1);
  padding-top: 0.1rem;
}

.sheet__fact dd {
  margin: 0;
}

.sheet__blurb {
  color: var(--dust);
  line-height: 1.6;
}

.sheet__wall {
  justify-self: start;
  font-size: var(--step--1);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.985);
  }
}

@keyframes sheet-fade {
  from {
    opacity: 0;
  }
}

/* --- smaller screens --------------------------------------------------------------- */

@media (max-width: 60rem) {
  .party {
    grid-template-columns: minmax(0, 1fr);
  }

  .party__table {
    max-width: 34rem;
  }

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

  .spot__row > :nth-child(n + 5) {
    display: none;
  }

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

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

@media (max-width: 40rem) {
  .friends-head {
    padding-block: 0.8rem;
  }

  /* The theme button beside it already says Friends: the head keeps to one line in any font. */
  .friends-head__brand span {
    display: none;
  }

  .party__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .party-host {
    justify-content: flex-start;
  }

  .join-code {
    max-width: none;
    flex-basis: auto;
  }

  .spot__row {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 82%;
    margin: 0 calc(-1 * var(--wide));
    padding: 0.3rem var(--wide) 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--wide);
  }

  .spot__row > * {
    scroll-snap-align: start;
  }

  .spot__row > :nth-child(n + 5) {
    display: flex;
  }

  .together__bar {
    position: static;
  }

  .together__search {
    max-width: none;
    flex-basis: 100%;
  }

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

  .trow__all {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

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

  .sheet {
    padding: 0;
    place-items: end stretch;
  }

  .sheet__panel {
    width: 100%;
    max-height: 92dvh;
    border-radius: 1.3rem 1.3rem 0 0;
    border-bottom: 0;
  }

  .sheet__fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }

  .sheet__actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 22rem) {
  .table-seats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A phone on its side: the party's buttons in the first screen, not just its title. */
@media (max-height: 30rem) and (orientation: landscape) {
  .party {
    padding-block: 1rem 1.5rem;
  }

  .party__title {
    font-size: clamp(2rem, 1rem + 4vw, 3.2rem);
    margin-bottom: 0.6rem;
  }

  .party__blurb {
    font-size: var(--step-0);
  }

  .party__actions {
    margin-top: 1rem;
  }
}

/* --- room kept for what the page's script fills in -------------------------------
   The header's buttons, Host and the invite, the table and the steps arrive a
   moment after the first paint; until then each keeps the room it will take
   (measured on 2026-11-14), so the page does not jump when they land. Once
   filled, :empty no longer matches and each takes its own size. */

.friends-head__side:empty {
  min-height: 2.25rem;
}

.party__actions:empty {
  min-height: 6.4rem;
}

.party__local:empty {
  min-height: 1.25rem;
}

.party__table:empty {
  min-height: 15.6rem;
}

.steps__list:empty {
  min-height: 7rem;
}

@media (max-width: 60rem) {
  .party__table:empty {
    min-height: 14.6rem;
  }

  .steps__list:empty {
    min-height: 20.3rem;
  }
}

@media (max-width: 40rem) {
  .party__actions:empty {
    min-height: 11.25rem;
  }

  .party__local:empty {
    min-height: 2.3rem;
  }

  .party__table:empty {
    min-height: 14.1rem;
  }

  .steps__list:empty {
    min-height: 22.7rem;
  }
}

/* Made for game night before the library is in: cards of the same shape, so
   nothing below them moves when the picks land (friends/index.html). */
.tcard--waiting {
  pointer-events: none;
}

.tcard--waiting .tcard__shot {
  background: color-mix(in oklab, var(--light) 5%, transparent);
}

